diff options
author | nobody <> | 2006-07-25 08:39:58 +0000 |
---|---|---|
committer | nobody <> | 2006-07-25 08:39:58 +0000 |
commit | 6a79f78d93deacb72d33c5b4609ddd2ed3f8b18e (patch) | |
tree | a5dbf4af3a220e2a22012a1f7d6e867b49cb631b /sim/common | |
parent | 1d89b61077f10ff90ba128dde09b559e9de93cb4 (diff) | |
download | gdb-cr-0x5f1.zip gdb-cr-0x5f1.tar.gz gdb-cr-0x5f1.tar.bz2 |
This commit was manufactured by cvs2svn to create branch 'cr-0x5f1'.cr-0x5f1
Sprout from master 2006-07-25 08:39:57 UTC Paolo Bonzini <bonzini@gnu.org> 'Sync from GCC'
Cherrypick from cygnus 2000-02-22 15:59:20 UTC Ian Lance Taylor <ian@airs.com> 'import libiberty from egcs':
README
config/mh-armpic
config/mh-elfalphapic
config/mh-m68kpic
config/mh-papic
config/mh-ppcpic
config/mh-x86pic
config/mt-d30v
config/mt-netware
config/mt-ospace
etc/add-log.el
etc/add-log.vi
etc/configbuild.ein
etc/configbuild.fig
etc/configbuild.jin
etc/configbuild.tin
etc/configdev.ein
etc/configdev.fig
etc/configdev.jin
etc/configdev.tin
include/aout/hppa.h
include/coff/sym.h
include/fopen-bin.h
include/fopen-same.h
include/fopen-vms.h
include/opcode/tahoe.h
libiberty/config.h-vms
libiberty/config/mh-aix
libiberty/config/mh-cxux7
libiberty/config/mh-fbsd21
libiberty/config/mh-windows
libiberty/makefile.vms
libiberty/msdos.c
libiberty/vmsbuild.com
makefile.vms
Delete:
bfd/COPYING
bfd/ChangeLog
bfd/ChangeLog-0001
bfd/ChangeLog-0203
bfd/ChangeLog-2004
bfd/ChangeLog-2005
bfd/ChangeLog-9193
bfd/ChangeLog-9495
bfd/ChangeLog-9697
bfd/ChangeLog-9899
bfd/MAINTAINERS
bfd/Makefile.am
bfd/Makefile.in
bfd/PORTING
bfd/README
bfd/TODO
bfd/acinclude.m4
bfd/aclocal.m4
bfd/aix386-core.c
bfd/aix5ppc-core.c
bfd/aout-adobe.c
bfd/aout-arm.c
bfd/aout-cris.c
bfd/aout-ns32k.c
bfd/aout-sparcle.c
bfd/aout-target.h
bfd/aout-tic30.c
bfd/aout0.c
bfd/aout32.c
bfd/aout64.c
bfd/aoutf1.h
bfd/aoutx.h
bfd/archive.c
bfd/archive64.c
bfd/archures.c
bfd/armnetbsd.c
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/bfd.m4
bfd/bfdio.c
bfd/bfdwin.c
bfd/binary.c
bfd/bout.c
bfd/cache.c
bfd/cf-i386lynx.c
bfd/cf-sparclynx.c
bfd/cisco-core.c
bfd/coff-alpha.c
bfd/coff-apollo.c
bfd/coff-arm.c
bfd/coff-aux.c
bfd/coff-go32.c
bfd/coff-h8300.c
bfd/coff-h8500.c
bfd/coff-i386.c
bfd/coff-i860.c
bfd/coff-i960.c
bfd/coff-ia64.c
bfd/coff-m68k.c
bfd/coff-m88k.c
bfd/coff-maxq.c
bfd/coff-mcore.c
bfd/coff-mips.c
bfd/coff-or32.c
bfd/coff-pmac.c
bfd/coff-ppc.c
bfd/coff-rs6000.c
bfd/coff-sh.c
bfd/coff-sparc.c
bfd/coff-stgo32.c
bfd/coff-svm68k.c
bfd/coff-tic30.c
bfd/coff-tic4x.c
bfd/coff-tic54x.c
bfd/coff-tic80.c
bfd/coff-u68k.c
bfd/coff-w65.c
bfd/coff-we32k.c
bfd/coff-z80.c
bfd/coff-z8k.c
bfd/coff64-rs6000.c
bfd/coffcode.h
bfd/coffgen.c
bfd/cofflink.c
bfd/coffswap.h
bfd/config.bfd
bfd/config.in
bfd/configure
bfd/configure.com
bfd/configure.host
bfd/configure.in
bfd/corefile.c
bfd/cpu-alpha.c
bfd/cpu-arc.c
bfd/cpu-arm.c
bfd/cpu-avr.c
bfd/cpu-bfin.c
bfd/cpu-cr16c.c
bfd/cpu-cris.c
bfd/cpu-crx.c
bfd/cpu-d10v.c
bfd/cpu-d30v.c
bfd/cpu-dlx.c
bfd/cpu-fr30.c
bfd/cpu-frv.c
bfd/cpu-h8300.c
bfd/cpu-h8500.c
bfd/cpu-hppa.c
bfd/cpu-i370.c
bfd/cpu-i386.c
bfd/cpu-i860.c
bfd/cpu-i960.c
bfd/cpu-ia64-opc.c
bfd/cpu-ia64.c
bfd/cpu-ip2k.c
bfd/cpu-iq2000.c
bfd/cpu-m10200.c
bfd/cpu-m10300.c
bfd/cpu-m32c.c
bfd/cpu-m32r.c
bfd/cpu-m68hc11.c
bfd/cpu-m68hc12.c
bfd/cpu-m68k.c
bfd/cpu-m88k.c
bfd/cpu-maxq.c
bfd/cpu-mcore.c
bfd/cpu-mips.c
bfd/cpu-mmix.c
bfd/cpu-msp430.c
bfd/cpu-mt.c
bfd/cpu-ns32k.c
bfd/cpu-openrisc.c
bfd/cpu-or32.c
bfd/cpu-pdp11.c
bfd/cpu-pj.c
bfd/cpu-powerpc.c
bfd/cpu-rs6000.c
bfd/cpu-s390.c
bfd/cpu-sh.c
bfd/cpu-sparc.c
bfd/cpu-tic30.c
bfd/cpu-tic4x.c
bfd/cpu-tic54x.c
bfd/cpu-tic80.c
bfd/cpu-v850.c
bfd/cpu-vax.c
bfd/cpu-w65.c
bfd/cpu-we32k.c
bfd/cpu-xc16x.c
bfd/cpu-xstormy16.c
bfd/cpu-xtensa.c
bfd/cpu-z80.c
bfd/cpu-z8k.c
bfd/demo64.c
bfd/dep-in.sed
bfd/doc/ChangeLog
bfd/doc/ChangeLog-9103
bfd/doc/Makefile.am
bfd/doc/Makefile.in
bfd/doc/bfd.texinfo
bfd/doc/bfdint.texi
bfd/doc/bfdsumm.texi
bfd/doc/chew.c
bfd/doc/doc.str
bfd/doc/fdl.texi
bfd/doc/header.sed
bfd/doc/makefile.vms
bfd/doc/proto.str
bfd/dwarf1.c
bfd/dwarf2.c
bfd/ecoff.c
bfd/ecofflink.c
bfd/ecoffswap.h
bfd/efi-app-ia32.c
bfd/efi-app-ia64.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-vxworks.c
bfd/elf-vxworks.h
bfd/elf.c
bfd/elf32-am33lin.c
bfd/elf32-arc.c
bfd/elf32-arm.c
bfd/elf32-avr.c
bfd/elf32-avr.h
bfd/elf32-bfin.c
bfd/elf32-cr16c.c
bfd/elf32-cris.c
bfd/elf32-crx.c
bfd/elf32-d10v.c
bfd/elf32-d30v.c
bfd/elf32-dlx.c
bfd/elf32-fr30.c
bfd/elf32-frv.c
bfd/elf32-gen.c
bfd/elf32-h8300.c
bfd/elf32-hppa.c
bfd/elf32-hppa.h
bfd/elf32-i370.c
bfd/elf32-i386.c
bfd/elf32-i860.c
bfd/elf32-i960.c
bfd/elf32-ip2k.c
bfd/elf32-iq2000.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68hc11.c
bfd/elf32-m68hc12.c
bfd/elf32-m68hc1x.c
bfd/elf32-m68hc1x.h
bfd/elf32-m68k.c
bfd/elf32-m88k.c
bfd/elf32-mcore.c
bfd/elf32-mips.c
bfd/elf32-msp430.c
bfd/elf32-mt.c
bfd/elf32-openrisc.c
bfd/elf32-or32.c
bfd/elf32-pj.c
bfd/elf32-ppc.c
bfd/elf32-ppc.h
bfd/elf32-s390.c
bfd/elf32-sh-symbian.c
bfd/elf32-sh.c
bfd/elf32-sh64-com.c
bfd/elf32-sh64.c
bfd/elf32-sh64.h
bfd/elf32-sparc.c
bfd/elf32-v850.c
bfd/elf32-vax.c
bfd/elf32-xc16x.c
bfd/elf32-xstormy16.c
bfd/elf32-xtensa.c
bfd/elf32.c
bfd/elf64-alpha.c
bfd/elf64-gen.c
bfd/elf64-hppa.c
bfd/elf64-hppa.h
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/elf64.c
bfd/elfcode.h
bfd/elfcore.h
bfd/elflink.c
bfd/elfn32-mips.c
bfd/elfxx-ia64.c
bfd/elfxx-mips.c
bfd/elfxx-mips.h
bfd/elfxx-sparc.c
bfd/elfxx-sparc.h
bfd/elfxx-target.h
bfd/epoc-pe-arm.c
bfd/epoc-pei-arm.c
bfd/format.c
bfd/freebsd.h
bfd/gen-aout.c
bfd/genlink.h
bfd/go32stub.h
bfd/hash.c
bfd/host-aout.c
bfd/hosts/alphalinux.h
bfd/hosts/alphavms.h
bfd/hosts/decstation.h
bfd/hosts/delta68.h
bfd/hosts/dpx2.h
bfd/hosts/hp300bsd.h
bfd/hosts/i386bsd.h
bfd/hosts/i386linux.h
bfd/hosts/i386mach3.h
bfd/hosts/i386sco.h
bfd/hosts/i860mach3.h
bfd/hosts/m68kaux.h
bfd/hosts/m68klinux.h
bfd/hosts/m88kmach3.h
bfd/hosts/mipsbsd.h
bfd/hosts/mipsmach3.h
bfd/hosts/news-mips.h
bfd/hosts/news.h
bfd/hosts/pc532mach.h
bfd/hosts/riscos.h
bfd/hosts/symmetry.h
bfd/hosts/tahoe.h
bfd/hosts/vaxbsd.h
bfd/hosts/vaxlinux.h
bfd/hosts/vaxult.h
bfd/hosts/vaxult2.h
bfd/hp300bsd.c
bfd/hp300hpux.c
bfd/hppabsd-core.c
bfd/hpux-core.c
bfd/i386aout.c
bfd/i386bsd.c
bfd/i386dynix.c
bfd/i386freebsd.c
bfd/i386linux.c
bfd/i386lynx.c
bfd/i386mach3.c
bfd/i386msdos.c
bfd/i386netbsd.c
bfd/i386os9k.c
bfd/ieee.c
bfd/ihex.c
bfd/init.c
bfd/irix-core.c
bfd/libaout.h
bfd/libbfd-in.h
bfd/libbfd.c
bfd/libbfd.h
bfd/libcoff-in.h
bfd/libcoff.h
bfd/libecoff.h
bfd/libhppa.h
bfd/libieee.h
bfd/libnlm.h
bfd/liboasys.h
bfd/libpei.h
bfd/libxcoff.h
bfd/linker.c
bfd/lynx-core.c
bfd/m68k4knetbsd.c
bfd/m68klinux.c
bfd/m68knetbsd.c
bfd/m88kmach3.c
bfd/m88kopenbsd.c
bfd/mach-o-target.c
bfd/mach-o.c
bfd/mach-o.h
bfd/makefile.vms
bfd/merge.c
bfd/mipsbsd.c
bfd/mmo.c
bfd/netbsd-core.c
bfd/netbsd.h
bfd/newsos3.c
bfd/nlm-target.h
bfd/nlm.c
bfd/nlm32-alpha.c
bfd/nlm32-i386.c
bfd/nlm32-ppc.c
bfd/nlm32-sparc.c
bfd/nlm32.c
bfd/nlm64.c
bfd/nlmcode.h
bfd/nlmswap.h
bfd/ns32k.h
bfd/ns32knetbsd.c
bfd/oasys.c
bfd/opncls.c
bfd/osf-core.c
bfd/pc532-mach.c
bfd/pdp11.c
bfd/pe-arm.c
bfd/pe-i386.c
bfd/pe-mcore.c
bfd/pe-mips.c
bfd/pe-ppc.c
bfd/pe-sh.c
bfd/peXXigen.c
bfd/pef-traceback.h
bfd/pef.c
bfd/pef.h
bfd/pei-arm.c
bfd/pei-i386.c
bfd/pei-mcore.c
bfd/pei-mips.c
bfd/pei-ppc.c
bfd/pei-sh.c
bfd/peicode.h
bfd/po/.cvsignore
bfd/po/BLD-POTFILES.in
bfd/po/Make-in
bfd/po/SRC-POTFILES.in
bfd/po/bfd.pot
bfd/po/da.po
bfd/po/es.po
bfd/po/fr.po
bfd/po/ja.po
bfd/po/ro.po
bfd/po/rw.po
bfd/po/sv.po
bfd/po/tr.po
bfd/po/vi.po
bfd/po/zh_CN.po
bfd/ppcboot.c
bfd/ptrace-core.c
bfd/reloc.c
bfd/reloc16.c
bfd/riscix.c
bfd/rs6000-core.c
bfd/sco5-core.c
bfd/section.c
bfd/simple.c
bfd/som.c
bfd/som.h
bfd/sparclinux.c
bfd/sparclynx.c
bfd/sparcnetbsd.c
bfd/srec.c
bfd/stab-syms.c
bfd/stabs.c
bfd/stamp-h.in
bfd/sunos.c
bfd/syms.c
bfd/sysdep.h
bfd/targets.c
bfd/targmatch.sed
bfd/tekhex.c
bfd/ticoff.h
bfd/trad-core.c
bfd/vax1knetbsd.c
bfd/vaxbsd.c
bfd/vaxnetbsd.c
bfd/versados.c
bfd/version.h
bfd/vms-gsd.c
bfd/vms-hdr.c
bfd/vms-misc.c
bfd/vms-tir.c
bfd/vms.c
bfd/vms.h
bfd/warning.m4
bfd/xcoff-target.h
bfd/xcofflink.c
bfd/xsym.c
bfd/xsym.h
bfd/xtensa-isa.c
bfd/xtensa-modules.c
binutils/BRANCHES
binutils/ChangeLog
binutils/ChangeLog-0001
binutils/ChangeLog-0203
binutils/ChangeLog-2004
binutils/ChangeLog-2005
binutils/ChangeLog-9197
binutils/ChangeLog-9899
binutils/MAINTAINERS
binutils/Makefile.am
binutils/Makefile.in
binutils/NEWS
binutils/README
binutils/acinclude.m4
binutils/aclocal.m4
binutils/addr2line.c
binutils/ar.c
binutils/arlex.l
binutils/arparse.y
binutils/arsup.c
binutils/arsup.h
binutils/binemul.c
binutils/binemul.h
binutils/bucomm.c
binutils/bucomm.h
binutils/budbg.h
binutils/budemang.c
binutils/budemang.h
binutils/coffdump.c
binutils/coffgrok.c
binutils/coffgrok.h
binutils/config.in
binutils/configure
binutils/configure.com
binutils/configure.in
binutils/configure.tgt
binutils/cxxfilt.c
binutils/debug.c
binutils/debug.h
binutils/deflex.l
binutils/defparse.y
binutils/dep-in.sed
binutils/dlltool.c
binutils/dlltool.h
binutils/dllwrap.c
binutils/doc/Makefile.am
binutils/doc/Makefile.in
binutils/doc/binutils.texi
binutils/doc/fdl.texi
binutils/dwarf.c
binutils/dwarf.h
binutils/emul_aix.c
binutils/emul_vanilla.c
binutils/filemode.c
binutils/ieee.c
binutils/is-ranlib.c
binutils/is-strip.c
binutils/makefile.vms-in
binutils/maybe-ranlib.c
binutils/maybe-strip.c
binutils/nlmconv.c
binutils/nlmconv.h
binutils/nlmheader.y
binutils/nm.c
binutils/not-ranlib.c
binutils/not-strip.c
binutils/objcopy.c
binutils/objdump.c
binutils/po/.cvsignore
binutils/po/Make-in
binutils/po/POTFILES.in
binutils/po/binutils.pot
binutils/po/da.po
binutils/po/es.po
binutils/po/fi.po
binutils/po/fr.po
binutils/po/ja.po
binutils/po/ro.po
binutils/po/ru.po
binutils/po/rw.po
binutils/po/sv.po
binutils/po/tr.po
binutils/po/vi.po
binutils/po/zh_CN.po
binutils/po/zh_TW.po
binutils/prdbg.c
binutils/ranlib.sh
binutils/rclex.l
binutils/rcparse.y
binutils/rdcoff.c
binutils/rddbg.c
binutils/readelf.c
binutils/rename.c
binutils/resbin.c
binutils/rescoff.c
binutils/resrc.c
binutils/resres.c
binutils/sanity.sh
binutils/size.c
binutils/srconv.c
binutils/stabs.c
binutils/stamp-h.in
binutils/strings.c
binutils/sysdump.c
binutils/sysinfo.y
binutils/syslex.l
binutils/sysroff.info
binutils/testsuite/ChangeLog
binutils/testsuite/ChangeLog-9303
binutils/testsuite/binutils-all/alias.def
binutils/testsuite/binutils-all/ar.exp
binutils/testsuite/binutils-all/arm/objdump.exp
binutils/testsuite/binutils-all/arm/thumb2-cond.s
binutils/testsuite/binutils-all/bintest.s
binutils/testsuite/binutils-all/copy-1.d
binutils/testsuite/binutils-all/copy-1.s
binutils/testsuite/binutils-all/copy-2.d
binutils/testsuite/binutils-all/copy-3.d
binutils/testsuite/binutils-all/copytest.s
binutils/testsuite/binutils-all/dlltool.exp
binutils/testsuite/binutils-all/fastcall.def
binutils/testsuite/binutils-all/group.s
binutils/testsuite/binutils-all/hppa/addendbug.s
binutils/testsuite/binutils-all/hppa/freg.s
binutils/testsuite/binutils-all/hppa/objdump.exp
binutils/testsuite/binutils-all/link-order.s
binutils/testsuite/binutils-all/localize-hidden-1.d
binutils/testsuite/binutils-all/localize-hidden-1.s
binutils/testsuite/binutils-all/localize-hidden-2.d
binutils/testsuite/binutils-all/localize-hidden-2.s
binutils/testsuite/binutils-all/m68k/movem.s
binutils/testsuite/binutils-all/m68k/objdump.exp
binutils/testsuite/binutils-all/nm.exp
binutils/testsuite/binutils-all/objcopy.exp
binutils/testsuite/binutils-all/objdump.exp
binutils/testsuite/binutils-all/readelf.exp
binutils/testsuite/binutils-all/readelf.h
binutils/testsuite/binutils-all/readelf.r
binutils/testsuite/binutils-all/readelf.r-64
binutils/testsuite/binutils-all/readelf.s
binutils/testsuite/binutils-all/readelf.s-64
binutils/testsuite/binutils-all/readelf.ss
binutils/testsuite/binutils-all/readelf.ss-64
binutils/testsuite/binutils-all/readelf.ss-mips
binutils/testsuite/binutils-all/readelf.ss-tmips
binutils/testsuite/binutils-all/size.exp
binutils/testsuite/binutils-all/testprog.c
binutils/testsuite/binutils-all/unknown.s
binutils/testsuite/binutils-all/vax/entrymask.s
binutils/testsuite/binutils-all/vax/objdump.exp
binutils/testsuite/binutils-all/windres/README
binutils/testsuite/binutils-all/windres/bmp1.bmp
binutils/testsuite/binutils-all/windres/bmpalign.rc
binutils/testsuite/binutils-all/windres/bmpalign.rsd
binutils/testsuite/binutils-all/windres/capstyle.rc
binutils/testsuite/binutils-all/windres/capstyle.rsd
binutils/testsuite/binutils-all/windres/checkbox.rc
binutils/testsuite/binutils-all/windres/checkbox.rsd
binutils/testsuite/binutils-all/windres/combobox.rc
binutils/testsuite/binutils-all/windres/combobox.rsd
binutils/testsuite/binutils-all/windres/deflang.rc
binutils/testsuite/binutils-all/windres/deflang.rsd
binutils/testsuite/binutils-all/windres/dialog0.rc
binutils/testsuite/binutils-all/windres/dialog0.rsd
binutils/testsuite/binutils-all/windres/dialog1.rc
binutils/testsuite/binutils-all/windres/dialog1.rsd
binutils/testsuite/binutils-all/windres/dialogid.rc
binutils/testsuite/binutils-all/windres/dialogid.rsd
binutils/testsuite/binutils-all/windres/dialogsignature.rc
binutils/testsuite/binutils-all/windres/dialogsignature.rsd
binutils/testsuite/binutils-all/windres/dlgfont.rc
binutils/testsuite/binutils-all/windres/dlgfont.rsd
binutils/testsuite/binutils-all/windres/edittext.rc
binutils/testsuite/binutils-all/windres/edittext.rsd
binutils/testsuite/binutils-all/windres/escapea.rc
binutils/testsuite/binutils-all/windres/escapea.rsd
binutils/testsuite/binutils-all/windres/escapex-2.rc
binutils/testsuite/binutils-all/windres/escapex-2.rsd
binutils/testsuite/binutils-all/windres/escapex.rc
binutils/testsuite/binutils-all/windres/escapex.rsd
binutils/testsuite/binutils-all/windres/lang.rc
binutils/testsuite/binutils-all/windres/lang.rsd
binutils/testsuite/binutils-all/windres/listbox.rc
binutils/testsuite/binutils-all/windres/listbox.rsd
binutils/testsuite/binutils-all/windres/msupdate
binutils/testsuite/binutils-all/windres/nocaption.rc
binutils/testsuite/binutils-all/windres/nocaption.rsd
binutils/testsuite/binutils-all/windres/printstyle.rc
binutils/testsuite/binutils-all/windres/printstyle.rsd
binutils/testsuite/binutils-all/windres/quoteclass.rc
binutils/testsuite/binutils-all/windres/scrollbar.rc
binutils/testsuite/binutils-all/windres/scrollbar.rsd
binutils/testsuite/binutils-all/windres/strtab1.rc
binutils/testsuite/binutils-all/windres/strtab1.rsd
binutils/testsuite/binutils-all/windres/sublang.rc
binutils/testsuite/binutils-all/windres/sublang.rsd
binutils/testsuite/binutils-all/windres/windres.exp
binutils/testsuite/config/default.exp
binutils/testsuite/config/hppa.sed
binutils/testsuite/lib/utils-lib.exp
binutils/unwind-ia64.c
binutils/unwind-ia64.h
binutils/version.c
binutils/windres.c
binutils/windres.h
binutils/winduni.c
binutils/winduni.h
binutils/wrstabs.c
compile
config.rpath
cpu/ChangeLog
cpu/cris.cpu
cpu/frv.cpu
cpu/frv.opc
cpu/iq10.cpu
cpu/iq2000.cpu
cpu/iq2000.opc
cpu/iq2000m.cpu
cpu/m32c.cpu
cpu/m32c.opc
cpu/m32r.cpu
cpu/m32r.opc
cpu/mt.cpu
cpu/mt.opc
cpu/sh.cpu
cpu/sh.opc
cpu/sh64-compact.cpu
cpu/sh64-media.cpu
cpu/simplify.inc
cpu/xc16x.cpu
cpu/xc16x.opc
djunpack.bat
gas/CONTRIBUTORS
gas/COPYING
gas/ChangeLog
gas/ChangeLog-0001
gas/ChangeLog-0203
gas/ChangeLog-2004
gas/ChangeLog-2005
gas/ChangeLog-9295
gas/ChangeLog-9697
gas/ChangeLog-9899
gas/MAINTAINERS
gas/Makefile.am
gas/Makefile.in
gas/NEWS
gas/README
gas/acinclude.m4
gas/aclocal.m4
gas/app.c
gas/as.c
gas/as.h
gas/asintl.h
gas/atof-generic.c
gas/bignum.h
gas/bit_fix.h
gas/cgen.c
gas/cgen.h
gas/cond.c
gas/config.in
gas/config/aout_gnu.h
gas/config/atof-ieee.c
gas/config/atof-vax.c
gas/config/bfin-aux.h
gas/config/bfin-defs.h
gas/config/bfin-lex.l
gas/config/bfin-parse.y
gas/config/e-crisaout.c
gas/config/e-criself.c
gas/config/e-i386aout.c
gas/config/e-i386coff.c
gas/config/e-i386elf.c
gas/config/e-mipsecoff.c
gas/config/e-mipself.c
gas/config/itbl-mips.h
gas/config/m68k-parse.h
gas/config/m68k-parse.y
gas/config/obj-aout.c
gas/config/obj-aout.h
gas/config/obj-coff.c
gas/config/obj-coff.h
gas/config/obj-ecoff.c
gas/config/obj-ecoff.h
gas/config/obj-elf.c
gas/config/obj-elf.h
gas/config/obj-evax.c
gas/config/obj-evax.h
gas/config/obj-multi.c
gas/config/obj-multi.h
gas/config/obj-som.c
gas/config/obj-som.h
gas/config/tc-alpha.c
gas/config/tc-alpha.h
gas/config/tc-arc.c
gas/config/tc-arc.h
gas/config/tc-arm.c
gas/config/tc-arm.h
gas/config/tc-avr.c
gas/config/tc-avr.h
gas/config/tc-bfin.c
gas/config/tc-bfin.h
gas/config/tc-cris.c
gas/config/tc-cris.h
gas/config/tc-crx.c
gas/config/tc-crx.h
gas/config/tc-d10v.c
gas/config/tc-d10v.h
gas/config/tc-d30v.c
gas/config/tc-d30v.h
gas/config/tc-dlx.c
gas/config/tc-dlx.h
gas/config/tc-fr30.c
gas/config/tc-fr30.h
gas/config/tc-frv.c
gas/config/tc-frv.h
gas/config/tc-generic.c
gas/config/tc-generic.h
gas/config/tc-h8300.c
gas/config/tc-h8300.h
gas/config/tc-hppa.c
gas/config/tc-hppa.h
gas/config/tc-i370.c
gas/config/tc-i370.h
gas/config/tc-i386.c
gas/config/tc-i386.h
gas/config/tc-i860.c
gas/config/tc-i860.h
gas/config/tc-i960.c
gas/config/tc-i960.h
gas/config/tc-ia64.c
gas/config/tc-ia64.h
gas/config/tc-ip2k.c
gas/config/tc-ip2k.h
gas/config/tc-iq2000.c
gas/config/tc-iq2000.h
gas/config/tc-m32c.c
gas/config/tc-m32c.h
gas/config/tc-m32r.c
gas/config/tc-m32r.h
gas/config/tc-m68851.h
gas/config/tc-m68hc11.c
gas/config/tc-m68hc11.h
gas/config/tc-m68k.c
gas/config/tc-m68k.h
gas/config/tc-maxq.c
gas/config/tc-maxq.h
gas/config/tc-mcore.c
gas/config/tc-mcore.h
gas/config/tc-mips.c
gas/config/tc-mips.h
gas/config/tc-mmix.c
gas/config/tc-mmix.h
gas/config/tc-mn10200.c
gas/config/tc-mn10200.h
gas/config/tc-mn10300.c
gas/config/tc-mn10300.h
gas/config/tc-msp430.c
gas/config/tc-msp430.h
gas/config/tc-mt.c
gas/config/tc-mt.h
gas/config/tc-ns32k.c
gas/config/tc-ns32k.h
gas/config/tc-openrisc.c
gas/config/tc-openrisc.h
gas/config/tc-or32.c
gas/config/tc-or32.h
gas/config/tc-pdp11.c
gas/config/tc-pdp11.h
gas/config/tc-pj.c
gas/config/tc-pj.h
gas/config/tc-ppc.c
gas/config/tc-ppc.h
gas/config/tc-s390.c
gas/config/tc-s390.h
gas/config/tc-sh.c
gas/config/tc-sh.h
gas/config/tc-sh64.c
gas/config/tc-sh64.h
gas/config/tc-sparc.c
gas/config/tc-sparc.h
gas/config/tc-tic30.c
gas/config/tc-tic30.h
gas/config/tc-tic4x.c
gas/config/tc-tic4x.h
gas/config/tc-tic54x.c
gas/config/tc-tic54x.h
gas/config/tc-v850.c
gas/config/tc-v850.h
gas/config/tc-vax.c
gas/config/tc-vax.h
gas/config/tc-xc16x.c
gas/config/tc-xc16x.h
gas/config/tc-xstormy16.c
gas/config/tc-xstormy16.h
gas/config/tc-xtensa.c
gas/config/tc-xtensa.h
gas/config/tc-z80.c
gas/config/tc-z80.h
gas/config/tc-z8k.c
gas/config/tc-z8k.h
gas/config/te-386bsd.h
gas/config/te-aix5.h
gas/config/te-armeabi.h
gas/config/te-armlinuxeabi.h
gas/config/te-dynix.h
gas/config/te-epoc-pe.h
gas/config/te-freebsd.h
gas/config/te-generic.h
gas/config/te-gnu.h
gas/config/te-go32.h
gas/config/te-hppa.h
gas/config/te-hppa64.h
gas/config/te-hppalinux64.h
gas/config/te-hpux.h
gas/config/te-i386aix.h
gas/config/te-ia64aix.h
gas/config/te-interix.h
gas/config/te-irix.h
gas/config/te-linux.h
gas/config/te-lnews.h
gas/config/te-lynx.h
gas/config/te-mach.h
gas/config/te-macos.h
gas/config/te-nbsd.h
gas/config/te-nbsd532.h
gas/config/te-netware.h
gas/config/te-pc532mach.h
gas/config/te-pe.h
gas/config/te-psos.h
gas/config/te-riscix.h
gas/config/te-sparcaout.h
gas/config/te-sun3.h
gas/config/te-svr4.h
gas/config/te-symbian.h
gas/config/te-tmips.h
gas/config/te-vxworks.h
gas/config/te-wince-pe.h
gas/config/vax-inst.h
gas/config/xtensa-istack.h
gas/config/xtensa-relax.c
gas/config/xtensa-relax.h
gas/configure
gas/configure.in
gas/configure.tgt
gas/debug.c
gas/dep-in.sed
gas/depend.c
gas/doc/Makefile.am
gas/doc/Makefile.in
gas/doc/all.texi
gas/doc/as.texinfo
gas/doc/c-alpha.texi
gas/doc/c-arc.texi
gas/doc/c-arm.texi
gas/doc/c-avr.texi
gas/doc/c-bfin.texi
gas/doc/c-cris.texi
gas/doc/c-d10v.texi
gas/doc/c-d30v.texi
gas/doc/c-h8300.texi
gas/doc/c-hppa.texi
gas/doc/c-i370.texi
gas/doc/c-i386.texi
gas/doc/c-i860.texi
gas/doc/c-i960.texi
gas/doc/c-ia64.texi
gas/doc/c-ip2k.texi
gas/doc/c-m32c.texi
gas/doc/c-m32r.texi
gas/doc/c-m68hc11.texi
gas/doc/c-m68k.texi
gas/doc/c-mips.texi
gas/doc/c-mmix.texi
gas/doc/c-msp430.texi
gas/doc/c-mt.texi
gas/doc/c-ns32k.texi
gas/doc/c-pdp11.texi
gas/doc/c-pj.texi
gas/doc/c-ppc.texi
gas/doc/c-sh.texi
gas/doc/c-sh64.texi
gas/doc/c-sparc.texi
gas/doc/c-tic54x.texi
gas/doc/c-v850.texi
gas/doc/c-vax.texi
gas/doc/c-xc16x.texi
gas/doc/c-xtensa.texi
gas/doc/c-z80.texi
gas/doc/c-z8k.texi
gas/doc/fdl.texi
gas/doc/h8.texi
gas/doc/internals.texi
gas/dw2gencfi.c
gas/dw2gencfi.h
gas/dwarf2dbg.c
gas/dwarf2dbg.h
gas/ecoff.c
gas/ecoff.h
gas/ehopt.c
gas/emul-target.h
gas/emul.h
gas/expr.c
gas/expr.h
gas/flonum-copy.c
gas/flonum-konst.c
gas/flonum-mult.c
gas/flonum.h
gas/frags.c
gas/frags.h
gas/gdbinit.in
gas/hash.c
gas/hash.h
gas/input-file.c
gas/input-file.h
gas/input-scrub.c
gas/itbl-lex.h
gas/itbl-lex.l
gas/itbl-ops.c
gas/itbl-ops.h
gas/itbl-parse.y
gas/listing.c
gas/listing.h
gas/literal.c
gas/macro.c
gas/macro.h
gas/messages.c
gas/obj.h
gas/output-file.c
gas/output-file.h
gas/po/.cvsignore
gas/po/Make-in
gas/po/POTFILES.in
gas/po/es.po
gas/po/fr.po
gas/po/gas.pot
gas/po/rw.po
gas/po/tr.po
gas/read.c
gas/read.h
gas/sb.c
gas/sb.h
gas/stabs.c
gas/stamp-h.in
gas/struc-symbol.h
gas/subsegs.c
gas/subsegs.h
gas/symbols.c
gas/symbols.h
gas/tc.h
gas/testsuite/ChangeLog
gas/testsuite/ChangeLog-2004
gas/testsuite/ChangeLog-2005
gas/testsuite/ChangeLog-9303
gas/testsuite/config/default.exp
gas/testsuite/gas/all/align.d
gas/testsuite/gas/all/align.s
gas/testsuite/gas/all/align2.d
gas/testsuite/gas/all/align2.s
gas/testsuite/gas/all/altmac2.d
gas/testsuite/gas/all/altmac2.s
gas/testsuite/gas/all/altmacro.d
gas/testsuite/gas/all/altmacro.s
gas/testsuite/gas/all/assign-bad.s
gas/testsuite/gas/all/assign-ok.s
gas/testsuite/gas/all/assign.d
gas/testsuite/gas/all/assign.s
gas/testsuite/gas/all/cofftag.d
gas/testsuite/gas/all/cofftag.s
gas/testsuite/gas/all/comment.s
gas/testsuite/gas/all/cond.l
gas/testsuite/gas/all/cond.s
gas/testsuite/gas/all/diff1.s
gas/testsuite/gas/all/equ-bad.s
gas/testsuite/gas/all/equ-ok.s
gas/testsuite/gas/all/equiv1.s
gas/testsuite/gas/all/equiv2.s
gas/testsuite/gas/all/eqv-bad.s
gas/testsuite/gas/all/eqv-ok.s
gas/testsuite/gas/all/err-1.s
gas/testsuite/gas/all/eval.d
gas/testsuite/gas/all/eval.s
gas/testsuite/gas/all/excl.s
gas/testsuite/gas/all/fastcall.s
gas/testsuite/gas/all/float.s
gas/testsuite/gas/all/forward.d
gas/testsuite/gas/all/forward.s
gas/testsuite/gas/all/gas.exp
gas/testsuite/gas/all/incbin.d
gas/testsuite/gas/all/incbin.dat
gas/testsuite/gas/all/incbin.s
gas/testsuite/gas/all/itbl
gas/testsuite/gas/all/itbl-test.c
gas/testsuite/gas/all/itbl.s
gas/testsuite/gas/all/p1480.s
gas/testsuite/gas/all/p2425.s
gas/testsuite/gas/all/quad.d
gas/testsuite/gas/all/quad.s
gas/testsuite/gas/all/redef.d
gas/testsuite/gas/all/redef.s
gas/testsuite/gas/all/redef2.d
gas/testsuite/gas/all/redef2.s
gas/testsuite/gas/all/redef3.d
gas/testsuite/gas/all/redef3.s
gas/testsuite/gas/all/redef4.s
gas/testsuite/gas/all/redef5.s
gas/testsuite/gas/all/sleb128.d
gas/testsuite/gas/all/sleb128.s
gas/testsuite/gas/all/struct.d
gas/testsuite/gas/all/struct.s
gas/testsuite/gas/all/test-example.c
gas/testsuite/gas/all/test-gen.c
gas/testsuite/gas/all/warn-1.s
gas/testsuite/gas/all/weakref1.d
gas/testsuite/gas/all/weakref1.s
gas/testsuite/gas/all/weakref1g.d
gas/testsuite/gas/all/weakref1l.d
gas/testsuite/gas/all/weakref1u.d
gas/testsuite/gas/all/weakref1w.d
gas/testsuite/gas/all/weakref2.s
gas/testsuite/gas/all/weakref3.s
gas/testsuite/gas/all/weakref4.s
gas/testsuite/gas/all/x930509.s
gas/testsuite/gas/alpha/alpha.exp
gas/testsuite/gas/alpha/elf-reloc-1.d
gas/testsuite/gas/alpha/elf-reloc-1.s
gas/testsuite/gas/alpha/elf-reloc-2.l
gas/testsuite/gas/alpha/elf-reloc-2.s
gas/testsuite/gas/alpha/elf-reloc-3.l
gas/testsuite/gas/alpha/elf-reloc-3.s
gas/testsuite/gas/alpha/elf-reloc-4.d
gas/testsuite/gas/alpha/elf-reloc-4.s
gas/testsuite/gas/alpha/elf-reloc-5.d
gas/testsuite/gas/alpha/elf-reloc-5.s
gas/testsuite/gas/alpha/elf-reloc-6.l
gas/testsuite/gas/alpha/elf-reloc-6.s
gas/testsuite/gas/alpha/elf-reloc-7.d
gas/testsuite/gas/alpha/elf-reloc-7.s
gas/testsuite/gas/alpha/elf-reloc-8.d
gas/testsuite/gas/alpha/elf-reloc-8.s
gas/testsuite/gas/alpha/elf-tls-1.d
gas/testsuite/gas/alpha/elf-tls-1.s
gas/testsuite/gas/alpha/elf-tls-2.l
gas/testsuite/gas/alpha/elf-tls-2.s
gas/testsuite/gas/alpha/elf-tls-3.l
gas/testsuite/gas/alpha/elf-tls-3.s
gas/testsuite/gas/alpha/elf-usepv-1.d
gas/testsuite/gas/alpha/elf-usepv-1.s
gas/testsuite/gas/alpha/elf-usepv-2.l
gas/testsuite/gas/alpha/elf-usepv-2.s
gas/testsuite/gas/alpha/fp.d
gas/testsuite/gas/alpha/fp.s
gas/testsuite/gas/alpha/unop.d
gas/testsuite/gas/alpha/unop.s
gas/testsuite/gas/arc/adc.d
gas/testsuite/gas/arc/adc.s
gas/testsuite/gas/arc/add.d
gas/testsuite/gas/arc/add.s
gas/testsuite/gas/arc/alias.d
gas/testsuite/gas/arc/alias.s
gas/testsuite/gas/arc/and.d
gas/testsuite/gas/arc/and.s
gas/testsuite/gas/arc/arc.exp
gas/testsuite/gas/arc/asl.d
gas/testsuite/gas/arc/asl.s
gas/testsuite/gas/arc/asr.d
gas/testsuite/gas/arc/asr.s
gas/testsuite/gas/arc/b.d
gas/testsuite/gas/arc/b.s
gas/testsuite/gas/arc/bic.d
gas/testsuite/gas/arc/bic.s
gas/testsuite/gas/arc/bl.d
gas/testsuite/gas/arc/bl.s
gas/testsuite/gas/arc/branch.d
gas/testsuite/gas/arc/branch.s
gas/testsuite/gas/arc/brk.d
gas/testsuite/gas/arc/brk.s
gas/testsuite/gas/arc/extb.d
gas/testsuite/gas/arc/extb.s
gas/testsuite/gas/arc/extensions.d
gas/testsuite/gas/arc/extensions.s
gas/testsuite/gas/arc/extw.d
gas/testsuite/gas/arc/extw.s
gas/testsuite/gas/arc/flag.d
gas/testsuite/gas/arc/flag.s
gas/testsuite/gas/arc/insn3.d
gas/testsuite/gas/arc/insn3.s
gas/testsuite/gas/arc/j.d
gas/testsuite/gas/arc/j.s
gas/testsuite/gas/arc/jl.d
gas/testsuite/gas/arc/jl.s
gas/testsuite/gas/arc/ld.d
gas/testsuite/gas/arc/ld.s
gas/testsuite/gas/arc/ld2.d
gas/testsuite/gas/arc/ld2.s
gas/testsuite/gas/arc/lp.d
gas/testsuite/gas/arc/lp.s
gas/testsuite/gas/arc/lsr.d
gas/testsuite/gas/arc/lsr.s
gas/testsuite/gas/arc/math.d
gas/testsuite/gas/arc/math.s
gas/testsuite/gas/arc/mov.d
gas/testsuite/gas/arc/mov.s
gas/testsuite/gas/arc/nop.d
gas/testsuite/gas/arc/nop.s
gas/testsuite/gas/arc/or.d
gas/testsuite/gas/arc/or.s
gas/testsuite/gas/arc/rlc.d
gas/testsuite/gas/arc/rlc.s
gas/testsuite/gas/arc/ror.d
gas/testsuite/gas/arc/ror.s
gas/testsuite/gas/arc/rrc.d
gas/testsuite/gas/arc/rrc.s
gas/testsuite/gas/arc/sbc.d
gas/testsuite/gas/arc/sbc.s
gas/testsuite/gas/arc/sexb.d
gas/testsuite/gas/arc/sexb.s
gas/testsuite/gas/arc/sexw.d
gas/testsuite/gas/arc/sexw.s
gas/testsuite/gas/arc/sleep.d
gas/testsuite/gas/arc/sleep.s
gas/testsuite/gas/arc/sshift.d
gas/testsuite/gas/arc/sshift.s
gas/testsuite/gas/arc/st.d
gas/testsuite/gas/arc/st.s
gas/testsuite/gas/arc/sub.d
gas/testsuite/gas/arc/sub.s
gas/testsuite/gas/arc/swi.d
gas/testsuite/gas/arc/swi.s
gas/testsuite/gas/arc/warn.exp
gas/testsuite/gas/arc/warn.s
gas/testsuite/gas/arc/xor.d
gas/testsuite/gas/arc/xor.s
gas/testsuite/gas/arm/abs12.d
gas/testsuite/gas/arm/abs12.s
gas/testsuite/gas/arm/adrl.d
gas/testsuite/gas/arm/adrl.s
gas/testsuite/gas/arm/arch4t.d
gas/testsuite/gas/arm/arch4t.s
gas/testsuite/gas/arm/arch5tej.d
gas/testsuite/gas/arm/arch5tej.s
gas/testsuite/gas/arm/arch6zk.d
gas/testsuite/gas/arm/arch6zk.s
gas/testsuite/gas/arm/arch7.d
gas/testsuite/gas/arm/arch7.s
gas/testsuite/gas/arm/arch7m-bad.d
gas/testsuite/gas/arm/arch7m-bad.l
gas/testsuite/gas/arm/arch7m-bad.s
gas/testsuite/gas/arm/archv6.d
gas/testsuite/gas/arm/archv6.s
gas/testsuite/gas/arm/archv6t2-bad.d
gas/testsuite/gas/arm/archv6t2-bad.l
gas/testsuite/gas/arm/archv6t2-bad.s
gas/testsuite/gas/arm/archv6t2.d
gas/testsuite/gas/arm/archv6t2.s
gas/testsuite/gas/arm/arm.exp
gas/testsuite/gas/arm/arm3-bad.d
gas/testsuite/gas/arm/arm3-bad.l
gas/testsuite/gas/arm/arm3-bad.s
gas/testsuite/gas/arm/arm3.d
gas/testsuite/gas/arm/arm3.s
gas/testsuite/gas/arm/arm6.d
gas/testsuite/gas/arm/arm6.s
gas/testsuite/gas/arm/arm7dm.d
gas/testsuite/gas/arm/arm7dm.s
gas/testsuite/gas/arm/arm7t.d
gas/testsuite/gas/arm/arm7t.s
gas/testsuite/gas/arm/armv1-bad.d
gas/testsuite/gas/arm/armv1-bad.l
gas/testsuite/gas/arm/armv1-bad.s
gas/testsuite/gas/arm/armv1.d
gas/testsuite/gas/arm/armv1.l
gas/testsuite/gas/arm/armv1.s
gas/testsuite/gas/arm/bignum1.d
gas/testsuite/gas/arm/bignum1.s
gas/testsuite/gas/arm/blx-local.d
gas/testsuite/gas/arm/blx-local.s
gas/testsuite/gas/arm/copro.d
gas/testsuite/gas/arm/copro.s
gas/testsuite/gas/arm/eabi_attr_1.d
gas/testsuite/gas/arm/eabi_attr_1.s
gas/testsuite/gas/arm/el_segundo.d
gas/testsuite/gas/arm/el_segundo.s
gas/testsuite/gas/arm/float.d
gas/testsuite/gas/arm/float.s
gas/testsuite/gas/arm/fpa-dyadic.d
gas/testsuite/gas/arm/fpa-dyadic.s
gas/testsuite/gas/arm/fpa-mem.d
gas/testsuite/gas/arm/fpa-mem.s
gas/testsuite/gas/arm/fpa-monadic.d
gas/testsuite/gas/arm/fpa-monadic.s
gas/testsuite/gas/arm/group-reloc-alu-encoding-bad.d
gas/testsuite/gas/arm/group-reloc-alu-encoding-bad.l
gas/testsuite/gas/arm/group-reloc-alu-encoding-bad.s
gas/testsuite/gas/arm/group-reloc-alu-parsing-bad.d
gas/testsuite/gas/arm/group-reloc-alu-parsing-bad.l
gas/testsuite/gas/arm/group-reloc-alu-parsing-bad.s
gas/testsuite/gas/arm/group-reloc-alu.d
gas/testsuite/gas/arm/group-reloc-alu.s
gas/testsuite/gas/arm/group-reloc-ldc-encoding-bad.d
gas/testsuite/gas/arm/group-reloc-ldc-encoding-bad.l
gas/testsuite/gas/arm/group-reloc-ldc-encoding-bad.s
gas/testsuite/gas/arm/group-reloc-ldc-parsing-bad.d
gas/testsuite/gas/arm/group-reloc-ldc-parsing-bad.l
gas/testsuite/gas/arm/group-reloc-ldc-parsing-bad.s
gas/testsuite/gas/arm/group-reloc-ldc.d
gas/testsuite/gas/arm/group-reloc-ldc.s
gas/testsuite/gas/arm/group-reloc-ldr-encoding-bad.d
gas/testsuite/gas/arm/group-reloc-ldr-encoding-bad.l
gas/testsuite/gas/arm/group-reloc-ldr-encoding-bad.s
gas/testsuite/gas/arm/group-reloc-ldr-parsing-bad.d
gas/testsuite/gas/arm/group-reloc-ldr-parsing-bad.l
gas/testsuite/gas/arm/group-reloc-ldr-parsing-bad.s
gas/testsuite/gas/arm/group-reloc-ldr.d
gas/testsuite/gas/arm/group-reloc-ldr.s
gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.d
gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.l
gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.s
gas/testsuite/gas/arm/group-reloc-ldrs-parsing-bad.d
gas/testsuite/gas/arm/group-reloc-ldrs-parsing-bad.l
gas/testsuite/gas/arm/group-reloc-ldrs-parsing-bad.s
gas/testsuite/gas/arm/group-reloc-ldrs.d
gas/testsuite/gas/arm/group-reloc-ldrs.s
gas/testsuite/gas/arm/immed.d
gas/testsuite/gas/arm/immed.s
gas/testsuite/gas/arm/inst.d
gas/testsuite/gas/arm/inst.s
gas/testsuite/gas/arm/itblock.s
gas/testsuite/gas/arm/iwmmxt-bad.d
gas/testsuite/gas/arm/iwmmxt-bad.l
gas/testsuite/gas/arm/iwmmxt-bad.s
gas/testsuite/gas/arm/iwmmxt-bad2.d
gas/testsuite/gas/arm/iwmmxt-bad2.l
gas/testsuite/gas/arm/iwmmxt-bad2.s
gas/testsuite/gas/arm/iwmmxt.d
gas/testsuite/gas/arm/iwmmxt.s
gas/testsuite/gas/arm/ldconst.d
gas/testsuite/gas/arm/ldconst.s
gas/testsuite/gas/arm/le-fpconst.d
gas/testsuite/gas/arm/le-fpconst.s
gas/testsuite/gas/arm/local_function.d
gas/testsuite/gas/arm/local_function.s
gas/testsuite/gas/arm/macro1.d
gas/testsuite/gas/arm/macro1.s
gas/testsuite/gas/arm/mapping.d
gas/testsuite/gas/arm/mapping.s
gas/testsuite/gas/arm/maverick.c
gas/testsuite/gas/arm/maverick.d
gas/testsuite/gas/arm/maverick.s
gas/testsuite/gas/arm/neon-cond-bad-inc.s
gas/testsuite/gas/arm/neon-cond-bad.d
gas/testsuite/gas/arm/neon-cond-bad.l
gas/testsuite/gas/arm/neon-cond-bad.s
gas/testsuite/gas/arm/neon-cond-bad_t2.d
gas/testsuite/gas/arm/neon-cond-bad_t2.s
gas/testsuite/gas/arm/neon-cond.d
gas/testsuite/gas/arm/neon-cond.s
gas/testsuite/gas/arm/neon-const.d
gas/testsuite/gas/arm/neon-const.s
gas/testsuite/gas/arm/neon-cov.d
gas/testsuite/gas/arm/neon-cov.s
gas/testsuite/gas/arm/neon-ldst-es.d
gas/testsuite/gas/arm/neon-ldst-es.s
gas/testsuite/gas/arm/neon-ldst-rm.d
gas/testsuite/gas/arm/neon-ldst-rm.s
gas/testsuite/gas/arm/neon-omit.d
gas/testsuite/gas/arm/neon-omit.s
gas/testsuite/gas/arm/neon-psyn.d
gas/testsuite/gas/arm/neon-psyn.s
gas/testsuite/gas/arm/nomapping.d
gas/testsuite/gas/arm/nomapping.s
gas/testsuite/gas/arm/offset.d
gas/testsuite/gas/arm/offset.s
gas/testsuite/gas/arm/pic.d
gas/testsuite/gas/arm/pic.s
gas/testsuite/gas/arm/pic_vxworks.d
gas/testsuite/gas/arm/r15-bad.d
gas/testsuite/gas/arm/r15-bad.l
gas/testsuite/gas/arm/r15-bad.s
gas/testsuite/gas/arm/reg-alias.d
gas/testsuite/gas/arm/reg-alias.s
gas/testsuite/gas/arm/req.d
gas/testsuite/gas/arm/req.l
gas/testsuite/gas/arm/req.s
gas/testsuite/gas/arm/svc.d
gas/testsuite/gas/arm/svc.s
gas/testsuite/gas/arm/t16-bad.d
gas/testsuite/gas/arm/t16-bad.l
gas/testsuite/gas/arm/t16-bad.s
gas/testsuite/gas/arm/tcompat.d
gas/testsuite/gas/arm/tcompat.s
gas/testsuite/gas/arm/tcompat2.d
gas/testsuite/gas/arm/tcompat2.s
gas/testsuite/gas/arm/thumb.d
gas/testsuite/gas/arm/thumb.s
gas/testsuite/gas/arm/thumb2_add.d
gas/testsuite/gas/arm/thumb2_add.s
gas/testsuite/gas/arm/thumb2_bcond.d
gas/testsuite/gas/arm/thumb2_bcond.s
gas/testsuite/gas/arm/thumb2_invert.d
gas/testsuite/gas/arm/thumb2_invert.s
gas/testsuite/gas/arm/thumb2_it.d
gas/testsuite/gas/arm/thumb2_it.s
gas/testsuite/gas/arm/thumb2_it_bad.d
gas/testsuite/gas/arm/thumb2_it_bad.l
gas/testsuite/gas/arm/thumb2_it_bad.s
gas/testsuite/gas/arm/thumb2_pool.d
gas/testsuite/gas/arm/thumb2_pool.s
gas/testsuite/gas/arm/thumb2_relax.d
gas/testsuite/gas/arm/thumb2_relax.s
gas/testsuite/gas/arm/thumb32.d
gas/testsuite/gas/arm/thumb32.l
gas/testsuite/gas/arm/thumb32.s
gas/testsuite/gas/arm/thumbv6.d
gas/testsuite/gas/arm/thumbv6.s
gas/testsuite/gas/arm/thumbv6k.d
gas/testsuite/gas/arm/thumbv6k.s
gas/testsuite/gas/arm/tls.d
gas/testsuite/gas/arm/tls.s
gas/testsuite/gas/arm/tls_vxworks.d
gas/testsuite/gas/arm/undefined.d
gas/testsuite/gas/arm/undefined.l
gas/testsuite/gas/arm/undefined.s
gas/testsuite/gas/arm/undefined_coff.d
gas/testsuite/gas/arm/undefined_coff.l
gas/testsuite/gas/arm/undefined_coff.s
gas/testsuite/gas/arm/unwind.d
gas/testsuite/gas/arm/unwind.s
gas/testsuite/gas/arm/unwind_vxworks.d
gas/testsuite/gas/arm/vfp-bad.d
gas/testsuite/gas/arm/vfp-bad.l
gas/testsuite/gas/arm/vfp-bad.s
gas/testsuite/gas/arm/vfp-bad_t2.d
gas/testsuite/gas/arm/vfp-bad_t2.l
gas/testsuite/gas/arm/vfp-bad_t2.s
gas/testsuite/gas/arm/vfp-neon-overlap.d
gas/testsuite/gas/arm/vfp-neon-overlap.s
gas/testsuite/gas/arm/vfp-neon-syntax-inc.s
gas/testsuite/gas/arm/vfp-neon-syntax.d
gas/testsuite/gas/arm/vfp-neon-syntax.s
gas/testsuite/gas/arm/vfp-neon-syntax_t2.d
gas/testsuite/gas/arm/vfp-neon-syntax_t2.s
gas/testsuite/gas/arm/vfp1.d
gas/testsuite/gas/arm/vfp1.s
gas/testsuite/gas/arm/vfp1_t2.d
gas/testsuite/gas/arm/vfp1_t2.s
gas/testsuite/gas/arm/vfp1xD.d
gas/testsuite/gas/arm/vfp1xD.s
gas/testsuite/gas/arm/vfp1xD_t2.d
gas/testsuite/gas/arm/vfp1xD_t2.s
gas/testsuite/gas/arm/vfp2.d
gas/testsuite/gas/arm/vfp2.s
gas/testsuite/gas/arm/vfp2_t2.d
gas/testsuite/gas/arm/vfp2_t2.s
gas/testsuite/gas/arm/vfpv3-32drs.d
gas/testsuite/gas/arm/vfpv3-32drs.s
gas/testsuite/gas/arm/vfpv3-const-conv.d
gas/testsuite/gas/arm/vfpv3-const-conv.s
gas/testsuite/gas/arm/wince_inst.d
gas/testsuite/gas/arm/xscale.d
gas/testsuite/gas/arm/xscale.s
gas/testsuite/gas/bfin/arithmetic.d
gas/testsuite/gas/bfin/arithmetic.s
gas/testsuite/gas/bfin/bfin.exp
gas/testsuite/gas/bfin/bit.d
gas/testsuite/gas/bfin/bit.s
gas/testsuite/gas/bfin/bit2.d
gas/testsuite/gas/bfin/bit2.s
gas/testsuite/gas/bfin/cache.d
gas/testsuite/gas/bfin/cache.s
gas/testsuite/gas/bfin/cache2.d
gas/testsuite/gas/bfin/cache2.s
gas/testsuite/gas/bfin/control_code.d
gas/testsuite/gas/bfin/control_code.s
gas/testsuite/gas/bfin/control_code2.d
gas/testsuite/gas/bfin/control_code2.s
gas/testsuite/gas/bfin/event.d
gas/testsuite/gas/bfin/event.s
gas/testsuite/gas/bfin/event2.d
gas/testsuite/gas/bfin/event2.s
gas/testsuite/gas/bfin/expected_errors.l
gas/testsuite/gas/bfin/expected_errors.s
gas/testsuite/gas/bfin/expected_move_errors.l
gas/testsuite/gas/bfin/expected_move_errors.s
gas/testsuite/gas/bfin/flow.d
gas/testsuite/gas/bfin/flow.s
gas/testsuite/gas/bfin/flow2.d
gas/testsuite/gas/bfin/flow2.s
gas/testsuite/gas/bfin/load.d
gas/testsuite/gas/bfin/load.s
gas/testsuite/gas/bfin/logical.d
gas/testsuite/gas/bfin/logical.s
gas/testsuite/gas/bfin/logical2.d
gas/testsuite/gas/bfin/logical2.s
gas/testsuite/gas/bfin/move.d
gas/testsuite/gas/bfin/move.s
gas/testsuite/gas/bfin/move2.d
gas/testsuite/gas/bfin/move2.s
gas/testsuite/gas/bfin/parallel.d
gas/testsuite/gas/bfin/parallel.s
gas/testsuite/gas/bfin/parallel2.d
gas/testsuite/gas/bfin/parallel2.s
gas/testsuite/gas/bfin/parallel3.d
gas/testsuite/gas/bfin/parallel3.s
gas/testsuite/gas/bfin/parallel4.d
gas/testsuite/gas/bfin/parallel4.s
gas/testsuite/gas/bfin/reloc.d
gas/testsuite/gas/bfin/reloc.s
gas/testsuite/gas/bfin/shift.d
gas/testsuite/gas/bfin/shift.s
gas/testsuite/gas/bfin/shift2.d
gas/testsuite/gas/bfin/shift2.s
gas/testsuite/gas/bfin/stack.d
gas/testsuite/gas/bfin/stack.s
gas/testsuite/gas/bfin/stack2.d
gas/testsuite/gas/bfin/stack2.s
gas/testsuite/gas/bfin/store.d
gas/testsuite/gas/bfin/store.s
gas/testsuite/gas/bfin/vector.d
gas/testsuite/gas/bfin/vector.s
gas/testsuite/gas/bfin/vector2.d
gas/testsuite/gas/bfin/vector2.s
gas/testsuite/gas/bfin/video.d
gas/testsuite/gas/bfin/video.s
gas/testsuite/gas/bfin/video2.d
gas/testsuite/gas/bfin/video2.s
gas/testsuite/gas/cfi/cfi-alpha-1.d
gas/testsuite/gas/cfi/cfi-alpha-1.s
gas/testsuite/gas/cfi/cfi-alpha-2.d
gas/testsuite/gas/cfi/cfi-alpha-2.s
gas/testsuite/gas/cfi/cfi-alpha-3.d
gas/testsuite/gas/cfi/cfi-alpha-3.s
gas/testsuite/gas/cfi/cfi-arm-1.d
gas/testsuite/gas/cfi/cfi-arm-1.s
gas/testsuite/gas/cfi/cfi-common-1.d
gas/testsuite/gas/cfi/cfi-common-1.s
gas/testsuite/gas/cfi/cfi-common-2.d
gas/testsuite/gas/cfi/cfi-common-2.s
gas/testsuite/gas/cfi/cfi-common-3.d
gas/testsuite/gas/cfi/cfi-common-3.s
gas/testsuite/gas/cfi/cfi-common-4.d
gas/testsuite/gas/cfi/cfi-common-4.s
gas/testsuite/gas/cfi/cfi-diag-1.l
gas/testsuite/gas/cfi/cfi-diag-1.s
gas/testsuite/gas/cfi/cfi-i386-2.d
gas/testsuite/gas/cfi/cfi-i386-2.s
gas/testsuite/gas/cfi/cfi-i386.d
gas/testsuite/gas/cfi/cfi-i386.s
gas/testsuite/gas/cfi/cfi-m68k.d
gas/testsuite/gas/cfi/cfi-m68k.s
gas/testsuite/gas/cfi/cfi-mips-1.d
gas/testsuite/gas/cfi/cfi-mips-1.s
gas/testsuite/gas/cfi/cfi-ppc-1.d
gas/testsuite/gas/cfi/cfi-ppc-1.s
gas/testsuite/gas/cfi/cfi-s390-1.d
gas/testsuite/gas/cfi/cfi-s390-1.s
gas/testsuite/gas/cfi/cfi-s390x-1.d
gas/testsuite/gas/cfi/cfi-s390x-1.s
gas/testsuite/gas/cfi/cfi-sh-1.d
gas/testsuite/gas/cfi/cfi-sh-1.s
gas/testsuite/gas/cfi/cfi-sparc-1.d
gas/testsuite/gas/cfi/cfi-sparc-1.s
gas/testsuite/gas/cfi/cfi-sparc64-1.d
gas/testsuite/gas/cfi/cfi-sparc64-1.s
gas/testsuite/gas/cfi/cfi-x86_64.d
gas/testsuite/gas/cfi/cfi-x86_64.s
gas/testsuite/gas/cfi/cfi.exp
gas/testsuite/gas/cris/abs32-1.s
gas/testsuite/gas/cris/addi.d
gas/testsuite/gas/cris/addi.s
gas/testsuite/gas/cris/arch-err-1.s
gas/testsuite/gas/cris/arch-err-2.s
gas/testsuite/gas/cris/arch-err-3.s
gas/testsuite/gas/cris/arch-err-4.s
gas/testsuite/gas/cris/arch-err-5.s
gas/testsuite/gas/cris/binop-cmpmove.d
gas/testsuite/gas/cris/binop-cmpmovx.d
gas/testsuite/gas/cris/binop-extx.d
gas/testsuite/gas/cris/binop-segref.s
gas/testsuite/gas/cris/binop.d
gas/testsuite/gas/cris/binop.s
gas/testsuite/gas/cris/bork.d
gas/testsuite/gas/cris/bork.s
gas/testsuite/gas/cris/bound-err-1.s
gas/testsuite/gas/cris/branch-warn-1.s
gas/testsuite/gas/cris/branch-warn-2.s
gas/testsuite/gas/cris/branch-warn-3.s
gas/testsuite/gas/cris/branch.d
gas/testsuite/gas/cris/branch.s
gas/testsuite/gas/cris/break.d
gas/testsuite/gas/cris/break.s
gas/testsuite/gas/cris/brokw-1.d
gas/testsuite/gas/cris/brokw-1.s
gas/testsuite/gas/cris/brokw-2.d
gas/testsuite/gas/cris/brokw-2.s
gas/testsuite/gas/cris/brokw-3.d
gas/testsuite/gas/cris/brokw-3.s
gas/testsuite/gas/cris/brokw-3b.s
gas/testsuite/gas/cris/bwtest-err-1.s
gas/testsuite/gas/cris/ccr.d
gas/testsuite/gas/cris/ccr.s
gas/testsuite/gas/cris/clear.d
gas/testsuite/gas/cris/continue.d
gas/testsuite/gas/cris/continue.s
gas/testsuite/gas/cris/cris.exp
gas/testsuite/gas/cris/diffexp-ovwr.d
gas/testsuite/gas/cris/diffexp-ovwr.s
gas/testsuite/gas/cris/fragtest.d
gas/testsuite/gas/cris/fragtest.s
gas/testsuite/gas/cris/jump-type.d
gas/testsuite/gas/cris/labfloat.d
gas/testsuite/gas/cris/labfloat.s
gas/testsuite/gas/cris/macroat.d
gas/testsuite/gas/cris/macroat.s
gas/testsuite/gas/cris/march-err-1.s
gas/testsuite/gas/cris/march-err-2.s
gas/testsuite/gas/cris/movem-to-reg.d
gas/testsuite/gas/cris/mulbug-err-1.s
gas/testsuite/gas/cris/nosep.d
gas/testsuite/gas/cris/nosep.s
gas/testsuite/gas/cris/oneop-type.d
gas/testsuite/gas/cris/operand-err-1.s
gas/testsuite/gas/cris/pic-err-1.s
gas/testsuite/gas/cris/prefix.d
gas/testsuite/gas/cris/prefix.s
gas/testsuite/gas/cris/push-err-1.s
gas/testsuite/gas/cris/push-err-2.s
gas/testsuite/gas/cris/pushpop-byte-sreg.d
gas/testsuite/gas/cris/pushpop-dcr1-sreg.d
gas/testsuite/gas/cris/pushpop-dword-sreg.d
gas/testsuite/gas/cris/pushpop-word-sreg.d
gas/testsuite/gas/cris/pushpop.d
gas/testsuite/gas/cris/pushpop.s
gas/testsuite/gas/cris/pushpopv32.s
gas/testsuite/gas/cris/quick-s6.d
gas/testsuite/gas/cris/quick-u5.d
gas/testsuite/gas/cris/quick-u6.d
gas/testsuite/gas/cris/quick.s
gas/testsuite/gas/cris/range-err-1.s
gas/testsuite/gas/cris/range-err-2.s
gas/testsuite/gas/cris/rd-abs32-1.d
gas/testsuite/gas/cris/rd-abs32-2.d
gas/testsuite/gas/cris/rd-arch-1.d
gas/testsuite/gas/cris/rd-arch-2.d
gas/testsuite/gas/cris/rd-arch-3.d
gas/testsuite/gas/cris/rd-bcnst-pic.d
gas/testsuite/gas/cris/rd-bcnst.d
gas/testsuite/gas/cris/rd-bcnst.s
gas/testsuite/gas/cris/rd-bkw1b.d
gas/testsuite/gas/cris/rd-bkw2b.d
gas/testsuite/gas/cris/rd-bkw3b.d
gas/testsuite/gas/cris/rd-bound1.d
gas/testsuite/gas/cris/rd-bound1.s
gas/testsuite/gas/cris/rd-bound2.d
gas/testsuite/gas/cris/rd-bound3.d
gas/testsuite/gas/cris/rd-bound4.d
gas/testsuite/gas/cris/rd-branch-pic.d
gas/testsuite/gas/cris/rd-break32.d
gas/testsuite/gas/cris/rd-brokw-pic-1.d
gas/testsuite/gas/cris/rd-brokw-pic-2.d
gas/testsuite/gas/cris/rd-brokw-pic-3.d
gas/testsuite/gas/cris/rd-dw2-1.d
gas/testsuite/gas/cris/rd-dw2-10.d
gas/testsuite/gas/cris/rd-dw2-11.d
gas/testsuite/gas/cris/rd-dw2-12.d
gas/testsuite/gas/cris/rd-dw2-13.d
gas/testsuite/gas/cris/rd-dw2-14.d
gas/testsuite/gas/cris/rd-dw2-15.d
gas/testsuite/gas/cris/rd-dw2-2.d
gas/testsuite/gas/cris/rd-dw2-3.d
gas/testsuite/gas/cris/rd-dw2-4.d
gas/testsuite/gas/cris/rd-dw2-5.d
gas/testsuite/gas/cris/rd-dw2-6.d
gas/testsuite/gas/cris/rd-dw2-7.d
gas/testsuite/gas/cris/rd-dw2-8.d
gas/testsuite/gas/cris/rd-dw2-9.d
gas/testsuite/gas/cris/rd-fragtest-pic.d
gas/testsuite/gas/cris/rd-mulbug-1.d
gas/testsuite/gas/cris/rd-pcplus.d
gas/testsuite/gas/cris/rd-pcplus.s
gas/testsuite/gas/cris/rd-pcrel1.d
gas/testsuite/gas/cris/rd-pcrel1.s
gas/testsuite/gas/cris/rd-pcrel2.d
gas/testsuite/gas/cris/rd-pcrel2.s
gas/testsuite/gas/cris/rd-pic-1.d
gas/testsuite/gas/cris/rd-pic-1.s
gas/testsuite/gas/cris/rd-pic-2.d
gas/testsuite/gas/cris/rd-pic-2.s
gas/testsuite/gas/cris/rd-ppv1032.d
gas/testsuite/gas/cris/rd-ppv32.d
gas/testsuite/gas/cris/rd-regprefix-1.d
gas/testsuite/gas/cris/rd-regprefix-1.s
gas/testsuite/gas/cris/rd-regprefix-1b.d
gas/testsuite/gas/cris/rd-spr-1.d
gas/testsuite/gas/cris/rd-spr-1.s
gas/testsuite/gas/cris/rd-usp-1.d
gas/testsuite/gas/cris/rd-usp-1b.d
gas/testsuite/gas/cris/rd-v10_32o-1.d
gas/testsuite/gas/cris/rd-v10_32o-2.d
gas/testsuite/gas/cris/rd-v10_32o-2.s
gas/testsuite/gas/cris/rd-v32-b1.d
gas/testsuite/gas/cris/rd-v32-b1.s
gas/testsuite/gas/cris/rd-v32-b2.d
gas/testsuite/gas/cris/rd-v32-b2.s
gas/testsuite/gas/cris/rd-v32-b3.d
gas/testsuite/gas/cris/rd-v32-b3.s
gas/testsuite/gas/cris/rd-v32-f1.d
gas/testsuite/gas/cris/rd-v32-f1.s
gas/testsuite/gas/cris/rd-v32-i1.d
gas/testsuite/gas/cris/rd-v32-i1.s
gas/testsuite/gas/cris/rd-v32-l1.d
gas/testsuite/gas/cris/rd-v32-l1.s
gas/testsuite/gas/cris/rd-v32-l3.d
gas/testsuite/gas/cris/rd-v32-l3.s
gas/testsuite/gas/cris/rd-v32-l4.d
gas/testsuite/gas/cris/rd-v32-l4.s
gas/testsuite/gas/cris/rd-v32o-1.d
gas/testsuite/gas/cris/rd-v32s-1.d
gas/testsuite/gas/cris/rd-v32s-2.d
gas/testsuite/gas/cris/rd-v32s-2.s
gas/testsuite/gas/cris/rd-v32s-3.d
gas/testsuite/gas/cris/rd-v32s-3.s
gas/testsuite/gas/cris/rd-v32s-4.d
gas/testsuite/gas/cris/rd-v32s-4.s
gas/testsuite/gas/cris/rd-vao-1.d
gas/testsuite/gas/cris/reg-to-mem.d
gas/testsuite/gas/cris/regprefix-err-1.s
gas/testsuite/gas/cris/regreg.d
gas/testsuite/gas/cris/regreg.s
gas/testsuite/gas/cris/return.d
gas/testsuite/gas/cris/return.s
gas/testsuite/gas/cris/scc.d
gas/testsuite/gas/cris/scc.s
gas/testsuite/gas/cris/sep-err-1.s
gas/testsuite/gas/cris/sep-err-2.s
gas/testsuite/gas/cris/sep-err-3.s
gas/testsuite/gas/cris/separator.d
gas/testsuite/gas/cris/separator.s
gas/testsuite/gas/cris/shexpr-1.d
gas/testsuite/gas/cris/shexpr-1.s
gas/testsuite/gas/cris/sreg-to-x.d
gas/testsuite/gas/cris/string-1.d
gas/testsuite/gas/cris/string-1.s
gas/testsuite/gas/cris/string-2.d
gas/testsuite/gas/cris/string-2.s
gas/testsuite/gas/cris/test.d
gas/testsuite/gas/cris/unimplemented.d
gas/testsuite/gas/cris/unimplemented.s
gas/testsuite/gas/cris/unop-mem.d
gas/testsuite/gas/cris/unop.s
gas/testsuite/gas/cris/us-err-1.s
gas/testsuite/gas/cris/us-err-2.s
gas/testsuite/gas/cris/us-err-3.s
gas/testsuite/gas/cris/v32-err-1.s
gas/testsuite/gas/cris/v32-err-10.s
gas/testsuite/gas/cris/v32-err-11.s
gas/testsuite/gas/cris/v32-err-2.s
gas/testsuite/gas/cris/v32-err-3.s
gas/testsuite/gas/cris/v32-err-4.s
gas/testsuite/gas/cris/v32-err-5.s
gas/testsuite/gas/cris/v32-err-6.s
gas/testsuite/gas/cris/v32-err-7.s
gas/testsuite/gas/cris/v32-err-8.s
gas/testsuite/gas/cris/v32-err-9.s
gas/testsuite/gas/cris/x-to-byte-sreg.d
gas/testsuite/gas/cris/x-to-dcr1-sreg.d
gas/testsuite/gas/cris/x-to-dword-sreg.d
gas/testsuite/gas/cris/x-to-word-sreg.d
gas/testsuite/gas/crx/allinsn.exp
gas/testsuite/gas/crx/arith_insn.d
gas/testsuite/gas/crx/arith_insn.s
gas/testsuite/gas/crx/beq_insn.d
gas/testsuite/gas/crx/beq_insn.s
gas/testsuite/gas/crx/bit_insn.d
gas/testsuite/gas/crx/bit_insn.s
gas/testsuite/gas/crx/br_insn.d
gas/testsuite/gas/crx/br_insn.s
gas/testsuite/gas/crx/cmov_insn.d
gas/testsuite/gas/crx/cmov_insn.s
gas/testsuite/gas/crx/cmpbr_insn.d
gas/testsuite/gas/crx/cmpbr_insn.s
gas/testsuite/gas/crx/cop_insn.d
gas/testsuite/gas/crx/cop_insn.s
gas/testsuite/gas/crx/gas-segfault.d
gas/testsuite/gas/crx/gas-segfault.s
gas/testsuite/gas/crx/jscond_insn.d
gas/testsuite/gas/crx/jscond_insn.s
gas/testsuite/gas/crx/list_insn.d
gas/testsuite/gas/crx/list_insn.s
gas/testsuite/gas/crx/load_stor_insn.d
gas/testsuite/gas/crx/load_stor_insn.s
gas/testsuite/gas/crx/misc_insn.d
gas/testsuite/gas/crx/misc_insn.s
gas/testsuite/gas/crx/no_op_insn.d
gas/testsuite/gas/crx/no_op_insn.s
gas/testsuite/gas/crx/shift_insn.d
gas/testsuite/gas/crx/shift_insn.s
gas/testsuite/gas/d10v/address-001.d
gas/testsuite/gas/d10v/address-001.s
gas/testsuite/gas/d10v/address-002.l
gas/testsuite/gas/d10v/address-002.s
gas/testsuite/gas/d10v/address-003.l
gas/testsuite/gas/d10v/address-003.s
gas/testsuite/gas/d10v/address-004.l
gas/testsuite/gas/d10v/address-004.s
gas/testsuite/gas/d10v/address-005.l
gas/testsuite/gas/d10v/address-005.s
gas/testsuite/gas/d10v/address-006.l
gas/testsuite/gas/d10v/address-006.s
gas/testsuite/gas/d10v/address-007.l
gas/testsuite/gas/d10v/address-007.s
gas/testsuite/gas/d10v/address-008.l
gas/testsuite/gas/d10v/address-008.s
gas/testsuite/gas/d10v/address-009.l
gas/testsuite/gas/d10v/address-009.s
gas/testsuite/gas/d10v/address-010.l
gas/testsuite/gas/d10v/address-010.s
gas/testsuite/gas/d10v/address-011.l
gas/testsuite/gas/d10v/address-011.s
gas/testsuite/gas/d10v/address-012.l
gas/testsuite/gas/d10v/address-012.s
gas/testsuite/gas/d10v/address-013.l
gas/testsuite/gas/d10v/address-013.s
gas/testsuite/gas/d10v/address-014.l
gas/testsuite/gas/d10v/address-014.s
gas/testsuite/gas/d10v/address-015.l
gas/testsuite/gas/d10v/address-015.s
gas/testsuite/gas/d10v/address-016.l
gas/testsuite/gas/d10v/address-016.s
gas/testsuite/gas/d10v/address-017.l
gas/testsuite/gas/d10v/address-017.s
gas/testsuite/gas/d10v/address-018.l
gas/testsuite/gas/d10v/address-018.s
gas/testsuite/gas/d10v/address-019.l
gas/testsuite/gas/d10v/address-019.s
gas/testsuite/gas/d10v/address-020.l
gas/testsuite/gas/d10v/address-020.s
gas/testsuite/gas/d10v/address-021.l
gas/testsuite/gas/d10v/address-021.s
gas/testsuite/gas/d10v/address-022.l
gas/testsuite/gas/d10v/address-022.s
gas/testsuite/gas/d10v/address-023.l
gas/testsuite/gas/d10v/address-023.s
gas/testsuite/gas/d10v/address-024.l
gas/testsuite/gas/d10v/address-024.s
gas/testsuite/gas/d10v/address-025.l
gas/testsuite/gas/d10v/address-025.s
gas/testsuite/gas/d10v/address-026.l
gas/testsuite/gas/d10v/address-026.s
gas/testsuite/gas/d10v/address-027.l
gas/testsuite/gas/d10v/address-027.s
gas/testsuite/gas/d10v/address-028.l
gas/testsuite/gas/d10v/address-028.s
gas/testsuite/gas/d10v/address-029.l
gas/testsuite/gas/d10v/address-029.s
gas/testsuite/gas/d10v/address-030.l
gas/testsuite/gas/d10v/address-030.s
gas/testsuite/gas/d10v/address-031.l
gas/testsuite/gas/d10v/address-031.s
gas/testsuite/gas/d10v/address-032.l
gas/testsuite/gas/d10v/address-032.s
gas/testsuite/gas/d10v/address-033.l
gas/testsuite/gas/d10v/address-033.s
gas/testsuite/gas/d10v/address-034.l
gas/testsuite/gas/d10v/address-034.s
gas/testsuite/gas/d10v/address-035.l
gas/testsuite/gas/d10v/address-035.s
gas/testsuite/gas/d10v/address-036.l
gas/testsuite/gas/d10v/address-036.s
gas/testsuite/gas/d10v/address-037.l
gas/testsuite/gas/d10v/address-037.s
gas/testsuite/gas/d10v/address-038.l
gas/testsuite/gas/d10v/address-038.s
gas/testsuite/gas/d10v/address-039.l
gas/testsuite/gas/d10v/address-039.s
gas/testsuite/gas/d10v/address-040.l
gas/testsuite/gas/d10v/address-040.s
gas/testsuite/gas/d10v/address-041.l
gas/testsuite/gas/d10v/address-041.s
gas/testsuite/gas/d10v/control-001.d
gas/testsuite/gas/d10v/control-001.s
gas/testsuite/gas/d10v/d10v.exp
gas/testsuite/gas/d10v/error-001.d
gas/testsuite/gas/d10v/error-001.s
gas/testsuite/gas/d10v/error-002.d
gas/testsuite/gas/d10v/error-002.s
gas/testsuite/gas/d10v/immediate-001.d
gas/testsuite/gas/d10v/immediate-001.s
gas/testsuite/gas/d10v/immediate-002.d
gas/testsuite/gas/d10v/immediate-002.s
gas/testsuite/gas/d10v/immediate-003.d
gas/testsuite/gas/d10v/immediate-003.s
gas/testsuite/gas/d10v/immediate-004.d
gas/testsuite/gas/d10v/immediate-004.s
gas/testsuite/gas/d10v/immediate-005.d
gas/testsuite/gas/d10v/immediate-005.s
gas/testsuite/gas/d10v/immediate-006.d
gas/testsuite/gas/d10v/immediate-006.s
gas/testsuite/gas/d10v/immediate-007.d
gas/testsuite/gas/d10v/immediate-007.s
gas/testsuite/gas/d10v/inst.d
gas/testsuite/gas/d10v/inst.s
gas/testsuite/gas/d10v/instruction_packing-001.d
gas/testsuite/gas/d10v/instruction_packing-001.s
gas/testsuite/gas/d10v/instruction_packing-002.d
gas/testsuite/gas/d10v/instruction_packing-002.s
gas/testsuite/gas/d10v/instruction_packing-003.d
gas/testsuite/gas/d10v/instruction_packing-003.s
gas/testsuite/gas/d10v/instruction_packing-004.d
gas/testsuite/gas/d10v/instruction_packing-004.s
gas/testsuite/gas/d10v/instruction_packing-005.d
gas/testsuite/gas/d10v/instruction_packing-005.s
gas/testsuite/gas/d10v/instruction_packing-006.d
gas/testsuite/gas/d10v/instruction_packing-006.s
gas/testsuite/gas/d10v/instruction_packing-007.d
gas/testsuite/gas/d10v/instruction_packing-007.s
gas/testsuite/gas/d10v/instruction_packing-008.d
gas/testsuite/gas/d10v/instruction_packing-009.d
gas/testsuite/gas/d10v/instruction_packing-010.d
gas/testsuite/gas/d10v/instruction_packing.d
gas/testsuite/gas/d10v/instruction_packing.s
gas/testsuite/gas/d10v/label-001.d
gas/testsuite/gas/d10v/label-001.s
gas/testsuite/gas/d10v/warning-001.d
gas/testsuite/gas/d10v/warning-001.s
gas/testsuite/gas/d10v/warning-002.d
gas/testsuite/gas/d10v/warning-002.s
gas/testsuite/gas/d10v/warning-003.d
gas/testsuite/gas/d10v/warning-003.s
gas/testsuite/gas/d10v/warning-004.d
gas/testsuite/gas/d10v/warning-004.s
gas/testsuite/gas/d10v/warning-005.d
gas/testsuite/gas/d10v/warning-005.s
gas/testsuite/gas/d10v/warning-006.d
gas/testsuite/gas/d10v/warning-006.s
gas/testsuite/gas/d10v/warning-007.d
gas/testsuite/gas/d10v/warning-007.s
gas/testsuite/gas/d10v/warning-008.d
gas/testsuite/gas/d10v/warning-008.s
gas/testsuite/gas/d10v/warning-009.d
gas/testsuite/gas/d10v/warning-009.s
gas/testsuite/gas/d10v/warning-010.d
gas/testsuite/gas/d10v/warning-010.s
gas/testsuite/gas/d10v/warning-011.d
gas/testsuite/gas/d10v/warning-011.s
gas/testsuite/gas/d10v/warning-012.d
gas/testsuite/gas/d10v/warning-012.s
gas/testsuite/gas/d10v/warning-013.d
gas/testsuite/gas/d10v/warning-013.s
gas/testsuite/gas/d10v/warning-014.d
gas/testsuite/gas/d10v/warning-014.s
gas/testsuite/gas/d10v/warning-015.d
gas/testsuite/gas/d10v/warning-016.d
gas/testsuite/gas/d10v/warning-016.s
gas/testsuite/gas/d10v/warning-017.d
gas/testsuite/gas/d10v/warning-017.s
gas/testsuite/gas/d10v/warning-018.d
gas/testsuite/gas/d10v/warning-018.s
gas/testsuite/gas/d10v/warning-019.d
gas/testsuite/gas/d10v/warning-019.s
gas/testsuite/gas/d30v/align.d
gas/testsuite/gas/d30v/align.s
gas/testsuite/gas/d30v/array.d
gas/testsuite/gas/d30v/array.s
gas/testsuite/gas/d30v/bittest.d
gas/testsuite/gas/d30v/bittest.l
gas/testsuite/gas/d30v/bittest.s
gas/testsuite/gas/d30v/d30.exp
gas/testsuite/gas/d30v/guard-debug.d
gas/testsuite/gas/d30v/guard-debug.s
gas/testsuite/gas/d30v/guard.d
gas/testsuite/gas/d30v/guard.s
gas/testsuite/gas/d30v/inst.d
gas/testsuite/gas/d30v/inst.s
gas/testsuite/gas/d30v/label-debug.d
gas/testsuite/gas/d30v/label-debug.s
gas/testsuite/gas/d30v/label.d
gas/testsuite/gas/d30v/label.s
gas/testsuite/gas/d30v/mul.d
gas/testsuite/gas/d30v/mul.s
gas/testsuite/gas/d30v/opt.d
gas/testsuite/gas/d30v/opt.s
gas/testsuite/gas/d30v/reloc.d
gas/testsuite/gas/d30v/reloc.s
gas/testsuite/gas/d30v/serial.l
gas/testsuite/gas/d30v/serial.s
gas/testsuite/gas/d30v/serial2.l
gas/testsuite/gas/d30v/serial2.s
gas/testsuite/gas/d30v/serial2O.l
gas/testsuite/gas/d30v/serial2O.s
gas/testsuite/gas/d30v/warn_oddreg.l
gas/testsuite/gas/d30v/warn_oddreg.s
gas/testsuite/gas/dlx/alltests.exp
gas/testsuite/gas/dlx/branch.d
gas/testsuite/gas/dlx/branch.s
gas/testsuite/gas/dlx/itype.d
gas/testsuite/gas/dlx/itype.s
gas/testsuite/gas/dlx/lhi.d
gas/testsuite/gas/dlx/lhi.s
gas/testsuite/gas/dlx/load.d
gas/testsuite/gas/dlx/load.s
gas/testsuite/gas/dlx/lohi.d
gas/testsuite/gas/dlx/lohi.s
gas/testsuite/gas/dlx/rtype.d
gas/testsuite/gas/dlx/rtype.s
gas/testsuite/gas/dlx/store.d
gas/testsuite/gas/dlx/store.s
gas/testsuite/gas/elf/ehopt0.d
gas/testsuite/gas/elf/ehopt0.s
gas/testsuite/gas/elf/elf.exp
gas/testsuite/gas/elf/group0.s
gas/testsuite/gas/elf/group0a.d
gas/testsuite/gas/elf/group0b.d
gas/testsuite/gas/elf/group1.s
gas/testsuite/gas/elf/group1a.d
gas/testsuite/gas/elf/group1b.d
gas/testsuite/gas/elf/redef.d
gas/testsuite/gas/elf/redef.s
gas/testsuite/gas/elf/section0.d
gas/testsuite/gas/elf/section0.s
gas/testsuite/gas/elf/section1.d
gas/testsuite/gas/elf/section1.s
gas/testsuite/gas/elf/section2.e
gas/testsuite/gas/elf/section2.e-armeabi
gas/testsuite/gas/elf/section2.e-m32r
gas/testsuite/gas/elf/section2.e-mips
gas/testsuite/gas/elf/section2.e-miwmmxt
gas/testsuite/gas/elf/section2.l
gas/testsuite/gas/elf/section2.s
gas/testsuite/gas/elf/section3.d
gas/testsuite/gas/elf/section3.s
gas/testsuite/gas/elf/section4.d
gas/testsuite/gas/elf/section4.s
gas/testsuite/gas/elf/section5.e
gas/testsuite/gas/elf/section5.l
gas/testsuite/gas/elf/section5.s
gas/testsuite/gas/elf/struct.d
gas/testsuite/gas/elf/struct.s
gas/testsuite/gas/elf/symver.d
gas/testsuite/gas/elf/symver.s
gas/testsuite/gas/elf/type.e
gas/testsuite/gas/elf/type.s
gas/testsuite/gas/fr30/allinsn.d
gas/testsuite/gas/fr30/allinsn.exp
gas/testsuite/gas/fr30/allinsn.s
gas/testsuite/gas/fr30/fr30.exp
gas/testsuite/gas/frv/allinsn.d
gas/testsuite/gas/frv/allinsn.exp
gas/testsuite/gas/frv/allinsn.s
gas/testsuite/gas/frv/fdpic.d
gas/testsuite/gas/frv/fdpic.s
gas/testsuite/gas/frv/fr405-insn.d
gas/testsuite/gas/frv/fr405-insn.l
gas/testsuite/gas/frv/fr405-insn.s
gas/testsuite/gas/frv/fr450-insn.d
gas/testsuite/gas/frv/fr450-insn.l
gas/testsuite/gas/frv/fr450-insn.s
gas/testsuite/gas/frv/fr450-media-issue.l
gas/testsuite/gas/frv/fr450-media-issue.s
gas/testsuite/gas/frv/fr450-spr.d
gas/testsuite/gas/frv/fr450-spr.s
gas/testsuite/gas/frv/fr550-pack1.d
gas/testsuite/gas/frv/fr550-pack1.s
gas/testsuite/gas/frv/reloc1.d
gas/testsuite/gas/frv/reloc1.s
gas/testsuite/gas/h8300/addsub.s
gas/testsuite/gas/h8300/addsubh.s
gas/testsuite/gas/h8300/addsubrxcheck.s
gas/testsuite/gas/h8300/addsubs.s
gas/testsuite/gas/h8300/bitops1.s
gas/testsuite/gas/h8300/bitops1h.s
gas/testsuite/gas/h8300/bitops1s.s
gas/testsuite/gas/h8300/bitops2.s
gas/testsuite/gas/h8300/bitops2h.s
gas/testsuite/gas/h8300/bitops2s.s
gas/testsuite/gas/h8300/bitops3.s
gas/testsuite/gas/h8300/bitops3h.s
gas/testsuite/gas/h8300/bitops3s.s
gas/testsuite/gas/h8300/bitops4.s
gas/testsuite/gas/h8300/bitops4h.s
gas/testsuite/gas/h8300/bitops4s.s
gas/testsuite/gas/h8300/branch-coff.s
gas/testsuite/gas/h8300/branch-elf.s
gas/testsuite/gas/h8300/branchh-coff.s
gas/testsuite/gas/h8300/branchh-elf.s
gas/testsuite/gas/h8300/branchs-coff.s
gas/testsuite/gas/h8300/branchs-elf.s
gas/testsuite/gas/h8300/cbranch.s
gas/testsuite/gas/h8300/cbranchh.s
gas/testsuite/gas/h8300/cbranchs.s
gas/testsuite/gas/h8300/cmpsi2.s
gas/testsuite/gas/h8300/compare.s
gas/testsuite/gas/h8300/compareh.s
gas/testsuite/gas/h8300/compares.s
gas/testsuite/gas/h8300/decimal.s
gas/testsuite/gas/h8300/decimalh.s
gas/testsuite/gas/h8300/decimals.s
gas/testsuite/gas/h8300/divmul.s
gas/testsuite/gas/h8300/divmulh.s
gas/testsuite/gas/h8300/divmuls.s
gas/testsuite/gas/h8300/extendh.s
gas/testsuite/gas/h8300/extends.s
gas/testsuite/gas/h8300/ffxx1-coff.d
gas/testsuite/gas/h8300/ffxx1-coff.s
gas/testsuite/gas/h8300/ffxx1-elf.d
gas/testsuite/gas/h8300/ffxx1-elf.s
gas/testsuite/gas/h8300/h8300-coff.exp
gas/testsuite/gas/h8300/h8300-elf.exp
gas/testsuite/gas/h8300/h8300.exp
gas/testsuite/gas/h8300/h8sx_disp2.d
gas/testsuite/gas/h8300/h8sx_disp2.s
gas/testsuite/gas/h8300/h8sx_mov_imm.d
gas/testsuite/gas/h8300/h8sx_mov_imm.s
gas/testsuite/gas/h8300/h8sx_rtsl.d
gas/testsuite/gas/h8300/h8sx_rtsl.s
gas/testsuite/gas/h8300/incdec.s
gas/testsuite/gas/h8300/incdech.s
gas/testsuite/gas/h8300/incdecs.s
gas/testsuite/gas/h8300/logical.s
gas/testsuite/gas/h8300/logicalh.s
gas/testsuite/gas/h8300/logicals.s
gas/testsuite/gas/h8300/macs.s
gas/testsuite/gas/h8300/misc.s
gas/testsuite/gas/h8300/misch.s
gas/testsuite/gas/h8300/miscs.s
gas/testsuite/gas/h8300/mov32bug.s
gas/testsuite/gas/h8300/movb.s
gas/testsuite/gas/h8300/movbh.s
gas/testsuite/gas/h8300/movbs.s
gas/testsuite/gas/h8300/movlh.s
gas/testsuite/gas/h8300/movls.s
gas/testsuite/gas/h8300/movw.s
gas/testsuite/gas/h8300/movwh.s
gas/testsuite/gas/h8300/movws.s
gas/testsuite/gas/h8300/multiples.s
gas/testsuite/gas/h8300/pushpop.s
gas/testsuite/gas/h8300/pushpoph.s
gas/testsuite/gas/h8300/pushpops.s
gas/testsuite/gas/h8300/rotsh.s
gas/testsuite/gas/h8300/rotshh.s
gas/testsuite/gas/h8300/rotshs.s
gas/testsuite/gas/h8300/symaddgen.s
gas/testsuite/gas/h8300/t01_mov.exp
gas/testsuite/gas/h8300/t01_mov.s
gas/testsuite/gas/h8300/t02_mova.exp
gas/testsuite/gas/h8300/t02_mova.s
gas/testsuite/gas/h8300/t03_add.exp
gas/testsuite/gas/h8300/t03_add.s
gas/testsuite/gas/h8300/t04_sub.exp
gas/testsuite/gas/h8300/t04_sub.s
gas/testsuite/gas/h8300/t05_cmp.exp
gas/testsuite/gas/h8300/t05_cmp.s
gas/testsuite/gas/h8300/t06_ari2.exp
gas/testsuite/gas/h8300/t06_ari2.s
gas/testsuite/gas/h8300/t07_ari3.exp
gas/testsuite/gas/h8300/t07_ari3.s
gas/testsuite/gas/h8300/t08_or.exp
gas/testsuite/gas/h8300/t08_or.s
gas/testsuite/gas/h8300/t09_xor.exp
gas/testsuite/gas/h8300/t09_xor.s
gas/testsuite/gas/h8300/t10_and.exp
gas/testsuite/gas/h8300/t10_and.s
gas/testsuite/gas/h8300/t11_logs.exp
gas/testsuite/gas/h8300/t11_logs.s
gas/testsuite/gas/h8300/t12_bit.exp
gas/testsuite/gas/h8300/t12_bit.s
gas/testsuite/gas/h8300/t13_otr.exp
gas/testsuite/gas/h8300/t13_otr.s
gas/testsuite/gas/hppa/README
gas/testsuite/gas/hppa/basic/add.s
gas/testsuite/gas/hppa/basic/add2.s
gas/testsuite/gas/hppa/basic/addi.s
gas/testsuite/gas/hppa/basic/basic.exp
gas/testsuite/gas/hppa/basic/branch.s
gas/testsuite/gas/hppa/basic/branch2.s
gas/testsuite/gas/hppa/basic/comclr.s
gas/testsuite/gas/hppa/basic/copr.s
gas/testsuite/gas/hppa/basic/coprmem.s
gas/testsuite/gas/hppa/basic/dcor.s
gas/testsuite/gas/hppa/basic/dcor2.s
gas/testsuite/gas/hppa/basic/deposit.s
gas/testsuite/gas/hppa/basic/deposit2.s
gas/testsuite/gas/hppa/basic/deposit3.s
gas/testsuite/gas/hppa/basic/ds.s
gas/testsuite/gas/hppa/basic/extract.s
gas/testsuite/gas/hppa/basic/extract2.s
gas/testsuite/gas/hppa/basic/extract3.s
gas/testsuite/gas/hppa/basic/fmem.s
gas/testsuite/gas/hppa/basic/fmemLRbug.s
gas/testsuite/gas/hppa/basic/fp_comp.s
gas/testsuite/gas/hppa/basic/fp_comp2.s
gas/testsuite/gas/hppa/basic/fp_conv.s
gas/testsuite/gas/hppa/basic/fp_fcmp.s
gas/testsuite/gas/hppa/basic/fp_misc.s
gas/testsuite/gas/hppa/basic/imem.s
gas/testsuite/gas/hppa/basic/immed.s
gas/testsuite/gas/hppa/basic/logical.s
gas/testsuite/gas/hppa/basic/media.s
gas/testsuite/gas/hppa/basic/perf.s
gas/testsuite/gas/hppa/basic/purge.s
gas/testsuite/gas/hppa/basic/purge2.s
gas/testsuite/gas/hppa/basic/sh1add.s
gas/testsuite/gas/hppa/basic/sh2add.s
gas/testsuite/gas/hppa/basic/sh3add.s
gas/testsuite/gas/hppa/basic/shift.s
gas/testsuite/gas/hppa/basic/shift2.s
gas/testsuite/gas/hppa/basic/shift3.s
gas/testsuite/gas/hppa/basic/shladd.s
gas/testsuite/gas/hppa/basic/shladd2.s
gas/testsuite/gas/hppa/basic/special.s
gas/testsuite/gas/hppa/basic/spop.s
gas/testsuite/gas/hppa/basic/sub.s
gas/testsuite/gas/hppa/basic/sub2.s
gas/testsuite/gas/hppa/basic/subi.s
gas/testsuite/gas/hppa/basic/system.s
gas/testsuite/gas/hppa/basic/system2.s
gas/testsuite/gas/hppa/basic/unit.s
gas/testsuite/gas/hppa/basic/unit2.s
gas/testsuite/gas/hppa/basic/weird.s
gas/testsuite/gas/hppa/parse/align1.s
gas/testsuite/gas/hppa/parse/align2.s
gas/testsuite/gas/hppa/parse/appbug.s
gas/testsuite/gas/hppa/parse/badfmpyadd.s
gas/testsuite/gas/hppa/parse/block1.s
gas/testsuite/gas/hppa/parse/block2.s
gas/testsuite/gas/hppa/parse/calldatabug.s
gas/testsuite/gas/hppa/parse/callinfobug.s
gas/testsuite/gas/hppa/parse/defbug.s
gas/testsuite/gas/hppa/parse/entrybug.s
gas/testsuite/gas/hppa/parse/exportbug.s
gas/testsuite/gas/hppa/parse/exprbug.s
gas/testsuite/gas/hppa/parse/fixup7bug.s
gas/testsuite/gas/hppa/parse/global.s
gas/testsuite/gas/hppa/parse/labelbug.s
gas/testsuite/gas/hppa/parse/linesepbug.s
gas/testsuite/gas/hppa/parse/lselbug.s
gas/testsuite/gas/hppa/parse/nosubspace.s
gas/testsuite/gas/hppa/parse/parse.exp
gas/testsuite/gas/hppa/parse/procbug.s
gas/testsuite/gas/hppa/parse/regpopbug.s
gas/testsuite/gas/hppa/parse/space.s
gas/testsuite/gas/hppa/parse/spacebug.s
gas/testsuite/gas/hppa/parse/ssbug.s
gas/testsuite/gas/hppa/parse/stdreg.s
gas/testsuite/gas/hppa/parse/stringer.s
gas/testsuite/gas/hppa/parse/undefbug.s
gas/testsuite/gas/hppa/parse/versionbug.s
gas/testsuite/gas/hppa/parse/xmpyubug.s
gas/testsuite/gas/hppa/reloc/applybug.s
gas/testsuite/gas/hppa/reloc/blebug.s
gas/testsuite/gas/hppa/reloc/blebug2.s
gas/testsuite/gas/hppa/reloc/blebug3.s
gas/testsuite/gas/hppa/reloc/exitbug.s
gas/testsuite/gas/hppa/reloc/fixupbug.s
gas/testsuite/gas/hppa/reloc/funcrelocbug.s
gas/testsuite/gas/hppa/reloc/labelopbug.s
gas/testsuite/gas/hppa/reloc/longcall.s
gas/testsuite/gas/hppa/reloc/picreloc.s
gas/testsuite/gas/hppa/reloc/plabelbug.s
gas/testsuite/gas/hppa/reloc/r_no_reloc.s
gas/testsuite/gas/hppa/reloc/reduce.s
gas/testsuite/gas/hppa/reloc/reduce2.s
gas/testsuite/gas/hppa/reloc/reduce3.s
gas/testsuite/gas/hppa/reloc/reloc.exp
gas/testsuite/gas/hppa/reloc/roundmode.s
gas/testsuite/gas/hppa/reloc/selectorbug.s
gas/testsuite/gas/hppa/unsorted/align3.s
gas/testsuite/gas/hppa/unsorted/align4.s
gas/testsuite/gas/hppa/unsorted/brlenbug.s
gas/testsuite/gas/hppa/unsorted/common.s
gas/testsuite/gas/hppa/unsorted/fragbug.s
gas/testsuite/gas/hppa/unsorted/globalbug.s
gas/testsuite/gas/hppa/unsorted/importbug.s
gas/testsuite/gas/hppa/unsorted/labeldiffs.s
gas/testsuite/gas/hppa/unsorted/locallabel.s
gas/testsuite/gas/hppa/unsorted/ss_align.s
gas/testsuite/gas/hppa/unsorted/unsorted.exp
gas/testsuite/gas/i386/absrel.d
gas/testsuite/gas/i386/absrel.s
gas/testsuite/gas/i386/amd.d
gas/testsuite/gas/i386/amd.s
gas/testsuite/gas/i386/amdfam10.d
gas/testsuite/gas/i386/amdfam10.s
gas/testsuite/gas/i386/bss.d
gas/testsuite/gas/i386/bss.s
gas/testsuite/gas/i386/cr-err.l
gas/testsuite/gas/i386/cr-err.s
gas/testsuite/gas/i386/crx.d
gas/testsuite/gas/i386/crx.s
gas/testsuite/gas/i386/divide.d
gas/testsuite/gas/i386/divide.s
gas/testsuite/gas/i386/equ.d
gas/testsuite/gas/i386/equ.e
gas/testsuite/gas/i386/equ.s
gas/testsuite/gas/i386/float.l
gas/testsuite/gas/i386/float.s
gas/testsuite/gas/i386/fp.d
gas/testsuite/gas/i386/fp.s
gas/testsuite/gas/i386/general.l
gas/testsuite/gas/i386/general.s
gas/testsuite/gas/i386/gotpc.d
gas/testsuite/gas/i386/gotpc.s
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/immed32.d
gas/testsuite/gas/i386/immed32.s
gas/testsuite/gas/i386/immed64.d
gas/testsuite/gas/i386/immed64.s
gas/testsuite/gas/i386/intel.d
gas/testsuite/gas/i386/intel.e
gas/testsuite/gas/i386/intel.s
gas/testsuite/gas/i386/intel16.d
gas/testsuite/gas/i386/intel16.e
gas/testsuite/gas/i386/intel16.s
gas/testsuite/gas/i386/intelbad.l
gas/testsuite/gas/i386/intelbad.s
gas/testsuite/gas/i386/intelok.d
gas/testsuite/gas/i386/intelok.e
gas/testsuite/gas/i386/intelok.s
gas/testsuite/gas/i386/intelpic.d
gas/testsuite/gas/i386/intelpic.s
gas/testsuite/gas/i386/inval-seg.l
gas/testsuite/gas/i386/inval-seg.s
gas/testsuite/gas/i386/inval.l
gas/testsuite/gas/i386/inval.s
gas/testsuite/gas/i386/jump.d
gas/testsuite/gas/i386/jump.s
gas/testsuite/gas/i386/jump16.d
gas/testsuite/gas/i386/jump16.s
gas/testsuite/gas/i386/katmai.d
gas/testsuite/gas/i386/katmai.s
gas/testsuite/gas/i386/merom.d
gas/testsuite/gas/i386/merom.s
gas/testsuite/gas/i386/mixed-mode-reloc.s
gas/testsuite/gas/i386/mixed-mode-reloc32.d
gas/testsuite/gas/i386/mixed-mode-reloc64.d
gas/testsuite/gas/i386/modrm.l
gas/testsuite/gas/i386/modrm.s
gas/testsuite/gas/i386/naked.d
gas/testsuite/gas/i386/naked.s
gas/testsuite/gas/i386/nops-1-i386.d
gas/testsuite/gas/i386/nops-1-i686.d
gas/testsuite/gas/i386/nops-1-merom.d
gas/testsuite/gas/i386/nops-1.d
gas/testsuite/gas/i386/nops-1.s
gas/testsuite/gas/i386/nops-2-i386.d
gas/testsuite/gas/i386/nops-2-merom.d
gas/testsuite/gas/i386/nops-2.d
gas/testsuite/gas/i386/nops-2.s
gas/testsuite/gas/i386/nops.d
gas/testsuite/gas/i386/nops.s
gas/testsuite/gas/i386/opcode.d
gas/testsuite/gas/i386/opcode.s
gas/testsuite/gas/i386/padlock.d
gas/testsuite/gas/i386/padlock.s
gas/testsuite/gas/i386/pcrel.d
gas/testsuite/gas/i386/pcrel.s
gas/testsuite/gas/i386/prefix.d
gas/testsuite/gas/i386/prefix.s
gas/testsuite/gas/i386/prescott.d
gas/testsuite/gas/i386/prescott.s
gas/testsuite/gas/i386/relax.d
gas/testsuite/gas/i386/relax.s
gas/testsuite/gas/i386/reloc.d
gas/testsuite/gas/i386/reloc.s
gas/testsuite/gas/i386/reloc32.d
gas/testsuite/gas/i386/reloc32.l
gas/testsuite/gas/i386/reloc32.s
gas/testsuite/gas/i386/reloc64.d
gas/testsuite/gas/i386/reloc64.l
gas/testsuite/gas/i386/reloc64.s
gas/testsuite/gas/i386/rep-suffix.d
gas/testsuite/gas/i386/rep-suffix.s
gas/testsuite/gas/i386/rep.d
gas/testsuite/gas/i386/rep.s
gas/testsuite/gas/i386/rex.d
gas/testsuite/gas/i386/rex.s
gas/testsuite/gas/i386/secrel.d
gas/testsuite/gas/i386/secrel.s
gas/testsuite/gas/i386/segment.l
gas/testsuite/gas/i386/segment.s
gas/testsuite/gas/i386/sib.d
gas/testsuite/gas/i386/sib.s
gas/testsuite/gas/i386/sse2.d
gas/testsuite/gas/i386/sse2.s
gas/testsuite/gas/i386/ssemmx2.d
gas/testsuite/gas/i386/ssemmx2.s
gas/testsuite/gas/i386/sub.d
gas/testsuite/gas/i386/sub.s
gas/testsuite/gas/i386/suffix.d
gas/testsuite/gas/i386/suffix.s
gas/testsuite/gas/i386/svme.d
gas/testsuite/gas/i386/svme.s
gas/testsuite/gas/i386/svme64.d
gas/testsuite/gas/i386/tlsd.d
gas/testsuite/gas/i386/tlsd.s
gas/testsuite/gas/i386/tlsnopic.d
gas/testsuite/gas/i386/tlsnopic.s
gas/testsuite/gas/i386/tlspic.d
gas/testsuite/gas/i386/tlspic.s
gas/testsuite/gas/i386/vmx.d
gas/testsuite/gas/i386/vmx.s
gas/testsuite/gas/i386/white.l
gas/testsuite/gas/i386/white.s
gas/testsuite/gas/i386/x86-64-addr32.d
gas/testsuite/gas/i386/x86-64-addr32.s
gas/testsuite/gas/i386/x86-64-amdfam10.d
gas/testsuite/gas/i386/x86-64-amdfam10.s
gas/testsuite/gas/i386/x86-64-branch.d
gas/testsuite/gas/i386/x86-64-branch.s
gas/testsuite/gas/i386/x86-64-crx-suffix.d
gas/testsuite/gas/i386/x86-64-crx.d
gas/testsuite/gas/i386/x86-64-crx.s
gas/testsuite/gas/i386/x86-64-drx-suffix.d
gas/testsuite/gas/i386/x86-64-drx.d
gas/testsuite/gas/i386/x86-64-drx.s
gas/testsuite/gas/i386/x86-64-gidt.d
gas/testsuite/gas/i386/x86-64-gidt.s
gas/testsuite/gas/i386/x86-64-inval-seg.l
gas/testsuite/gas/i386/x86-64-inval-seg.s
gas/testsuite/gas/i386/x86-64-inval.l
gas/testsuite/gas/i386/x86-64-inval.s
gas/testsuite/gas/i386/x86-64-merom.d
gas/testsuite/gas/i386/x86-64-merom.s
gas/testsuite/gas/i386/x86-64-nops-1-k8.d
gas/testsuite/gas/i386/x86-64-nops-1-merom.d
gas/testsuite/gas/i386/x86-64-nops-1-nocona.d
gas/testsuite/gas/i386/x86-64-nops-1.d
gas/testsuite/gas/i386/x86-64-nops-1.s
gas/testsuite/gas/i386/x86-64-nops.d
gas/testsuite/gas/i386/x86-64-nops.s
gas/testsuite/gas/i386/x86-64-opcode.d
gas/testsuite/gas/i386/x86-64-opcode.s
gas/testsuite/gas/i386/x86-64-pcrel.d
gas/testsuite/gas/i386/x86-64-pcrel.s
gas/testsuite/gas/i386/x86-64-prescott.d
gas/testsuite/gas/i386/x86-64-prescott.s
gas/testsuite/gas/i386/x86-64-rep-suffix.d
gas/testsuite/gas/i386/x86-64-rep-suffix.s
gas/testsuite/gas/i386/x86-64-rep.d
gas/testsuite/gas/i386/x86-64-rep.s
gas/testsuite/gas/i386/x86-64-rip.d
gas/testsuite/gas/i386/x86-64-rip.s
gas/testsuite/gas/i386/x86-64-segment.l
gas/testsuite/gas/i386/x86-64-segment.s
gas/testsuite/gas/i386/x86-64-stack-intel.d
gas/testsuite/gas/i386/x86-64-stack-suffix.d
gas/testsuite/gas/i386/x86-64-stack.d
gas/testsuite/gas/i386/x86-64-stack.s
gas/testsuite/gas/i386/x86-64-unwind.d
gas/testsuite/gas/i386/x86-64-unwind.s
gas/testsuite/gas/i386/x86-64-vmx.d
gas/testsuite/gas/i386/x86-64-vmx.s
gas/testsuite/gas/i386/x86_64.d
gas/testsuite/gas/i386/x86_64.e
gas/testsuite/gas/i386/x86_64.s
gas/testsuite/gas/i860/README.i860
gas/testsuite/gas/i860/bitwise.d
gas/testsuite/gas/i860/bitwise.s
gas/testsuite/gas/i860/branch.d
gas/testsuite/gas/i860/branch.s
gas/testsuite/gas/i860/bte.d
gas/testsuite/gas/i860/bte.s
gas/testsuite/gas/i860/dir-align01.d
gas/testsuite/gas/i860/dir-align01.s
gas/testsuite/gas/i860/dir-intel01.d
gas/testsuite/gas/i860/dir-intel01.s
gas/testsuite/gas/i860/dir-intel02.d
gas/testsuite/gas/i860/dir-intel02.s
gas/testsuite/gas/i860/dir-intel03-err.l
gas/testsuite/gas/i860/dir-intel03-err.s
gas/testsuite/gas/i860/dual01.d
gas/testsuite/gas/i860/dual01.s
gas/testsuite/gas/i860/dual02-err.l
gas/testsuite/gas/i860/dual02-err.s
gas/testsuite/gas/i860/dual03.d
gas/testsuite/gas/i860/dual03.s
gas/testsuite/gas/i860/fldst01.d
gas/testsuite/gas/i860/fldst01.s
gas/testsuite/gas/i860/fldst02.d
gas/testsuite/gas/i860/fldst02.s
gas/testsuite/gas/i860/fldst03.d
gas/testsuite/gas/i860/fldst03.s
gas/testsuite/gas/i860/fldst04.d
gas/testsuite/gas/i860/fldst04.s
gas/testsuite/gas/i860/fldst05.d
gas/testsuite/gas/i860/fldst05.s
gas/testsuite/gas/i860/fldst06.d
gas/testsuite/gas/i860/fldst06.s
gas/testsuite/gas/i860/fldst07.d
gas/testsuite/gas/i860/fldst07.s
gas/testsuite/gas/i860/fldst08.d
gas/testsuite/gas/i860/fldst08.s
gas/testsuite/gas/i860/float01.d
gas/testsuite/gas/i860/float01.s
gas/testsuite/gas/i860/float02.d
gas/testsuite/gas/i860/float02.s
gas/testsuite/gas/i860/float03.d
gas/testsuite/gas/i860/float03.s
gas/testsuite/gas/i860/float04.d
gas/testsuite/gas/i860/float04.s
gas/testsuite/gas/i860/form.d
gas/testsuite/gas/i860/form.s
gas/testsuite/gas/i860/i860.exp
gas/testsuite/gas/i860/iarith.d
gas/testsuite/gas/i860/iarith.s
gas/testsuite/gas/i860/ldst01.d
gas/testsuite/gas/i860/ldst01.s
gas/testsuite/gas/i860/ldst02.d
gas/testsuite/gas/i860/ldst02.s
gas/testsuite/gas/i860/ldst03.d
gas/testsuite/gas/i860/ldst03.s
gas/testsuite/gas/i860/ldst04.d
gas/testsuite/gas/i860/ldst04.s
gas/testsuite/gas/i860/ldst05.d
gas/testsuite/gas/i860/ldst05.s
gas/testsuite/gas/i860/ldst06.d
gas/testsuite/gas/i860/ldst06.s
gas/testsuite/gas/i860/pfam.d
gas/testsuite/gas/i860/pfam.s
gas/testsuite/gas/i860/pfmam.d
gas/testsuite/gas/i860/pfmam.s
gas/testsuite/gas/i860/pfmsm.d
gas/testsuite/gas/i860/pfmsm.s
gas/testsuite/gas/i860/pfsm.d
gas/testsuite/gas/i860/pfsm.s
gas/testsuite/gas/i860/pseudo-ops01.d
gas/testsuite/gas/i860/pseudo-ops01.s
gas/testsuite/gas/i860/regress01.d
gas/testsuite/gas/i860/regress01.s
gas/testsuite/gas/i860/shift.d
gas/testsuite/gas/i860/shift.s
gas/testsuite/gas/i860/simd.d
gas/testsuite/gas/i860/simd.s
gas/testsuite/gas/i860/system.d
gas/testsuite/gas/i860/system.s
gas/testsuite/gas/i860/xp.d
gas/testsuite/gas/i860/xp.s
gas/testsuite/gas/ia64/alias-ilp32.d
gas/testsuite/gas/ia64/alias.d
gas/testsuite/gas/ia64/alias.s
gas/testsuite/gas/ia64/align.d
gas/testsuite/gas/ia64/align.s
gas/testsuite/gas/ia64/alloc.l
gas/testsuite/gas/ia64/alloc.s
gas/testsuite/gas/ia64/bundling.d
gas/testsuite/gas/ia64/bundling.s
gas/testsuite/gas/ia64/dependency-1.d
gas/testsuite/gas/ia64/dependency-1.s
gas/testsuite/gas/ia64/dv-branch.d
gas/testsuite/gas/ia64/dv-branch.s
gas/testsuite/gas/ia64/dv-entry-err.l
gas/testsuite/gas/ia64/dv-entry-err.s
gas/testsuite/gas/ia64/dv-imply.d
gas/testsuite/gas/ia64/dv-imply.s
gas/testsuite/gas/ia64/dv-mutex-err.l
gas/testsuite/gas/ia64/dv-mutex-err.s
gas/testsuite/gas/ia64/dv-mutex.d
gas/testsuite/gas/ia64/dv-mutex.s
gas/testsuite/gas/ia64/dv-raw-err.l
gas/testsuite/gas/ia64/dv-raw-err.s
gas/testsuite/gas/ia64/dv-safe.d
gas/testsuite/gas/ia64/dv-safe.s
gas/testsuite/gas/ia64/dv-srlz.d
gas/testsuite/gas/ia64/dv-srlz.s
gas/testsuite/gas/ia64/dv-war-err.l
gas/testsuite/gas/ia64/dv-war-err.s
gas/testsuite/gas/ia64/dv-waw-err.l
gas/testsuite/gas/ia64/dv-waw-err.s
gas/testsuite/gas/ia64/fixup-dump.pl
gas/testsuite/gas/ia64/forward.d
gas/testsuite/gas/ia64/forward.s
gas/testsuite/gas/ia64/global.d
gas/testsuite/gas/ia64/global.s
gas/testsuite/gas/ia64/group-1.d
gas/testsuite/gas/ia64/group-1.s
gas/testsuite/gas/ia64/group-2.d
gas/testsuite/gas/ia64/group-2.s
gas/testsuite/gas/ia64/hint.b-err.l
gas/testsuite/gas/ia64/hint.b-err.s
gas/testsuite/gas/ia64/hint.b-warn.l
gas/testsuite/gas/ia64/hint.b-warn.s
gas/testsuite/gas/ia64/ia64.exp
gas/testsuite/gas/ia64/index.l
gas/testsuite/gas/ia64/index.s
gas/testsuite/gas/ia64/invalid-ar.l
gas/testsuite/gas/ia64/invalid-ar.s
gas/testsuite/gas/ia64/label.l
gas/testsuite/gas/ia64/label.s
gas/testsuite/gas/ia64/last.l
gas/testsuite/gas/ia64/last.s
gas/testsuite/gas/ia64/ldxmov-1.d
gas/testsuite/gas/ia64/ldxmov-1.s
gas/testsuite/gas/ia64/ldxmov-2.l
gas/testsuite/gas/ia64/ldxmov-2.s
gas/testsuite/gas/ia64/ltoff22x-1.d
gas/testsuite/gas/ia64/ltoff22x-1.s
gas/testsuite/gas/ia64/ltoff22x-2.d
gas/testsuite/gas/ia64/ltoff22x-2.s
gas/testsuite/gas/ia64/ltoff22x-3.d
gas/testsuite/gas/ia64/ltoff22x-3.s
gas/testsuite/gas/ia64/ltoff22x-4.d
gas/testsuite/gas/ia64/ltoff22x-4.s
gas/testsuite/gas/ia64/ltoff22x-5.d
gas/testsuite/gas/ia64/ltoff22x-5.s
gas/testsuite/gas/ia64/mov-ar.d
gas/testsuite/gas/ia64/mov-ar.s
gas/testsuite/gas/ia64/no-fit.l
gas/testsuite/gas/ia64/no-fit.s
gas/testsuite/gas/ia64/nop_x.d
gas/testsuite/gas/ia64/nop_x.s
gas/testsuite/gas/ia64/nostkreg.d
gas/testsuite/gas/ia64/nostkreg.s
gas/testsuite/gas/ia64/opc-a-err.l
gas/testsuite/gas/ia64/opc-a-err.s
gas/testsuite/gas/ia64/opc-a.d
gas/testsuite/gas/ia64/opc-a.pl
gas/testsuite/gas/ia64/opc-a.s
gas/testsuite/gas/ia64/opc-b.d
gas/testsuite/gas/ia64/opc-b.pl
gas/testsuite/gas/ia64/opc-b.s
gas/testsuite/gas/ia64/opc-f.d
gas/testsuite/gas/ia64/opc-f.pl
gas/testsuite/gas/ia64/opc-f.s
gas/testsuite/gas/ia64/opc-i.d
gas/testsuite/gas/ia64/opc-i.pl
gas/testsuite/gas/ia64/opc-i.s
gas/testsuite/gas/ia64/opc-m.d
gas/testsuite/gas/ia64/opc-m.pl
gas/testsuite/gas/ia64/opc-m.s
gas/testsuite/gas/ia64/opc-x.d
gas/testsuite/gas/ia64/opc-x.s
gas/testsuite/gas/ia64/operand-or.d
gas/testsuite/gas/ia64/operand-or.s
gas/testsuite/gas/ia64/operands.l
gas/testsuite/gas/ia64/operands.s
gas/testsuite/gas/ia64/order.d
gas/testsuite/gas/ia64/order.s
gas/testsuite/gas/ia64/pcrel.d
gas/testsuite/gas/ia64/pcrel.s
gas/testsuite/gas/ia64/pound.l
gas/testsuite/gas/ia64/pound.s
gas/testsuite/gas/ia64/pred-rel.s
gas/testsuite/gas/ia64/proc.l
gas/testsuite/gas/ia64/proc.s
gas/testsuite/gas/ia64/pseudo.d
gas/testsuite/gas/ia64/pseudo.s
gas/testsuite/gas/ia64/radix.l
gas/testsuite/gas/ia64/radix.s
gas/testsuite/gas/ia64/real.d
gas/testsuite/gas/ia64/real.s
gas/testsuite/gas/ia64/reg-err.l
gas/testsuite/gas/ia64/reg-err.s
gas/testsuite/gas/ia64/regs.d
gas/testsuite/gas/ia64/regs.pl
gas/testsuite/gas/ia64/regs.s
gas/testsuite/gas/ia64/regval.l
gas/testsuite/gas/ia64/regval.s
gas/testsuite/gas/ia64/reloc-bad.l
gas/testsuite/gas/ia64/reloc-bad.s
gas/testsuite/gas/ia64/reloc-uw-ilp32.d
gas/testsuite/gas/ia64/reloc-uw.d
gas/testsuite/gas/ia64/reloc-uw.s
gas/testsuite/gas/ia64/reloc.d
gas/testsuite/gas/ia64/reloc.s
gas/testsuite/gas/ia64/rotX.l
gas/testsuite/gas/ia64/rotX.s
gas/testsuite/gas/ia64/secname-ilp32.d
gas/testsuite/gas/ia64/secname.d
gas/testsuite/gas/ia64/secname.s
gas/testsuite/gas/ia64/slot2.l
gas/testsuite/gas/ia64/slot2.s
gas/testsuite/gas/ia64/strange.d
gas/testsuite/gas/ia64/strange.s
gas/testsuite/gas/ia64/tls.d
gas/testsuite/gas/ia64/tls.s
gas/testsuite/gas/ia64/unwind-bad.l
gas/testsuite/gas/ia64/unwind-bad.s
gas/testsuite/gas/ia64/unwind-err.l
gas/testsuite/gas/ia64/unwind-err.s
gas/testsuite/gas/ia64/unwind-ilp32.d
gas/testsuite/gas/ia64/unwind-ok.d
gas/testsuite/gas/ia64/unwind-ok.s
gas/testsuite/gas/ia64/unwind.d
gas/testsuite/gas/ia64/unwind.s
gas/testsuite/gas/ia64/xdata-ilp32.d
gas/testsuite/gas/ia64/xdata.d
gas/testsuite/gas/ia64/xdata.s
gas/testsuite/gas/ieee-fp/x930509a.exp
gas/testsuite/gas/ieee-fp/x930509a.s
gas/testsuite/gas/iq2000/allinsn.d
gas/testsuite/gas/iq2000/allinsn.exp
gas/testsuite/gas/iq2000/allinsn.s
gas/testsuite/gas/iq2000/hazard0.s
gas/testsuite/gas/iq2000/hazard1.s
gas/testsuite/gas/iq2000/hazard2.s
gas/testsuite/gas/iq2000/hazard3.s
gas/testsuite/gas/iq2000/hazard4.s
gas/testsuite/gas/iq2000/hazard5.s
gas/testsuite/gas/iq2000/load-hazards.exp
gas/testsuite/gas/iq2000/nohazard.s
gas/testsuite/gas/iq2000/noyield.s
gas/testsuite/gas/iq2000/odd-ldw.exp
gas/testsuite/gas/iq2000/odd-sdw.exp
gas/testsuite/gas/iq2000/oddldw.s
gas/testsuite/gas/iq2000/oddsdw.s
gas/testsuite/gas/iq2000/yield.exp
gas/testsuite/gas/iq2000/yield0.s
gas/testsuite/gas/iq2000/yield1.s
gas/testsuite/gas/iq2000/yield2.s
gas/testsuite/gas/lns/lns-common-1.d
gas/testsuite/gas/lns/lns-common-1.s
gas/testsuite/gas/lns/lns-diag-1.l
gas/testsuite/gas/lns/lns-diag-1.s
gas/testsuite/gas/lns/lns.exp
gas/testsuite/gas/m32r/allinsn.d
gas/testsuite/gas/m32r/allinsn.exp
gas/testsuite/gas/m32r/allinsn.s
gas/testsuite/gas/m32r/error.exp
gas/testsuite/gas/m32r/fslot.d
gas/testsuite/gas/m32r/fslot.s
gas/testsuite/gas/m32r/fslotx.d
gas/testsuite/gas/m32r/fslotx.s
gas/testsuite/gas/m32r/high-1.d
gas/testsuite/gas/m32r/high-1.s
gas/testsuite/gas/m32r/interfere.s
gas/testsuite/gas/m32r/m32r.exp
gas/testsuite/gas/m32r/m32r2.d
gas/testsuite/gas/m32r/m32r2.exp
gas/testsuite/gas/m32r/m32r2.s
gas/testsuite/gas/m32r/m32rx.d
gas/testsuite/gas/m32r/m32rx.exp
gas/testsuite/gas/m32r/m32rx.s
gas/testsuite/gas/m32r/outofrange.s
gas/testsuite/gas/m32r/parallel-2.d
gas/testsuite/gas/m32r/parallel-2.s
gas/testsuite/gas/m32r/parallel.s
gas/testsuite/gas/m32r/pic.d
gas/testsuite/gas/m32r/pic.exp
gas/testsuite/gas/m32r/pic.s
gas/testsuite/gas/m32r/pic2.d
gas/testsuite/gas/m32r/pic2.s
gas/testsuite/gas/m32r/rel32-err.s
gas/testsuite/gas/m32r/rel32-pic.d
gas/testsuite/gas/m32r/rel32-pic.s
gas/testsuite/gas/m32r/rel32.d
gas/testsuite/gas/m32r/rel32.exp
gas/testsuite/gas/m32r/rel32.s
gas/testsuite/gas/m32r/rela-1.d
gas/testsuite/gas/m32r/rela-1.s
gas/testsuite/gas/m32r/relax-1.d
gas/testsuite/gas/m32r/relax-1.s
gas/testsuite/gas/m32r/relax-2.d
gas/testsuite/gas/m32r/relax-2.s
gas/testsuite/gas/m32r/seth.d
gas/testsuite/gas/m32r/seth.s
gas/testsuite/gas/m32r/signed-relocs.d
gas/testsuite/gas/m32r/signed-relocs.s
gas/testsuite/gas/m32r/uppercase.d
gas/testsuite/gas/m32r/uppercase.s
gas/testsuite/gas/m32r/wrongsize.s
gas/testsuite/gas/m68hc11/abi-m68hc11-16-32.d
gas/testsuite/gas/m68hc11/abi-m68hc11-16-64.d
gas/testsuite/gas/m68hc11/abi-m68hc11-32-32.d
gas/testsuite/gas/m68hc11/abi-m68hc11-32-64.d
gas/testsuite/gas/m68hc11/abi.s
gas/testsuite/gas/m68hc11/all_insns.d
gas/testsuite/gas/m68hc11/all_insns.s
gas/testsuite/gas/m68hc11/branchs12.d
gas/testsuite/gas/m68hc11/branchs12.s
gas/testsuite/gas/m68hc11/bug-1825.d
gas/testsuite/gas/m68hc11/bug-1825.s
gas/testsuite/gas/m68hc11/indexed12.d
gas/testsuite/gas/m68hc11/indexed12.s
gas/testsuite/gas/m68hc11/insns-dwarf2.d
gas/testsuite/gas/m68hc11/insns.d
gas/testsuite/gas/m68hc11/insns.s
gas/testsuite/gas/m68hc11/insns12.d
gas/testsuite/gas/m68hc11/insns12.s
gas/testsuite/gas/m68hc11/lbranch-dwarf2.d
gas/testsuite/gas/m68hc11/lbranch.d
gas/testsuite/gas/m68hc11/lbranch.s
gas/testsuite/gas/m68hc11/m68hc11.exp
gas/testsuite/gas/m68hc11/malis-include.s
gas/testsuite/gas/m68hc11/malis.d
gas/testsuite/gas/m68hc11/malis.s
gas/testsuite/gas/m68hc11/movb.d
gas/testsuite/gas/m68hc11/movb.s
gas/testsuite/gas/m68hc11/opers12-dwarf2.d
gas/testsuite/gas/m68hc11/opers12.d
gas/testsuite/gas/m68hc11/opers12.s
gas/testsuite/gas/m68k-coff/gas.exp
gas/testsuite/gas/m68k-coff/p2389.s
gas/testsuite/gas/m68k-coff/p2389a.s
gas/testsuite/gas/m68k-coff/p2430.s
gas/testsuite/gas/m68k-coff/p2430a.s
gas/testsuite/gas/m68k-coff/t1.s
gas/testsuite/gas/m68k/all.exp
gas/testsuite/gas/m68k/arch-cpu-1.d
gas/testsuite/gas/m68k/arch-cpu-1.s
gas/testsuite/gas/m68k/bitfield.d
gas/testsuite/gas/m68k/bitfield.s
gas/testsuite/gas/m68k/cas.d
gas/testsuite/gas/m68k/cas.s
gas/testsuite/gas/m68k/disperr.s
gas/testsuite/gas/m68k/fmoveml.d
gas/testsuite/gas/m68k/fmoveml.s
gas/testsuite/gas/m68k/link.d
gas/testsuite/gas/m68k/link.s
gas/testsuite/gas/m68k/mcf-emac.d
gas/testsuite/gas/m68k/mcf-emac.s
gas/testsuite/gas/m68k/mcf-fpu.d
gas/testsuite/gas/m68k/mcf-fpu.s
gas/testsuite/gas/m68k/mcf-mac.d
gas/testsuite/gas/m68k/mcf-mac.s
gas/testsuite/gas/m68k/mcf-mov3q.d
gas/testsuite/gas/m68k/mcf-mov3q.s
gas/testsuite/gas/m68k/mode5.d
gas/testsuite/gas/m68k/mode5.s
gas/testsuite/gas/m68k/op68000.d
gas/testsuite/gas/m68k/operands.d
gas/testsuite/gas/m68k/operands.s
gas/testsuite/gas/m68k/p2410.s
gas/testsuite/gas/m68k/p2663.s
gas/testsuite/gas/m68k/pcrel.d
gas/testsuite/gas/m68k/pcrel.s
gas/testsuite/gas/m68k/pic1.s
gas/testsuite/gas/m68k/t2.d
gas/testsuite/gas/m68k/t2.s
gas/testsuite/gas/macros/and.s
gas/testsuite/gas/macros/app1.d
gas/testsuite/gas/macros/app1.s
gas/testsuite/gas/macros/app2.d
gas/testsuite/gas/macros/app2.s
gas/testsuite/gas/macros/app3.d
gas/testsuite/gas/macros/app3.s
gas/testsuite/gas/macros/app4.d
gas/testsuite/gas/macros/app4.s
gas/testsuite/gas/macros/app4b.s
gas/testsuite/gas/macros/badarg.l
gas/testsuite/gas/macros/badarg.s
gas/testsuite/gas/macros/dot.l
gas/testsuite/gas/macros/dot.s
gas/testsuite/gas/macros/end.l
gas/testsuite/gas/macros/end.s
gas/testsuite/gas/macros/err.s
gas/testsuite/gas/macros/irp.d
gas/testsuite/gas/macros/irp.s
gas/testsuite/gas/macros/macros.exp
gas/testsuite/gas/macros/paren.d
gas/testsuite/gas/macros/paren.s
gas/testsuite/gas/macros/purge.l
gas/testsuite/gas/macros/purge.s
gas/testsuite/gas/macros/redef.l
gas/testsuite/gas/macros/redef.s
gas/testsuite/gas/macros/repeat.d
gas/testsuite/gas/macros/repeat.s
gas/testsuite/gas/macros/rept.d
gas/testsuite/gas/macros/rept.s
gas/testsuite/gas/macros/semi.d
gas/testsuite/gas/macros/semi.s
gas/testsuite/gas/macros/strings.d
gas/testsuite/gas/macros/strings.s
gas/testsuite/gas/macros/test1.d
gas/testsuite/gas/macros/test1.s
gas/testsuite/gas/macros/test2.d
gas/testsuite/gas/macros/test2.s
gas/testsuite/gas/macros/test3.d
gas/testsuite/gas/macros/test3.s
gas/testsuite/gas/macros/vararg.d
gas/testsuite/gas/macros/vararg.s
gas/testsuite/gas/maxq10/bits.d
gas/testsuite/gas/maxq10/bits.s
gas/testsuite/gas/maxq10/call.d
gas/testsuite/gas/maxq10/call.s
gas/testsuite/gas/maxq10/data.s
gas/testsuite/gas/maxq10/data2.d
gas/testsuite/gas/maxq10/data2.s
gas/testsuite/gas/maxq10/data3.d
gas/testsuite/gas/maxq10/data3.s
gas/testsuite/gas/maxq10/err.s
gas/testsuite/gas/maxq10/jump.d
gas/testsuite/gas/maxq10/jump.s
gas/testsuite/gas/maxq10/logical.d
gas/testsuite/gas/maxq10/logical.s
gas/testsuite/gas/maxq10/math.d
gas/testsuite/gas/maxq10/math.s
gas/testsuite/gas/maxq10/maxq10.exp
gas/testsuite/gas/maxq10/pmtest.d
gas/testsuite/gas/maxq10/pmtest.s
gas/testsuite/gas/maxq10/range.d
gas/testsuite/gas/maxq10/range.s
gas/testsuite/gas/maxq20/bits.d
gas/testsuite/gas/maxq20/bits.s
gas/testsuite/gas/maxq20/call.d
gas/testsuite/gas/maxq20/call.s
gas/testsuite/gas/maxq20/data1.d
gas/testsuite/gas/maxq20/data1.s
gas/testsuite/gas/maxq20/data2.d
gas/testsuite/gas/maxq20/data2.s
gas/testsuite/gas/maxq20/data3.d
gas/testsuite/gas/maxq20/data3.s
gas/testsuite/gas/maxq20/jump.d
gas/testsuite/gas/maxq20/jump.s
gas/testsuite/gas/maxq20/jzimm.d
gas/testsuite/gas/maxq20/jzimm.s
gas/testsuite/gas/maxq20/logical.d
gas/testsuite/gas/maxq20/logical.s
gas/testsuite/gas/maxq20/math.d
gas/testsuite/gas/maxq20/math.s
gas/testsuite/gas/maxq20/maxq20.exp
gas/testsuite/gas/maxq20/pfx2.s
gas/testsuite/gas/maxq20/pmtest.d
gas/testsuite/gas/maxq20/pmtest.s
gas/testsuite/gas/maxq20/pxf0.s
gas/testsuite/gas/maxq20/range.d
gas/testsuite/gas/maxq20/range.s
gas/testsuite/gas/mcore/allinsn.d
gas/testsuite/gas/mcore/allinsn.exp
gas/testsuite/gas/mcore/allinsn.s
gas/testsuite/gas/mips/abs.d
gas/testsuite/gas/mips/abs.s
gas/testsuite/gas/mips/add.d
gas/testsuite/gas/mips/add.s
gas/testsuite/gas/mips/and.d
gas/testsuite/gas/mips/and.s
gas/testsuite/gas/mips/baddata1.l
gas/testsuite/gas/mips/baddata1.s
gas/testsuite/gas/mips/beq.d
gas/testsuite/gas/mips/beq.s
gas/testsuite/gas/mips/bge.d
gas/testsuite/gas/mips/bge.s
gas/testsuite/gas/mips/bgeu.d
gas/testsuite/gas/mips/bgeu.s
gas/testsuite/gas/mips/blt.d
gas/testsuite/gas/mips/blt.s
gas/testsuite/gas/mips/bltu.d
gas/testsuite/gas/mips/bltu.s
gas/testsuite/gas/mips/branch-misc-1.d
gas/testsuite/gas/mips/branch-misc-1.s
gas/testsuite/gas/mips/branch-misc-2-64.d
gas/testsuite/gas/mips/branch-misc-2.d
gas/testsuite/gas/mips/branch-misc-2.s
gas/testsuite/gas/mips/branch-misc-2pic-64.d
gas/testsuite/gas/mips/branch-misc-2pic.d
gas/testsuite/gas/mips/branch-misc-3.d
gas/testsuite/gas/mips/branch-misc-3.s
gas/testsuite/gas/mips/branch-swap.d
gas/testsuite/gas/mips/branch-swap.s
gas/testsuite/gas/mips/break20.d
gas/testsuite/gas/mips/break20.s
gas/testsuite/gas/mips/cp0-names-mips32.d
gas/testsuite/gas/mips/cp0-names-mips32r2.d
gas/testsuite/gas/mips/cp0-names-mips64.d
gas/testsuite/gas/mips/cp0-names-mips64r2.d
gas/testsuite/gas/mips/cp0-names-numeric.d
gas/testsuite/gas/mips/cp0-names-sb1.d
gas/testsuite/gas/mips/cp0-names.s
gas/testsuite/gas/mips/cp0sel-names-mips32.d
gas/testsuite/gas/mips/cp0sel-names-mips32r2.d
gas/testsuite/gas/mips/cp0sel-names-mips64.d
gas/testsuite/gas/mips/cp0sel-names-mips64r2.d
gas/testsuite/gas/mips/cp0sel-names-numeric.d
gas/testsuite/gas/mips/cp0sel-names-sb1.d
gas/testsuite/gas/mips/cp0sel-names.s
gas/testsuite/gas/mips/delay.d
gas/testsuite/gas/mips/delay.s
gas/testsuite/gas/mips/div-ilocks.d
gas/testsuite/gas/mips/div.d
gas/testsuite/gas/mips/div.s
gas/testsuite/gas/mips/dli.d
gas/testsuite/gas/mips/dli.s
gas/testsuite/gas/mips/e32-rel2.d
gas/testsuite/gas/mips/e32-rel4.d
gas/testsuite/gas/mips/e32el-rel2.d
gas/testsuite/gas/mips/elf-consthilo.d
gas/testsuite/gas/mips/elf-consthilo.s
gas/testsuite/gas/mips/elf-jal.d
gas/testsuite/gas/mips/elf-rel-got-n32.d
gas/testsuite/gas/mips/elf-rel-got-n32.s
gas/testsuite/gas/mips/elf-rel-got-n64.d
gas/testsuite/gas/mips/elf-rel-got-n64.s
gas/testsuite/gas/mips/elf-rel-xgot-n32.d
gas/testsuite/gas/mips/elf-rel-xgot-n64.d
gas/testsuite/gas/mips/elf-rel.d
gas/testsuite/gas/mips/elf-rel.s
gas/testsuite/gas/mips/elf-rel10.d
gas/testsuite/gas/mips/elf-rel10.s
gas/testsuite/gas/mips/elf-rel11.d
gas/testsuite/gas/mips/elf-rel11.s
gas/testsuite/gas/mips/elf-rel12.d
gas/testsuite/gas/mips/elf-rel12.s
gas/testsuite/gas/mips/elf-rel13.d
gas/testsuite/gas/mips/elf-rel13.s
gas/testsuite/gas/mips/elf-rel14.d
gas/testsuite/gas/mips/elf-rel14.s
gas/testsuite/gas/mips/elf-rel15.d
gas/testsuite/gas/mips/elf-rel15.s
gas/testsuite/gas/mips/elf-rel16.d
gas/testsuite/gas/mips/elf-rel16.s
gas/testsuite/gas/mips/elf-rel17.d
gas/testsuite/gas/mips/elf-rel17.s
gas/testsuite/gas/mips/elf-rel18.d
gas/testsuite/gas/mips/elf-rel18.s
gas/testsuite/gas/mips/elf-rel19.d
gas/testsuite/gas/mips/elf-rel19.s
gas/testsuite/gas/mips/elf-rel2.d
gas/testsuite/gas/mips/elf-rel2.s
gas/testsuite/gas/mips/elf-rel20.d
gas/testsuite/gas/mips/elf-rel20.s
gas/testsuite/gas/mips/elf-rel21.d
gas/testsuite/gas/mips/elf-rel21.s
gas/testsuite/gas/mips/elf-rel22.d
gas/testsuite/gas/mips/elf-rel22.s
gas/testsuite/gas/mips/elf-rel23.d
gas/testsuite/gas/mips/elf-rel23.s
gas/testsuite/gas/mips/elf-rel23a.d
gas/testsuite/gas/mips/elf-rel23b.d
gas/testsuite/gas/mips/elf-rel24.d
gas/testsuite/gas/mips/elf-rel24.s
gas/testsuite/gas/mips/elf-rel25.d
gas/testsuite/gas/mips/elf-rel25.s
gas/testsuite/gas/mips/elf-rel25a.d
gas/testsuite/gas/mips/elf-rel3.d
gas/testsuite/gas/mips/elf-rel3.s
gas/testsuite/gas/mips/elf-rel4.d
gas/testsuite/gas/mips/elf-rel4.s
gas/testsuite/gas/mips/elf-rel5.d
gas/testsuite/gas/mips/elf-rel5.s
gas/testsuite/gas/mips/elf-rel6-n32.d
gas/testsuite/gas/mips/elf-rel6-n64.d
gas/testsuite/gas/mips/elf-rel6.d
gas/testsuite/gas/mips/elf-rel6.s
gas/testsuite/gas/mips/elf-rel7.d
gas/testsuite/gas/mips/elf-rel7.s
gas/testsuite/gas/mips/elf-rel8.d
gas/testsuite/gas/mips/elf-rel8.s
gas/testsuite/gas/mips/elf-rel9.d
gas/testsuite/gas/mips/elf-rel9.s
gas/testsuite/gas/mips/elf_arch_mips1.d
gas/testsuite/gas/mips/elf_arch_mips2.d
gas/testsuite/gas/mips/elf_arch_mips3.d
gas/testsuite/gas/mips/elf_arch_mips32.d
gas/testsuite/gas/mips/elf_arch_mips32r2.d
gas/testsuite/gas/mips/elf_arch_mips4.d
gas/testsuite/gas/mips/elf_arch_mips5.d
gas/testsuite/gas/mips/elf_arch_mips64.d
gas/testsuite/gas/mips/elf_arch_mips64r2.d
gas/testsuite/gas/mips/elf_ase_mips16.d
gas/testsuite/gas/mips/elf_e_flags.c
gas/testsuite/gas/mips/elf_e_flags.s
gas/testsuite/gas/mips/elf_e_flags1.d
gas/testsuite/gas/mips/elf_e_flags2.d
gas/testsuite/gas/mips/elf_e_flags3.d
gas/testsuite/gas/mips/elf_e_flags4.d
gas/testsuite/gas/mips/elfel-rel.d
gas/testsuite/gas/mips/elfel-rel2.d
gas/testsuite/gas/mips/elfel-rel3.d
gas/testsuite/gas/mips/empty.s
gas/testsuite/gas/mips/expr1.d
gas/testsuite/gas/mips/expr1.s
gas/testsuite/gas/mips/fpr-names-32.d
gas/testsuite/gas/mips/fpr-names-64.d
gas/testsuite/gas/mips/fpr-names-n32.d
gas/testsuite/gas/mips/fpr-names-numeric.d
gas/testsuite/gas/mips/fpr-names.s
gas/testsuite/gas/mips/gpr-names-32.d
gas/testsuite/gas/mips/gpr-names-64.d
gas/testsuite/gas/mips/gpr-names-n32.d
gas/testsuite/gas/mips/gpr-names-numeric.d
gas/testsuite/gas/mips/gpr-names.s
gas/testsuite/gas/mips/hwr-names-mips32r2.d
gas/testsuite/gas/mips/hwr-names-mips64r2.d
gas/testsuite/gas/mips/hwr-names-numeric.d
gas/testsuite/gas/mips/hwr-names.s
gas/testsuite/gas/mips/illegal.l
gas/testsuite/gas/mips/illegal.s
gas/testsuite/gas/mips/itbl
gas/testsuite/gas/mips/itbl.s
gas/testsuite/gas/mips/jal-newabi.d
gas/testsuite/gas/mips/jal-newabi.s
gas/testsuite/gas/mips/jal-range.l
gas/testsuite/gas/mips/jal-range.s
gas/testsuite/gas/mips/jal-svr4pic.d
gas/testsuite/gas/mips/jal-svr4pic.s
gas/testsuite/gas/mips/jal-xgot.d
gas/testsuite/gas/mips/jal.d
gas/testsuite/gas/mips/jal.s
gas/testsuite/gas/mips/la-svr4pic.d
gas/testsuite/gas/mips/la-xgot.d
gas/testsuite/gas/mips/la.d
gas/testsuite/gas/mips/la.s
gas/testsuite/gas/mips/lb-pic.s
gas/testsuite/gas/mips/lb-svr4pic-ilocks.d
gas/testsuite/gas/mips/lb-svr4pic.d
gas/testsuite/gas/mips/lb-xgot-ilocks.d
gas/testsuite/gas/mips/lb-xgot.d
gas/testsuite/gas/mips/lb.d
gas/testsuite/gas/mips/lb.s
gas/testsuite/gas/mips/lca-svr4pic.d
gas/testsuite/gas/mips/lca-xgot.d
gas/testsuite/gas/mips/lca.s
gas/testsuite/gas/mips/ld-ilocks-addr32.d
gas/testsuite/gas/mips/ld-ilocks.d
gas/testsuite/gas/mips/ld-pic.s
gas/testsuite/gas/mips/ld-svr4pic.d
gas/testsuite/gas/mips/ld-xgot.d
gas/testsuite/gas/mips/ld.d
gas/testsuite/gas/mips/ld.s
gas/testsuite/gas/mips/ldstla-32-1.l
gas/testsuite/gas/mips/ldstla-32-1.s
gas/testsuite/gas/mips/ldstla-32-mips3-1.l
gas/testsuite/gas/mips/ldstla-32-mips3-1.s
gas/testsuite/gas/mips/ldstla-32-mips3-shared.d
gas/testsuite/gas/mips/ldstla-32-mips3.d
gas/testsuite/gas/mips/ldstla-32-mips3.s
gas/testsuite/gas/mips/ldstla-32-shared.d
gas/testsuite/gas/mips/ldstla-32.d
gas/testsuite/gas/mips/ldstla-32.s
gas/testsuite/gas/mips/ldstla-eabi64.d
gas/testsuite/gas/mips/ldstla-n64-shared.d
gas/testsuite/gas/mips/ldstla-n64-sym32.d
gas/testsuite/gas/mips/ldstla-n64.d
gas/testsuite/gas/mips/ldstla-n64.s
gas/testsuite/gas/mips/ldstla-sym32.s
gas/testsuite/gas/mips/li.d
gas/testsuite/gas/mips/li.s
gas/testsuite/gas/mips/lif-svr4pic.d
gas/testsuite/gas/mips/lif-xgot.d
gas/testsuite/gas/mips/lifloat.d
gas/testsuite/gas/mips/lifloat.s
gas/testsuite/gas/mips/lineno.d
gas/testsuite/gas/mips/lineno.s
gas/testsuite/gas/mips/macro-warn-1-n32.d
gas/testsuite/gas/mips/macro-warn-1-n32.l
gas/testsuite/gas/mips/macro-warn-1.d
gas/testsuite/gas/mips/macro-warn-1.l
gas/testsuite/gas/mips/macro-warn-1.s
gas/testsuite/gas/mips/macro-warn-2-n32.d
gas/testsuite/gas/mips/macro-warn-2.d
gas/testsuite/gas/mips/macro-warn-2.l
gas/testsuite/gas/mips/macro-warn-2.s
gas/testsuite/gas/mips/macro-warn-3.d
gas/testsuite/gas/mips/macro-warn-3.l
gas/testsuite/gas/mips/macro-warn-3.s
gas/testsuite/gas/mips/macro-warn-4.d
gas/testsuite/gas/mips/macro-warn-4.l
gas/testsuite/gas/mips/macro-warn-4.s
gas/testsuite/gas/mips/mips-abi32-pic.d
gas/testsuite/gas/mips/mips-abi32-pic.s
gas/testsuite/gas/mips/mips-abi32-pic2.d
gas/testsuite/gas/mips/mips-abi32-pic2.s
gas/testsuite/gas/mips/mips-abi32.d
gas/testsuite/gas/mips/mips-abi32.s
gas/testsuite/gas/mips/mips-gp32-fp32-pic.d
gas/testsuite/gas/mips/mips-gp32-fp32-pic.s
gas/testsuite/gas/mips/mips-gp32-fp32.d
gas/testsuite/gas/mips/mips-gp32-fp32.s
gas/testsuite/gas/mips/mips-gp32-fp64-pic.d
gas/testsuite/gas/mips/mips-gp32-fp64-pic.s
gas/testsuite/gas/mips/mips-gp32-fp64.d
gas/testsuite/gas/mips/mips-gp32-fp64.l
gas/testsuite/gas/mips/mips-gp32-fp64.s
gas/testsuite/gas/mips/mips-gp64-fp32-pic.d
gas/testsuite/gas/mips/mips-gp64-fp32-pic.l
gas/testsuite/gas/mips/mips-gp64-fp32-pic.s
gas/testsuite/gas/mips/mips-gp64-fp32.d
gas/testsuite/gas/mips/mips-gp64-fp32.l
gas/testsuite/gas/mips/mips-gp64-fp32.s
gas/testsuite/gas/mips/mips-gp64-fp64-pic.d
gas/testsuite/gas/mips/mips-gp64-fp64-pic.s
gas/testsuite/gas/mips/mips-gp64-fp64.d
gas/testsuite/gas/mips/mips-gp64-fp64.l
gas/testsuite/gas/mips/mips-gp64-fp64.s
gas/testsuite/gas/mips/mips-jalx.d
gas/testsuite/gas/mips/mips-jalx.s
gas/testsuite/gas/mips/mips-no-jalx.l
gas/testsuite/gas/mips/mips-no-jalx.s
gas/testsuite/gas/mips/mips.exp
gas/testsuite/gas/mips/mips16-64.d
gas/testsuite/gas/mips/mips16-dwarf2-n32.d
gas/testsuite/gas/mips/mips16-dwarf2.d
gas/testsuite/gas/mips/mips16-dwarf2.s
gas/testsuite/gas/mips/mips16-e.d
gas/testsuite/gas/mips/mips16-e.s
gas/testsuite/gas/mips/mips16-f.d
gas/testsuite/gas/mips/mips16-f.s
gas/testsuite/gas/mips/mips16-hilo-n32.d
gas/testsuite/gas/mips/mips16-hilo.d
gas/testsuite/gas/mips/mips16-hilo.s
gas/testsuite/gas/mips/mips16-jalx.d
gas/testsuite/gas/mips/mips16-jalx.s
gas/testsuite/gas/mips/mips16.d
gas/testsuite/gas/mips/mips16.s
gas/testsuite/gas/mips/mips16e-64.d
gas/testsuite/gas/mips/mips16e-64.l
gas/testsuite/gas/mips/mips16e-64.s
gas/testsuite/gas/mips/mips16e-jrc.d
gas/testsuite/gas/mips/mips16e-jrc.s
gas/testsuite/gas/mips/mips16e-save.d
gas/testsuite/gas/mips/mips16e-save.s
gas/testsuite/gas/mips/mips16e.d
gas/testsuite/gas/mips/mips16e.s
gas/testsuite/gas/mips/mips32-dsp.d
gas/testsuite/gas/mips/mips32-dsp.s
gas/testsuite/gas/mips/mips32-mt.d
gas/testsuite/gas/mips/mips32-mt.s
gas/testsuite/gas/mips/mips32-sf32.d
gas/testsuite/gas/mips/mips32-sf32.s
gas/testsuite/gas/mips/mips32.d
gas/testsuite/gas/mips/mips32.s
gas/testsuite/gas/mips/mips32r2-ill-fp64.l
gas/testsuite/gas/mips/mips32r2-ill-fp64.s
gas/testsuite/gas/mips/mips32r2-ill.l
gas/testsuite/gas/mips/mips32r2-ill.s
gas/testsuite/gas/mips/mips32r2.d
gas/testsuite/gas/mips/mips32r2.s
gas/testsuite/gas/mips/mips4.d
gas/testsuite/gas/mips/mips4.s
gas/testsuite/gas/mips/mips4010.d
gas/testsuite/gas/mips/mips4010.s
gas/testsuite/gas/mips/mips4100.d
gas/testsuite/gas/mips/mips4100.s
gas/testsuite/gas/mips/mips4650.d
gas/testsuite/gas/mips/mips4650.s
gas/testsuite/gas/mips/mips5.d
gas/testsuite/gas/mips/mips5.l
gas/testsuite/gas/mips/mips5.s
gas/testsuite/gas/mips/mips64-dsp.d
gas/testsuite/gas/mips/mips64-dsp.s
gas/testsuite/gas/mips/mips64-mdmx.d
gas/testsuite/gas/mips/mips64-mdmx.s
gas/testsuite/gas/mips/mips64-mips3d-incl.d
gas/testsuite/gas/mips/mips64-mips3d.d
gas/testsuite/gas/mips/mips64-mips3d.l
gas/testsuite/gas/mips/mips64-mips3d.s
gas/testsuite/gas/mips/mips64.d
gas/testsuite/gas/mips/mips64.s
gas/testsuite/gas/mips/mips64r2-ill.l
gas/testsuite/gas/mips/mips64r2-ill.s
gas/testsuite/gas/mips/mips64r2.d
gas/testsuite/gas/mips/mips64r2.s
gas/testsuite/gas/mips/mipsel16-e.d
gas/testsuite/gas/mips/mipsel16-f.d
gas/testsuite/gas/mips/mul-ilocks.d
gas/testsuite/gas/mips/mul.d
gas/testsuite/gas/mips/mul.s
gas/testsuite/gas/mips/n32-consec.d
gas/testsuite/gas/mips/n32-consec.s
gas/testsuite/gas/mips/noat-1.d
gas/testsuite/gas/mips/noat-1.s
gas/testsuite/gas/mips/noat-2.l
gas/testsuite/gas/mips/noat-2.s
gas/testsuite/gas/mips/noat-3.l
gas/testsuite/gas/mips/noat-3.s
gas/testsuite/gas/mips/noat-4.l
gas/testsuite/gas/mips/noat-4.s
gas/testsuite/gas/mips/noat-5.l
gas/testsuite/gas/mips/noat-5.s
gas/testsuite/gas/mips/noat-6.l
gas/testsuite/gas/mips/noat-6.s
gas/testsuite/gas/mips/noat-7.l
gas/testsuite/gas/mips/noat-7.s
gas/testsuite/gas/mips/nodelay.d
gas/testsuite/gas/mips/noreorder.d
gas/testsuite/gas/mips/noreorder.s
gas/testsuite/gas/mips/perfcount.d
gas/testsuite/gas/mips/perfcount.s
gas/testsuite/gas/mips/relax-swap1-mips1.d
gas/testsuite/gas/mips/relax-swap1-mips2.d
gas/testsuite/gas/mips/relax-swap1.l
gas/testsuite/gas/mips/relax-swap1.s
gas/testsuite/gas/mips/relax-swap2.d
gas/testsuite/gas/mips/relax-swap2.l
gas/testsuite/gas/mips/relax-swap2.s
gas/testsuite/gas/mips/relax.d
gas/testsuite/gas/mips/relax.l
gas/testsuite/gas/mips/relax.s
gas/testsuite/gas/mips/rm7000.d
gas/testsuite/gas/mips/rm7000.s
gas/testsuite/gas/mips/rol-hw.d
gas/testsuite/gas/mips/rol.d
gas/testsuite/gas/mips/rol.s
gas/testsuite/gas/mips/rol64-hw.d
gas/testsuite/gas/mips/rol64.d
gas/testsuite/gas/mips/rol64.s
gas/testsuite/gas/mips/sb.d
gas/testsuite/gas/mips/sb.s
gas/testsuite/gas/mips/sb1-ext-mdmx.d
gas/testsuite/gas/mips/sb1-ext-mdmx.s
gas/testsuite/gas/mips/sb1-ext-ps.d
gas/testsuite/gas/mips/sb1-ext-ps.s
gas/testsuite/gas/mips/set-arch.d
gas/testsuite/gas/mips/set-arch.l
gas/testsuite/gas/mips/set-arch.s
gas/testsuite/gas/mips/smartmips.d
gas/testsuite/gas/mips/smartmips.s
gas/testsuite/gas/mips/sync.d
gas/testsuite/gas/mips/sync.s
gas/testsuite/gas/mips/tls-ill.l
gas/testsuite/gas/mips/tls-ill.s
gas/testsuite/gas/mips/tls-o32.d
gas/testsuite/gas/mips/tls-o32.s
gas/testsuite/gas/mips/tmips16-e.d
gas/testsuite/gas/mips/tmips16-f.d
gas/testsuite/gas/mips/tmipsel16-e.d
gas/testsuite/gas/mips/tmipsel16-f.d
gas/testsuite/gas/mips/trap20.d
gas/testsuite/gas/mips/trap20.s
gas/testsuite/gas/mips/trunc.d
gas/testsuite/gas/mips/trunc.s
gas/testsuite/gas/mips/uld.d
gas/testsuite/gas/mips/uld.s
gas/testsuite/gas/mips/uld2-eb.d
gas/testsuite/gas/mips/uld2-el.d
gas/testsuite/gas/mips/uld2.s
gas/testsuite/gas/mips/ulh-pic.s
gas/testsuite/gas/mips/ulh-svr4pic.d
gas/testsuite/gas/mips/ulh-xgot.d
gas/testsuite/gas/mips/ulh.d
gas/testsuite/gas/mips/ulh.s
gas/testsuite/gas/mips/ulh2-eb.d
gas/testsuite/gas/mips/ulh2-el.d
gas/testsuite/gas/mips/ulh2.s
gas/testsuite/gas/mips/ulw.d
gas/testsuite/gas/mips/ulw.s
gas/testsuite/gas/mips/ulw2-eb-ilocks.d
gas/testsuite/gas/mips/ulw2-eb.d
gas/testsuite/gas/mips/ulw2-el-ilocks.d
gas/testsuite/gas/mips/ulw2-el.d
gas/testsuite/gas/mips/ulw2.s
gas/testsuite/gas/mips/usd.d
gas/testsuite/gas/mips/usd.s
gas/testsuite/gas/mips/ush.d
gas/testsuite/gas/mips/ush.s
gas/testsuite/gas/mips/usw.d
gas/testsuite/gas/mips/usw.s
gas/testsuite/gas/mips/vr4111.d
gas/testsuite/gas/mips/vr4111.s
gas/testsuite/gas/mips/vr4120-2.d
gas/testsuite/gas/mips/vr4120-2.s
gas/testsuite/gas/mips/vr4120.d
gas/testsuite/gas/mips/vr4120.s
gas/testsuite/gas/mips/vr4130.d
gas/testsuite/gas/mips/vr4130.s
gas/testsuite/gas/mips/vr5400.d
gas/testsuite/gas/mips/vr5400.s
gas/testsuite/gas/mips/vr5500.d
gas/testsuite/gas/mips/vr5500.s
gas/testsuite/gas/mips/vxworks1-el.d
gas/testsuite/gas/mips/vxworks1-xgot-el.d
gas/testsuite/gas/mips/vxworks1-xgot.d
gas/testsuite/gas/mips/vxworks1.d
gas/testsuite/gas/mips/vxworks1.s
gas/testsuite/gas/mmix/1cjmp1b-n.d
gas/testsuite/gas/mmix/1cjmp1b-r.d
gas/testsuite/gas/mmix/1cjmp1b.d
gas/testsuite/gas/mmix/1cjmp1b.l
gas/testsuite/gas/mmix/1cjmp1b.s
gas/testsuite/gas/mmix/1cjmp1brn.d
gas/testsuite/gas/mmix/1hjmp1b.d
gas/testsuite/gas/mmix/1hjmp1b.l
gas/testsuite/gas/mmix/1hjmp1b.s
gas/testsuite/gas/mmix/align-1.d
gas/testsuite/gas/mmix/align-1.s
gas/testsuite/gas/mmix/basep-1.d
gas/testsuite/gas/mmix/basep-1.s
gas/testsuite/gas/mmix/basep-10.d
gas/testsuite/gas/mmix/basep-10.s
gas/testsuite/gas/mmix/basep-11.d
gas/testsuite/gas/mmix/basep-11.s
gas/testsuite/gas/mmix/basep-1b.d
gas/testsuite/gas/mmix/basep-2.d
gas/testsuite/gas/mmix/basep-2.s
gas/testsuite/gas/mmix/basep-2b.d
gas/testsuite/gas/mmix/basep-3.d
gas/testsuite/gas/mmix/basep-3.s
gas/testsuite/gas/mmix/basep-3b.d
gas/testsuite/gas/mmix/basep-4.d
gas/testsuite/gas/mmix/basep-5.d
gas/testsuite/gas/mmix/basep-6.d
gas/testsuite/gas/mmix/basep-7.d
gas/testsuite/gas/mmix/basep-8.d
gas/testsuite/gas/mmix/basep-8.s
gas/testsuite/gas/mmix/basep-9.d
gas/testsuite/gas/mmix/basep-9.s
gas/testsuite/gas/mmix/bspec-1.d
gas/testsuite/gas/mmix/bspec-1.s
gas/testsuite/gas/mmix/bspec-2.d
gas/testsuite/gas/mmix/bspec-2.s
gas/testsuite/gas/mmix/builtin1.d
gas/testsuite/gas/mmix/builtin1.s
gas/testsuite/gas/mmix/builtin2.d
gas/testsuite/gas/mmix/builtin3.d
gas/testsuite/gas/mmix/byte-1.d
gas/testsuite/gas/mmix/byte-1.s
gas/testsuite/gas/mmix/bz-c.d
gas/testsuite/gas/mmix/bz-c.s
gas/testsuite/gas/mmix/comment-1.d
gas/testsuite/gas/mmix/comment-1.s
gas/testsuite/gas/mmix/comment-2.d
gas/testsuite/gas/mmix/comment-2.s
gas/testsuite/gas/mmix/comment-3.d
gas/testsuite/gas/mmix/comment-3.s
gas/testsuite/gas/mmix/cons-1.d
gas/testsuite/gas/mmix/cons-1.s
gas/testsuite/gas/mmix/cons-2.d
gas/testsuite/gas/mmix/cons-2.s
gas/testsuite/gas/mmix/err-bpo1.s
gas/testsuite/gas/mmix/err-bpo2.s
gas/testsuite/gas/mmix/err-bpo3.s
gas/testsuite/gas/mmix/err-bpo4.s
gas/testsuite/gas/mmix/err-bpo5.s
gas/testsuite/gas/mmix/err-bpo6.s
gas/testsuite/gas/mmix/err-bspec-1.s
gas/testsuite/gas/mmix/err-bspec-2.s
gas/testsuite/gas/mmix/err-bspec-3.s
gas/testsuite/gas/mmix/err-bspec-4.s
gas/testsuite/gas/mmix/err-bspec-5.s
gas/testsuite/gas/mmix/err-builtin.s
gas/testsuite/gas/mmix/err-byte1.s
gas/testsuite/gas/mmix/err-byte2.s
gas/testsuite/gas/mmix/err-case.s
gas/testsuite/gas/mmix/err-fb-1.s
gas/testsuite/gas/mmix/err-greg1.s
gas/testsuite/gas/mmix/err-insn.s
gas/testsuite/gas/mmix/err-is-1.s
gas/testsuite/gas/mmix/err-loc-1.s
gas/testsuite/gas/mmix/err-loc-2.s
gas/testsuite/gas/mmix/err-loc-3.s
gas/testsuite/gas/mmix/err-loc-4.s
gas/testsuite/gas/mmix/err-loc-5.s
gas/testsuite/gas/mmix/err-loc-6.s
gas/testsuite/gas/mmix/err-loc-7.s
gas/testsuite/gas/mmix/err-loc-8.s
gas/testsuite/gas/mmix/err-local1.s
gas/testsuite/gas/mmix/err-local2.s
gas/testsuite/gas/mmix/err-ser-1.s
gas/testsuite/gas/mmix/err-set.s
gas/testsuite/gas/mmix/expr-1.d
gas/testsuite/gas/mmix/expr-1.s
gas/testsuite/gas/mmix/fb-1.d
gas/testsuite/gas/mmix/fb-1.s
gas/testsuite/gas/mmix/fb-2.d
gas/testsuite/gas/mmix/fb-2.s
gas/testsuite/gas/mmix/get-op-r.d
gas/testsuite/gas/mmix/get-op.d
gas/testsuite/gas/mmix/get-op.l
gas/testsuite/gas/mmix/get-op.s
gas/testsuite/gas/mmix/geta-c.d
gas/testsuite/gas/mmix/geta-c.s
gas/testsuite/gas/mmix/geta-op-r.d
gas/testsuite/gas/mmix/geta-op.d
gas/testsuite/gas/mmix/geta-op.l
gas/testsuite/gas/mmix/geta-op.s
gas/testsuite/gas/mmix/geta-opn.d
gas/testsuite/gas/mmix/geta-oprn.d
gas/testsuite/gas/mmix/greg1.d
gas/testsuite/gas/mmix/greg1.s
gas/testsuite/gas/mmix/greg1a.d
gas/testsuite/gas/mmix/greg2.d
gas/testsuite/gas/mmix/greg2.s
gas/testsuite/gas/mmix/greg2a.d
gas/testsuite/gas/mmix/greg3.d
gas/testsuite/gas/mmix/greg3.s
gas/testsuite/gas/mmix/greg4.d
gas/testsuite/gas/mmix/greg4.s
gas/testsuite/gas/mmix/greg5.d
gas/testsuite/gas/mmix/greg5.s
gas/testsuite/gas/mmix/greg6.d
gas/testsuite/gas/mmix/greg6.s
gas/testsuite/gas/mmix/greg7.d
gas/testsuite/gas/mmix/greg7.s
gas/testsuite/gas/mmix/greg8.d
gas/testsuite/gas/mmix/greg8.s
gas/testsuite/gas/mmix/greg9.d
gas/testsuite/gas/mmix/greg9.s
gas/testsuite/gas/mmix/hex-r.d
gas/testsuite/gas/mmix/hex.d
gas/testsuite/gas/mmix/hex.l
gas/testsuite/gas/mmix/hex.s
gas/testsuite/gas/mmix/hex2.d
gas/testsuite/gas/mmix/hex2.s
gas/testsuite/gas/mmix/is-1.d
gas/testsuite/gas/mmix/is-1.s
gas/testsuite/gas/mmix/jmp-op-n.d
gas/testsuite/gas/mmix/jmp-op-r.d
gas/testsuite/gas/mmix/jmp-op.d
gas/testsuite/gas/mmix/jmp-op.l
gas/testsuite/gas/mmix/jmp-op.s
gas/testsuite/gas/mmix/jmp-oprn.d
gas/testsuite/gas/mmix/jump-c.d
gas/testsuite/gas/mmix/jump-c.s
gas/testsuite/gas/mmix/list-in-n.d
gas/testsuite/gas/mmix/list-in-r.d
gas/testsuite/gas/mmix/list-in-rn.d
gas/testsuite/gas/mmix/list-insns.d
gas/testsuite/gas/mmix/list-insns.l
gas/testsuite/gas/mmix/list-insns.s
gas/testsuite/gas/mmix/list-pseudoints.l
gas/testsuite/gas/mmix/list-pseudoints.s
gas/testsuite/gas/mmix/list-textfirst
gas/testsuite/gas/mmix/list-textfirst.l
gas/testsuite/gas/mmix/list-textfirst.s
gas/testsuite/gas/mmix/loc-1.d
gas/testsuite/gas/mmix/loc-1.s
gas/testsuite/gas/mmix/loc-2.d
gas/testsuite/gas/mmix/loc-2.s
gas/testsuite/gas/mmix/loc-3.d
gas/testsuite/gas/mmix/loc-3.s
gas/testsuite/gas/mmix/loc-4.d
gas/testsuite/gas/mmix/loc-4.s
gas/testsuite/gas/mmix/loc-5.d
gas/testsuite/gas/mmix/loc-5.s
gas/testsuite/gas/mmix/local-1.d
gas/testsuite/gas/mmix/local-1.s
gas/testsuite/gas/mmix/locall1.d
gas/testsuite/gas/mmix/locall1.s
gas/testsuite/gas/mmix/mmix-err.exp
gas/testsuite/gas/mmix/mmix-list.exp
gas/testsuite/gas/mmix/mmix.exp
gas/testsuite/gas/mmix/odd-1.d
gas/testsuite/gas/mmix/odd-1.s
gas/testsuite/gas/mmix/op-0-1.d
gas/testsuite/gas/mmix/op-0-1.s
gas/testsuite/gas/mmix/op-0-1s.d
gas/testsuite/gas/mmix/op-0-2.d
gas/testsuite/gas/mmix/pop-op-r.d
gas/testsuite/gas/mmix/pop-op.d
gas/testsuite/gas/mmix/pop-op.l
gas/testsuite/gas/mmix/pop-op.s
gas/testsuite/gas/mmix/prefix1.d
gas/testsuite/gas/mmix/prefix1.s
gas/testsuite/gas/mmix/prefix2.d
gas/testsuite/gas/mmix/prefix2.s
gas/testsuite/gas/mmix/prefix3.d
gas/testsuite/gas/mmix/prefix3.s
gas/testsuite/gas/mmix/pseudo-1.d
gas/testsuite/gas/mmix/pseudo-1.s
gas/testsuite/gas/mmix/pushgo-op-r.d
gas/testsuite/gas/mmix/pushgo-op.d
gas/testsuite/gas/mmix/pushgo-op.l
gas/testsuite/gas/mmix/pushgo-op.s
gas/testsuite/gas/mmix/pushj-c.d
gas/testsuite/gas/mmix/pushj-c.s
gas/testsuite/gas/mmix/pushj-cs.d
gas/testsuite/gas/mmix/put-op-r.d
gas/testsuite/gas/mmix/put-op.d
gas/testsuite/gas/mmix/put-op.l
gas/testsuite/gas/mmix/put-op.s
gas/testsuite/gas/mmix/reg-op-r.d
gas/testsuite/gas/mmix/reg-op.d
gas/testsuite/gas/mmix/reg-op.l
gas/testsuite/gas/mmix/reg-op.s
gas/testsuite/gas/mmix/reg3-op-r.d
gas/testsuite/gas/mmix/reg3-op.d
gas/testsuite/gas/mmix/reg3-op.l
gas/testsuite/gas/mmix/reg3-op.s
gas/testsuite/gas/mmix/regt-op-r.d
gas/testsuite/gas/mmix/regt-op.d
gas/testsuite/gas/mmix/regt-op.l
gas/testsuite/gas/mmix/regt-op.s
gas/testsuite/gas/mmix/regx-op-r.d
gas/testsuite/gas/mmix/regx-op.d
gas/testsuite/gas/mmix/regx-op.l
gas/testsuite/gas/mmix/regx-op.s
gas/testsuite/gas/mmix/regy-op-r.d
gas/testsuite/gas/mmix/regy-op.d
gas/testsuite/gas/mmix/regy-op.l
gas/testsuite/gas/mmix/regy-op.s
gas/testsuite/gas/mmix/relax1-n.d
gas/testsuite/gas/mmix/relax1-r.d
gas/testsuite/gas/mmix/relax1-rn.d
gas/testsuite/gas/mmix/relax1.d
gas/testsuite/gas/mmix/relax1.l
gas/testsuite/gas/mmix/relax1.s
gas/testsuite/gas/mmix/relax2.d
gas/testsuite/gas/mmix/relax2.s
gas/testsuite/gas/mmix/reloc16-n.d
gas/testsuite/gas/mmix/reloc16-r.d
gas/testsuite/gas/mmix/reloc16.d
gas/testsuite/gas/mmix/reloc16.l
gas/testsuite/gas/mmix/reloc16.s
gas/testsuite/gas/mmix/reloc8-r.d
gas/testsuite/gas/mmix/reloc8.d
gas/testsuite/gas/mmix/reloc8.l
gas/testsuite/gas/mmix/reloc8.s
gas/testsuite/gas/mmix/relocl-n.d
gas/testsuite/gas/mmix/reloclab-r.d
gas/testsuite/gas/mmix/reloclab-rs.d
gas/testsuite/gas/mmix/reloclab-s.d
gas/testsuite/gas/mmix/reloclab.d
gas/testsuite/gas/mmix/reloclab.l
gas/testsuite/gas/mmix/reloclab.s
gas/testsuite/gas/mmix/reloclrn.d
gas/testsuite/gas/mmix/relocxrn.d
gas/testsuite/gas/mmix/resume-op-r.d
gas/testsuite/gas/mmix/resume-op.d
gas/testsuite/gas/mmix/resume-op.l
gas/testsuite/gas/mmix/resume-op.s
gas/testsuite/gas/mmix/round2-op-r.d
gas/testsuite/gas/mmix/round2-op.d
gas/testsuite/gas/mmix/round2-op.l
gas/testsuite/gas/mmix/round2-op.s
gas/testsuite/gas/mmix/roundi-op-r.d
gas/testsuite/gas/mmix/roundi-op.d
gas/testsuite/gas/mmix/roundi-op.l
gas/testsuite/gas/mmix/roundi-op.s
gas/testsuite/gas/mmix/roundr-op-r.d
gas/testsuite/gas/mmix/roundr-op.d
gas/testsuite/gas/mmix/roundr-op.l
gas/testsuite/gas/mmix/roundr-op.s
gas/testsuite/gas/mmix/save-op-r.d
gas/testsuite/gas/mmix/save-op.d
gas/testsuite/gas/mmix/save-op.l
gas/testsuite/gas/mmix/save-op.s
gas/testsuite/gas/mmix/set-r.d
gas/testsuite/gas/mmix/set.d
gas/testsuite/gas/mmix/set.l
gas/testsuite/gas/mmix/set.s
gas/testsuite/gas/mmix/swym-op-r.d
gas/testsuite/gas/mmix/swym-op.d
gas/testsuite/gas/mmix/swym-op.l
gas/testsuite/gas/mmix/swym-op.s
gas/testsuite/gas/mmix/sym-1.d
gas/testsuite/gas/mmix/sym-1.s
gas/testsuite/gas/mmix/sync-op-r.d
gas/testsuite/gas/mmix/sync-op.d
gas/testsuite/gas/mmix/sync-op.l
gas/testsuite/gas/mmix/sync-op.s
gas/testsuite/gas/mmix/two-op-r.d
gas/testsuite/gas/mmix/two-op.d
gas/testsuite/gas/mmix/two-op.l
gas/testsuite/gas/mmix/two-op.s
gas/testsuite/gas/mmix/unsave-op-r.d
gas/testsuite/gas/mmix/unsave-op.d
gas/testsuite/gas/mmix/unsave-op.l
gas/testsuite/gas/mmix/unsave-op.s
gas/testsuite/gas/mmix/weak1-s.d
gas/testsuite/gas/mmix/weak1.d
gas/testsuite/gas/mmix/weak1.s
gas/testsuite/gas/mmix/zerop-1.d
gas/testsuite/gas/mmix/zerop-1.s
gas/testsuite/gas/mn10200/add.s
gas/testsuite/gas/mn10200/basic.exp
gas/testsuite/gas/mn10200/bcc.s
gas/testsuite/gas/mn10200/bccx.s
gas/testsuite/gas/mn10200/bit.s
gas/testsuite/gas/mn10200/cmp.s
gas/testsuite/gas/mn10200/ext.s
gas/testsuite/gas/mn10200/logical.s
gas/testsuite/gas/mn10200/mov1.s
gas/testsuite/gas/mn10200/mov2.s
gas/testsuite/gas/mn10200/mov3.s
gas/testsuite/gas/mn10200/mov4.s
gas/testsuite/gas/mn10200/movb.s
gas/testsuite/gas/mn10200/movbu.s
gas/testsuite/gas/mn10200/movx.s
gas/testsuite/gas/mn10200/muldiv.s
gas/testsuite/gas/mn10200/other.s
gas/testsuite/gas/mn10200/shift.s
gas/testsuite/gas/mn10200/sub.s
gas/testsuite/gas/mn10300/add.s
gas/testsuite/gas/mn10300/am33-2.c
gas/testsuite/gas/mn10300/am33-2.d
gas/testsuite/gas/mn10300/am33-2.s
gas/testsuite/gas/mn10300/am33.s
gas/testsuite/gas/mn10300/am33_2.s
gas/testsuite/gas/mn10300/am33_3.s
gas/testsuite/gas/mn10300/am33_4.s
gas/testsuite/gas/mn10300/am33_5.s
gas/testsuite/gas/mn10300/am33_6.s
gas/testsuite/gas/mn10300/am33_7.s
gas/testsuite/gas/mn10300/am33_8.s
gas/testsuite/gas/mn10300/basic.exp
gas/testsuite/gas/mn10300/bcc.s
gas/testsuite/gas/mn10300/bit.s
gas/testsuite/gas/mn10300/cmp.s
gas/testsuite/gas/mn10300/ext.s
gas/testsuite/gas/mn10300/extend.s
gas/testsuite/gas/mn10300/logical.s
gas/testsuite/gas/mn10300/loop.s
gas/testsuite/gas/mn10300/mov1.s
gas/testsuite/gas/mn10300/mov2.s
gas/testsuite/gas/mn10300/mov3.s
gas/testsuite/gas/mn10300/mov4.s
gas/testsuite/gas/mn10300/mov5.s
gas/testsuite/gas/mn10300/movbu.s
gas/testsuite/gas/mn10300/movhu.s
gas/testsuite/gas/mn10300/movm.s
gas/testsuite/gas/mn10300/movpc.l
gas/testsuite/gas/mn10300/movpc.s
gas/testsuite/gas/mn10300/muldiv.s
gas/testsuite/gas/mn10300/other.s
gas/testsuite/gas/mn10300/relax.d
gas/testsuite/gas/mn10300/relax.s
gas/testsuite/gas/mn10300/shift.s
gas/testsuite/gas/mn10300/sub.s
gas/testsuite/gas/mn10300/udf.s
gas/testsuite/gas/mri/char.d
gas/testsuite/gas/mri/char.s
gas/testsuite/gas/mri/comment.d
gas/testsuite/gas/mri/comment.s
gas/testsuite/gas/mri/common.d
gas/testsuite/gas/mri/common.s
gas/testsuite/gas/mri/constants.d
gas/testsuite/gas/mri/constants.s
gas/testsuite/gas/mri/empty.s
gas/testsuite/gas/mri/equ.d
gas/testsuite/gas/mri/equ.s
gas/testsuite/gas/mri/expr.d
gas/testsuite/gas/mri/expr.s
gas/testsuite/gas/mri/float.d
gas/testsuite/gas/mri/float.s
gas/testsuite/gas/mri/for.d
gas/testsuite/gas/mri/for.s
gas/testsuite/gas/mri/if.d
gas/testsuite/gas/mri/if.s
gas/testsuite/gas/mri/immconst.d
gas/testsuite/gas/mri/label.d
gas/testsuite/gas/mri/label.s
gas/testsuite/gas/mri/moveml.d
gas/testsuite/gas/mri/moveml.s
gas/testsuite/gas/mri/mri.exp
gas/testsuite/gas/mri/repeat.d
gas/testsuite/gas/mri/repeat.s
gas/testsuite/gas/mri/semi.d
gas/testsuite/gas/mri/semi.s
gas/testsuite/gas/mri/while.d
gas/testsuite/gas/mri/while.s
gas/testsuite/gas/msp430/msp430.exp
gas/testsuite/gas/msp430/opcode.d
gas/testsuite/gas/msp430/opcode.s
gas/testsuite/gas/mt/allinsn.d
gas/testsuite/gas/mt/allinsn.s
gas/testsuite/gas/mt/badinsn.s
gas/testsuite/gas/mt/badinsn1.s
gas/testsuite/gas/mt/badoffsethigh.s
gas/testsuite/gas/mt/badoffsetlow.s
gas/testsuite/gas/mt/badorder.s
gas/testsuite/gas/mt/badreg.s
gas/testsuite/gas/mt/badsignedimmhigh.s
gas/testsuite/gas/mt/badsignedimmlow.s
gas/testsuite/gas/mt/badsyntax.s
gas/testsuite/gas/mt/badsyntax1.s
gas/testsuite/gas/mt/badunsignedimmhigh.s
gas/testsuite/gas/mt/badunsignedimmlow.s
gas/testsuite/gas/mt/errors.exp
gas/testsuite/gas/mt/ldst.s
gas/testsuite/gas/mt/misc.d
gas/testsuite/gas/mt/misc.s
gas/testsuite/gas/mt/ms1-16-003.d
gas/testsuite/gas/mt/ms1-16-003.s
gas/testsuite/gas/mt/ms2.d
gas/testsuite/gas/mt/ms2.s
gas/testsuite/gas/mt/msys.d
gas/testsuite/gas/mt/msys.s
gas/testsuite/gas/mt/mt.exp
gas/testsuite/gas/mt/relocs.d
gas/testsuite/gas/mt/relocs.exp
gas/testsuite/gas/mt/relocs1.s
gas/testsuite/gas/mt/relocs2.s
gas/testsuite/gas/openrisc/addi.d
gas/testsuite/gas/openrisc/addi.s
gas/testsuite/gas/openrisc/allinsn.d
gas/testsuite/gas/openrisc/allinsn.exp
gas/testsuite/gas/openrisc/allinsn.s
gas/testsuite/gas/openrisc/lohi.d
gas/testsuite/gas/openrisc/lohi.s
gas/testsuite/gas/openrisc/store.d
gas/testsuite/gas/openrisc/store.s
gas/testsuite/gas/pdp11/opcode.d
gas/testsuite/gas/pdp11/opcode.s
gas/testsuite/gas/pdp11/pdp11.exp
gas/testsuite/gas/pj/ops.d
gas/testsuite/gas/pj/ops.s
gas/testsuite/gas/pj/pj.exp
gas/testsuite/gas/ppc/aix.exp
gas/testsuite/gas/ppc/align.s
gas/testsuite/gas/ppc/altivec.d
gas/testsuite/gas/ppc/altivec.s
gas/testsuite/gas/ppc/altivec_xcoff.d
gas/testsuite/gas/ppc/altivec_xcoff.s
gas/testsuite/gas/ppc/altivec_xcoff64.d
gas/testsuite/gas/ppc/altivec_xcoff64.s
gas/testsuite/gas/ppc/astest.d
gas/testsuite/gas/ppc/astest.s
gas/testsuite/gas/ppc/astest2.d
gas/testsuite/gas/ppc/astest2.s
gas/testsuite/gas/ppc/astest2_64.d
gas/testsuite/gas/ppc/astest2_64.s
gas/testsuite/gas/ppc/astest64.d
gas/testsuite/gas/ppc/astest64.s
gas/testsuite/gas/ppc/booke.d
gas/testsuite/gas/ppc/booke.s
gas/testsuite/gas/ppc/booke_xcoff.d
gas/testsuite/gas/ppc/booke_xcoff.s
gas/testsuite/gas/ppc/booke_xcoff64.d
gas/testsuite/gas/ppc/booke_xcoff64.s
gas/testsuite/gas/ppc/e500.d
gas/testsuite/gas/ppc/e500.s
gas/testsuite/gas/ppc/generate.sh
gas/testsuite/gas/ppc/machine.d
gas/testsuite/gas/ppc/machine.s
gas/testsuite/gas/ppc/power4.d
gas/testsuite/gas/ppc/power4.s
gas/testsuite/gas/ppc/ppc.exp
gas/testsuite/gas/ppc/simpshft.d
gas/testsuite/gas/ppc/simpshft.s
gas/testsuite/gas/ppc/test1elf.asm
gas/testsuite/gas/ppc/test1elf32.d
gas/testsuite/gas/ppc/test1elf32.s
gas/testsuite/gas/ppc/test1elf64.d
gas/testsuite/gas/ppc/test1elf64.s
gas/testsuite/gas/ppc/test1xcoff.asm
gas/testsuite/gas/ppc/test1xcoff32.d
gas/testsuite/gas/ppc/test1xcoff32.s
gas/testsuite/gas/ppc/textalign-xcoff-001.d
gas/testsuite/gas/ppc/textalign-xcoff-001.s
gas/testsuite/gas/ppc/textalign-xcoff-002.d
gas/testsuite/gas/s390/esa-g5.d
gas/testsuite/gas/s390/esa-g5.s
gas/testsuite/gas/s390/esa-operands.d
gas/testsuite/gas/s390/esa-operands.s
gas/testsuite/gas/s390/esa-reloc.d
gas/testsuite/gas/s390/esa-reloc.s
gas/testsuite/gas/s390/esa-z9-109.d
gas/testsuite/gas/s390/esa-z9-109.s
gas/testsuite/gas/s390/esa-z900.d
gas/testsuite/gas/s390/esa-z900.s
gas/testsuite/gas/s390/esa-z990.d
gas/testsuite/gas/s390/esa-z990.s
gas/testsuite/gas/s390/operands.d
gas/testsuite/gas/s390/operands.s
gas/testsuite/gas/s390/operands64.d
gas/testsuite/gas/s390/operands64.s
gas/testsuite/gas/s390/s390.exp
gas/testsuite/gas/s390/zarch-operands.d
gas/testsuite/gas/s390/zarch-operands.s
gas/testsuite/gas/s390/zarch-reloc.d
gas/testsuite/gas/s390/zarch-reloc.s
gas/testsuite/gas/s390/zarch-z9-109.d
gas/testsuite/gas/s390/zarch-z9-109.s
gas/testsuite/gas/s390/zarch-z900.d
gas/testsuite/gas/s390/zarch-z900.s
gas/testsuite/gas/s390/zarch-z990.d
gas/testsuite/gas/s390/zarch-z990.s
gas/testsuite/gas/sh/arch/arch.exp
gas/testsuite/gas/sh/arch/arch_expected.txt
gas/testsuite/gas/sh/arch/sh-dsp.s
gas/testsuite/gas/sh/arch/sh.s
gas/testsuite/gas/sh/arch/sh2.s
gas/testsuite/gas/sh/arch/sh2a-nofpu-or-sh3-nommu.s
gas/testsuite/gas/sh/arch/sh2a-nofpu-or-sh4-nommu-nofpu.s
gas/testsuite/gas/sh/arch/sh2a-nofpu.s
gas/testsuite/gas/sh/arch/sh2a-or-sh3e.s
gas/testsuite/gas/sh/arch/sh2a-or-sh4.s
gas/testsuite/gas/sh/arch/sh2a.s
gas/testsuite/gas/sh/arch/sh2e.s
gas/testsuite/gas/sh/arch/sh3-dsp.s
gas/testsuite/gas/sh/arch/sh3-nommu.s
gas/testsuite/gas/sh/arch/sh3.s
gas/testsuite/gas/sh/arch/sh3e.s
gas/testsuite/gas/sh/arch/sh4-nofpu.s
gas/testsuite/gas/sh/arch/sh4-nommu-nofpu.s
gas/testsuite/gas/sh/arch/sh4.s
gas/testsuite/gas/sh/arch/sh4a-nofpu.s
gas/testsuite/gas/sh/arch/sh4a.s
gas/testsuite/gas/sh/arch/sh4al-dsp.s
gas/testsuite/gas/sh/basic.exp
gas/testsuite/gas/sh/dsp.d
gas/testsuite/gas/sh/dsp.s
gas/testsuite/gas/sh/err-1.s
gas/testsuite/gas/sh/err-at.s
gas/testsuite/gas/sh/err-be.s
gas/testsuite/gas/sh/err-le.s
gas/testsuite/gas/sh/err-sh4a-fp.s
gas/testsuite/gas/sh/err-sh4a.s
gas/testsuite/gas/sh/err-sh4al-dsp.s
gas/testsuite/gas/sh/err.exp
gas/testsuite/gas/sh/fp.s
gas/testsuite/gas/sh/pcrel-coff.d
gas/testsuite/gas/sh/pcrel-coff.s
gas/testsuite/gas/sh/pcrel-hms.d
gas/testsuite/gas/sh/pcrel.d
gas/testsuite/gas/sh/pcrel.l
gas/testsuite/gas/sh/pcrel.s
gas/testsuite/gas/sh/pcrel2.d
gas/testsuite/gas/sh/pcrel2.s
gas/testsuite/gas/sh/pic.d
gas/testsuite/gas/sh/pic.s
gas/testsuite/gas/sh/reg-prefix.d
gas/testsuite/gas/sh/reg-prefix.s
gas/testsuite/gas/sh/renesas-1.d
gas/testsuite/gas/sh/renesas-1.s
gas/testsuite/gas/sh/sh2a.d
gas/testsuite/gas/sh/sh2a.s
gas/testsuite/gas/sh/sh4a-dsp.d
gas/testsuite/gas/sh/sh4a-dsp.s
gas/testsuite/gas/sh/sh4a-fp.d
gas/testsuite/gas/sh/sh4a-fp.s
gas/testsuite/gas/sh/sh4a.d
gas/testsuite/gas/sh/sh4a.s
gas/testsuite/gas/sh/sh4al-dsp.d
gas/testsuite/gas/sh/sh4al-dsp.s
gas/testsuite/gas/sh/sh64/abi-32.d
gas/testsuite/gas/sh/sh64/abi-32.s
gas/testsuite/gas/sh/sh64/abi-64.d
gas/testsuite/gas/sh/sh64/abi-64.s
gas/testsuite/gas/sh/sh64/basic-1.d
gas/testsuite/gas/sh/sh64/basic-1.s
gas/testsuite/gas/sh/sh64/case-1.d
gas/testsuite/gas/sh/sh64/case-1.s
gas/testsuite/gas/sh/sh64/case-noexp-1.d
gas/testsuite/gas/sh/sh64/crange1-1.d
gas/testsuite/gas/sh/sh64/crange1-2.d
gas/testsuite/gas/sh/sh64/crange1.s
gas/testsuite/gas/sh/sh64/crange2-1.d
gas/testsuite/gas/sh/sh64/crange2-2.d
gas/testsuite/gas/sh/sh64/crange2-noexp-1.d
gas/testsuite/gas/sh/sh64/crange2.s
gas/testsuite/gas/sh/sh64/crange3-1.d
gas/testsuite/gas/sh/sh64/crange3.s
gas/testsuite/gas/sh/sh64/crange4-1.d
gas/testsuite/gas/sh/sh64/crange4.s
gas/testsuite/gas/sh/sh64/crange5-1.d
gas/testsuite/gas/sh/sh64/crange5.s
gas/testsuite/gas/sh/sh64/creg-1.d
gas/testsuite/gas/sh/sh64/creg-1.s
gas/testsuite/gas/sh/sh64/creg-2.d
gas/testsuite/gas/sh/sh64/creg-2.s
gas/testsuite/gas/sh/sh64/datal-1.s
gas/testsuite/gas/sh/sh64/datal-2.d
gas/testsuite/gas/sh/sh64/datal-2.s
gas/testsuite/gas/sh/sh64/datal-3.s
gas/testsuite/gas/sh/sh64/datal32-1.d
gas/testsuite/gas/sh/sh64/datal32-3.d
gas/testsuite/gas/sh/sh64/datal64-1.d
gas/testsuite/gas/sh/sh64/datal64-3.d
gas/testsuite/gas/sh/sh64/endian-1.d
gas/testsuite/gas/sh/sh64/endian-1.s
gas/testsuite/gas/sh/sh64/endian-2.d
gas/testsuite/gas/sh/sh64/endian-2.s
gas/testsuite/gas/sh/sh64/err-1.s
gas/testsuite/gas/sh/sh64/err-2.s
gas/testsuite/gas/sh/sh64/err-3.s
gas/testsuite/gas/sh/sh64/err-4.s
gas/testsuite/gas/sh/sh64/err-abi-32.s
gas/testsuite/gas/sh/sh64/err-abi-64.s
gas/testsuite/gas/sh/sh64/err-dsp.s
gas/testsuite/gas/sh/sh64/err-movi-noexp-1.s
gas/testsuite/gas/sh/sh64/err-noexp-cmd1.s
gas/testsuite/gas/sh/sh64/err-pt-1.s
gas/testsuite/gas/sh/sh64/err-pt32-cmd1.s
gas/testsuite/gas/sh/sh64/err-pt32-cmd2.s
gas/testsuite/gas/sh/sh64/err-pt32-cmd3.s
gas/testsuite/gas/sh/sh64/err-ptb-1.s
gas/testsuite/gas/sh/sh64/err-ptb-2.s
gas/testsuite/gas/sh/sh64/err.exp
gas/testsuite/gas/sh/sh64/immexpr1.s
gas/testsuite/gas/sh/sh64/immexpr2.s
gas/testsuite/gas/sh/sh64/immexpr32-1.d
gas/testsuite/gas/sh/sh64/immexpr32-2.d
gas/testsuite/gas/sh/sh64/immexpr64-1.d
gas/testsuite/gas/sh/sh64/immexpr64-2.d
gas/testsuite/gas/sh/sh64/lineno.d
gas/testsuite/gas/sh/sh64/lineno.s
gas/testsuite/gas/sh/sh64/localcom-1.d
gas/testsuite/gas/sh/sh64/localcom-1.s
gas/testsuite/gas/sh/sh64/mix-1.d
gas/testsuite/gas/sh/sh64/mix-1.s
gas/testsuite/gas/sh/sh64/mix-noexp-1.d
gas/testsuite/gas/sh/sh64/movi-1.s
gas/testsuite/gas/sh/sh64/movi-2.s
gas/testsuite/gas/sh/sh64/movi-3.d
gas/testsuite/gas/sh/sh64/movi-3.s
gas/testsuite/gas/sh/sh64/movi32-1.d
gas/testsuite/gas/sh/sh64/movi32-2.d
gas/testsuite/gas/sh/sh64/movi32-noexp-2.d
gas/testsuite/gas/sh/sh64/movi64-1.d
gas/testsuite/gas/sh/sh64/movi64-2.d
gas/testsuite/gas/sh/sh64/movi64-2.s
gas/testsuite/gas/sh/sh64/movi64-3.d
gas/testsuite/gas/sh/sh64/movi64-noexp-2.d
gas/testsuite/gas/sh/sh64/pt-1.d
gas/testsuite/gas/sh/sh64/pt-1.s
gas/testsuite/gas/sh/sh64/pt-2.s
gas/testsuite/gas/sh/sh64/pt-noexp-1.d
gas/testsuite/gas/sh/sh64/pt32-1.d
gas/testsuite/gas/sh/sh64/pt32-noexp-2.d
gas/testsuite/gas/sh/sh64/pt64-1.d
gas/testsuite/gas/sh/sh64/pt64-32-1.d
gas/testsuite/gas/sh/sh64/pt64-32-2.d
gas/testsuite/gas/sh/sh64/pt64-noexp-2.d
gas/testsuite/gas/sh/sh64/ptc-1.s
gas/testsuite/gas/sh/sh64/ptc32-1.d
gas/testsuite/gas/sh/sh64/ptc32-noexp-1.d
gas/testsuite/gas/sh/sh64/ptc64-1.d
gas/testsuite/gas/sh/sh64/ptc64-32-1.d
gas/testsuite/gas/sh/sh64/ptc64-noexp-1.d
gas/testsuite/gas/sh/sh64/ptext-1.s
gas/testsuite/gas/sh/sh64/ptext32-1.d
gas/testsuite/gas/sh/sh64/ptext32-noexp-1.d
gas/testsuite/gas/sh/sh64/ptext64-1.d
gas/testsuite/gas/sh/sh64/ptext64-32-1.d
gas/testsuite/gas/sh/sh64/ptext64-noexp-1.d
gas/testsuite/gas/sh/sh64/rel-1.s
gas/testsuite/gas/sh/sh64/rel-2.s
gas/testsuite/gas/sh/sh64/rel-3.s
gas/testsuite/gas/sh/sh64/rel-4.s
gas/testsuite/gas/sh/sh64/rel-5.s
gas/testsuite/gas/sh/sh64/rel32-1.d
gas/testsuite/gas/sh/sh64/rel32-2.d
gas/testsuite/gas/sh/sh64/rel32-3.d
gas/testsuite/gas/sh/sh64/rel32-4.d
gas/testsuite/gas/sh/sh64/rel32-5.d
gas/testsuite/gas/sh/sh64/rel64-1.d
gas/testsuite/gas/sh/sh64/rel64-2.d
gas/testsuite/gas/sh/sh64/rel64-3.d
gas/testsuite/gas/sh/sh64/rel64-4.d
gas/testsuite/gas/sh/sh64/rel64-5.d
gas/testsuite/gas/sh/sh64/relax-1.d
gas/testsuite/gas/sh/sh64/relax-1.s
gas/testsuite/gas/sh/sh64/relax-2.d
gas/testsuite/gas/sh/sh64/relax-2.s
gas/testsuite/gas/sh/sh64/relax-3.d
gas/testsuite/gas/sh/sh64/relax-3.s
gas/testsuite/gas/sh/sh64/sh64.exp
gas/testsuite/gas/sh/sh64/shift-1.s
gas/testsuite/gas/sh/sh64/shift-2.s
gas/testsuite/gas/sh/sh64/shift-3.s
gas/testsuite/gas/sh/sh64/shift32-1.d
gas/testsuite/gas/sh/sh64/shift32-3.d
gas/testsuite/gas/sh/sh64/shift32-noexp-3.d
gas/testsuite/gas/sh/sh64/shift64-1.d
gas/testsuite/gas/sh/sh64/shift64-2.d
gas/testsuite/gas/sh/sh64/shift64-3.d
gas/testsuite/gas/sh/sh64/shift64-noexp-3.d
gas/testsuite/gas/sh/sh64/syntax-1.d
gas/testsuite/gas/sh/sh64/syntax-1.s
gas/testsuite/gas/sh/sh64/syntax-2.d
gas/testsuite/gas/sh/sh64/syntax-2.s
gas/testsuite/gas/sh/sh64/ua-1.s
gas/testsuite/gas/sh/sh64/ua32-1.d
gas/testsuite/gas/sh/sh64/ua64-1.d
gas/testsuite/gas/sh/tlsd.d
gas/testsuite/gas/sh/tlsd.s
gas/testsuite/gas/sh/tlsnopic.d
gas/testsuite/gas/sh/tlsnopic.s
gas/testsuite/gas/sh/tlspic.d
gas/testsuite/gas/sh/tlspic.s
gas/testsuite/gas/sh/too_large.d
gas/testsuite/gas/sh/too_large.s
gas/testsuite/gas/sparc-solaris/addend.exp
gas/testsuite/gas/sparc-solaris/addend.s
gas/testsuite/gas/sparc-solaris/gas.exp
gas/testsuite/gas/sparc-solaris/sol-cc.s
gas/testsuite/gas/sparc-solaris/sol-gcc.s
gas/testsuite/gas/sparc/asi.d
gas/testsuite/gas/sparc/asi.s
gas/testsuite/gas/sparc/membar.d
gas/testsuite/gas/sparc/membar.s
gas/testsuite/gas/sparc/mism-1.s
gas/testsuite/gas/sparc/mismatch.exp
gas/testsuite/gas/sparc/pcrel.d
gas/testsuite/gas/sparc/pcrel.s
gas/testsuite/gas/sparc/pcrel64.d
gas/testsuite/gas/sparc/pcrel64.s
gas/testsuite/gas/sparc/plt.d
gas/testsuite/gas/sparc/plt.s
gas/testsuite/gas/sparc/plt64.d
gas/testsuite/gas/sparc/plt64.s
gas/testsuite/gas/sparc/prefetch.d
gas/testsuite/gas/sparc/prefetch.s
gas/testsuite/gas/sparc/rdhpr.d
gas/testsuite/gas/sparc/rdhpr.s
gas/testsuite/gas/sparc/rdpr.d
gas/testsuite/gas/sparc/rdpr.s
gas/testsuite/gas/sparc/reloc64.d
gas/testsuite/gas/sparc/reloc64.s
gas/testsuite/gas/sparc/set64.d
gas/testsuite/gas/sparc/set64.s
gas/testsuite/gas/sparc/sparc.exp
gas/testsuite/gas/sparc/splet-2.d
gas/testsuite/gas/sparc/splet-2.s
gas/testsuite/gas/sparc/splet.d
gas/testsuite/gas/sparc/splet.s
gas/testsuite/gas/sparc/synth.d
gas/testsuite/gas/sparc/synth.s
gas/testsuite/gas/sparc/synth64.d
gas/testsuite/gas/sparc/synth64.s
gas/testsuite/gas/sparc/unalign.d
gas/testsuite/gas/sparc/unalign.s
gas/testsuite/gas/sparc/vxworks-pic.d
gas/testsuite/gas/sparc/vxworks-pic.s
gas/testsuite/gas/sparc/window.d
gas/testsuite/gas/sparc/window.s
gas/testsuite/gas/sparc/wrhpr.d
gas/testsuite/gas/sparc/wrhpr.s
gas/testsuite/gas/sparc/wrpr.d
gas/testsuite/gas/sparc/wrpr.s
gas/testsuite/gas/sun4/addend.d
gas/testsuite/gas/sun4/addend.exp
gas/testsuite/gas/sun4/addend.s
gas/testsuite/gas/symver/symver.exp
gas/testsuite/gas/symver/symver0.d
gas/testsuite/gas/symver/symver0.s
gas/testsuite/gas/symver/symver1.d
gas/testsuite/gas/symver/symver1.s
gas/testsuite/gas/symver/symver2.l
gas/testsuite/gas/symver/symver2.s
gas/testsuite/gas/symver/symver3.l
gas/testsuite/gas/symver/symver3.s
gas/testsuite/gas/symver/symver4.l
gas/testsuite/gas/symver/symver4.s
gas/testsuite/gas/symver/symver5.l
gas/testsuite/gas/symver/symver5.s
gas/testsuite/gas/symver/symver6.l
gas/testsuite/gas/symver/symver6.s
gas/testsuite/gas/template
gas/testsuite/gas/tic4x/addressing.s
gas/testsuite/gas/tic4x/addressing_c3x.d
gas/testsuite/gas/tic4x/addressing_c4x.d
gas/testsuite/gas/tic4x/allopcodes.S
gas/testsuite/gas/tic4x/data.d
gas/testsuite/gas/tic4x/data.s
gas/testsuite/gas/tic4x/float.d
gas/testsuite/gas/tic4x/float.s
gas/testsuite/gas/tic4x/opclasses.h
gas/testsuite/gas/tic4x/opcodes.s
gas/testsuite/gas/tic4x/opcodes_c3x.d
gas/testsuite/gas/tic4x/opcodes_c4x.d
gas/testsuite/gas/tic4x/opcodes_new.d
gas/testsuite/gas/tic4x/rebuild.sh
gas/testsuite/gas/tic4x/registers.s
gas/testsuite/gas/tic4x/registers_c3x.d
gas/testsuite/gas/tic4x/registers_c4x.d
gas/testsuite/gas/tic4x/tic4x.exp
gas/testsuite/gas/tic4x/zeros.d
gas/testsuite/gas/tic4x/zeros.s
gas/testsuite/gas/tic54x/address.d
gas/testsuite/gas/tic54x/address.s
gas/testsuite/gas/tic54x/addrfar.d
gas/testsuite/gas/tic54x/align.d
gas/testsuite/gas/tic54x/align.s
gas/testsuite/gas/tic54x/all-opcodes.d
gas/testsuite/gas/tic54x/all-opcodes.s
gas/testsuite/gas/tic54x/asg.d
gas/testsuite/gas/tic54x/asg.s
gas/testsuite/gas/tic54x/cons.d
gas/testsuite/gas/tic54x/cons.s
gas/testsuite/gas/tic54x/consfar.d
gas/testsuite/gas/tic54x/extaddr.d
gas/testsuite/gas/tic54x/extaddr.s
gas/testsuite/gas/tic54x/field.d
gas/testsuite/gas/tic54x/field.s
gas/testsuite/gas/tic54x/in_mlib.asm
gas/testsuite/gas/tic54x/labels.d
gas/testsuite/gas/tic54x/labels.inc
gas/testsuite/gas/tic54x/labels.s
gas/testsuite/gas/tic54x/loop.d
gas/testsuite/gas/tic54x/loop.s
gas/testsuite/gas/tic54x/lp.d
gas/testsuite/gas/tic54x/lp.s
gas/testsuite/gas/tic54x/macro.d
gas/testsuite/gas/tic54x/macro.s
gas/testsuite/gas/tic54x/macro1.s
gas/testsuite/gas/tic54x/macros.lib
gas/testsuite/gas/tic54x/math.d
gas/testsuite/gas/tic54x/math.s
gas/testsuite/gas/tic54x/opcodes.d
gas/testsuite/gas/tic54x/opcodes.s
gas/testsuite/gas/tic54x/sections.d
gas/testsuite/gas/tic54x/sections.s
gas/testsuite/gas/tic54x/set.d
gas/testsuite/gas/tic54x/set.s
gas/testsuite/gas/tic54x/struct.d
gas/testsuite/gas/tic54x/struct.s
gas/testsuite/gas/tic54x/subsym.d
gas/testsuite/gas/tic54x/subsym.s
gas/testsuite/gas/tic54x/subsym1.s
gas/testsuite/gas/tic54x/tic54x.exp
gas/testsuite/gas/v850/arith.s
gas/testsuite/gas/v850/basic.exp
gas/testsuite/gas/v850/bit.s
gas/testsuite/gas/v850/branch.s
gas/testsuite/gas/v850/compare.s
gas/testsuite/gas/v850/fepsw.s
gas/testsuite/gas/v850/hilo.s
gas/testsuite/gas/v850/hilo2.s
gas/testsuite/gas/v850/jumps.s
gas/testsuite/gas/v850/logical.s
gas/testsuite/gas/v850/mem.s
gas/testsuite/gas/v850/misc.s
gas/testsuite/gas/v850/move.s
gas/testsuite/gas/v850/range.s
gas/testsuite/gas/v850/reloc.s
gas/testsuite/gas/v850/split-lo16.d
gas/testsuite/gas/v850/split-lo16.s
gas/testsuite/gas/v850/v850e1.d
gas/testsuite/gas/v850/v850e1.s
gas/testsuite/gas/vax/elf-rel.d
gas/testsuite/gas/vax/elf-rel.s
gas/testsuite/gas/vax/flonum.d
gas/testsuite/gas/vax/flonum.s
gas/testsuite/gas/vax/quad.s
gas/testsuite/gas/vax/quad_elf.s
gas/testsuite/gas/vax/vax.exp
gas/testsuite/gas/xc16x/add.s
gas/testsuite/gas/xc16x/add_test.s
gas/testsuite/gas/xc16x/addb.s
gas/testsuite/gas/xc16x/addc.s
gas/testsuite/gas/xc16x/addcb.s
gas/testsuite/gas/xc16x/and.s
gas/testsuite/gas/xc16x/andb.s
gas/testsuite/gas/xc16x/bfldl.s
gas/testsuite/gas/xc16x/bit.s
gas/testsuite/gas/xc16x/calla.s
gas/testsuite/gas/xc16x/calli.s
gas/testsuite/gas/xc16x/cmp.s
gas/testsuite/gas/xc16x/cmp_test.s
gas/testsuite/gas/xc16x/cmpb.s
gas/testsuite/gas/xc16x/cmpi.s
gas/testsuite/gas/xc16x/cpl.s
gas/testsuite/gas/xc16x/div.s
gas/testsuite/gas/xc16x/jmpa.s
gas/testsuite/gas/xc16x/jmpi.s
gas/testsuite/gas/xc16x/jmpr.s
gas/testsuite/gas/xc16x/mov.s
gas/testsuite/gas/xc16x/mov_test.s
gas/testsuite/gas/xc16x/movb.s
gas/testsuite/gas/xc16x/movbs.s
gas/testsuite/gas/xc16x/movbz.s
gas/testsuite/gas/xc16x/mul.s
gas/testsuite/gas/xc16x/neg.s
gas/testsuite/gas/xc16x/nop.s
gas/testsuite/gas/xc16x/or.s
gas/testsuite/gas/xc16x/orb.s
gas/testsuite/gas/xc16x/prior.s
gas/testsuite/gas/xc16x/pushpop.s
gas/testsuite/gas/xc16x/ret.s
gas/testsuite/gas/xc16x/scxt.s
gas/testsuite/gas/xc16x/shlrol.s
gas/testsuite/gas/xc16x/sub.s
gas/testsuite/gas/xc16x/sub_test.s
gas/testsuite/gas/xc16x/subb.s
gas/testsuite/gas/xc16x/subc.s
gas/testsuite/gas/xc16x/subcb.s
gas/testsuite/gas/xc16x/syscontrol1.s
gas/testsuite/gas/xc16x/syscontrol2.s
gas/testsuite/gas/xc16x/trap.s
gas/testsuite/gas/xc16x/xc16x.exp
gas/testsuite/gas/xc16x/xor.s
gas/testsuite/gas/xc16x/xorb.s
gas/testsuite/gas/xstormy16/allinsn.d
gas/testsuite/gas/xstormy16/allinsn.exp
gas/testsuite/gas/xstormy16/allinsn.s
gas/testsuite/gas/xstormy16/allinsn.sh
gas/testsuite/gas/xstormy16/gcc.d
gas/testsuite/gas/xstormy16/gcc.s
gas/testsuite/gas/xstormy16/gcc.sh
gas/testsuite/gas/xstormy16/reloc-1.d
gas/testsuite/gas/xstormy16/reloc-1.s
gas/testsuite/gas/xstormy16/reloc-2.d
gas/testsuite/gas/xstormy16/reloc-2.s
gas/testsuite/gas/xtensa/all.exp
gas/testsuite/gas/xtensa/entry_align.s
gas/testsuite/gas/xtensa/entry_misalign.s
gas/testsuite/gas/xtensa/entry_misalign2.s
gas/testsuite/gas/xtensa/j_too_far.s
gas/testsuite/gas/xtensa/loop_align.s
gas/testsuite/gas/xtensa/loop_misalign.s
gas/testsuite/gas/xtensa/short_branch_offset.d
gas/testsuite/gas/xtensa/short_branch_offset.s
gas/testsuite/gas/z80/offset.d
gas/testsuite/gas/z80/offset.s
gas/testsuite/gas/z80/quotes.d
gas/testsuite/gas/z80/quotes.s
gas/testsuite/gas/z80/redef.d
gas/testsuite/gas/z80/redef.s
gas/testsuite/gas/z80/suffix.d
gas/testsuite/gas/z80/suffix.s
gas/testsuite/gas/z80/z80.exp
gas/testsuite/gas/z8k/calr-backf.s
gas/testsuite/gas/z8k/calr-forwf.s
gas/testsuite/gas/z8k/calr.d
gas/testsuite/gas/z8k/calr.s
gas/testsuite/gas/z8k/ctrl-names.d
gas/testsuite/gas/z8k/ctrl-names.s
gas/testsuite/gas/z8k/dec.s
gas/testsuite/gas/z8k/decbf.s
gas/testsuite/gas/z8k/decf.s
gas/testsuite/gas/z8k/djnz-backf.s
gas/testsuite/gas/z8k/djnz-backf2.s
gas/testsuite/gas/z8k/djnz.d
gas/testsuite/gas/z8k/djnz.s
gas/testsuite/gas/z8k/eidi.s
gas/testsuite/gas/z8k/eidif.s
gas/testsuite/gas/z8k/inc.s
gas/testsuite/gas/z8k/incbf.s
gas/testsuite/gas/z8k/incf.s
gas/testsuite/gas/z8k/inout.d
gas/testsuite/gas/z8k/inout.s
gas/testsuite/gas/z8k/jmp-cc.d
gas/testsuite/gas/z8k/jmp-cc.s
gas/testsuite/gas/z8k/jr-back.d
gas/testsuite/gas/z8k/jr-back.s
gas/testsuite/gas/z8k/jr-backf.s
gas/testsuite/gas/z8k/jr-forw.d
gas/testsuite/gas/z8k/jr-forw.s
gas/testsuite/gas/z8k/jr-forwf.s
gas/testsuite/gas/z8k/ldk.s
gas/testsuite/gas/z8k/ldkf.s
gas/testsuite/gas/z8k/ret-cc.d
gas/testsuite/gas/z8k/ret-cc.s
gas/testsuite/gas/z8k/z8k.exp
gas/testsuite/lib/doboth
gas/testsuite/lib/doobjcmp
gas/testsuite/lib/dostriptest
gas/testsuite/lib/dotest
gas/testsuite/lib/dounsreloc
gas/testsuite/lib/dounssym
gas/testsuite/lib/gas-defs.exp
gas/testsuite/lib/gas-dg.exp
gas/testsuite/lib/run
gas/write.c
gas/write.h
gdb/CONTRIBUTE
gdb/COPYING
gdb/ChangeLog
gdb/ChangeLog-1990
gdb/ChangeLog-1991
gdb/ChangeLog-1992
gdb/ChangeLog-1993
gdb/ChangeLog-1994
gdb/ChangeLog-1995
gdb/ChangeLog-1996
gdb/ChangeLog-1997
gdb/ChangeLog-1998
gdb/ChangeLog-1999
gdb/ChangeLog-2000
gdb/ChangeLog-2001
gdb/ChangeLog-2002
gdb/ChangeLog-2003
gdb/ChangeLog-2004
gdb/ChangeLog-2005
gdb/ChangeLog-3.x
gdb/MAINTAINERS
gdb/Makefile.in
gdb/NEWS
gdb/PROBLEMS
gdb/README
gdb/abug-rom.c
gdb/acinclude.m4
gdb/aclocal.m4
gdb/ada-exp.y
gdb/ada-lang.c
gdb/ada-lang.h
gdb/ada-lex.l
gdb/ada-typeprint.c
gdb/ada-valprint.c
gdb/aix-thread.c
gdb/alpha-linux-nat.c
gdb/alpha-linux-tdep.c
gdb/alpha-mdebug-tdep.c
gdb/alpha-nat.c
gdb/alpha-osf1-tdep.c
gdb/alpha-tdep.c
gdb/alpha-tdep.h
gdb/alphabsd-nat.c
gdb/alphabsd-tdep.c
gdb/alphabsd-tdep.h
gdb/alphafbsd-tdep.c
gdb/alphanbsd-tdep.c
gdb/alphaobsd-tdep.c
gdb/amd64-linux-nat.c
gdb/amd64-linux-tdep.c
gdb/amd64-nat.c
gdb/amd64-nat.h
gdb/amd64-sol2-tdep.c
gdb/amd64-tdep.c
gdb/amd64-tdep.h
gdb/amd64bsd-nat.c
gdb/amd64fbsd-nat.c
gdb/amd64fbsd-tdep.c
gdb/amd64nbsd-nat.c
gdb/amd64nbsd-tdep.c
gdb/amd64obsd-nat.c
gdb/amd64obsd-tdep.c
gdb/annotate.c
gdb/annotate.h
gdb/arch-utils.c
gdb/arch-utils.h
gdb/arm-linux-nat.c
gdb/arm-linux-tdep.c
gdb/arm-linux-tdep.h
gdb/arm-tdep.c
gdb/arm-tdep.h
gdb/armnbsd-nat.c
gdb/armnbsd-tdep.c
gdb/armobsd-tdep.c
gdb/auxv.c
gdb/auxv.h
gdb/avr-tdep.c
gdb/ax-gdb.c
gdb/ax-gdb.h
gdb/ax-general.c
gdb/ax.h
gdb/bcache.c
gdb/bcache.h
gdb/bfd-target.c
gdb/bfd-target.h
gdb/block.c
gdb/block.h
gdb/blockframe.c
gdb/breakpoint.c
gdb/breakpoint.h
gdb/bsd-kvm.c
gdb/bsd-kvm.h
gdb/bsd-uthread.c
gdb/bsd-uthread.h
gdb/buildsym.c
gdb/buildsym.h
gdb/c-exp.y
gdb/c-lang.c
gdb/c-lang.h
gdb/c-typeprint.c
gdb/c-valprint.c
gdb/call-cmds.h
gdb/charset.c
gdb/charset.h
gdb/cli-out.c
gdb/cli-out.h
gdb/cli/cli-cmds.c
gdb/cli/cli-cmds.h
gdb/cli/cli-decode.c
gdb/cli/cli-decode.h
gdb/cli/cli-dump.c
gdb/cli/cli-dump.h
gdb/cli/cli-interp.c
gdb/cli/cli-logging.c
gdb/cli/cli-script.c
gdb/cli/cli-script.h
gdb/cli/cli-setshow.c
gdb/cli/cli-setshow.h
gdb/cli/cli-utils.c
gdb/cli/cli-utils.h
gdb/coff-pe-read.c
gdb/coff-pe-read.h
gdb/coff-solib.c
gdb/coff-solib.h
gdb/coffread.c
gdb/command.h
gdb/complaints.c
gdb/complaints.h
gdb/completer.c
gdb/completer.h
gdb/config.in
gdb/config/alpha/alpha-linux.mh
gdb/config/alpha/alpha-linux.mt
gdb/config/alpha/alpha-osf1.mh
gdb/config/alpha/alpha-osf1.mt
gdb/config/alpha/alpha-osf2.mh
gdb/config/alpha/alpha-osf3.mh
gdb/config/alpha/alpha.mt
gdb/config/alpha/fbsd.mh
gdb/config/alpha/fbsd.mt
gdb/config/alpha/nbsd.mh
gdb/config/alpha/nbsd.mt
gdb/config/alpha/nm-linux.h
gdb/config/alpha/nm-osf.h
gdb/config/alpha/nm-osf2.h
gdb/config/alpha/nm-osf3.h
gdb/config/alpha/obsd.mt
gdb/config/alpha/tm-alpha.h
gdb/config/alpha/tm-alphalinux.h
gdb/config/arm/embed.mt
gdb/config/arm/linux.mh
gdb/config/arm/linux.mt
gdb/config/arm/nbsd.mt
gdb/config/arm/nbsdaout.mh
gdb/config/arm/nbsdelf.mh
gdb/config/arm/nm-linux.h
gdb/config/arm/nm-nbsdaout.h
gdb/config/arm/obsd.mt
gdb/config/arm/tm-arm.h
gdb/config/arm/tm-embed.h
gdb/config/arm/tm-linux.h
gdb/config/arm/tm-wince.h
gdb/config/arm/wince.mt
gdb/config/avr/avr.mt
gdb/config/cris/cris.mt
gdb/config/d10v/d10v.mt
gdb/config/djgpp/README
gdb/config/djgpp/config.sed
gdb/config/djgpp/djcheck.sh
gdb/config/djgpp/djconfig.sh
gdb/config/djgpp/fnchange.lst
gdb/config/frv/frv.mt
gdb/config/frv/tm-frv.h
gdb/config/h8300/h8300.mt
gdb/config/i386/cygwin.mh
gdb/config/i386/cygwin.mt
gdb/config/i386/fbsd.mh
gdb/config/i386/fbsd.mt
gdb/config/i386/fbsd64.mh
gdb/config/i386/fbsd64.mt
gdb/config/i386/go32.mh
gdb/config/i386/i386.mt
gdb/config/i386/i386gnu.mh
gdb/config/i386/i386gnu.mt
gdb/config/i386/i386sco.mh
gdb/config/i386/i386sco4.mh
gdb/config/i386/i386sco5.mh
gdb/config/i386/i386sol2.mh
gdb/config/i386/i386sol2.mt
gdb/config/i386/i386v.mh
gdb/config/i386/i386v4.mh
gdb/config/i386/i386v42mp.mh
gdb/config/i386/linux.mh
gdb/config/i386/linux.mt
gdb/config/i386/linux64.mh
gdb/config/i386/linux64.mt
gdb/config/i386/nbsd.mt
gdb/config/i386/nbsd64.mh
gdb/config/i386/nbsd64.mt
gdb/config/i386/nbsdaout.mh
gdb/config/i386/nbsdelf.mh
gdb/config/i386/ncr3000.mh
gdb/config/i386/ncr3000.mt
gdb/config/i386/nm-cygwin.h
gdb/config/i386/nm-fbsd.h
gdb/config/i386/nm-go32.h
gdb/config/i386/nm-i386.h
gdb/config/i386/nm-i386gnu.h
gdb/config/i386/nm-i386sco.h
gdb/config/i386/nm-i386sco4.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-linux64.h
gdb/config/i386/nto.mh
gdb/config/i386/nto.mt
gdb/config/i386/obsd.mh
gdb/config/i386/obsd.mt
gdb/config/i386/obsd64.mh
gdb/config/i386/obsd64.mt
gdb/config/i386/obsdaout.mh
gdb/config/i386/sol2-64.mh
gdb/config/i386/sol2-64.mt
gdb/config/i386/tm-i386sol2.h
gdb/config/i386/tm-linux.h
gdb/config/i386/tm-nto.h
gdb/config/ia64/ia64.mt
gdb/config/ia64/linux.mh
gdb/config/ia64/linux.mt
gdb/config/ia64/nm-linux.h
gdb/config/ia64/tm-linux.h
gdb/config/iq2000/iq2000.mt
gdb/config/m32c/m32c.mt
gdb/config/m32r/linux.mh
gdb/config/m32r/linux.mt
gdb/config/m32r/m32r.mt
gdb/config/m32r/nm-linux.h
gdb/config/m68hc11/m68hc11.mt
gdb/config/m68k/cisco.mt
gdb/config/m68k/linux.mh
gdb/config/m68k/linux.mt
gdb/config/m68k/monitor.mt
gdb/config/m68k/nbsd.mt
gdb/config/m68k/nbsdaout.mh
gdb/config/m68k/nbsdelf.mh
gdb/config/m68k/nm-linux.h
gdb/config/m68k/obsd.mh
gdb/config/m68k/obsd.mt
gdb/config/m68k/os68k.mt
gdb/config/m68k/st2000.mt
gdb/config/m68k/tm-cisco.h
gdb/config/m68k/tm-monitor.h
gdb/config/m68k/tm-os68k.h
gdb/config/m88k/obsd.mh
gdb/config/m88k/obsd.mt
gdb/config/mips/embed.mt
gdb/config/mips/irix5.mh
gdb/config/mips/irix5.mt
gdb/config/mips/irix6.mh
gdb/config/mips/irix6.mt
gdb/config/mips/linux.mh
gdb/config/mips/linux.mt
gdb/config/mips/nbsd.mh
gdb/config/mips/nbsd.mt
gdb/config/mips/nm-irix5.h
gdb/config/mips/nm-linux.h
gdb/config/mips/obsd64.mh
gdb/config/mips/obsd64.mt
gdb/config/mips/tm-linux.h
gdb/config/mips/tm-nbsd.h
gdb/config/mips/tm-wince.h
gdb/config/mips/wince.mt
gdb/config/mn10300/linux.mt
gdb/config/mn10300/mn10300.mt
gdb/config/mt/mt.mt
gdb/config/nm-linux.h
gdb/config/nm-lynx.h
gdb/config/nm-nbsd.h
gdb/config/nm-nbsdaout.h
gdb/config/pa/hppa.mt
gdb/config/pa/hppa64.mt
gdb/config/pa/hppahpux.mt
gdb/config/pa/hpux.mh
gdb/config/pa/linux.mh
gdb/config/pa/linux.mt
gdb/config/pa/nm-linux.h
gdb/config/pa/obsd.mh
gdb/config/pa/obsd.mt
gdb/config/pa/tm-hppa.h
gdb/config/pa/tm-hppah.h
gdb/config/pa/tm-linux.h
gdb/config/powerpc/aix.mh
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-aix.h
gdb/config/powerpc/nm-linux.h
gdb/config/powerpc/nm-ppc64-linux.h
gdb/config/powerpc/obsd.mh
gdb/config/powerpc/obsd.mt
gdb/config/powerpc/ppc-eabi.mt
gdb/config/powerpc/ppc-sim.mt
gdb/config/powerpc/ppc64-linux.mh
gdb/config/powerpc/tm-linux.h
gdb/config/powerpc/tm-ppc-eabi.h
gdb/config/rs6000/aix4.mh
gdb/config/rs6000/aix4.mt
gdb/config/rs6000/nm-rs6000.h
gdb/config/rs6000/rs6000.mh
gdb/config/rs6000/rs6000.mt
gdb/config/rs6000/rs6000lynx.mh
gdb/config/rs6000/rs6000lynx.mt
gdb/config/rs6000/tm-rs6000.h
gdb/config/rs6000/tm-rs6000ly.h
gdb/config/s390/nm-linux.h
gdb/config/s390/s390.mh
gdb/config/s390/s390.mt
gdb/config/sh/embed.mt
gdb/config/sh/linux.mt
gdb/config/sh/nbsd.mh
gdb/config/sh/nbsd.mt
gdb/config/sh/sh64.mt
gdb/config/sh/tm-linux.h
gdb/config/sh/tm-nbsd.h
gdb/config/sh/tm-sh.h
gdb/config/sh/tm-wince.h
gdb/config/sh/wince.mt
gdb/config/sparc/fbsd.mh
gdb/config/sparc/fbsd.mt
gdb/config/sparc/linux.mh
gdb/config/sparc/linux.mt
gdb/config/sparc/linux64.mh
gdb/config/sparc/linux64.mt
gdb/config/sparc/nbsd.mt
gdb/config/sparc/nbsd64.mh
gdb/config/sparc/nbsd64.mt
gdb/config/sparc/nbsdaout.mh
gdb/config/sparc/nbsdelf.mh
gdb/config/sparc/nm-linux.h
gdb/config/sparc/nm-sol2.h
gdb/config/sparc/obsd.mt
gdb/config/sparc/obsd64.mt
gdb/config/sparc/sol2-64.mt
gdb/config/sparc/sol2.mh
gdb/config/sparc/sol2.mt
gdb/config/sparc/sparc.mt
gdb/config/sparc/sparc64.mt
gdb/config/sparc/tm-sol2.h
gdb/config/tm-linux.h
gdb/config/tm-nto.h
gdb/config/v850/v850.mt
gdb/config/vax/nbsd.mt
gdb/config/vax/nbsdaout.mh
gdb/config/vax/nbsdelf.mh
gdb/config/vax/nm-vax.h
gdb/config/vax/obsd.mh
gdb/config/vax/obsd.mt
gdb/config/vax/vax.mh
gdb/config/vax/vax.mt
gdb/config/xstormy16/xstormy16.mt
gdb/configure
gdb/configure.ac
gdb/configure.host
gdb/configure.tgt
gdb/copying.awk
gdb/copying.c
gdb/core-aout.c
gdb/core-regset.c
gdb/corefile.c
gdb/corelow.c
gdb/cp-abi.c
gdb/cp-abi.h
gdb/cp-name-parser.y
gdb/cp-namespace.c
gdb/cp-support.c
gdb/cp-support.h
gdb/cp-valprint.c
gdb/cpu32bug-rom.c
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/dbug-rom.c
gdb/dbxread.c
gdb/dcache.c
gdb/dcache.h
gdb/defs.h
gdb/demangle.c
gdb/dictionary.c
gdb/dictionary.h
gdb/dink32-rom.c
gdb/disasm.c
gdb/disasm.h
gdb/doc/ChangeLog
gdb/doc/LRS
gdb/doc/Makefile.in
gdb/doc/a4rc.sed
gdb/doc/agentexpr.texi
gdb/doc/all-cfg.texi
gdb/doc/annotate.texinfo
gdb/doc/configure
gdb/doc/configure.ac
gdb/doc/fdl.texi
gdb/doc/gdb.texinfo
gdb/doc/gdbint.texinfo
gdb/doc/gpl.texi
gdb/doc/lpsrc.sed
gdb/doc/observer.texi
gdb/doc/psrc.sed
gdb/doc/refcard.tex
gdb/doc/stabs.texinfo
gdb/doublest.c
gdb/doublest.h
gdb/dsrec.c
gdb/dummy-frame.c
gdb/dummy-frame.h
gdb/dve3900-rom.c
gdb/dwarf2-frame.c
gdb/dwarf2-frame.h
gdb/dwarf2expr.c
gdb/dwarf2expr.h
gdb/dwarf2loc.c
gdb/dwarf2loc.h
gdb/dwarf2read.c
gdb/dwarfread.c
gdb/elfread.c
gdb/environ.c
gdb/environ.h
gdb/eval.c
gdb/event-loop.c
gdb/event-loop.h
gdb/event-top.c
gdb/event-top.h
gdb/exc_request.defs
gdb/exceptions.c
gdb/exceptions.h
gdb/exec.c
gdb/exec.h
gdb/expprint.c
gdb/expression.h
gdb/f-exp.y
gdb/f-lang.c
gdb/f-lang.h
gdb/f-typeprint.c
gdb/f-valprint.c
gdb/fbsd-nat.c
gdb/fbsd-nat.h
gdb/findvar.c
gdb/fork-child.c
gdb/frame-base.c
gdb/frame-base.h
gdb/frame-unwind.c
gdb/frame-unwind.h
gdb/frame.c
gdb/frame.h
gdb/frv-linux-tdep.c
gdb/frv-tdep.c
gdb/frv-tdep.h
gdb/gcore.c
gdb/gdb-events.c
gdb/gdb-events.h
gdb/gdb-events.sh
gdb/gdb-stabs.h
gdb/gdb.1
gdb/gdb.c
gdb/gdb.gdb
gdb/gdb.h
gdb/gdb_assert.h
gdb/gdb_curses.h
gdb/gdb_dirent.h
gdb/gdb_gcore.sh
gdb/gdb_indent.sh
gdb/gdb_locale.h
gdb/gdb_mbuild.sh
gdb/gdb_obstack.h
gdb/gdb_proc_service.h
gdb/gdb_ptrace.h
gdb/gdb_regex.h
gdb/gdb_select.h
gdb/gdb_stat.h
gdb/gdb_string.h
gdb/gdb_thread_db.h
gdb/gdb_vfork.h
gdb/gdb_wait.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbcmd.h
gdb/gdbcore.h
gdb/gdbinit.in
gdb/gdbserver/ChangeLog
gdb/gdbserver/Makefile.in
gdb/gdbserver/README
gdb/gdbserver/acinclude.m4
gdb/gdbserver/aclocal.m4
gdb/gdbserver/config.in
gdb/gdbserver/configure
gdb/gdbserver/configure.ac
gdb/gdbserver/configure.srv
gdb/gdbserver/gdb_proc_service.h
gdb/gdbserver/gdbreplay.c
gdb/gdbserver/gdbserver.1
gdb/gdbserver/i387-fp.c
gdb/gdbserver/i387-fp.h
gdb/gdbserver/inferiors.c
gdb/gdbserver/linux-arm-low.c
gdb/gdbserver/linux-cris-low.c
gdb/gdbserver/linux-crisv32-low.c
gdb/gdbserver/linux-i386-low.c
gdb/gdbserver/linux-ia64-low.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/linux-low.h
gdb/gdbserver/linux-m32r-low.c
gdb/gdbserver/linux-m68k-low.c
gdb/gdbserver/linux-mips-low.c
gdb/gdbserver/linux-ppc-low.c
gdb/gdbserver/linux-ppc64-low.c
gdb/gdbserver/linux-s390-low.c
gdb/gdbserver/linux-sh-low.c
gdb/gdbserver/linux-x86-64-low.c
gdb/gdbserver/mem-break.c
gdb/gdbserver/mem-break.h
gdb/gdbserver/proc-service.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/gdbserver/terminal.h
gdb/gdbserver/thread-db.c
gdb/gdbserver/utils.c
gdb/gdbserver/win32-i386-low.c
gdb/gdbthread.h
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/glibc-tdep.c
gdb/glibc-tdep.h
gdb/gnu-nat.c
gdb/gnu-nat.h
gdb/gnu-v2-abi.c
gdb/gnu-v2-abi.h
gdb/gnu-v3-abi.c
gdb/go32-nat.c
gdb/gregset.h
gdb/h8300-tdep.c
gdb/hpacc-abi.c
gdb/hppa-hpux-nat.c
gdb/hppa-hpux-tdep.c
gdb/hppa-linux-nat.c
gdb/hppa-linux-tdep.c
gdb/hppa-tdep.c
gdb/hppa-tdep.h
gdb/hppabsd-nat.c
gdb/hppabsd-tdep.c
gdb/hpread.c
gdb/hpux-thread.c
gdb/i386-cygwin-tdep.c
gdb/i386-linux-nat.c
gdb/i386-linux-tdep.c
gdb/i386-linux-tdep.h
gdb/i386-nat.c
gdb/i386-nto-tdep.c
gdb/i386-sol2-nat.c
gdb/i386-sol2-tdep.c
gdb/i386-stub.c
gdb/i386-tdep.c
gdb/i386-tdep.h
gdb/i386bsd-nat.c
gdb/i386bsd-nat.h
gdb/i386bsd-tdep.c
gdb/i386fbsd-nat.c
gdb/i386fbsd-tdep.c
gdb/i386gnu-nat.c
gdb/i386gnu-tdep.c
gdb/i386nbsd-nat.c
gdb/i386nbsd-tdep.c
gdb/i386obsd-nat.c
gdb/i386obsd-tdep.c
gdb/i386v-nat.c
gdb/i386v4-nat.c
gdb/i387-tdep.c
gdb/i387-tdep.h
gdb/ia64-linux-nat.c
gdb/ia64-linux-tdep.c
gdb/ia64-tdep.c
gdb/ia64-tdep.h
gdb/inf-child.c
gdb/inf-child.h
gdb/inf-loop.c
gdb/inf-loop.h
gdb/inf-ptrace.c
gdb/inf-ptrace.h
gdb/inf-ttrace.c
gdb/inf-ttrace.h
gdb/infcall.c
gdb/infcall.h
gdb/infcmd.c
gdb/inferior.h
gdb/inflow.c
gdb/inflow.h
gdb/infptrace.c
gdb/infrun.c
gdb/inftarg.c
gdb/interps.c
gdb/interps.h
gdb/iq2000-tdep.c
gdb/irix5-nat.c
gdb/jv-exp.y
gdb/jv-lang.c
gdb/jv-lang.h
gdb/jv-typeprint.c
gdb/jv-valprint.c
gdb/language.c
gdb/language.h
gdb/libunwind-frame.c
gdb/libunwind-frame.h
gdb/linespec.c
gdb/linespec.h
gdb/linux-fork.c
gdb/linux-fork.h
gdb/linux-nat.c
gdb/linux-nat.h
gdb/linux-thread-db.c
gdb/lynx-nat.c
gdb/m2-exp.y
gdb/m2-lang.c
gdb/m2-lang.h
gdb/m2-typeprint.c
gdb/m2-valprint.c
gdb/m32c-tdep.c
gdb/m32r-linux-nat.c
gdb/m32r-linux-tdep.c
gdb/m32r-rom.c
gdb/m32r-stub.c
gdb/m32r-tdep.c
gdb/m32r-tdep.h
gdb/m68hc11-tdep.c
gdb/m68k-stub.c
gdb/m68k-tdep.c
gdb/m68k-tdep.h
gdb/m68kbsd-nat.c
gdb/m68kbsd-tdep.c
gdb/m68klinux-nat.c
gdb/m68klinux-tdep.c
gdb/m88k-tdep.c
gdb/m88k-tdep.h
gdb/m88kbsd-nat.c
gdb/macrocmd.c
gdb/macroexp.c
gdb/macroexp.h
gdb/macroscope.c
gdb/macroscope.h
gdb/macrotab.c
gdb/macrotab.h
gdb/main.c
gdb/main.h
gdb/maint.c
gdb/mdebugread.c
gdb/mdebugread.h
gdb/mem-break.c
gdb/memattr.c
gdb/memattr.h
gdb/mi/ChangeLog-1999-2003
gdb/mi/gdb-mi.el
gdb/mi/mi-cmd-break.c
gdb/mi/mi-cmd-disas.c
gdb/mi/mi-cmd-env.c
gdb/mi/mi-cmd-file.c
gdb/mi/mi-cmd-stack.c
gdb/mi/mi-cmd-var.c
gdb/mi/mi-cmds.c
gdb/mi/mi-cmds.h
gdb/mi/mi-common.c
gdb/mi/mi-common.h
gdb/mi/mi-console.c
gdb/mi/mi-console.h
gdb/mi/mi-getopt.c
gdb/mi/mi-getopt.h
gdb/mi/mi-interp.c
gdb/mi/mi-main.c
gdb/mi/mi-main.h
gdb/mi/mi-out.c
gdb/mi/mi-out.h
gdb/mi/mi-parse.c
gdb/mi/mi-parse.h
gdb/mi/mi-symbol-cmds.c
gdb/mingw-hdep.c
gdb/minsyms.c
gdb/mips-irix-tdep.c
gdb/mips-linux-nat.c
gdb/mips-linux-tdep.c
gdb/mips-linux-tdep.h
gdb/mips-mdebug-tdep.c
gdb/mips-mdebug-tdep.h
gdb/mips-tdep.c
gdb/mips-tdep.h
gdb/mips64obsd-nat.c
gdb/mips64obsd-tdep.c
gdb/mipsnbsd-nat.c
gdb/mipsnbsd-tdep.c
gdb/mipsnbsd-tdep.h
gdb/mipsread.c
gdb/mipsv4-nat.c
gdb/mn10300-linux-tdep.c
gdb/mn10300-tdep.c
gdb/mn10300-tdep.h
gdb/monitor.c
gdb/monitor.h
gdb/msg.defs
gdb/msg_reply.defs
gdb/mt-tdep.c
gdb/nbsd-tdep.c
gdb/nbsd-tdep.h
gdb/nlmread.c
gdb/notify.defs
gdb/nto-procfs.c
gdb/nto-tdep.c
gdb/nto-tdep.h
gdb/objc-exp.y
gdb/objc-lang.c
gdb/objc-lang.h
gdb/objfiles.c
gdb/objfiles.h
gdb/obsd-tdep.c
gdb/obsd-tdep.h
gdb/observer.c
gdb/observer.sh
gdb/ocd.c
gdb/ocd.h
gdb/osabi.c
gdb/osabi.h
gdb/osf-share/AT386/cma_thread_io.h
gdb/osf-share/HP800/cma_thread_io.h
gdb/osf-share/README
gdb/osf-share/RIOS/cma_thread_io.h
gdb/osf-share/cma_attr.h
gdb/osf-share/cma_deb_core.h
gdb/osf-share/cma_debug_client.h
gdb/osf-share/cma_errors.h
gdb/osf-share/cma_handle.h
gdb/osf-share/cma_init.h
gdb/osf-share/cma_list.h
gdb/osf-share/cma_mutex.h
gdb/osf-share/cma_sched.h
gdb/osf-share/cma_semaphore_defs.h
gdb/osf-share/cma_sequence.h
gdb/osf-share/cma_stack.h
gdb/osf-share/cma_stack_int.h
gdb/osf-share/cma_tcb_defs.h
gdb/osf-share/cma_util.h
gdb/p-exp.y
gdb/p-lang.c
gdb/p-lang.h
gdb/p-typeprint.c
gdb/p-valprint.c
gdb/parse.c
gdb/parser-defs.h
gdb/po/gdbtext
gdb/posix-hdep.c
gdb/ppc-bdm.c
gdb/ppc-linux-nat.c
gdb/ppc-linux-tdep.c
gdb/ppc-sysv-tdep.c
gdb/ppc-tdep.h
gdb/ppcbug-rom.c
gdb/ppcnbsd-nat.c
gdb/ppcnbsd-tdep.c
gdb/ppcnbsd-tdep.h
gdb/ppcobsd-nat.c
gdb/ppcobsd-tdep.c
gdb/ppcobsd-tdep.h
gdb/printcmd.c
gdb/proc-api.c
gdb/proc-events.c
gdb/proc-flags.c
gdb/proc-service.c
gdb/proc-utils.h
gdb/proc-why.c
gdb/process_reply.defs
gdb/procfs.c
gdb/prologue-value.c
gdb/prologue-value.h
gdb/regcache.c
gdb/regcache.h
gdb/regformats/reg-arm.dat
gdb/regformats/reg-cris.dat
gdb/regformats/reg-crisv32.dat
gdb/regformats/reg-i386-linux.dat
gdb/regformats/reg-i386.dat
gdb/regformats/reg-ia64.dat
gdb/regformats/reg-m32r.dat
gdb/regformats/reg-m68k.dat
gdb/regformats/reg-mips.dat
gdb/regformats/reg-ppc.dat
gdb/regformats/reg-ppc64.dat
gdb/regformats/reg-s390.dat
gdb/regformats/reg-s390x.dat
gdb/regformats/reg-sh.dat
gdb/regformats/reg-x86-64.dat
gdb/regformats/regdat.sh
gdb/regformats/regdef.h
gdb/reggroups.c
gdb/reggroups.h
gdb/regset.c
gdb/regset.h
gdb/remote-e7000.c
gdb/remote-est.c
gdb/remote-fileio.c
gdb/remote-fileio.h
gdb/remote-hms.c
gdb/remote-m32r-sdi.c
gdb/remote-mips.c
gdb/remote-sds.c
gdb/remote-sim.c
gdb/remote-st.c
gdb/remote-utils.c
gdb/remote-utils.h
gdb/remote.c
gdb/remote.h
gdb/reply_mig_hack.awk
gdb/rom68k-rom.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-nat.c
gdb/rs6000-tdep.c
gdb/rs6000-tdep.h
gdb/s390-nat.c
gdb/s390-tdep.c
gdb/s390-tdep.h
gdb/scm-exp.c
gdb/scm-lang.c
gdb/scm-lang.h
gdb/scm-tags.h
gdb/scm-valprint.c
gdb/sentinel-frame.c
gdb/sentinel-frame.h
gdb/ser-base.c
gdb/ser-base.h
gdb/ser-e7kpc.c
gdb/ser-go32.c
gdb/ser-mingw.c
gdb/ser-pipe.c
gdb/ser-tcp.c
gdb/ser-tcp.h
gdb/ser-unix.c
gdb/ser-unix.h
gdb/serial.c
gdb/serial.h
gdb/sh-linux-tdep.c
gdb/sh-stub.c
gdb/sh-tdep.c
gdb/sh-tdep.h
gdb/sh3-rom.c
gdb/sh64-tdep.c
gdb/shnbsd-nat.c
gdb/shnbsd-tdep.c
gdb/shnbsd-tdep.h
gdb/signals/signals.c
gdb/sim-regno.h
gdb/sol-thread.c
gdb/sol2-tdep.c
gdb/sol2-tdep.h
gdb/solib-aix5.c
gdb/solib-frv.c
gdb/solib-irix.c
gdb/solib-legacy.c
gdb/solib-null.c
gdb/solib-osf.c
gdb/solib-pa64.c
gdb/solib-pa64.h
gdb/solib-som.c
gdb/solib-som.h
gdb/solib-sunos.c
gdb/solib-svr4.c
gdb/solib-svr4.h
gdb/solib.c
gdb/solib.h
gdb/solist.h
gdb/somread.c
gdb/source.c
gdb/source.h
gdb/sparc-linux-nat.c
gdb/sparc-linux-tdep.c
gdb/sparc-nat.c
gdb/sparc-nat.h
gdb/sparc-sol2-nat.c
gdb/sparc-sol2-tdep.c
gdb/sparc-stub.c
gdb/sparc-tdep.c
gdb/sparc-tdep.h
gdb/sparc64-linux-nat.c
gdb/sparc64-linux-tdep.c
gdb/sparc64-nat.c
gdb/sparc64-sol2-tdep.c
gdb/sparc64-tdep.c
gdb/sparc64-tdep.h
gdb/sparc64fbsd-nat.c
gdb/sparc64fbsd-tdep.c
gdb/sparc64nbsd-nat.c
gdb/sparc64nbsd-tdep.c
gdb/sparc64obsd-tdep.c
gdb/sparcnbsd-nat.c
gdb/sparcnbsd-tdep.c
gdb/sparcobsd-tdep.c
gdb/srec.h
gdb/stabsread.c
gdb/stabsread.h
gdb/stack.c
gdb/stack.h
gdb/std-regs.c
gdb/stop-gdb.c
gdb/symfile-mem.c
gdb/symfile.c
gdb/symfile.h
gdb/symmisc.c
gdb/symtab.c
gdb/symtab.h
gdb/target.c
gdb/target.h
gdb/terminal.h
gdb/testsuite/.gdbinit
gdb/testsuite/ChangeLog
gdb/testsuite/Makefile.in
gdb/testsuite/TODO
gdb/testsuite/aclocal.m4
gdb/testsuite/config/abug.exp
gdb/testsuite/config/arm-ice.exp
gdb/testsuite/config/cfdbug.exp
gdb/testsuite/config/cpu32bug.exp
gdb/testsuite/config/cygmon.exp
gdb/testsuite/config/d10v.exp
gdb/testsuite/config/dve.exp
gdb/testsuite/config/est.exp
gdb/testsuite/config/gdbserver.exp
gdb/testsuite/config/h8300.exp
gdb/testsuite/config/hmsirom.exp
gdb/testsuite/config/i386-bozo.exp
gdb/testsuite/config/i960.exp
gdb/testsuite/config/m32r-stub.exp
gdb/testsuite/config/m32r.exp
gdb/testsuite/config/m68k-emc.exp
gdb/testsuite/config/mips-idt.exp
gdb/testsuite/config/mips.exp
gdb/testsuite/config/mn10300-eval.exp
gdb/testsuite/config/monitor.exp
gdb/testsuite/config/netware.exp
gdb/testsuite/config/nind.exp
gdb/testsuite/config/proelf.exp
gdb/testsuite/config/rom68k.exp
gdb/testsuite/config/sh.exp
gdb/testsuite/config/sid.exp
gdb/testsuite/config/sim.exp
gdb/testsuite/config/slite.exp
gdb/testsuite/config/unix.exp
gdb/testsuite/config/unknown.exp
gdb/testsuite/config/vr4300.exp
gdb/testsuite/config/vr5000.exp
gdb/testsuite/config/vx.exp
gdb/testsuite/config/vxworks.exp
gdb/testsuite/config/vxworks29k.exp
gdb/testsuite/configure
gdb/testsuite/configure.ac
gdb/testsuite/gdb.ada/Makefile.in
gdb/testsuite/gdb.ada/array_return.exp
gdb/testsuite/gdb.ada/array_return/p.adb
gdb/testsuite/gdb.ada/array_return/pck.adb
gdb/testsuite/gdb.ada/array_return/pck.ads
gdb/testsuite/gdb.ada/arrayidx.exp
gdb/testsuite/gdb.ada/arrayidx/p.adb
gdb/testsuite/gdb.ada/exec_changed.exp
gdb/testsuite/gdb.ada/exec_changed/first.adb
gdb/testsuite/gdb.ada/exec_changed/second.adb
gdb/testsuite/gdb.ada/fixed_points.exp
gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb
gdb/testsuite/gdb.ada/gnat_ada.gpr
gdb/testsuite/gdb.ada/null_record.exp
gdb/testsuite/gdb.ada/null_record/bar.adb
gdb/testsuite/gdb.ada/null_record/bar.ads
gdb/testsuite/gdb.ada/null_record/null_record.adb
gdb/testsuite/gdb.ada/packed_array.exp
gdb/testsuite/gdb.ada/packed_array/pa.adb
gdb/testsuite/gdb.ada/start.exp
gdb/testsuite/gdb.ada/start/dummy.adb
gdb/testsuite/gdb.arch/Makefile.in
gdb/testsuite/gdb.arch/alpha-step.c
gdb/testsuite/gdb.arch/alpha-step.exp
gdb/testsuite/gdb.arch/altivec-abi.c
gdb/testsuite/gdb.arch/altivec-abi.exp
gdb/testsuite/gdb.arch/altivec-regs.c
gdb/testsuite/gdb.arch/altivec-regs.exp
gdb/testsuite/gdb.arch/e500-abi.c
gdb/testsuite/gdb.arch/e500-abi.exp
gdb/testsuite/gdb.arch/e500-prologue.c
gdb/testsuite/gdb.arch/e500-prologue.exp
gdb/testsuite/gdb.arch/e500-regs.c
gdb/testsuite/gdb.arch/e500-regs.exp
gdb/testsuite/gdb.arch/gdb1291.exp
gdb/testsuite/gdb.arch/gdb1291.s
gdb/testsuite/gdb.arch/gdb1431.exp
gdb/testsuite/gdb.arch/gdb1431.s
gdb/testsuite/gdb.arch/gdb1558.c
gdb/testsuite/gdb.arch/gdb1558.exp
gdb/testsuite/gdb.arch/i386-cpuid.h
gdb/testsuite/gdb.arch/i386-prologue.c
gdb/testsuite/gdb.arch/i386-prologue.exp
gdb/testsuite/gdb.arch/i386-size.c
gdb/testsuite/gdb.arch/i386-size.exp
gdb/testsuite/gdb.arch/i386-sse.c
gdb/testsuite/gdb.arch/i386-sse.exp
gdb/testsuite/gdb.arch/i386-unwind.c
gdb/testsuite/gdb.arch/i386-unwind.exp
gdb/testsuite/gdb.arch/pa-nullify.exp
gdb/testsuite/gdb.arch/pa-nullify.s
gdb/testsuite/gdb.arch/pa64-nullify.s
gdb/testsuite/gdb.arch/powerpc-aix-prologue.c
gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
gdb/testsuite/gdb.arch/powerpc-prologue.c
gdb/testsuite/gdb.arch/powerpc-prologue.exp
gdb/testsuite/gdb.asm/Makefile.in
gdb/testsuite/gdb.asm/alpha.inc
gdb/testsuite/gdb.asm/arm.inc
gdb/testsuite/gdb.asm/asm-source.exp
gdb/testsuite/gdb.asm/asmsrc1.s
gdb/testsuite/gdb.asm/asmsrc2.s
gdb/testsuite/gdb.asm/common.inc
gdb/testsuite/gdb.asm/d10v.inc
gdb/testsuite/gdb.asm/empty.inc
gdb/testsuite/gdb.asm/frv.inc
gdb/testsuite/gdb.asm/h8300.inc
gdb/testsuite/gdb.asm/i386.inc
gdb/testsuite/gdb.asm/ia64.inc
gdb/testsuite/gdb.asm/iq2000.inc
gdb/testsuite/gdb.asm/m32c.inc
gdb/testsuite/gdb.asm/m32r-linux.inc
gdb/testsuite/gdb.asm/m32r.inc
gdb/testsuite/gdb.asm/m68hc11.inc
gdb/testsuite/gdb.asm/m68k.inc
gdb/testsuite/gdb.asm/mips.inc
gdb/testsuite/gdb.asm/netbsd.inc
gdb/testsuite/gdb.asm/openbsd.inc
gdb/testsuite/gdb.asm/pa.inc
gdb/testsuite/gdb.asm/pa64.inc
gdb/testsuite/gdb.asm/powerpc.inc
gdb/testsuite/gdb.asm/s390.inc
gdb/testsuite/gdb.asm/s390x.inc
gdb/testsuite/gdb.asm/sh.inc
gdb/testsuite/gdb.asm/sparc.inc
gdb/testsuite/gdb.asm/sparc64.inc
gdb/testsuite/gdb.asm/v850.inc
gdb/testsuite/gdb.asm/x86_64.inc
gdb/testsuite/gdb.asm/xstormy16.inc
gdb/testsuite/gdb.base/Makefile.in
gdb/testsuite/gdb.base/a2-run.exp
gdb/testsuite/gdb.base/advance.c
gdb/testsuite/gdb.base/advance.exp
gdb/testsuite/gdb.base/all-bin.exp
gdb/testsuite/gdb.base/all-types.c
gdb/testsuite/gdb.base/annota1.c
gdb/testsuite/gdb.base/annota1.exp
gdb/testsuite/gdb.base/annota3.c
gdb/testsuite/gdb.base/annota3.exp
gdb/testsuite/gdb.base/args.c
gdb/testsuite/gdb.base/args.exp
gdb/testsuite/gdb.base/arithmet.exp
gdb/testsuite/gdb.base/arrayidx.c
gdb/testsuite/gdb.base/arrayidx.exp
gdb/testsuite/gdb.base/assign.exp
gdb/testsuite/gdb.base/async.c
gdb/testsuite/gdb.base/async.exp
gdb/testsuite/gdb.base/attach.c
gdb/testsuite/gdb.base/attach.exp
gdb/testsuite/gdb.base/attach2.c
gdb/testsuite/gdb.base/auxv.c
gdb/testsuite/gdb.base/auxv.exp
gdb/testsuite/gdb.base/average.c
gdb/testsuite/gdb.base/bang.exp
gdb/testsuite/gdb.base/bar.c
gdb/testsuite/gdb.base/baz.c
gdb/testsuite/gdb.base/bfp-test.c
gdb/testsuite/gdb.base/bfp-test.exp
gdb/testsuite/gdb.base/bigcore.c
gdb/testsuite/gdb.base/bigcore.exp
gdb/testsuite/gdb.base/bitfields.c
gdb/testsuite/gdb.base/bitfields.exp
gdb/testsuite/gdb.base/bitfields2.c
gdb/testsuite/gdb.base/bitfields2.exp
gdb/testsuite/gdb.base/bitops.exp
gdb/testsuite/gdb.base/branches.c
gdb/testsuite/gdb.base/break.c
gdb/testsuite/gdb.base/break.exp
gdb/testsuite/gdb.base/break1.c
gdb/testsuite/gdb.base/call-ar-st.c
gdb/testsuite/gdb.base/call-ar-st.exp
gdb/testsuite/gdb.base/call-rt-st.c
gdb/testsuite/gdb.base/call-rt-st.exp
gdb/testsuite/gdb.base/call-sc.c
gdb/testsuite/gdb.base/call-sc.exp
gdb/testsuite/gdb.base/call-strs.c
gdb/testsuite/gdb.base/call-strs.exp
gdb/testsuite/gdb.base/callfuncs.c
gdb/testsuite/gdb.base/callfuncs.exp
gdb/testsuite/gdb.base/charset.c
gdb/testsuite/gdb.base/charset.exp
gdb/testsuite/gdb.base/checkpoint.c
gdb/testsuite/gdb.base/checkpoint.exp
gdb/testsuite/gdb.base/chng-syms.c
gdb/testsuite/gdb.base/chng-syms.exp
gdb/testsuite/gdb.base/code-expr.exp
gdb/testsuite/gdb.base/commands.exp
gdb/testsuite/gdb.base/completion.exp
gdb/testsuite/gdb.base/complex.c
gdb/testsuite/gdb.base/complex.exp
gdb/testsuite/gdb.base/cond-expr.exp
gdb/testsuite/gdb.base/condbreak.exp
gdb/testsuite/gdb.base/consecutive.c
gdb/testsuite/gdb.base/consecutive.exp
gdb/testsuite/gdb.base/constvars.c
gdb/testsuite/gdb.base/constvars.exp
gdb/testsuite/gdb.base/corefile.exp
gdb/testsuite/gdb.base/coremaker.c
gdb/testsuite/gdb.base/coremaker2.c
gdb/testsuite/gdb.base/cursal.c
gdb/testsuite/gdb.base/cursal.exp
gdb/testsuite/gdb.base/cvexpr.c
gdb/testsuite/gdb.base/cvexpr.exp
gdb/testsuite/gdb.base/d10v.ld
gdb/testsuite/gdb.base/d10vovly.c
gdb/testsuite/gdb.base/dbx.exp
gdb/testsuite/gdb.base/default.exp
gdb/testsuite/gdb.base/define.exp
gdb/testsuite/gdb.base/del.c
gdb/testsuite/gdb.base/del.exp
gdb/testsuite/gdb.base/detach.exp
gdb/testsuite/gdb.base/display.c
gdb/testsuite/gdb.base/display.exp
gdb/testsuite/gdb.base/dump.c
gdb/testsuite/gdb.base/dump.exp
gdb/testsuite/gdb.base/echo.exp
gdb/testsuite/gdb.base/ena-dis-br.exp
gdb/testsuite/gdb.base/ending-run.c
gdb/testsuite/gdb.base/ending-run.exp
gdb/testsuite/gdb.base/environ.exp
gdb/testsuite/gdb.base/eval-skip.exp
gdb/testsuite/gdb.base/execd-prog.c
gdb/testsuite/gdb.base/exprs.c
gdb/testsuite/gdb.base/exprs.exp
gdb/testsuite/gdb.base/fileio.c
gdb/testsuite/gdb.base/fileio.exp
gdb/testsuite/gdb.base/finish.exp
gdb/testsuite/gdb.base/float.exp
gdb/testsuite/gdb.base/foll-exec.c
gdb/testsuite/gdb.base/foll-exec.exp
gdb/testsuite/gdb.base/foll-fork.c
gdb/testsuite/gdb.base/foll-fork.exp
gdb/testsuite/gdb.base/foll-vfork.c
gdb/testsuite/gdb.base/foll-vfork.exp
gdb/testsuite/gdb.base/foo.c
gdb/testsuite/gdb.base/freebpcmd.c
gdb/testsuite/gdb.base/freebpcmd.exp
gdb/testsuite/gdb.base/funcargs.c
gdb/testsuite/gdb.base/funcargs.exp
gdb/testsuite/gdb.base/gcore.c
gdb/testsuite/gdb.base/gcore.exp
gdb/testsuite/gdb.base/gdb1056.exp
gdb/testsuite/gdb.base/gdb1090.c
gdb/testsuite/gdb.base/gdb1090.exp
gdb/testsuite/gdb.base/gdb1250.c
gdb/testsuite/gdb.base/gdb1250.exp
gdb/testsuite/gdb.base/gdb1555-main.c
gdb/testsuite/gdb.base/gdb1555.c
gdb/testsuite/gdb.base/gdb1555.exp
gdb/testsuite/gdb.base/gdb1821.c
gdb/testsuite/gdb.base/gdb1821.exp
gdb/testsuite/gdb.base/gdb_history
gdb/testsuite/gdb.base/gdbvars.exp
gdb/testsuite/gdb.base/grbx.c
gdb/testsuite/gdb.base/help.exp
gdb/testsuite/gdb.base/huge.c
gdb/testsuite/gdb.base/huge.exp
gdb/testsuite/gdb.base/ifelse.exp
gdb/testsuite/gdb.base/info-proc.exp
gdb/testsuite/gdb.base/int-type.c
gdb/testsuite/gdb.base/interp.exp
gdb/testsuite/gdb.base/interrupt.c
gdb/testsuite/gdb.base/interrupt.exp
gdb/testsuite/gdb.base/jump.c
gdb/testsuite/gdb.base/jump.exp
gdb/testsuite/gdb.base/langs.exp
gdb/testsuite/gdb.base/langs0.c
gdb/testsuite/gdb.base/langs1.c
gdb/testsuite/gdb.base/langs1.f
gdb/testsuite/gdb.base/langs2.c
gdb/testsuite/gdb.base/langs2.cxx
gdb/testsuite/gdb.base/lineinc.c
gdb/testsuite/gdb.base/lineinc.exp
gdb/testsuite/gdb.base/lineinc1.h
gdb/testsuite/gdb.base/lineinc2.h
gdb/testsuite/gdb.base/lineinc3.h
gdb/testsuite/gdb.base/list.exp
gdb/testsuite/gdb.base/list0.c
gdb/testsuite/gdb.base/list0.h
gdb/testsuite/gdb.base/list1.c
gdb/testsuite/gdb.base/logical.exp
gdb/testsuite/gdb.base/long_long.c
gdb/testsuite/gdb.base/long_long.exp
gdb/testsuite/gdb.base/m32r.ld
gdb/testsuite/gdb.base/m32rovly.c
gdb/testsuite/gdb.base/macscp.exp
gdb/testsuite/gdb.base/macscp1.c
gdb/testsuite/gdb.base/macscp2.h
gdb/testsuite/gdb.base/macscp3.h
gdb/testsuite/gdb.base/macscp4.h
gdb/testsuite/gdb.base/maint.exp
gdb/testsuite/gdb.base/mips_pro.c
gdb/testsuite/gdb.base/mips_pro.exp
gdb/testsuite/gdb.base/miscexprs.c
gdb/testsuite/gdb.base/miscexprs.exp
gdb/testsuite/gdb.base/multi-forks.c
gdb/testsuite/gdb.base/multi-forks.exp
gdb/testsuite/gdb.base/nodebug.c
gdb/testsuite/gdb.base/nodebug.exp
gdb/testsuite/gdb.base/opaque.exp
gdb/testsuite/gdb.base/opaque0.c
gdb/testsuite/gdb.base/opaque1.c
gdb/testsuite/gdb.base/overlays.c
gdb/testsuite/gdb.base/overlays.exp
gdb/testsuite/gdb.base/ovlymgr.c
gdb/testsuite/gdb.base/ovlymgr.h
gdb/testsuite/gdb.base/page.exp
gdb/testsuite/gdb.base/pc-fp.c
gdb/testsuite/gdb.base/pc-fp.exp
gdb/testsuite/gdb.base/pending.c
gdb/testsuite/gdb.base/pending.exp
gdb/testsuite/gdb.base/pendshr.c
gdb/testsuite/gdb.base/pi.txt
gdb/testsuite/gdb.base/pointers.c
gdb/testsuite/gdb.base/pointers.exp
gdb/testsuite/gdb.base/prelink-lib.c
gdb/testsuite/gdb.base/prelink.c
gdb/testsuite/gdb.base/prelink.exp
gdb/testsuite/gdb.base/printcmds.c
gdb/testsuite/gdb.base/printcmds.exp
gdb/testsuite/gdb.base/psymtab.exp
gdb/testsuite/gdb.base/psymtab1.c
gdb/testsuite/gdb.base/psymtab2.c
gdb/testsuite/gdb.base/ptr-typedef.c
gdb/testsuite/gdb.base/ptr-typedef.exp
gdb/testsuite/gdb.base/ptype.c
gdb/testsuite/gdb.base/ptype.exp
gdb/testsuite/gdb.base/ptype1.c
gdb/testsuite/gdb.base/radix.exp
gdb/testsuite/gdb.base/readline.exp
gdb/testsuite/gdb.base/recurse.c
gdb/testsuite/gdb.base/recurse.exp
gdb/testsuite/gdb.base/regs.exp
gdb/testsuite/gdb.base/relational.exp
gdb/testsuite/gdb.base/relocate.c
gdb/testsuite/gdb.base/relocate.exp
gdb/testsuite/gdb.base/remote.c
gdb/testsuite/gdb.base/remote.exp
gdb/testsuite/gdb.base/remotetimeout.exp
gdb/testsuite/gdb.base/reread.exp
gdb/testsuite/gdb.base/reread1.c
gdb/testsuite/gdb.base/reread2.c
gdb/testsuite/gdb.base/restore.c
gdb/testsuite/gdb.base/restore.exp
gdb/testsuite/gdb.base/return.c
gdb/testsuite/gdb.base/return.exp
gdb/testsuite/gdb.base/return2.c
gdb/testsuite/gdb.base/return2.exp
gdb/testsuite/gdb.base/run.c
gdb/testsuite/gdb.base/savedregs.c
gdb/testsuite/gdb.base/savedregs.exp
gdb/testsuite/gdb.base/scope.exp
gdb/testsuite/gdb.base/scope0.c
gdb/testsuite/gdb.base/scope1.c
gdb/testsuite/gdb.base/sect-cmd.exp
gdb/testsuite/gdb.base/sep-proc.c
gdb/testsuite/gdb.base/sep.c
gdb/testsuite/gdb.base/sep.exp
gdb/testsuite/gdb.base/sepdebug.c
gdb/testsuite/gdb.base/sepdebug.exp
gdb/testsuite/gdb.base/setshow.c
gdb/testsuite/gdb.base/setshow.exp
gdb/testsuite/gdb.base/setvar.c
gdb/testsuite/gdb.base/setvar.exp
gdb/testsuite/gdb.base/shlib-call.exp
gdb/testsuite/gdb.base/shmain.c
gdb/testsuite/gdb.base/shr1.c
gdb/testsuite/gdb.base/shr2.c
gdb/testsuite/gdb.base/shreloc.c
gdb/testsuite/gdb.base/shreloc.exp
gdb/testsuite/gdb.base/shreloc1.c
gdb/testsuite/gdb.base/shreloc2.c
gdb/testsuite/gdb.base/sigall.c
gdb/testsuite/gdb.base/sigall.exp
gdb/testsuite/gdb.base/sigaltstack.c
gdb/testsuite/gdb.base/sigaltstack.exp
gdb/testsuite/gdb.base/sigbpt.c
gdb/testsuite/gdb.base/sigbpt.exp
gdb/testsuite/gdb.base/siginfo.c
gdb/testsuite/gdb.base/siginfo.exp
gdb/testsuite/gdb.base/signals.c
gdb/testsuite/gdb.base/signals.exp
gdb/testsuite/gdb.base/signull.c
gdb/testsuite/gdb.base/signull.exp
gdb/testsuite/gdb.base/sigrepeat.c
gdb/testsuite/gdb.base/sigrepeat.exp
gdb/testsuite/gdb.base/sigstep.c
gdb/testsuite/gdb.base/sigstep.exp
gdb/testsuite/gdb.base/sizeof.c
gdb/testsuite/gdb.base/sizeof.exp
gdb/testsuite/gdb.base/so-impl-ld.c
gdb/testsuite/gdb.base/so-impl-ld.exp
gdb/testsuite/gdb.base/so-indr-cl.c
gdb/testsuite/gdb.base/so-indr-cl.exp
gdb/testsuite/gdb.base/solib.c
gdb/testsuite/gdb.base/solib.exp
gdb/testsuite/gdb.base/solib1.c
gdb/testsuite/gdb.base/solib2.c
gdb/testsuite/gdb.base/source-error.gdb
gdb/testsuite/gdb.base/source.exp
gdb/testsuite/gdb.base/ss.h
gdb/testsuite/gdb.base/start.c
gdb/testsuite/gdb.base/start.exp
gdb/testsuite/gdb.base/step-line.c
gdb/testsuite/gdb.base/step-line.exp
gdb/testsuite/gdb.base/step-line.inp
gdb/testsuite/gdb.base/step-test.c
gdb/testsuite/gdb.base/step-test.exp
gdb/testsuite/gdb.base/store.c
gdb/testsuite/gdb.base/store.exp
gdb/testsuite/gdb.base/structs.c
gdb/testsuite/gdb.base/structs.exp
gdb/testsuite/gdb.base/structs2.c
gdb/testsuite/gdb.base/structs2.exp
gdb/testsuite/gdb.base/sum.c
gdb/testsuite/gdb.base/term.exp
gdb/testsuite/gdb.base/twice.c
gdb/testsuite/gdb.base/twice.exp
gdb/testsuite/gdb.base/unload.c
gdb/testsuite/gdb.base/unload.exp
gdb/testsuite/gdb.base/unloadshr.c
gdb/testsuite/gdb.base/until.exp
gdb/testsuite/gdb.base/varargs.c
gdb/testsuite/gdb.base/varargs.exp
gdb/testsuite/gdb.base/vforked-prog.c
gdb/testsuite/gdb.base/volatile.exp
gdb/testsuite/gdb.base/watchpoint.c
gdb/testsuite/gdb.base/watchpoint.exp
gdb/testsuite/gdb.base/whatis-exp.exp
gdb/testsuite/gdb.base/whatis.c
gdb/testsuite/gdb.base/whatis.exp
gdb/testsuite/gdb.cp/Makefile.in
gdb/testsuite/gdb.cp/ambiguous.cc
gdb/testsuite/gdb.cp/ambiguous.exp
gdb/testsuite/gdb.cp/annota2.cc
gdb/testsuite/gdb.cp/annota2.exp
gdb/testsuite/gdb.cp/annota3.cc
gdb/testsuite/gdb.cp/annota3.exp
gdb/testsuite/gdb.cp/anon-union.cc
gdb/testsuite/gdb.cp/anon-union.exp
gdb/testsuite/gdb.cp/bool.cc
gdb/testsuite/gdb.cp/bool.exp
gdb/testsuite/gdb.cp/breakpoint.cc
gdb/testsuite/gdb.cp/breakpoint.exp
gdb/testsuite/gdb.cp/bs15503.cc
gdb/testsuite/gdb.cp/bs15503.exp
gdb/testsuite/gdb.cp/casts.cc
gdb/testsuite/gdb.cp/casts.exp
gdb/testsuite/gdb.cp/class2.cc
gdb/testsuite/gdb.cp/class2.exp
gdb/testsuite/gdb.cp/classes.cc
gdb/testsuite/gdb.cp/classes.exp
gdb/testsuite/gdb.cp/cplusfuncs.cc
gdb/testsuite/gdb.cp/cplusfuncs.exp
gdb/testsuite/gdb.cp/ctti.exp
gdb/testsuite/gdb.cp/cttiadd.cc
gdb/testsuite/gdb.cp/cttiadd1.cc
gdb/testsuite/gdb.cp/cttiadd2.cc
gdb/testsuite/gdb.cp/cttiadd3.cc
gdb/testsuite/gdb.cp/demangle.exp
gdb/testsuite/gdb.cp/derivation.cc
gdb/testsuite/gdb.cp/derivation.exp
gdb/testsuite/gdb.cp/exception.cc
gdb/testsuite/gdb.cp/exception.exp
gdb/testsuite/gdb.cp/gdb1355.cc
gdb/testsuite/gdb.cp/gdb1355.exp
gdb/testsuite/gdb.cp/hang.H
gdb/testsuite/gdb.cp/hang.exp
gdb/testsuite/gdb.cp/hang1.C
gdb/testsuite/gdb.cp/hang2.C
gdb/testsuite/gdb.cp/hang3.C
gdb/testsuite/gdb.cp/inherit.exp
gdb/testsuite/gdb.cp/local.cc
gdb/testsuite/gdb.cp/local.exp
gdb/testsuite/gdb.cp/m-data.cc
gdb/testsuite/gdb.cp/m-data.exp
gdb/testsuite/gdb.cp/m-static.cc
gdb/testsuite/gdb.cp/m-static.exp
gdb/testsuite/gdb.cp/m-static.h
gdb/testsuite/gdb.cp/m-static1.cc
gdb/testsuite/gdb.cp/maint.exp
gdb/testsuite/gdb.cp/member-ptr.cc
gdb/testsuite/gdb.cp/member-ptr.exp
gdb/testsuite/gdb.cp/method.cc
gdb/testsuite/gdb.cp/method.exp
gdb/testsuite/gdb.cp/misc.cc
gdb/testsuite/gdb.cp/misc.exp
gdb/testsuite/gdb.cp/namespace.cc
gdb/testsuite/gdb.cp/namespace.exp
gdb/testsuite/gdb.cp/namespace1.cc
gdb/testsuite/gdb.cp/overload.cc
gdb/testsuite/gdb.cp/overload.exp
gdb/testsuite/gdb.cp/ovldbreak.cc
gdb/testsuite/gdb.cp/ovldbreak.exp
gdb/testsuite/gdb.cp/pr-1023.cc
gdb/testsuite/gdb.cp/pr-1023.exp
gdb/testsuite/gdb.cp/pr-1210.cc
gdb/testsuite/gdb.cp/pr-1210.exp
gdb/testsuite/gdb.cp/pr-574.cc
gdb/testsuite/gdb.cp/pr-574.exp
gdb/testsuite/gdb.cp/printmethod.cc
gdb/testsuite/gdb.cp/printmethod.exp
gdb/testsuite/gdb.cp/psmang.exp
gdb/testsuite/gdb.cp/psmang1.cc
gdb/testsuite/gdb.cp/psmang2.cc
gdb/testsuite/gdb.cp/ref-params.cc
gdb/testsuite/gdb.cp/ref-params.exp
gdb/testsuite/gdb.cp/ref-types.cc
gdb/testsuite/gdb.cp/ref-types.exp
gdb/testsuite/gdb.cp/rtti.exp
gdb/testsuite/gdb.cp/rtti.h
gdb/testsuite/gdb.cp/rtti1.cc
gdb/testsuite/gdb.cp/rtti2.cc
gdb/testsuite/gdb.cp/templates.cc
gdb/testsuite/gdb.cp/templates.exp
gdb/testsuite/gdb.cp/try_catch.cc
gdb/testsuite/gdb.cp/try_catch.exp
gdb/testsuite/gdb.cp/userdef.cc
gdb/testsuite/gdb.cp/userdef.exp
gdb/testsuite/gdb.cp/virtfunc.cc
gdb/testsuite/gdb.cp/virtfunc.exp
gdb/testsuite/gdb.disasm/Makefile.in
gdb/testsuite/gdb.disasm/am33.exp
gdb/testsuite/gdb.disasm/am33.s
gdb/testsuite/gdb.disasm/h8300s.exp
gdb/testsuite/gdb.disasm/h8300s.s
gdb/testsuite/gdb.disasm/hppa.exp
gdb/testsuite/gdb.disasm/hppa.s
gdb/testsuite/gdb.disasm/mn10200.s
gdb/testsuite/gdb.disasm/mn10300.exp
gdb/testsuite/gdb.disasm/mn10300.s
gdb/testsuite/gdb.disasm/sh3.exp
gdb/testsuite/gdb.disasm/sh3.s
gdb/testsuite/gdb.disasm/t01_mov.exp
gdb/testsuite/gdb.disasm/t01_mov.s
gdb/testsuite/gdb.disasm/t02_mova.exp
gdb/testsuite/gdb.disasm/t02_mova.s
gdb/testsuite/gdb.disasm/t03_add.exp
gdb/testsuite/gdb.disasm/t03_add.s
gdb/testsuite/gdb.disasm/t04_sub.exp
gdb/testsuite/gdb.disasm/t04_sub.s
gdb/testsuite/gdb.disasm/t05_cmp.exp
gdb/testsuite/gdb.disasm/t05_cmp.s
gdb/testsuite/gdb.disasm/t06_ari2.exp
gdb/testsuite/gdb.disasm/t06_ari2.s
gdb/testsuite/gdb.disasm/t07_ari3.exp
gdb/testsuite/gdb.disasm/t07_ari3.s
gdb/testsuite/gdb.disasm/t08_or.exp
gdb/testsuite/gdb.disasm/t08_or.s
gdb/testsuite/gdb.disasm/t09_xor.exp
gdb/testsuite/gdb.disasm/t09_xor.s
gdb/testsuite/gdb.disasm/t10_and.exp
gdb/testsuite/gdb.disasm/t10_and.s
gdb/testsuite/gdb.disasm/t11_logs.exp
gdb/testsuite/gdb.disasm/t11_logs.s
gdb/testsuite/gdb.disasm/t12_bit.exp
gdb/testsuite/gdb.disasm/t12_bit.s
gdb/testsuite/gdb.disasm/t13_otr.exp
gdb/testsuite/gdb.disasm/t13_otr.s
gdb/testsuite/gdb.dwarf2/Makefile.in
gdb/testsuite/gdb.dwarf2/dup-psym.S
gdb/testsuite/gdb.dwarf2/dup-psym.exp
gdb/testsuite/gdb.dwarf2/dw2-basic.S
gdb/testsuite/gdb.dwarf2/dw2-basic.exp
gdb/testsuite/gdb.dwarf2/dw2-intercu.S
gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
gdb/testsuite/gdb.dwarf2/dw2-intermix.S
gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
gdb/testsuite/gdb.dwarf2/file1.txt
gdb/testsuite/gdb.dwarf2/mac-fileno.S
gdb/testsuite/gdb.dwarf2/mac-fileno.exp
gdb/testsuite/gdb.dwarf2/main.c
gdb/testsuite/gdb.fortran/Makefile.in
gdb/testsuite/gdb.fortran/array-element.exp
gdb/testsuite/gdb.fortran/array-element.f
gdb/testsuite/gdb.fortran/derived-type.exp
gdb/testsuite/gdb.fortran/derived-type.f90
gdb/testsuite/gdb.fortran/exprs.exp
gdb/testsuite/gdb.fortran/subarray.exp
gdb/testsuite/gdb.fortran/subarray.f
gdb/testsuite/gdb.fortran/types.exp
gdb/testsuite/gdb.gdb/complaints.exp
gdb/testsuite/gdb.gdb/observer.exp
gdb/testsuite/gdb.gdb/selftest.exp
gdb/testsuite/gdb.gdb/xfullpath.exp
gdb/testsuite/gdb.hp/Makefile.in
gdb/testsuite/gdb.hp/configure
gdb/testsuite/gdb.hp/configure.ac
gdb/testsuite/gdb.hp/gdb.aCC/Makefile.in
gdb/testsuite/gdb.hp/gdb.aCC/configure
gdb/testsuite/gdb.hp/gdb.aCC/configure.ac
gdb/testsuite/gdb.hp/gdb.aCC/exception.exp
gdb/testsuite/gdb.hp/gdb.aCC/optimize.c
gdb/testsuite/gdb.hp/gdb.aCC/optimize.exp
gdb/testsuite/gdb.hp/gdb.aCC/run.c
gdb/testsuite/gdb.hp/gdb.aCC/watch-cmd.exp
gdb/testsuite/gdb.hp/gdb.base-hp/Makefile.in
gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.c
gdb/testsuite/gdb.hp/gdb.base-hp/callfwmall.exp
gdb/testsuite/gdb.hp/gdb.base-hp/configure
gdb/testsuite/gdb.hp/gdb.base-hp/configure.ac
gdb/testsuite/gdb.hp/gdb.base-hp/dollar.c
gdb/testsuite/gdb.hp/gdb.base-hp/dollar.exp
gdb/testsuite/gdb.hp/gdb.base-hp/genso-thresh.c
gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.c
gdb/testsuite/gdb.hp/gdb.base-hp/hwwatchbus.exp
gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.c
gdb/testsuite/gdb.hp/gdb.base-hp/pxdb.exp
gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.exp
gdb/testsuite/gdb.hp/gdb.base-hp/reg-pa64.s
gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp
gdb/testsuite/gdb.hp/gdb.base-hp/reg.s
gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.c
gdb/testsuite/gdb.hp/gdb.base-hp/sized-enum.exp
gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp
gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.mk
gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.sh
gdb/testsuite/gdb.hp/gdb.compat/Makefile.in
gdb/testsuite/gdb.hp/gdb.compat/average.c
gdb/testsuite/gdb.hp/gdb.compat/configure
gdb/testsuite/gdb.hp/gdb.compat/configure.ac
gdb/testsuite/gdb.hp/gdb.compat/sum.c
gdb/testsuite/gdb.hp/gdb.compat/xdb.c
gdb/testsuite/gdb.hp/gdb.compat/xdb0.c
gdb/testsuite/gdb.hp/gdb.compat/xdb0.h
gdb/testsuite/gdb.hp/gdb.compat/xdb1.c
gdb/testsuite/gdb.hp/gdb.compat/xdb1.exp
gdb/testsuite/gdb.hp/gdb.compat/xdb2.exp
gdb/testsuite/gdb.hp/gdb.compat/xdb3.exp
gdb/testsuite/gdb.hp/gdb.defects/Makefile.in
gdb/testsuite/gdb.hp/gdb.defects/bs14602.c
gdb/testsuite/gdb.hp/gdb.defects/bs14602.exp
gdb/testsuite/gdb.hp/gdb.defects/configure
gdb/testsuite/gdb.hp/gdb.defects/configure.ac
gdb/testsuite/gdb.hp/gdb.defects/solib-d.c
gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp
gdb/testsuite/gdb.hp/gdb.defects/solib-d1.c
gdb/testsuite/gdb.hp/gdb.defects/solib-d2.c
gdb/testsuite/gdb.hp/gdb.objdbg/Makefile.in
gdb/testsuite/gdb.hp/gdb.objdbg/configure
gdb/testsuite/gdb.hp/gdb.objdbg/configure.ac
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x1.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x2.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01/x3.h
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x1.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x2.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02/x3.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x1.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x2.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03/x3.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x.h
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x1.cc
gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04/x2.cc
gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr
gdb/testsuite/gdb.hp/gdb.objdbg/tools/symaddr.pa64
gdb/testsuite/gdb.hp/gdb.objdbg/tools/test-objdbg.cc
gdb/testsuite/gdb.hp/tools/odump
gdb/testsuite/gdb.java/Makefile.in
gdb/testsuite/gdb.java/jmain.exp
gdb/testsuite/gdb.java/jmain.java
gdb/testsuite/gdb.java/jmisc.exp
gdb/testsuite/gdb.java/jmisc.java
gdb/testsuite/gdb.java/jmisc1.exp
gdb/testsuite/gdb.java/jprint.exp
gdb/testsuite/gdb.java/jprint.java
gdb/testsuite/gdb.java/jv-exp.exp
gdb/testsuite/gdb.java/jv-print.exp
gdb/testsuite/gdb.mi/ChangeLog-1999-2003
gdb/testsuite/gdb.mi/Makefile.in
gdb/testsuite/gdb.mi/array.f
gdb/testsuite/gdb.mi/basics.c
gdb/testsuite/gdb.mi/gdb669.exp
gdb/testsuite/gdb.mi/gdb680.exp
gdb/testsuite/gdb.mi/gdb701.c
gdb/testsuite/gdb.mi/gdb701.exp
gdb/testsuite/gdb.mi/gdb792.cc
gdb/testsuite/gdb.mi/gdb792.exp
gdb/testsuite/gdb.mi/mi-basics.exp
gdb/testsuite/gdb.mi/mi-break.exp
gdb/testsuite/gdb.mi/mi-cli.exp
gdb/testsuite/gdb.mi/mi-console.c
gdb/testsuite/gdb.mi/mi-console.exp
gdb/testsuite/gdb.mi/mi-disassemble.exp
gdb/testsuite/gdb.mi/mi-eval.exp
gdb/testsuite/gdb.mi/mi-file.exp
gdb/testsuite/gdb.mi/mi-hack-cli.exp
gdb/testsuite/gdb.mi/mi-pthreads.exp
gdb/testsuite/gdb.mi/mi-read-memory.c
gdb/testsuite/gdb.mi/mi-read-memory.exp
gdb/testsuite/gdb.mi/mi-regs.exp
gdb/testsuite/gdb.mi/mi-return.exp
gdb/testsuite/gdb.mi/mi-simplerun.exp
gdb/testsuite/gdb.mi/mi-stack.c
gdb/testsuite/gdb.mi/mi-stack.exp
gdb/testsuite/gdb.mi/mi-stepi.exp
gdb/testsuite/gdb.mi/mi-syn-frame.c
gdb/testsuite/gdb.mi/mi-syn-frame.exp
gdb/testsuite/gdb.mi/mi-until.exp
gdb/testsuite/gdb.mi/mi-var-block.exp
gdb/testsuite/gdb.mi/mi-var-child-f.exp
gdb/testsuite/gdb.mi/mi-var-child.c
gdb/testsuite/gdb.mi/mi-var-child.exp
gdb/testsuite/gdb.mi/mi-var-cmd.exp
gdb/testsuite/gdb.mi/mi-var-display.exp
gdb/testsuite/gdb.mi/mi-watch.exp
gdb/testsuite/gdb.mi/mi2-basics.exp
gdb/testsuite/gdb.mi/mi2-break.exp
gdb/testsuite/gdb.mi/mi2-cli.exp
gdb/testsuite/gdb.mi/mi2-console.exp
gdb/testsuite/gdb.mi/mi2-disassemble.exp
gdb/testsuite/gdb.mi/mi2-eval.exp
gdb/testsuite/gdb.mi/mi2-file.exp
gdb/testsuite/gdb.mi/mi2-hack-cli.exp
gdb/testsuite/gdb.mi/mi2-pthreads.exp
gdb/testsuite/gdb.mi/mi2-read-memory.exp
gdb/testsuite/gdb.mi/mi2-regs.exp
gdb/testsuite/gdb.mi/mi2-return.exp
gdb/testsuite/gdb.mi/mi2-simplerun.exp
gdb/testsuite/gdb.mi/mi2-stack.exp
gdb/testsuite/gdb.mi/mi2-stepi.exp
gdb/testsuite/gdb.mi/mi2-syn-frame.exp
gdb/testsuite/gdb.mi/mi2-until.exp
gdb/testsuite/gdb.mi/mi2-var-block.exp
gdb/testsuite/gdb.mi/mi2-var-child.exp
gdb/testsuite/gdb.mi/mi2-var-cmd.exp
gdb/testsuite/gdb.mi/mi2-var-display.exp
gdb/testsuite/gdb.mi/mi2-watch.exp
gdb/testsuite/gdb.mi/pthreads.c
gdb/testsuite/gdb.mi/testcmds
gdb/testsuite/gdb.mi/until.c
gdb/testsuite/gdb.mi/var-cmd.c
gdb/testsuite/gdb.objc/Makefile.in
gdb/testsuite/gdb.objc/basicclass.exp
gdb/testsuite/gdb.objc/basicclass.m
gdb/testsuite/gdb.objc/nondebug.exp
gdb/testsuite/gdb.objc/nondebug.m
gdb/testsuite/gdb.objc/objcdecode.exp
gdb/testsuite/gdb.objc/objcdecode.m
gdb/testsuite/gdb.server/Makefile.in
gdb/testsuite/gdb.server/server-run.exp
gdb/testsuite/gdb.server/server.c
gdb/testsuite/gdb.stabs/Makefile.in
gdb/testsuite/gdb.stabs/aout.sed
gdb/testsuite/gdb.stabs/configure
gdb/testsuite/gdb.stabs/configure.ac
gdb/testsuite/gdb.stabs/ecoff.sed
gdb/testsuite/gdb.stabs/exclfwd.exp
gdb/testsuite/gdb.stabs/exclfwd.h
gdb/testsuite/gdb.stabs/exclfwd1.c
gdb/testsuite/gdb.stabs/exclfwd2.c
gdb/testsuite/gdb.stabs/hppa.sed
gdb/testsuite/gdb.stabs/weird.def
gdb/testsuite/gdb.stabs/weird.exp
gdb/testsuite/gdb.stabs/xcoff.sed
gdb/testsuite/gdb.threads/Makefile.in
gdb/testsuite/gdb.threads/bp_in_thread.c
gdb/testsuite/gdb.threads/bp_in_thread.exp
gdb/testsuite/gdb.threads/gcore-thread.exp
gdb/testsuite/gdb.threads/killed.c
gdb/testsuite/gdb.threads/killed.exp
gdb/testsuite/gdb.threads/linux-dp.c
gdb/testsuite/gdb.threads/linux-dp.exp
gdb/testsuite/gdb.threads/manythreads.c
gdb/testsuite/gdb.threads/manythreads.exp
gdb/testsuite/gdb.threads/print-threads.c
gdb/testsuite/gdb.threads/print-threads.exp
gdb/testsuite/gdb.threads/pthread_cond_wait.c
gdb/testsuite/gdb.threads/pthread_cond_wait.exp
gdb/testsuite/gdb.threads/pthreads.c
gdb/testsuite/gdb.threads/pthreads.exp
gdb/testsuite/gdb.threads/schedlock.c
gdb/testsuite/gdb.threads/schedlock.exp
gdb/testsuite/gdb.threads/staticthreads.c
gdb/testsuite/gdb.threads/staticthreads.exp
gdb/testsuite/gdb.threads/step.c
gdb/testsuite/gdb.threads/step.exp
gdb/testsuite/gdb.threads/step2.exp
gdb/testsuite/gdb.threads/switch-threads.c
gdb/testsuite/gdb.threads/switch-threads.exp
gdb/testsuite/gdb.threads/thread-specific.c
gdb/testsuite/gdb.threads/thread-specific.exp
gdb/testsuite/gdb.threads/thread_check.c
gdb/testsuite/gdb.threads/thread_check.exp
gdb/testsuite/gdb.threads/threadapply.c
gdb/testsuite/gdb.threads/threadapply.exp
gdb/testsuite/gdb.threads/tls-main.c
gdb/testsuite/gdb.threads/tls-shared.c
gdb/testsuite/gdb.threads/tls-shared.exp
gdb/testsuite/gdb.threads/tls.c
gdb/testsuite/gdb.threads/tls.exp
gdb/testsuite/gdb.threads/watchthreads.c
gdb/testsuite/gdb.threads/watchthreads.exp
gdb/testsuite/gdb.trace/Makefile.in
gdb/testsuite/gdb.trace/actions.c
gdb/testsuite/gdb.trace/actions.exp
gdb/testsuite/gdb.trace/backtrace.exp
gdb/testsuite/gdb.trace/circ.c
gdb/testsuite/gdb.trace/circ.exp
gdb/testsuite/gdb.trace/collection.c
gdb/testsuite/gdb.trace/collection.exp
gdb/testsuite/gdb.trace/deltrace.exp
gdb/testsuite/gdb.trace/gdb_c_test.c
gdb/testsuite/gdb.trace/infotrace.exp
gdb/testsuite/gdb.trace/limits.c
gdb/testsuite/gdb.trace/limits.exp
gdb/testsuite/gdb.trace/packetlen.exp
gdb/testsuite/gdb.trace/passc-dyn.exp
gdb/testsuite/gdb.trace/passcount.exp
gdb/testsuite/gdb.trace/report.exp
gdb/testsuite/gdb.trace/save-trace.exp
gdb/testsuite/gdb.trace/tfind.exp
gdb/testsuite/gdb.trace/tracecmd.exp
gdb/testsuite/gdb.trace/while-dyn.exp
gdb/testsuite/gdb.trace/while-stepping.exp
gdb/testsuite/lib/ada.exp
gdb/testsuite/lib/compiler.c
gdb/testsuite/lib/compiler.cc
gdb/testsuite/lib/cp-support.exp
gdb/testsuite/lib/emc-support.exp
gdb/testsuite/lib/gdb.exp
gdb/testsuite/lib/gdbserver-support.exp
gdb/testsuite/lib/java.exp
gdb/testsuite/lib/mi-support.exp
gdb/testsuite/lib/trace-support.exp
gdb/thread.c
gdb/top.c
gdb/top.h
gdb/tracepoint.c
gdb/tracepoint.h
gdb/trad-frame.c
gdb/trad-frame.h
gdb/tramp-frame.c
gdb/tramp-frame.h
gdb/tui/ChangeLog-1998-2003
gdb/tui/tui-command.c
gdb/tui/tui-command.h
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-disasm.c
gdb/tui/tui-disasm.h
gdb/tui/tui-file.c
gdb/tui/tui-file.h
gdb/tui/tui-hooks.c
gdb/tui/tui-hooks.h
gdb/tui/tui-interp.c
gdb/tui/tui-io.c
gdb/tui/tui-io.h
gdb/tui/tui-layout.c
gdb/tui/tui-layout.h
gdb/tui/tui-main.c
gdb/tui/tui-out.c
gdb/tui/tui-regs.c
gdb/tui/tui-regs.h
gdb/tui/tui-source.c
gdb/tui/tui-source.h
gdb/tui/tui-stack.c
gdb/tui/tui-stack.h
gdb/tui/tui-win.c
gdb/tui/tui-win.h
gdb/tui/tui-windata.c
gdb/tui/tui-windata.h
gdb/tui/tui-wingeneral.c
gdb/tui/tui-wingeneral.h
gdb/tui/tui-winsource.c
gdb/tui/tui-winsource.h
gdb/tui/tui.c
gdb/tui/tui.h
gdb/typeprint.c
gdb/typeprint.h
gdb/ui-file.c
gdb/ui-file.h
gdb/ui-out.c
gdb/ui-out.h
gdb/user-regs.c
gdb/user-regs.h
gdb/utils.c
gdb/uw-thread.c
gdb/v850-tdep.c
gdb/valarith.c
gdb/valops.c
gdb/valprint.c
gdb/valprint.h
gdb/value.c
gdb/value.h
gdb/varobj.c
gdb/varobj.h
gdb/vax-nat.c
gdb/vax-tdep.c
gdb/vax-tdep.h
gdb/vaxbsd-nat.c
gdb/vaxnbsd-tdep.c
gdb/vaxobsd-tdep.c
gdb/version.h
gdb/version.in
gdb/vx-share/README
gdb/win32-nat.c
gdb/win32-termcap.c
gdb/wince-stub.c
gdb/wince-stub.h
gdb/wince.c
gdb/windows-nat.c
gdb/windows-termcap.c
gdb/wrapper.c
gdb/wrapper.h
gdb/xcoffread.c
gdb/xcoffsolib.c
gdb/xcoffsolib.h
gdb/xstormy16-tdep.c
gprof/.gdbinit
gprof/ChangeLog
gprof/ChangeLog-2004
gprof/ChangeLog-2005
gprof/ChangeLog-9203
gprof/MAINTAINERS
gprof/Makefile.am
gprof/Makefile.in
gprof/README
gprof/TEST
gprof/TODO
gprof/acinclude.m4
gprof/aclocal.m4
gprof/alpha.c
gprof/basic_blocks.c
gprof/basic_blocks.h
gprof/bb_exit_func.c
gprof/bbconv.pl
gprof/bsd_callg_bl.m
gprof/call_graph.c
gprof/call_graph.h
gprof/cg_arcs.c
gprof/cg_arcs.h
gprof/cg_dfn.c
gprof/cg_dfn.h
gprof/cg_print.c
gprof/cg_print.h
gprof/configure
gprof/configure.in
gprof/corefile.c
gprof/corefile.h
gprof/dep-in.sed
gprof/flat_bl.m
gprof/fsf_callg_bl.m
gprof/gconfig.in
gprof/gen-c-prog.awk
gprof/gmon.h
gprof/gmon_io.c
gprof/gmon_io.h
gprof/gmon_out.h
gprof/gprof.c
gprof/gprof.h
gprof/gprof.texi
gprof/hertz.c
gprof/hertz.h
gprof/hist.c
gprof/hist.h
gprof/i386.c
gprof/mips.c
gprof/po/.cvsignore
gprof/po/Make-in
gprof/po/POTFILES.in
gprof/po/da.po
gprof/po/de.po
gprof/po/es.po
gprof/po/fr.po
gprof/po/ga.po
gprof/po/gprof.pot
gprof/po/id.po
gprof/po/pt_BR.po
gprof/po/rw.po
gprof/po/sv.po
gprof/po/tr.po
gprof/po/vi.po
gprof/search_list.c
gprof/search_list.h
gprof/source.c
gprof/source.h
gprof/sparc.c
gprof/stamp-h.in
gprof/sym_ids.c
gprof/sym_ids.h
gprof/symtab.c
gprof/symtab.h
gprof/tahoe.c
gprof/utils.c
gprof/utils.h
gprof/vax.c
intl/ChangeLog
intl/Makefile.in
intl/README
intl/VERSION
intl/aclocal.m4
intl/bindtextdom.c
intl/config.h.in
intl/config.intl.in
intl/configure
intl/configure.ac
intl/dcgettext.c
intl/dcigettext.c
intl/dcngettext.c
intl/dgettext.c
intl/dngettext.c
intl/eval-plural.h
intl/explodename.c
intl/finddomain.c
intl/gettext.c
intl/gettextP.h
intl/gmo.h
intl/hash-string.h
intl/intl-compat.c
intl/l10nflist.c
intl/libgnuintl.h
intl/loadinfo.h
intl/loadmsgcat.c
intl/localcharset.c
intl/localcharset.h
intl/locale.alias
intl/localealias.c
intl/localename.c
intl/log.c
intl/ngettext.c
intl/osdep.c
intl/plural-exp.c
intl/plural-exp.h
intl/plural.c
intl/plural.y
intl/relocatable.c
intl/relocatable.h
intl/textdomain.c
ld/ChangeLog
ld/ChangeLog-0001
ld/ChangeLog-0203
ld/ChangeLog-2004
ld/ChangeLog-2005
ld/ChangeLog-9197
ld/ChangeLog-9899
ld/MAINTAINERS
ld/Makefile.am
ld/Makefile.in
ld/NEWS
ld/README
ld/TODO
ld/acinclude.m4
ld/aclocal.m4
ld/config.in
ld/configure
ld/configure.host
ld/configure.in
ld/configure.tgt
ld/deffile.h
ld/deffilep.y
ld/dep-in.sed
ld/elf-hints-local.h
ld/emulparams/README
ld/emulparams/aix5ppc.sh
ld/emulparams/aix5rs6.sh
ld/emulparams/aixppc.sh
ld/emulparams/aixrs6.sh
ld/emulparams/alpha.sh
ld/emulparams/arcelf.sh
ld/emulparams/arm_epoc_pe.sh
ld/emulparams/armaoutb.sh
ld/emulparams/armaoutl.sh
ld/emulparams/armcoff.sh
ld/emulparams/armelf.sh
ld/emulparams/armelf_fbsd.sh
ld/emulparams/armelf_linux.sh
ld/emulparams/armelf_linux_eabi.sh
ld/emulparams/armelf_nbsd.sh
ld/emulparams/armelf_vxworks.sh
ld/emulparams/armelfb.sh
ld/emulparams/armelfb_linux.sh
ld/emulparams/armelfb_linux_eabi.sh
ld/emulparams/armelfb_nbsd.sh
ld/emulparams/armnbsd.sh
ld/emulparams/armnto.sh
ld/emulparams/armpe.sh
ld/emulparams/armsymbian.sh
ld/emulparams/avr1.sh
ld/emulparams/avr2.sh
ld/emulparams/avr3.sh
ld/emulparams/avr4.sh
ld/emulparams/avr5.sh
ld/emulparams/avr6.sh
ld/emulparams/bfin.sh
ld/emulparams/coff_i860.sh
ld/emulparams/coff_sparc.sh
ld/emulparams/crisaout.sh
ld/emulparams/criself.sh
ld/emulparams/crislinux.sh
ld/emulparams/d10velf.sh
ld/emulparams/d30v_e.sh
ld/emulparams/d30v_o.sh
ld/emulparams/d30velf.sh
ld/emulparams/delta68.sh
ld/emulparams/elf32_dlx.sh
ld/emulparams/elf32_i860.sh
ld/emulparams/elf32_i960.sh
ld/emulparams/elf32_sparc.sh
ld/emulparams/elf32_sparc_vxworks.sh
ld/emulparams/elf32am33lin.sh
ld/emulparams/elf32b4300.sh
ld/emulparams/elf32bfinfd.sh
ld/emulparams/elf32bmip.sh
ld/emulparams/elf32bmipn32-defs.sh
ld/emulparams/elf32bmipn32.sh
ld/emulparams/elf32bsmip.sh
ld/emulparams/elf32btsmip.sh
ld/emulparams/elf32btsmipn32.sh
ld/emulparams/elf32cr16c.sh
ld/emulparams/elf32crx.sh
ld/emulparams/elf32ebmip.sh
ld/emulparams/elf32ebmipvxworks.sh
ld/emulparams/elf32elmip.sh
ld/emulparams/elf32elmipvxworks.sh
ld/emulparams/elf32fr30.sh
ld/emulparams/elf32frv.sh
ld/emulparams/elf32frvfd.sh
ld/emulparams/elf32i370.sh
ld/emulparams/elf32ip2k.sh
ld/emulparams/elf32iq10.sh
ld/emulparams/elf32iq2000.sh
ld/emulparams/elf32l4300.sh
ld/emulparams/elf32lmip.sh
ld/emulparams/elf32lppc.sh
ld/emulparams/elf32lppcnto.sh
ld/emulparams/elf32lppcsim.sh
ld/emulparams/elf32lsmip.sh
ld/emulparams/elf32ltsmip.sh
ld/emulparams/elf32ltsmipn32.sh
ld/emulparams/elf32m32c.sh
ld/emulparams/elf32mcore.sh
ld/emulparams/elf32mipswindiss.sh
ld/emulparams/elf32mt.sh
ld/emulparams/elf32openrisc.sh
ld/emulparams/elf32ppc.sh
ld/emulparams/elf32ppc_fbsd.sh
ld/emulparams/elf32ppccommon.sh
ld/emulparams/elf32ppclinux.sh
ld/emulparams/elf32ppcnto.sh
ld/emulparams/elf32ppcsim.sh
ld/emulparams/elf32ppcvxworks.sh
ld/emulparams/elf32ppcwindiss.sh
ld/emulparams/elf32vax.sh
ld/emulparams/elf32xc16x.sh
ld/emulparams/elf32xc16xl.sh
ld/emulparams/elf32xc16xs.sh
ld/emulparams/elf32xstormy16.sh
ld/emulparams/elf32xtensa.sh
ld/emulparams/elf64_aix.sh
ld/emulparams/elf64_ia64.sh
ld/emulparams/elf64_ia64_fbsd.sh
ld/emulparams/elf64_s390.sh
ld/emulparams/elf64_sparc.sh
ld/emulparams/elf64_sparc_fbsd.sh
ld/emulparams/elf64alpha.sh
ld/emulparams/elf64alpha_fbsd.sh
ld/emulparams/elf64alpha_nbsd.sh
ld/emulparams/elf64bmip.sh
ld/emulparams/elf64btsmip.sh
ld/emulparams/elf64hppa.sh
ld/emulparams/elf64lppc.sh
ld/emulparams/elf64ltsmip.sh
ld/emulparams/elf64mmix.sh
ld/emulparams/elf64ppc.sh
ld/emulparams/elf_fbsd.sh
ld/emulparams/elf_i386.sh
ld/emulparams/elf_i386_be.sh
ld/emulparams/elf_i386_chaos.sh
ld/emulparams/elf_i386_fbsd.sh
ld/emulparams/elf_i386_ldso.sh
ld/emulparams/elf_i386_vxworks.sh
ld/emulparams/elf_s390.sh
ld/emulparams/elf_x86_64.sh
ld/emulparams/elf_x86_64_fbsd.sh
ld/emulparams/gld960.sh
ld/emulparams/gld960coff.sh
ld/emulparams/h8300.sh
ld/emulparams/h8300elf.sh
ld/emulparams/h8300h.sh
ld/emulparams/h8300helf.sh
ld/emulparams/h8300hn.sh
ld/emulparams/h8300hnelf.sh
ld/emulparams/h8300s.sh
ld/emulparams/h8300self.sh
ld/emulparams/h8300sn.sh
ld/emulparams/h8300snelf.sh
ld/emulparams/h8300sx.sh
ld/emulparams/h8300sxelf.sh
ld/emulparams/h8300sxn.sh
ld/emulparams/h8300sxnelf.sh
ld/emulparams/h8500.sh
ld/emulparams/h8500b.sh
ld/emulparams/h8500c.sh
ld/emulparams/h8500m.sh
ld/emulparams/h8500s.sh
ld/emulparams/hp300bsd.sh
ld/emulparams/hp3hpux.sh
ld/emulparams/hppa64linux.sh
ld/emulparams/hppaelf.sh
ld/emulparams/hppalinux.sh
ld/emulparams/hppanbsd.sh
ld/emulparams/hppaobsd.sh
ld/emulparams/i386aout.sh
ld/emulparams/i386beos.sh
ld/emulparams/i386bsd.sh
ld/emulparams/i386coff.sh
ld/emulparams/i386go32.sh
ld/emulparams/i386linux.sh
ld/emulparams/i386lynx.sh
ld/emulparams/i386mach.sh
ld/emulparams/i386moss.sh
ld/emulparams/i386msdos.sh
ld/emulparams/i386nbsd.sh
ld/emulparams/i386nto.sh
ld/emulparams/i386nw.sh
ld/emulparams/i386pe.sh
ld/emulparams/i386pe_posix.sh
ld/emulparams/lnk960.sh
ld/emulparams/m32relf.sh
ld/emulparams/m32relf_linux.sh
ld/emulparams/m32rlelf.sh
ld/emulparams/m32rlelf_linux.sh
ld/emulparams/m68hc11elf.sh
ld/emulparams/m68hc11elfb.sh
ld/emulparams/m68hc12elf.sh
ld/emulparams/m68hc12elfb.sh
ld/emulparams/m68k4knbsd.sh
ld/emulparams/m68kaout.sh
ld/emulparams/m68kaux.sh
ld/emulparams/m68kcoff.sh
ld/emulparams/m68kelf.sh
ld/emulparams/m68kelfnbsd.sh
ld/emulparams/m68klinux.sh
ld/emulparams/m68knbsd.sh
ld/emulparams/m68kpsos.sh
ld/emulparams/m88kbcs.sh
ld/emulparams/maxqcoff.sh
ld/emulparams/mcorepe.sh
ld/emulparams/mipsbig.sh
ld/emulparams/mipsbsd.sh
ld/emulparams/mipsidt.sh
ld/emulparams/mipsidtl.sh
ld/emulparams/mipslit.sh
ld/emulparams/mipslnews.sh
ld/emulparams/mipspe.sh
ld/emulparams/mmo.sh
ld/emulparams/mn10200.sh
ld/emulparams/mn10300.sh
ld/emulparams/msp430all.sh
ld/emulparams/news.sh
ld/emulparams/ns32knbsd.sh
ld/emulparams/or32.sh
ld/emulparams/or32elf.sh
ld/emulparams/pc532macha.sh
ld/emulparams/pdp11.sh
ld/emulparams/pjelf.sh
ld/emulparams/pjlelf.sh
ld/emulparams/ppclynx.sh
ld/emulparams/ppcmacos.sh
ld/emulparams/ppcnw.sh
ld/emulparams/ppcpe.sh
ld/emulparams/riscix.sh
ld/emulparams/sh.sh
ld/emulparams/shelf.sh
ld/emulparams/shelf32.sh
ld/emulparams/shelf32_linux.sh
ld/emulparams/shelf32_nbsd.sh
ld/emulparams/shelf64.sh
ld/emulparams/shelf64_nbsd.sh
ld/emulparams/shelf_linux.sh
ld/emulparams/shelf_nbsd.sh
ld/emulparams/shelf_nto.sh
ld/emulparams/shl.sh
ld/emulparams/shlelf.sh
ld/emulparams/shlelf32.sh
ld/emulparams/shlelf32_linux.sh
ld/emulparams/shlelf32_nbsd.sh
ld/emulparams/shlelf64.sh
ld/emulparams/shlelf64_nbsd.sh
ld/emulparams/shlelf_linux.sh
ld/emulparams/shlelf_nbsd.sh
ld/emulparams/shlelf_nto.sh
ld/emulparams/shlsymbian.sh
ld/emulparams/shpe.sh
ld/emulparams/sparcaout.sh
ld/emulparams/sparclinux.sh
ld/emulparams/sparcnbsd.sh
ld/emulparams/st2000.sh
ld/emulparams/sun3.sh
ld/emulparams/sun4.sh
ld/emulparams/tic30aout.sh
ld/emulparams/tic30coff.sh
ld/emulparams/tic3xcoff.sh
ld/emulparams/tic3xcoff_onchip.sh
ld/emulparams/tic4xcoff.sh
ld/emulparams/tic54xcoff.sh
ld/emulparams/tic80coff.sh
ld/emulparams/v850.sh
ld/emulparams/vanilla.sh
ld/emulparams/vax.sh
ld/emulparams/vaxnbsd.sh
ld/emulparams/vsta.sh
ld/emulparams/vxworks.sh
ld/emulparams/w65.sh
ld/emulparams/xtensa-config.sh
ld/emulparams/z80.sh
ld/emulparams/z8001.sh
ld/emulparams/z8002.sh
ld/emultempl/README
ld/emultempl/aix.em
ld/emultempl/alphaelf.em
ld/emultempl/armcoff.em
ld/emultempl/armelf.em
ld/emultempl/astring.sed
ld/emultempl/avrelf.em
ld/emultempl/beos.em
ld/emultempl/crxelf.em
ld/emultempl/elf-generic.em
ld/emultempl/elf32.em
ld/emultempl/genelf.em
ld/emultempl/generic.em
ld/emultempl/gld960.em
ld/emultempl/gld960c.em
ld/emultempl/hppaelf.em
ld/emultempl/ia64elf.em
ld/emultempl/irix.em
ld/emultempl/linux.em
ld/emultempl/lnk960.em
ld/emultempl/m68hc1xelf.em
ld/emultempl/m68kcoff.em
ld/emultempl/m68kelf.em
ld/emultempl/mipsecoff.em
ld/emultempl/mmix-elfnmmo.em
ld/emultempl/mmixelf.em
ld/emultempl/mmo.em
ld/emultempl/needrelax.em
ld/emultempl/netbsd.em
ld/emultempl/ostring.sed
ld/emultempl/pe.em
ld/emultempl/ppc32elf.em
ld/emultempl/ppc64elf.em
ld/emultempl/sh64elf.em
ld/emultempl/sunos.em
ld/emultempl/ticoff.em
ld/emultempl/vanilla.em
ld/emultempl/vxworks.em
ld/emultempl/xtensaelf.em
ld/emultempl/z80.em
ld/fdl.texi
ld/gen-doc.texi
ld/genscripts.sh
ld/h8-doc.texi
ld/ld.h
ld/ld.texinfo
ld/ldcref.c
ld/ldctor.c
ld/ldctor.h
ld/ldemul.c
ld/ldemul.h
ld/ldexp.c
ld/ldexp.h
ld/ldfile.c
ld/ldfile.h
ld/ldgram.y
ld/ldint.texinfo
ld/ldlang.c
ld/ldlang.h
ld/ldlex.h
ld/ldlex.l
ld/ldmain.c
ld/ldmain.h
ld/ldmisc.c
ld/ldmisc.h
ld/ldver.c
ld/ldver.h
ld/ldwrite.c
ld/ldwrite.h
ld/lexsup.c
ld/mri.c
ld/mri.h
ld/pe-dll.c
ld/pe-dll.h
ld/po/.cvsignore
ld/po/Make-in
ld/po/POTFILES.in
ld/po/da.po
ld/po/es.po
ld/po/fr.po
ld/po/ld.pot
ld/po/sv.po
ld/po/tr.po
ld/po/vi.po
ld/po/zh_CN.po
ld/po/zh_TW.po
ld/scripttempl/README
ld/scripttempl/a29k.sc
ld/scripttempl/aix.sc
ld/scripttempl/alpha.sc
ld/scripttempl/aout.sc
ld/scripttempl/armaout.sc
ld/scripttempl/armbpabi.sc
ld/scripttempl/armcoff.sc
ld/scripttempl/avr.sc
ld/scripttempl/crisaout.sc
ld/scripttempl/delta68.sc
ld/scripttempl/dlx.sc
ld/scripttempl/ebmon29k.sc
ld/scripttempl/elf.sc
ld/scripttempl/elf32cr16c.sc
ld/scripttempl/elf32crx.sc
ld/scripttempl/elf32msp430.sc
ld/scripttempl/elf32msp430_3.sc
ld/scripttempl/elf32sh-symbian.sc
ld/scripttempl/elf32xc16x.sc
ld/scripttempl/elf32xc16xl.sc
ld/scripttempl/elf32xc16xs.sc
ld/scripttempl/elf_chaos.sc
ld/scripttempl/elfd10v.sc
ld/scripttempl/elfd30v.sc
ld/scripttempl/elfi370.sc
ld/scripttempl/elfm68hc11.sc
ld/scripttempl/elfm68hc12.sc
ld/scripttempl/elfxtensa.sc
ld/scripttempl/epocpe.sc
ld/scripttempl/h8300.sc
ld/scripttempl/h8300h.sc
ld/scripttempl/h8300hn.sc
ld/scripttempl/h8300s.sc
ld/scripttempl/h8300sn.sc
ld/scripttempl/h8300sx.sc
ld/scripttempl/h8300sxn.sc
ld/scripttempl/h8500.sc
ld/scripttempl/h8500b.sc
ld/scripttempl/h8500c.sc
ld/scripttempl/h8500m.sc
ld/scripttempl/h8500s.sc
ld/scripttempl/hppaelf.sc
ld/scripttempl/i386beos.sc
ld/scripttempl/i386coff.sc
ld/scripttempl/i386go32.sc
ld/scripttempl/i386msdos.sc
ld/scripttempl/i860coff.sc
ld/scripttempl/i960.sc
ld/scripttempl/ip2k.sc
ld/scripttempl/iq2000.sc
ld/scripttempl/m68kaux.sc
ld/scripttempl/m68kcoff.sc
ld/scripttempl/m68klynx.sc
ld/scripttempl/m88kbcs.sc
ld/scripttempl/maxqcoff.sc
ld/scripttempl/mcorepe.sc
ld/scripttempl/mips.sc
ld/scripttempl/mipsbsd.sc
ld/scripttempl/mmo.sc
ld/scripttempl/nw.sc
ld/scripttempl/or32.sc
ld/scripttempl/pe.sc
ld/scripttempl/pj.sc
ld/scripttempl/ppcpe.sc
ld/scripttempl/psos.sc
ld/scripttempl/riscix.sc
ld/scripttempl/sa29200.sc
ld/scripttempl/sh.sc
ld/scripttempl/sparccoff.sc
ld/scripttempl/sparclynx.sc
ld/scripttempl/st2000.sc
ld/scripttempl/tic30aout.sc
ld/scripttempl/tic30coff.sc
ld/scripttempl/tic4xcoff.sc
ld/scripttempl/tic54xcoff.sc
ld/scripttempl/tic80coff.sc
ld/scripttempl/v850.sc
ld/scripttempl/vanilla.sc
ld/scripttempl/w65.sc
ld/scripttempl/xstormy16.sc
ld/scripttempl/z80.sc
ld/scripttempl/z8000.sc
ld/stamp-h.in
ld/sysdep.h
ld/testsuite/ChangeLog
ld/testsuite/ChangeLog-2004
ld/testsuite/ChangeLog-2005
ld/testsuite/ChangeLog-9303
ld/testsuite/config/default.exp
ld/testsuite/ld-alpha/align.s
ld/testsuite/ld-alpha/alpha.exp
ld/testsuite/ld-alpha/tlsbin.dd
ld/testsuite/ld-alpha/tlsbin.rd
ld/testsuite/ld-alpha/tlsbin.s
ld/testsuite/ld-alpha/tlsbin.sd
ld/testsuite/ld-alpha/tlsbin.td
ld/testsuite/ld-alpha/tlsbinpic.s
ld/testsuite/ld-alpha/tlsbinr.dd
ld/testsuite/ld-alpha/tlsbinr.rd
ld/testsuite/ld-alpha/tlsbinr.sd
ld/testsuite/ld-alpha/tlsg.s
ld/testsuite/ld-alpha/tlsg.sd
ld/testsuite/ld-alpha/tlslib.s
ld/testsuite/ld-alpha/tlspic.dd
ld/testsuite/ld-alpha/tlspic.rd
ld/testsuite/ld-alpha/tlspic.sd
ld/testsuite/ld-alpha/tlspic.td
ld/testsuite/ld-alpha/tlspic1.s
ld/testsuite/ld-alpha/tlspic2.s
ld/testsuite/ld-arm/arm-app-abs32.d
ld/testsuite/ld-arm/arm-app-abs32.r
ld/testsuite/ld-arm/arm-app-abs32.s
ld/testsuite/ld-arm/arm-app.d
ld/testsuite/ld-arm/arm-app.r
ld/testsuite/ld-arm/arm-app.s
ld/testsuite/ld-arm/arm-be8.d
ld/testsuite/ld-arm/arm-be8.s
ld/testsuite/ld-arm/arm-call.d
ld/testsuite/ld-arm/arm-call1.s
ld/testsuite/ld-arm/arm-call2.s
ld/testsuite/ld-arm/arm-dyn.ld
ld/testsuite/ld-arm/arm-elf.exp
ld/testsuite/ld-arm/arm-lib-plt32.d
ld/testsuite/ld-arm/arm-lib-plt32.r
ld/testsuite/ld-arm/arm-lib-plt32.s
ld/testsuite/ld-arm/arm-lib.d
ld/testsuite/ld-arm/arm-lib.ld
ld/testsuite/ld-arm/arm-lib.r
ld/testsuite/ld-arm/arm-lib.s
ld/testsuite/ld-arm/arm-movwt.d
ld/testsuite/ld-arm/arm-movwt.s
ld/testsuite/ld-arm/arm-rel31.d
ld/testsuite/ld-arm/arm-rel31.s
ld/testsuite/ld-arm/arm-static-app.d
ld/testsuite/ld-arm/arm-static-app.r
ld/testsuite/ld-arm/arm-static-app.s
ld/testsuite/ld-arm/arm-target1-abs.d
ld/testsuite/ld-arm/arm-target1-rel.d
ld/testsuite/ld-arm/arm-target1.s
ld/testsuite/ld-arm/arm-target2-abs.d
ld/testsuite/ld-arm/arm-target2-got-rel.d
ld/testsuite/ld-arm/arm-target2-rel.d
ld/testsuite/ld-arm/arm-target2.s
ld/testsuite/ld-arm/arm.ld
ld/testsuite/ld-arm/group-relocs-alu-bad.d
ld/testsuite/ld-arm/group-relocs-alu-bad.s
ld/testsuite/ld-arm/group-relocs-ldc-bad.d
ld/testsuite/ld-arm/group-relocs-ldc-bad.s
ld/testsuite/ld-arm/group-relocs-ldr-bad.d
ld/testsuite/ld-arm/group-relocs-ldr-bad.s
ld/testsuite/ld-arm/group-relocs-ldrs-bad.d
ld/testsuite/ld-arm/group-relocs-ldrs-bad.s
ld/testsuite/ld-arm/group-relocs.d
ld/testsuite/ld-arm/group-relocs.s
ld/testsuite/ld-arm/mixed-app-v5.d
ld/testsuite/ld-arm/mixed-app.d
ld/testsuite/ld-arm/mixed-app.r
ld/testsuite/ld-arm/mixed-app.s
ld/testsuite/ld-arm/mixed-app.sym
ld/testsuite/ld-arm/mixed-lib.d
ld/testsuite/ld-arm/mixed-lib.r
ld/testsuite/ld-arm/mixed-lib.s
ld/testsuite/ld-arm/mixed-lib.sym
ld/testsuite/ld-arm/thumb-entry.d
ld/testsuite/ld-arm/thumb-entry.s
ld/testsuite/ld-arm/thumb-rel32.d
ld/testsuite/ld-arm/thumb-rel32.s
ld/testsuite/ld-arm/tls-app.d
ld/testsuite/ld-arm/tls-app.r
ld/testsuite/ld-arm/tls-app.s
ld/testsuite/ld-arm/tls-lib.d
ld/testsuite/ld-arm/tls-lib.r
ld/testsuite/ld-arm/tls-lib.s
ld/testsuite/ld-arm/use-thumb-lib.s
ld/testsuite/ld-arm/use-thumb-lib.sym
ld/testsuite/ld-arm/vxworks1-lib.dd
ld/testsuite/ld-arm/vxworks1-lib.nd
ld/testsuite/ld-arm/vxworks1-lib.rd
ld/testsuite/ld-arm/vxworks1-lib.s
ld/testsuite/ld-arm/vxworks1-static.d
ld/testsuite/ld-arm/vxworks1.dd
ld/testsuite/ld-arm/vxworks1.ld
ld/testsuite/ld-arm/vxworks1.rd
ld/testsuite/ld-arm/vxworks1.s
ld/testsuite/ld-arm/vxworks2-static.sd
ld/testsuite/ld-arm/vxworks2.s
ld/testsuite/ld-arm/vxworks2.sd
ld/testsuite/ld-auto-import/auto-import.exp
ld/testsuite/ld-auto-import/client.c
ld/testsuite/ld-auto-import/dll.c
ld/testsuite/ld-bootstrap/bootstrap.exp
ld/testsuite/ld-cdtest/cdtest-bar.cc
ld/testsuite/ld-cdtest/cdtest-foo.cc
ld/testsuite/ld-cdtest/cdtest-foo.h
ld/testsuite/ld-cdtest/cdtest-main.cc
ld/testsuite/ld-cdtest/cdtest-nrv.dat
ld/testsuite/ld-cdtest/cdtest.dat
ld/testsuite/ld-cdtest/cdtest.exp
ld/testsuite/ld-checks/asm.s
ld/testsuite/ld-checks/checks.exp
ld/testsuite/ld-checks/script
ld/testsuite/ld-cris/badgotr1.d
ld/testsuite/ld-cris/comref1.s
ld/testsuite/ld-cris/cris.exp
ld/testsuite/ld-cris/def2.d
ld/testsuite/ld-cris/def3.d
ld/testsuite/ld-cris/dso-1.s
ld/testsuite/ld-cris/dso-2.s
ld/testsuite/ld-cris/dso-3.s
ld/testsuite/ld-cris/dsofnf.s
ld/testsuite/ld-cris/dsofnf2.s
ld/testsuite/ld-cris/dsov32-1.s
ld/testsuite/ld-cris/dsov32-2.s
ld/testsuite/ld-cris/dsov32-3.s
ld/testsuite/ld-cris/dsov32-4.s
ld/testsuite/ld-cris/euwref1.s
ld/testsuite/ld-cris/expdref1.s
ld/testsuite/ld-cris/expdyn1.d
ld/testsuite/ld-cris/expdyn1.s
ld/testsuite/ld-cris/expdyn2.d
ld/testsuite/ld-cris/expdyn3.d
ld/testsuite/ld-cris/expdyn4.d
ld/testsuite/ld-cris/expdyn5.d
ld/testsuite/ld-cris/expdyn6.d
ld/testsuite/ld-cris/expdyn7.d
ld/testsuite/ld-cris/globsym1ref.s
ld/testsuite/ld-cris/globsymw1.s
ld/testsuite/ld-cris/globsymw2.s
ld/testsuite/ld-cris/gotplt1.d
ld/testsuite/ld-cris/gotplt2.d
ld/testsuite/ld-cris/gotplt3.d
ld/testsuite/ld-cris/gotrel1.s
ld/testsuite/ld-cris/gotrel2.s
ld/testsuite/ld-cris/hiddef1.d
ld/testsuite/ld-cris/hiddef1.s
ld/testsuite/ld-cris/hide1
ld/testsuite/ld-cris/hidrefgotplt1.s
ld/testsuite/ld-cris/ldsym1.d
ld/testsuite/ld-cris/libdso-1.d
ld/testsuite/ld-cris/libdso-10.d
ld/testsuite/ld-cris/libdso-11.d
ld/testsuite/ld-cris/libdso-12.d
ld/testsuite/ld-cris/libdso-13.d
ld/testsuite/ld-cris/libdso-14.d
ld/testsuite/ld-cris/libdso-2.d
ld/testsuite/ld-cris/libdso-3.d
ld/testsuite/ld-cris/libdso-4.d
ld/testsuite/ld-cris/locref1.d
ld/testsuite/ld-cris/locref1.s
ld/testsuite/ld-cris/locref2.d
ld/testsuite/ld-cris/locref2.s
ld/testsuite/ld-cris/move-1.s
ld/testsuite/ld-cris/nodyn4.d
ld/testsuite/ld-cris/nodyn5.d
ld/testsuite/ld-cris/noglob1.d
ld/testsuite/ld-cris/noglob1.s
ld/testsuite/ld-cris/noov.d
ld/testsuite/ld-cris/noov.s
ld/testsuite/ld-cris/pv32-1.d
ld/testsuite/ld-cris/pv32.s
ld/testsuite/ld-cris/stabs1.s
ld/testsuite/ld-cris/start1.s
ld/testsuite/ld-cris/undef1.d
ld/testsuite/ld-cris/undef2.d
ld/testsuite/ld-cris/undef3.d
ld/testsuite/ld-cris/v10-v32.d
ld/testsuite/ld-cris/v10-va.d
ld/testsuite/ld-cris/v32-ba-1.d
ld/testsuite/ld-cris/v32-ba-1.s
ld/testsuite/ld-cris/v32-bin-1.d
ld/testsuite/ld-cris/v32-bin-1.s
ld/testsuite/ld-cris/v32-v10.d
ld/testsuite/ld-cris/v32-va.d
ld/testsuite/ld-cris/va-v10.d
ld/testsuite/ld-cris/va-v32.d
ld/testsuite/ld-cris/warn1.d
ld/testsuite/ld-cris/warn2.d
ld/testsuite/ld-cris/warn3.d
ld/testsuite/ld-cris/warn4.d
ld/testsuite/ld-cris/weakref1.d
ld/testsuite/ld-cris/weakref2.d
ld/testsuite/ld-crx/crx.exp
ld/testsuite/ld-crx/crx.ld
ld/testsuite/ld-crx/reloc-abs32.d
ld/testsuite/ld-crx/reloc-abs32.s
ld/testsuite/ld-crx/reloc-imm16.d
ld/testsuite/ld-crx/reloc-imm16.s
ld/testsuite/ld-crx/reloc-imm32.d
ld/testsuite/ld-crx/reloc-imm32.s
ld/testsuite/ld-crx/reloc-num16.d
ld/testsuite/ld-crx/reloc-num16.s
ld/testsuite/ld-crx/reloc-num32.d
ld/testsuite/ld-crx/reloc-num32.s
ld/testsuite/ld-crx/reloc-num8.d
ld/testsuite/ld-crx/reloc-num8.s
ld/testsuite/ld-crx/reloc-regrel12.d
ld/testsuite/ld-crx/reloc-regrel12.s
ld/testsuite/ld-crx/reloc-regrel22.d
ld/testsuite/ld-crx/reloc-regrel22.s
ld/testsuite/ld-crx/reloc-regrel28.d
ld/testsuite/ld-crx/reloc-regrel28.s
ld/testsuite/ld-crx/reloc-regrel32.d
ld/testsuite/ld-crx/reloc-regrel32.s
ld/testsuite/ld-crx/reloc-rel16.d
ld/testsuite/ld-crx/reloc-rel16.s
ld/testsuite/ld-crx/reloc-rel24.d
ld/testsuite/ld-crx/reloc-rel24.s
ld/testsuite/ld-crx/reloc-rel32.d
ld/testsuite/ld-crx/reloc-rel32.s
ld/testsuite/ld-crx/reloc-rel4.d
ld/testsuite/ld-crx/reloc-rel4.s
ld/testsuite/ld-crx/reloc-rel8-cmp.d
ld/testsuite/ld-crx/reloc-rel8-cmp.s
ld/testsuite/ld-crx/reloc-rel8.d
ld/testsuite/ld-crx/reloc-rel8.s
ld/testsuite/ld-cygwin/exe-export.exp
ld/testsuite/ld-cygwin/testdll.c
ld/testsuite/ld-cygwin/testdll.def
ld/testsuite/ld-cygwin/testexe.c
ld/testsuite/ld-cygwin/testexe.def
ld/testsuite/ld-d10v/d10v.exp
ld/testsuite/ld-d10v/default_layout.d
ld/testsuite/ld-d10v/linktest-001.s
ld/testsuite/ld-d10v/linktest-002.lt
ld/testsuite/ld-d10v/linktest-002.s
ld/testsuite/ld-d10v/regression-001.lt
ld/testsuite/ld-d10v/regression-001.s
ld/testsuite/ld-d10v/reloc-001.d
ld/testsuite/ld-d10v/reloc-001.ld
ld/testsuite/ld-d10v/reloc-001.s
ld/testsuite/ld-d10v/reloc-002.d
ld/testsuite/ld-d10v/reloc-002.ld
ld/testsuite/ld-d10v/reloc-003.d
ld/testsuite/ld-d10v/reloc-003.ld
ld/testsuite/ld-d10v/reloc-004.d
ld/testsuite/ld-d10v/reloc-004.ld
ld/testsuite/ld-d10v/reloc-005.d
ld/testsuite/ld-d10v/reloc-005.ld
ld/testsuite/ld-d10v/reloc-005.s
ld/testsuite/ld-d10v/reloc-006.d
ld/testsuite/ld-d10v/reloc-006.ld
ld/testsuite/ld-d10v/reloc-007.d
ld/testsuite/ld-d10v/reloc-007.ld
ld/testsuite/ld-d10v/reloc-008.d
ld/testsuite/ld-d10v/reloc-008.ld
ld/testsuite/ld-d10v/reloc-009.d
ld/testsuite/ld-d10v/reloc-009.ld
ld/testsuite/ld-d10v/reloc-009.s
ld/testsuite/ld-d10v/reloc-010.d
ld/testsuite/ld-d10v/reloc-010.ld
ld/testsuite/ld-d10v/reloc-011.d
ld/testsuite/ld-d10v/reloc-011.ld
ld/testsuite/ld-d10v/reloc-012.d
ld/testsuite/ld-d10v/reloc-012.ld
ld/testsuite/ld-d10v/reloc-013.d
ld/testsuite/ld-d10v/reloc-013.ld
ld/testsuite/ld-d10v/reloc-014.d
ld/testsuite/ld-d10v/reloc-014.ld
ld/testsuite/ld-d10v/reloc-015.d
ld/testsuite/ld-d10v/reloc-015.ld
ld/testsuite/ld-d10v/reloc-016.d
ld/testsuite/ld-d10v/reloc-016.ld
ld/testsuite/ld-d10v/simple.s
ld/testsuite/ld-discard/discard.exp
ld/testsuite/ld-discard/discard.ld
ld/testsuite/ld-discard/exit.s
ld/testsuite/ld-discard/extern.d
ld/testsuite/ld-discard/extern.s
ld/testsuite/ld-discard/start.d
ld/testsuite/ld-discard/start.s
ld/testsuite/ld-discard/static.d
ld/testsuite/ld-discard/static.s
ld/testsuite/ld-elf/begin.c
ld/testsuite/ld-elf/binutils.exp
ld/testsuite/ld-elf/commonpage1.d
ld/testsuite/ld-elf/eh1.d
ld/testsuite/ld-elf/eh1.s
ld/testsuite/ld-elf/eh1a.s
ld/testsuite/ld-elf/eh2.d
ld/testsuite/ld-elf/eh2a.s
ld/testsuite/ld-elf/eh3.d
ld/testsuite/ld-elf/eh3.s
ld/testsuite/ld-elf/eh3a.s
ld/testsuite/ld-elf/elf.exp
ld/testsuite/ld-elf/empty.d
ld/testsuite/ld-elf/empty.s
ld/testsuite/ld-elf/empty2.d
ld/testsuite/ld-elf/empty2.s
ld/testsuite/ld-elf/end.c
ld/testsuite/ld-elf/endhidden.c
ld/testsuite/ld-elf/endprotected.c
ld/testsuite/ld-elf/exclude.exp
ld/testsuite/ld-elf/exclude1.s
ld/testsuite/ld-elf/exclude2.s
ld/testsuite/ld-elf/fini.c
ld/testsuite/ld-elf/fini.out
ld/testsuite/ld-elf/foo.c
ld/testsuite/ld-elf/foo.map
ld/testsuite/ld-elf/frame.exp
ld/testsuite/ld-elf/frame.s
ld/testsuite/ld-elf/group.ld
ld/testsuite/ld-elf/group1.d
ld/testsuite/ld-elf/group1a.s
ld/testsuite/ld-elf/group1b.s
ld/testsuite/ld-elf/group2.d
ld/testsuite/ld-elf/hidden.out
ld/testsuite/ld-elf/init.c
ld/testsuite/ld-elf/init.out
ld/testsuite/ld-elf/main.c
ld/testsuite/ld-elf/maxpage1.d
ld/testsuite/ld-elf/maxpage1.s
ld/testsuite/ld-elf/maxpage2.d
ld/testsuite/ld-elf/merge.d
ld/testsuite/ld-elf/merge.ld
ld/testsuite/ld-elf/merge.s
ld/testsuite/ld-elf/merge2.d
ld/testsuite/ld-elf/merge2.s
ld/testsuite/ld-elf/normal.out
ld/testsuite/ld-elf/orphan.d
ld/testsuite/ld-elf/orphan.ld
ld/testsuite/ld-elf/orphan.s
ld/testsuite/ld-elf/orphan2.d
ld/testsuite/ld-elf/orphan2.s
ld/testsuite/ld-elf/preinit.c
ld/testsuite/ld-elf/preinit.out
ld/testsuite/ld-elf/sec64k.exp
ld/testsuite/ld-elf/shared.exp
ld/testsuite/ld-elf/stab.d
ld/testsuite/ld-elf/start.s
ld/testsuite/ld-elf/symbol1ref.s
ld/testsuite/ld-elf/symbol1w.s
ld/testsuite/ld-elf/table.s
ld/testsuite/ld-elf/tbss.s
ld/testsuite/ld-elf/tbss1.s
ld/testsuite/ld-elf/tbss2.s
ld/testsuite/ld-elf/tdata1.s
ld/testsuite/ld-elf/tdata2.s
ld/testsuite/ld-elf/tls_common.exp
ld/testsuite/ld-elf/tls_common.s
ld/testsuite/ld-elf/unknown.d
ld/testsuite/ld-elf/unknown2.d
ld/testsuite/ld-elf/unknown2.s
ld/testsuite/ld-elf/warn1.d
ld/testsuite/ld-elfcomm/common1a.c
ld/testsuite/ld-elfcomm/common1b.c
ld/testsuite/ld-elfcomm/elfcomm.exp
ld/testsuite/ld-elfvers/vers.exp
ld/testsuite/ld-elfvers/vers1.c
ld/testsuite/ld-elfvers/vers1.dsym
ld/testsuite/ld-elfvers/vers1.map
ld/testsuite/ld-elfvers/vers1.sym
ld/testsuite/ld-elfvers/vers1.ver
ld/testsuite/ld-elfvers/vers13.asym
ld/testsuite/ld-elfvers/vers15.c
ld/testsuite/ld-elfvers/vers15.dsym
ld/testsuite/ld-elfvers/vers15.sym
ld/testsuite/ld-elfvers/vers15.ver
ld/testsuite/ld-elfvers/vers16.c
ld/testsuite/ld-elfvers/vers16.dsym
ld/testsuite/ld-elfvers/vers16.map
ld/testsuite/ld-elfvers/vers16a.c
ld/testsuite/ld-elfvers/vers16a.dsym
ld/testsuite/ld-elfvers/vers16a.ver
ld/testsuite/ld-elfvers/vers17.c
ld/testsuite/ld-elfvers/vers17.dsym
ld/testsuite/ld-elfvers/vers17.map
ld/testsuite/ld-elfvers/vers17.ver
ld/testsuite/ld-elfvers/vers18.c
ld/testsuite/ld-elfvers/vers18.dsym
ld/testsuite/ld-elfvers/vers18.map
ld/testsuite/ld-elfvers/vers18.sym
ld/testsuite/ld-elfvers/vers18.ver
ld/testsuite/ld-elfvers/vers19.c
ld/testsuite/ld-elfvers/vers19.dsym
ld/testsuite/ld-elfvers/vers19.ver
ld/testsuite/ld-elfvers/vers2.c
ld/testsuite/ld-elfvers/vers2.dsym
ld/testsuite/ld-elfvers/vers2.map
ld/testsuite/ld-elfvers/vers2.ver
ld/testsuite/ld-elfvers/vers20.c
ld/testsuite/ld-elfvers/vers20.dsym
ld/testsuite/ld-elfvers/vers20.map
ld/testsuite/ld-elfvers/vers20.ver
ld/testsuite/ld-elfvers/vers20a.ver
ld/testsuite/ld-elfvers/vers21.c
ld/testsuite/ld-elfvers/vers21.dsym
ld/testsuite/ld-elfvers/vers21.map
ld/testsuite/ld-elfvers/vers21.sym
ld/testsuite/ld-elfvers/vers21.ver
ld/testsuite/ld-elfvers/vers22.c
ld/testsuite/ld-elfvers/vers22.dsym
ld/testsuite/ld-elfvers/vers22.map
ld/testsuite/ld-elfvers/vers22.ver
ld/testsuite/ld-elfvers/vers22a.c
ld/testsuite/ld-elfvers/vers22a.dsym
ld/testsuite/ld-elfvers/vers22a.sym
ld/testsuite/ld-elfvers/vers22a.ver
ld/testsuite/ld-elfvers/vers22b.c
ld/testsuite/ld-elfvers/vers22b.dsym
ld/testsuite/ld-elfvers/vers22b.ver
ld/testsuite/ld-elfvers/vers23.c
ld/testsuite/ld-elfvers/vers23.dsym
ld/testsuite/ld-elfvers/vers23.ver
ld/testsuite/ld-elfvers/vers23a.c
ld/testsuite/ld-elfvers/vers23a.dsym
ld/testsuite/ld-elfvers/vers23a.map
ld/testsuite/ld-elfvers/vers23a.sym
ld/testsuite/ld-elfvers/vers23a.ver
ld/testsuite/ld-elfvers/vers23b.c
ld/testsuite/ld-elfvers/vers23b.dsym
ld/testsuite/ld-elfvers/vers23b.map
ld/testsuite/ld-elfvers/vers23b.ver
ld/testsuite/ld-elfvers/vers23c.ver
ld/testsuite/ld-elfvers/vers23d.dsym
ld/testsuite/ld-elfvers/vers24.map
ld/testsuite/ld-elfvers/vers24.rd
ld/testsuite/ld-elfvers/vers24a.c
ld/testsuite/ld-elfvers/vers24b.c
ld/testsuite/ld-elfvers/vers24c.c
ld/testsuite/ld-elfvers/vers25a.c
ld/testsuite/ld-elfvers/vers25a.dsym
ld/testsuite/ld-elfvers/vers25a.map
ld/testsuite/ld-elfvers/vers25a.ver
ld/testsuite/ld-elfvers/vers25b.c
ld/testsuite/ld-elfvers/vers25b.dsym
ld/testsuite/ld-elfvers/vers25b.ver
ld/testsuite/ld-elfvers/vers26a.c
ld/testsuite/ld-elfvers/vers26a.dsym
ld/testsuite/ld-elfvers/vers26a.map
ld/testsuite/ld-elfvers/vers26a.ver
ld/testsuite/ld-elfvers/vers26b.c
ld/testsuite/ld-elfvers/vers26b.dsym
ld/testsuite/ld-elfvers/vers26b.ver
ld/testsuite/ld-elfvers/vers27a.c
ld/testsuite/ld-elfvers/vers27a.dsym
ld/testsuite/ld-elfvers/vers27a.map
ld/testsuite/ld-elfvers/vers27a.ver
ld/testsuite/ld-elfvers/vers27b.c
ld/testsuite/ld-elfvers/vers27b.dsym
ld/testsuite/ld-elfvers/vers27b.ver
ld/testsuite/ld-elfvers/vers27c.c
ld/testsuite/ld-elfvers/vers27c.dsym
ld/testsuite/ld-elfvers/vers27c.ver
ld/testsuite/ld-elfvers/vers27d.dsym
ld/testsuite/ld-elfvers/vers27d.sym
ld/testsuite/ld-elfvers/vers27d.ver
ld/testsuite/ld-elfvers/vers27d1.c
ld/testsuite/ld-elfvers/vers27d2.c
ld/testsuite/ld-elfvers/vers27d3.c
ld/testsuite/ld-elfvers/vers27d4.dsym
ld/testsuite/ld-elfvers/vers27d4.ver
ld/testsuite/ld-elfvers/vers28a.c
ld/testsuite/ld-elfvers/vers28a.dsym
ld/testsuite/ld-elfvers/vers28a.ver
ld/testsuite/ld-elfvers/vers28b.c
ld/testsuite/ld-elfvers/vers28b.dsym
ld/testsuite/ld-elfvers/vers28b.map
ld/testsuite/ld-elfvers/vers28b.ver
ld/testsuite/ld-elfvers/vers28c.c
ld/testsuite/ld-elfvers/vers28c.dsym
ld/testsuite/ld-elfvers/vers28c.ver
ld/testsuite/ld-elfvers/vers29.c
ld/testsuite/ld-elfvers/vers29.dsym
ld/testsuite/ld-elfvers/vers29.ver
ld/testsuite/ld-elfvers/vers3.c
ld/testsuite/ld-elfvers/vers3.dsym
ld/testsuite/ld-elfvers/vers3.ver
ld/testsuite/ld-elfvers/vers30.c
ld/testsuite/ld-elfvers/vers30.dsym
ld/testsuite/ld-elfvers/vers30.map
ld/testsuite/ld-elfvers/vers30.ver
ld/testsuite/ld-elfvers/vers31.c
ld/testsuite/ld-elfvers/vers31.dsym
ld/testsuite/ld-elfvers/vers31.map
ld/testsuite/ld-elfvers/vers31.ver
ld/testsuite/ld-elfvers/vers4.c
ld/testsuite/ld-elfvers/vers4.sym
ld/testsuite/ld-elfvers/vers4a.dsym
ld/testsuite/ld-elfvers/vers4a.sym
ld/testsuite/ld-elfvers/vers4a.ver
ld/testsuite/ld-elfvers/vers5.c
ld/testsuite/ld-elfvers/vers6.c
ld/testsuite/ld-elfvers/vers6.dsym
ld/testsuite/ld-elfvers/vers6.sym
ld/testsuite/ld-elfvers/vers6.ver
ld/testsuite/ld-elfvers/vers7.c
ld/testsuite/ld-elfvers/vers7.map
ld/testsuite/ld-elfvers/vers7a.c
ld/testsuite/ld-elfvers/vers7a.dsym
ld/testsuite/ld-elfvers/vers7a.sym
ld/testsuite/ld-elfvers/vers7a.ver
ld/testsuite/ld-elfvers/vers8.c
ld/testsuite/ld-elfvers/vers8.map
ld/testsuite/ld-elfvers/vers8.ver
ld/testsuite/ld-elfvers/vers9.c
ld/testsuite/ld-elfvers/vers9.dsym
ld/testsuite/ld-elfvers/vers9.sym
ld/testsuite/ld-elfvers/vers9.ver
ld/testsuite/ld-elfvsb/common.c
ld/testsuite/ld-elfvsb/define.s
ld/testsuite/ld-elfvsb/elf-offset.ld
ld/testsuite/ld-elfvsb/elfvsb.dat
ld/testsuite/ld-elfvsb/elfvsb.exp
ld/testsuite/ld-elfvsb/hidden0.d
ld/testsuite/ld-elfvsb/hidden1.d
ld/testsuite/ld-elfvsb/hidden2.d
ld/testsuite/ld-elfvsb/hidden2.ld
ld/testsuite/ld-elfvsb/hidden2.s
ld/testsuite/ld-elfvsb/internal0.d
ld/testsuite/ld-elfvsb/internal1.d
ld/testsuite/ld-elfvsb/main.c
ld/testsuite/ld-elfvsb/protected0.d
ld/testsuite/ld-elfvsb/protected1.d
ld/testsuite/ld-elfvsb/sh1.c
ld/testsuite/ld-elfvsb/sh2.c
ld/testsuite/ld-elfvsb/sh3.c
ld/testsuite/ld-elfvsb/test.c
ld/testsuite/ld-elfvsb/undef.s
ld/testsuite/ld-elfweak/bar.c
ld/testsuite/ld-elfweak/bar1a.c
ld/testsuite/ld-elfweak/bar1b.c
ld/testsuite/ld-elfweak/bar1c.c
ld/testsuite/ld-elfweak/dso.dsym
ld/testsuite/ld-elfweak/dsodata.dsym
ld/testsuite/ld-elfweak/dsow.dsym
ld/testsuite/ld-elfweak/dsowdata.dsym
ld/testsuite/ld-elfweak/elfweak.exp
ld/testsuite/ld-elfweak/foo.c
ld/testsuite/ld-elfweak/foo1a.c
ld/testsuite/ld-elfweak/foo1b.c
ld/testsuite/ld-elfweak/main.c
ld/testsuite/ld-elfweak/main1.c
ld/testsuite/ld-elfweak/size.dat
ld/testsuite/ld-elfweak/size2.d
ld/testsuite/ld-elfweak/size2a.s
ld/testsuite/ld-elfweak/size2b.s
ld/testsuite/ld-elfweak/size_bar.c
ld/testsuite/ld-elfweak/size_foo.c
ld/testsuite/ld-elfweak/size_main.c
ld/testsuite/ld-elfweak/strong.dat
ld/testsuite/ld-elfweak/strong.sym
ld/testsuite/ld-elfweak/strongcomm.sym
ld/testsuite/ld-elfweak/strongdata.dat
ld/testsuite/ld-elfweak/strongdata.sym
ld/testsuite/ld-elfweak/weak.dat
ld/testsuite/ld-elfweak/weak.dsym
ld/testsuite/ld-elfweak/weakdata.dat
ld/testsuite/ld-elfweak/weakdata.dsym
ld/testsuite/ld-fastcall/export.s
ld/testsuite/ld-fastcall/fastcall.exp
ld/testsuite/ld-fastcall/import.s
ld/testsuite/ld-frv/fdpic-pie-1.d
ld/testsuite/ld-frv/fdpic-pie-2.d
ld/testsuite/ld-frv/fdpic-pie-5.d
ld/testsuite/ld-frv/fdpic-pie-6-fail.d
ld/testsuite/ld-frv/fdpic-pie-6.d
ld/testsuite/ld-frv/fdpic-pie-7.d
ld/testsuite/ld-frv/fdpic-pie-8.d
ld/testsuite/ld-frv/fdpic-shared-1.d
ld/testsuite/ld-frv/fdpic-shared-2-fail.d
ld/testsuite/ld-frv/fdpic-shared-2.d
ld/testsuite/ld-frv/fdpic-shared-3.d
ld/testsuite/ld-frv/fdpic-shared-4.d
ld/testsuite/ld-frv/fdpic-shared-5.d
ld/testsuite/ld-frv/fdpic-shared-6-fail.d
ld/testsuite/ld-frv/fdpic-shared-6.d
ld/testsuite/ld-frv/fdpic-shared-7.d
ld/testsuite/ld-frv/fdpic-shared-8-fail.d
ld/testsuite/ld-frv/fdpic-shared-8.d
ld/testsuite/ld-frv/fdpic-shared-local-2.d
ld/testsuite/ld-frv/fdpic-shared-local-8.d
ld/testsuite/ld-frv/fdpic-static-1.d
ld/testsuite/ld-frv/fdpic-static-2.d
ld/testsuite/ld-frv/fdpic-static-5.d
ld/testsuite/ld-frv/fdpic-static-6.d
ld/testsuite/ld-frv/fdpic-static-7.d
ld/testsuite/ld-frv/fdpic-static-8.d
ld/testsuite/ld-frv/fdpic.exp
ld/testsuite/ld-frv/fdpic1.s
ld/testsuite/ld-frv/fdpic2.ldv
ld/testsuite/ld-frv/fdpic2.s
ld/testsuite/ld-frv/fdpic2min.ldv
ld/testsuite/ld-frv/fdpic3.s
ld/testsuite/ld-frv/fdpic4.s
ld/testsuite/ld-frv/fdpic5.s
ld/testsuite/ld-frv/fdpic6.ldv
ld/testsuite/ld-frv/fdpic6.s
ld/testsuite/ld-frv/fdpic7.s
ld/testsuite/ld-frv/fdpic8.ldv
ld/testsuite/ld-frv/fdpic8.s
ld/testsuite/ld-frv/fdpic8min.ldv
ld/testsuite/ld-frv/fr450-link.d
ld/testsuite/ld-frv/fr450-linka.s
ld/testsuite/ld-frv/fr450-linkb.s
ld/testsuite/ld-frv/fr450-linkc.s
ld/testsuite/ld-frv/frv-elf.exp
ld/testsuite/ld-frv/tls-1-dep.s
ld/testsuite/ld-frv/tls-1-shared.lds
ld/testsuite/ld-frv/tls-1.s
ld/testsuite/ld-frv/tls-2.s
ld/testsuite/ld-frv/tls-3.s
ld/testsuite/ld-frv/tls-dynamic-1.d
ld/testsuite/ld-frv/tls-dynamic-2.d
ld/testsuite/ld-frv/tls-dynamic-3.d
ld/testsuite/ld-frv/tls-initial-shared-2.d
ld/testsuite/ld-frv/tls-pie-1.d
ld/testsuite/ld-frv/tls-pie-3.d
ld/testsuite/ld-frv/tls-relax-dynamic-1.d
ld/testsuite/ld-frv/tls-relax-dynamic-2.d
ld/testsuite/ld-frv/tls-relax-dynamic-3.d
ld/testsuite/ld-frv/tls-relax-initial-shared-2.d
ld/testsuite/ld-frv/tls-relax-pie-1.d
ld/testsuite/ld-frv/tls-relax-pie-3.d
ld/testsuite/ld-frv/tls-relax-shared-1.d
ld/testsuite/ld-frv/tls-relax-shared-2.d
ld/testsuite/ld-frv/tls-relax-shared-3.d
ld/testsuite/ld-frv/tls-relax-static-1.d
ld/testsuite/ld-frv/tls-relax-static-3.d
ld/testsuite/ld-frv/tls-shared-1-fail.d
ld/testsuite/ld-frv/tls-shared-1.d
ld/testsuite/ld-frv/tls-shared-2.d
ld/testsuite/ld-frv/tls-shared-3.d
ld/testsuite/ld-frv/tls-static-1.d
ld/testsuite/ld-frv/tls-static-3.d
ld/testsuite/ld-frv/tls.exp
ld/testsuite/ld-h8300/gcsection.d
ld/testsuite/ld-h8300/gcsection.s
ld/testsuite/ld-h8300/h8300.exp
ld/testsuite/ld-h8300/relax-2.d
ld/testsuite/ld-h8300/relax-2.s
ld/testsuite/ld-h8300/relax-3-coff.d
ld/testsuite/ld-h8300/relax-3.d
ld/testsuite/ld-h8300/relax-3.s
ld/testsuite/ld-h8300/relax-4-coff.d
ld/testsuite/ld-h8300/relax-4.d
ld/testsuite/ld-h8300/relax-4.s
ld/testsuite/ld-h8300/relax-5-coff.d
ld/testsuite/ld-h8300/relax-5.d
ld/testsuite/ld-h8300/relax-5.s
ld/testsuite/ld-h8300/relax-6-coff.d
ld/testsuite/ld-h8300/relax-6.d
ld/testsuite/ld-h8300/relax-6.s
ld/testsuite/ld-h8300/relax.d
ld/testsuite/ld-h8300/relax.s
ld/testsuite/ld-i386/abs.d
ld/testsuite/ld-i386/abs.s
ld/testsuite/ld-i386/combreloc.d
ld/testsuite/ld-i386/combreloc.s
ld/testsuite/ld-i386/emit-relocs.d
ld/testsuite/ld-i386/emit-relocs.s
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/pcrel16.d
ld/testsuite/ld-i386/pcrel16.s
ld/testsuite/ld-i386/pcrel8.d
ld/testsuite/ld-i386/pcrel8.s
ld/testsuite/ld-i386/reloc.d
ld/testsuite/ld-i386/reloc.s
ld/testsuite/ld-i386/tlsbin.dd
ld/testsuite/ld-i386/tlsbin.rd
ld/testsuite/ld-i386/tlsbin.s
ld/testsuite/ld-i386/tlsbin.sd
ld/testsuite/ld-i386/tlsbin.td
ld/testsuite/ld-i386/tlsbindesc.dd
ld/testsuite/ld-i386/tlsbindesc.rd
ld/testsuite/ld-i386/tlsbindesc.s
ld/testsuite/ld-i386/tlsbindesc.sd
ld/testsuite/ld-i386/tlsbindesc.td
ld/testsuite/ld-i386/tlsbinpic.s
ld/testsuite/ld-i386/tlsdesc.dd
ld/testsuite/ld-i386/tlsdesc.rd
ld/testsuite/ld-i386/tlsdesc.s
ld/testsuite/ld-i386/tlsdesc.sd
ld/testsuite/ld-i386/tlsdesc.td
ld/testsuite/ld-i386/tlsg.s
ld/testsuite/ld-i386/tlsg.sd
ld/testsuite/ld-i386/tlsgdesc.dd
ld/testsuite/ld-i386/tlsgdesc.rd
ld/testsuite/ld-i386/tlsgdesc.s
ld/testsuite/ld-i386/tlsindntpoff.dd
ld/testsuite/ld-i386/tlsindntpoff.s
ld/testsuite/ld-i386/tlslib.s
ld/testsuite/ld-i386/tlsnopic.dd
ld/testsuite/ld-i386/tlsnopic.rd
ld/testsuite/ld-i386/tlsnopic.sd
ld/testsuite/ld-i386/tlsnopic1.s
ld/testsuite/ld-i386/tlsnopic2.s
ld/testsuite/ld-i386/tlspic.dd
ld/testsuite/ld-i386/tlspic.rd
ld/testsuite/ld-i386/tlspic.sd
ld/testsuite/ld-i386/tlspic.td
ld/testsuite/ld-i386/tlspic1.s
ld/testsuite/ld-i386/tlspic2.s
ld/testsuite/ld-i386/vxworks1-lib.dd
ld/testsuite/ld-i386/vxworks1-lib.nd
ld/testsuite/ld-i386/vxworks1-lib.rd
ld/testsuite/ld-i386/vxworks1-lib.s
ld/testsuite/ld-i386/vxworks1-static.d
ld/testsuite/ld-i386/vxworks1.dd
ld/testsuite/ld-i386/vxworks1.ld
ld/testsuite/ld-i386/vxworks1.rd
ld/testsuite/ld-i386/vxworks1.s
ld/testsuite/ld-i386/vxworks2-static.sd
ld/testsuite/ld-i386/vxworks2.s
ld/testsuite/ld-i386/vxworks2.sd
ld/testsuite/ld-i386/zero.s
ld/testsuite/ld-ia64/ia64.exp
ld/testsuite/ld-ia64/link-order.d
ld/testsuite/ld-ia64/tlsbin.dd
ld/testsuite/ld-ia64/tlsbin.rd
ld/testsuite/ld-ia64/tlsbin.s
ld/testsuite/ld-ia64/tlsbin.sd
ld/testsuite/ld-ia64/tlsbin.td
ld/testsuite/ld-ia64/tlsbinpic.s
ld/testsuite/ld-ia64/tlsg.s
ld/testsuite/ld-ia64/tlsg.sd
ld/testsuite/ld-ia64/tlslib.s
ld/testsuite/ld-ia64/tlspic.dd
ld/testsuite/ld-ia64/tlspic.rd
ld/testsuite/ld-ia64/tlspic.sd
ld/testsuite/ld-ia64/tlspic.td
ld/testsuite/ld-ia64/tlspic1.s
ld/testsuite/ld-ia64/tlspic2.s
ld/testsuite/ld-linkonce/linkonce.exp
ld/testsuite/ld-linkonce/x.s
ld/testsuite/ld-linkonce/y.s
ld/testsuite/ld-linkonce/zeroeh.ld
ld/testsuite/ld-linkonce/zeroehl32.d
ld/testsuite/ld-m68hc11/adj-brset.d
ld/testsuite/ld-m68hc11/adj-brset.s
ld/testsuite/ld-m68hc11/adj-jump.d
ld/testsuite/ld-m68hc11/adj-jump.s
ld/testsuite/ld-m68hc11/bug-1403.d
ld/testsuite/ld-m68hc11/bug-1403.s
ld/testsuite/ld-m68hc11/bug-1417.d
ld/testsuite/ld-m68hc11/bug-1417.s
ld/testsuite/ld-m68hc11/bug-3331.d
ld/testsuite/ld-m68hc11/bug-3331.s
ld/testsuite/ld-m68hc11/far-hc11.d
ld/testsuite/ld-m68hc11/far-hc11.s
ld/testsuite/ld-m68hc11/far-hc12.d
ld/testsuite/ld-m68hc11/far-hc12.ld
ld/testsuite/ld-m68hc11/far-hc12.s
ld/testsuite/ld-m68hc11/link-hc12.s
ld/testsuite/ld-m68hc11/link-hcs12.d
ld/testsuite/ld-m68hc11/link-hcs12.s
ld/testsuite/ld-m68hc11/m68hc11.exp
ld/testsuite/ld-m68hc11/relax-direct.d
ld/testsuite/ld-m68hc11/relax-direct.s
ld/testsuite/ld-m68hc11/relax-group.d
ld/testsuite/ld-m68hc11/relax-group.s
ld/testsuite/ld-m68k/isaa-mac.d
ld/testsuite/ld-m68k/isaa-mac.s
ld/testsuite/ld-m68k/isaa-nodiv.s
ld/testsuite/ld-m68k/isaa.d
ld/testsuite/ld-m68k/isaa.s
ld/testsuite/ld-m68k/isaaplus.d
ld/testsuite/ld-m68k/isaaplus.s
ld/testsuite/ld-m68k/isab-float.d
ld/testsuite/ld-m68k/isab-float.s
ld/testsuite/ld-m68k/isab-nousp.s
ld/testsuite/ld-m68k/isab.d
ld/testsuite/ld-m68k/isab.s
ld/testsuite/ld-m68k/m68k.exp
ld/testsuite/ld-m68k/merge-error-1a.d
ld/testsuite/ld-m68k/merge-error-1a.s
ld/testsuite/ld-m68k/merge-error-1b.d
ld/testsuite/ld-m68k/merge-error-1b.s
ld/testsuite/ld-m68k/merge-error-1c.d
ld/testsuite/ld-m68k/merge-error-1d.d
ld/testsuite/ld-m68k/merge-error-1e.d
ld/testsuite/ld-m68k/merge-ok-1a.d
ld/testsuite/ld-m68k/merge-ok-1b.d
ld/testsuite/ld-m68k/merge-ok-1c.d
ld/testsuite/ld-m68k/merge.ld
ld/testsuite/ld-m68k/plt1-68020.d
ld/testsuite/ld-m68k/plt1-cpu32.d
ld/testsuite/ld-m68k/plt1-empty.s
ld/testsuite/ld-m68k/plt1-isab.d
ld/testsuite/ld-m68k/plt1.ld
ld/testsuite/ld-m68k/plt1.s
ld/testsuite/ld-maxq/addend.dd
ld/testsuite/ld-maxq/addend.s
ld/testsuite/ld-maxq/maxq.exp
ld/testsuite/ld-maxq/paddr.dd
ld/testsuite/ld-maxq/paddr.s
ld/testsuite/ld-maxq/paddr1.dd
ld/testsuite/ld-maxq/paddr1.s
ld/testsuite/ld-maxq/r32-1.s
ld/testsuite/ld-maxq/r32-2.s
ld/testsuite/ld-maxq/r32.dd
ld/testsuite/ld-mips-elf/branch-misc-1.d
ld/testsuite/ld-mips-elf/eh-frame1-n32.d
ld/testsuite/ld-mips-elf/eh-frame1-n64.d
ld/testsuite/ld-mips-elf/eh-frame1.ld
ld/testsuite/ld-mips-elf/eh-frame1.s
ld/testsuite/ld-mips-elf/eh-frame2-n32.d
ld/testsuite/ld-mips-elf/eh-frame2-n64.d
ld/testsuite/ld-mips-elf/eh-frame3.d
ld/testsuite/ld-mips-elf/eh-frame4.d
ld/testsuite/ld-mips-elf/elf-rel-got-n32.d
ld/testsuite/ld-mips-elf/elf-rel-got-n64-linux.d
ld/testsuite/ld-mips-elf/elf-rel-got-n64.d
ld/testsuite/ld-mips-elf/elf-rel-xgot-n32.d
ld/testsuite/ld-mips-elf/elf-rel-xgot-n64-linux.d
ld/testsuite/ld-mips-elf/elf-rel-xgot-n64.d
ld/testsuite/ld-mips-elf/emit-relocs-1.d
ld/testsuite/ld-mips-elf/emit-relocs-1.ld
ld/testsuite/ld-mips-elf/emit-relocs-1a.s
ld/testsuite/ld-mips-elf/emit-relocs-1b.s
ld/testsuite/ld-mips-elf/jalbal.d
ld/testsuite/ld-mips-elf/jalbal.s
ld/testsuite/ld-mips-elf/jaloverflow-2.d
ld/testsuite/ld-mips-elf/jaloverflow-2.s
ld/testsuite/ld-mips-elf/jaloverflow.d
ld/testsuite/ld-mips-elf/jaloverflow.s
ld/testsuite/ld-mips-elf/jr.s
ld/testsuite/ld-mips-elf/mips-dyn.ld
ld/testsuite/ld-mips-elf/mips-elf-flags.exp
ld/testsuite/ld-mips-elf/mips-elf.exp
ld/testsuite/ld-mips-elf/mips-lib.ld
ld/testsuite/ld-mips-elf/mips16-1.d
ld/testsuite/ld-mips-elf/mips16-1a.s
ld/testsuite/ld-mips-elf/mips16-1b.s
ld/testsuite/ld-mips-elf/mips16-call-global-1.s
ld/testsuite/ld-mips-elf/mips16-call-global-2.s
ld/testsuite/ld-mips-elf/mips16-call-global-3.s
ld/testsuite/ld-mips-elf/mips16-call-global.d
ld/testsuite/ld-mips-elf/mips16-hilo-n32.d
ld/testsuite/ld-mips-elf/mips16-hilo.d
ld/testsuite/ld-mips-elf/mips16-hilo.ld
ld/testsuite/ld-mips-elf/mips16-hilo.s
ld/testsuite/ld-mips-elf/multi-got-1-1.s
ld/testsuite/ld-mips-elf/multi-got-1-2.s
ld/testsuite/ld-mips-elf/multi-got-1.d
ld/testsuite/ld-mips-elf/multi-got-no-shared-1.s
ld/testsuite/ld-mips-elf/multi-got-no-shared-2.s
ld/testsuite/ld-mips-elf/multi-got-no-shared.d
ld/testsuite/ld-mips-elf/region1.d
ld/testsuite/ld-mips-elf/region1.t
ld/testsuite/ld-mips-elf/region1a.s
ld/testsuite/ld-mips-elf/region1b.s
ld/testsuite/ld-mips-elf/rel32-n32.d
ld/testsuite/ld-mips-elf/rel32-o32.d
ld/testsuite/ld-mips-elf/rel32.s
ld/testsuite/ld-mips-elf/rel64.d
ld/testsuite/ld-mips-elf/rel64.s
ld/testsuite/ld-mips-elf/relax-jalr-n32-shared.d
ld/testsuite/ld-mips-elf/relax-jalr-n32.d
ld/testsuite/ld-mips-elf/relax-jalr-n64-shared.d
ld/testsuite/ld-mips-elf/relax-jalr-n64.d
ld/testsuite/ld-mips-elf/relax-jalr.s
ld/testsuite/ld-mips-elf/reloc-1-n32.d
ld/testsuite/ld-mips-elf/reloc-1-n64.d
ld/testsuite/ld-mips-elf/reloc-1-rel.d
ld/testsuite/ld-mips-elf/reloc-1a.s
ld/testsuite/ld-mips-elf/reloc-1b.s
ld/testsuite/ld-mips-elf/reloc-2.d
ld/testsuite/ld-mips-elf/reloc-2.ld
ld/testsuite/ld-mips-elf/reloc-2a.s
ld/testsuite/ld-mips-elf/reloc-2b.s
ld/testsuite/ld-mips-elf/reloc-merge-lo16.d
ld/testsuite/ld-mips-elf/reloc-merge-lo16.ld
ld/testsuite/ld-mips-elf/reloc-merge-lo16.s
ld/testsuite/ld-mips-elf/stub-dynsym-1-10000.d
ld/testsuite/ld-mips-elf/stub-dynsym-1-2fe80.d
ld/testsuite/ld-mips-elf/stub-dynsym-1-7fff.d
ld/testsuite/ld-mips-elf/stub-dynsym-1-8000.d
ld/testsuite/ld-mips-elf/stub-dynsym-1-fff0.d
ld/testsuite/ld-mips-elf/stub-dynsym-1.ld
ld/testsuite/ld-mips-elf/stub-dynsym-1.s
ld/testsuite/ld-mips-elf/textrel-1.d
ld/testsuite/ld-mips-elf/textrel-1.s
ld/testsuite/ld-mips-elf/tls-hidden2-got.d
ld/testsuite/ld-mips-elf/tls-hidden2.d
ld/testsuite/ld-mips-elf/tls-hidden2a.s
ld/testsuite/ld-mips-elf/tls-hidden2b.s
ld/testsuite/ld-mips-elf/tls-hidden3.d
ld/testsuite/ld-mips-elf/tls-hidden3.got
ld/testsuite/ld-mips-elf/tls-hidden3.ld
ld/testsuite/ld-mips-elf/tls-hidden3.r
ld/testsuite/ld-mips-elf/tls-hidden3a.s
ld/testsuite/ld-mips-elf/tls-hidden3b.s
ld/testsuite/ld-mips-elf/tls-hidden4.got
ld/testsuite/ld-mips-elf/tls-hidden4.r
ld/testsuite/ld-mips-elf/tls-hidden4a.s
ld/testsuite/ld-mips-elf/tls-hidden4b.s
ld/testsuite/ld-mips-elf/tls-multi-got-1-1.s
ld/testsuite/ld-mips-elf/tls-multi-got-1-2.s
ld/testsuite/ld-mips-elf/tls-multi-got-1.d
ld/testsuite/ld-mips-elf/tls-multi-got-1.got
ld/testsuite/ld-mips-elf/tls-multi-got-1.r
ld/testsuite/ld-mips-elf/tlsbin-o32.d
ld/testsuite/ld-mips-elf/tlsbin-o32.got
ld/testsuite/ld-mips-elf/tlsbin-o32.s
ld/testsuite/ld-mips-elf/tlsdyn-o32-1.d
ld/testsuite/ld-mips-elf/tlsdyn-o32-1.got
ld/testsuite/ld-mips-elf/tlsdyn-o32-2.d
ld/testsuite/ld-mips-elf/tlsdyn-o32-2.got
ld/testsuite/ld-mips-elf/tlsdyn-o32-2.s
ld/testsuite/ld-mips-elf/tlsdyn-o32-3.d
ld/testsuite/ld-mips-elf/tlsdyn-o32-3.got
ld/testsuite/ld-mips-elf/tlsdyn-o32.d
ld/testsuite/ld-mips-elf/tlsdyn-o32.got
ld/testsuite/ld-mips-elf/tlsdyn-o32.s
ld/testsuite/ld-mips-elf/tlslib-hidden.ver
ld/testsuite/ld-mips-elf/tlslib-o32-hidden.got
ld/testsuite/ld-mips-elf/tlslib-o32-ver.got
ld/testsuite/ld-mips-elf/tlslib-o32.d
ld/testsuite/ld-mips-elf/tlslib-o32.got
ld/testsuite/ld-mips-elf/tlslib-o32.s
ld/testsuite/ld-mips-elf/tlslib.ver
ld/testsuite/ld-mips-elf/vxworks1-lib.dd
ld/testsuite/ld-mips-elf/vxworks1-lib.nd
ld/testsuite/ld-mips-elf/vxworks1-lib.rd
ld/testsuite/ld-mips-elf/vxworks1-lib.s
ld/testsuite/ld-mips-elf/vxworks1-static.d
ld/testsuite/ld-mips-elf/vxworks1.dd
ld/testsuite/ld-mips-elf/vxworks1.ld
ld/testsuite/ld-mips-elf/vxworks1.rd
ld/testsuite/ld-mips-elf/vxworks1.s
ld/testsuite/ld-mips-elf/vxworks2-static.sd
ld/testsuite/ld-mips-elf/vxworks2.s
ld/testsuite/ld-mips-elf/vxworks2.sd
ld/testsuite/ld-mmix/a.s
ld/testsuite/ld-mmix/areg-256.s
ld/testsuite/ld-mmix/areg-t.s
ld/testsuite/ld-mmix/aregm.s
ld/testsuite/ld-mmix/b-badfil1.d
ld/testsuite/ld-mmix/b-badfil1.s
ld/testsuite/ld-mmix/b-badfil2.d
ld/testsuite/ld-mmix/b-badfil2.s
ld/testsuite/ld-mmix/b-badfixo.d
ld/testsuite/ld-mmix/b-badfixo.s
ld/testsuite/ld-mmix/b-badloc.d
ld/testsuite/ld-mmix/b-badloc.s
ld/testsuite/ld-mmix/b-badlop.d
ld/testsuite/ld-mmix/b-badlop.s
ld/testsuite/ld-mmix/b-badm.d
ld/testsuite/ld-mmix/b-badm2.s
ld/testsuite/ld-mmix/b-badmain.s
ld/testsuite/ld-mmix/b-badquot.d
ld/testsuite/ld-mmix/b-badquot.s
ld/testsuite/ld-mmix/b-badrx1.d
ld/testsuite/ld-mmix/b-badrx1.s
ld/testsuite/ld-mmix/b-badrx2.d
ld/testsuite/ld-mmix/b-badrx2.s
ld/testsuite/ld-mmix/b-badrx3.d
ld/testsuite/ld-mmix/b-badrx3.s
ld/testsuite/ld-mmix/b-bend.s
ld/testsuite/ld-mmix/b-bend1.d
ld/testsuite/ld-mmix/b-bend2.d
ld/testsuite/ld-mmix/b-bend3.d
ld/testsuite/ld-mmix/b-bstab1.d
ld/testsuite/ld-mmix/b-bstab1.s
ld/testsuite/ld-mmix/b-fixo2.d
ld/testsuite/ld-mmix/b-fixo2.s
ld/testsuite/ld-mmix/b-goodmain.s
ld/testsuite/ld-mmix/b-loc64k.d
ld/testsuite/ld-mmix/b-loc64k.s
ld/testsuite/ld-mmix/b-nosym.d
ld/testsuite/ld-mmix/b-nosym.s
ld/testsuite/ld-mmix/b-offloc.s
ld/testsuite/ld-mmix/b-post1.s
ld/testsuite/ld-mmix/b-twoinsn.s
ld/testsuite/ld-mmix/b-widec.s
ld/testsuite/ld-mmix/b-widec1.d
ld/testsuite/ld-mmix/b-widec2.d
ld/testsuite/ld-mmix/b-widec2.s
ld/testsuite/ld-mmix/b-widec3.d
ld/testsuite/ld-mmix/b-widec3.s
ld/testsuite/ld-mmix/bpo-1.d
ld/testsuite/ld-mmix/bpo-1.s
ld/testsuite/ld-mmix/bpo-10.d
ld/testsuite/ld-mmix/bpo-10.s
ld/testsuite/ld-mmix/bpo-11.d
ld/testsuite/ld-mmix/bpo-11.s
ld/testsuite/ld-mmix/bpo-12.d
ld/testsuite/ld-mmix/bpo-12m.d
ld/testsuite/ld-mmix/bpo-13.d
ld/testsuite/ld-mmix/bpo-13m.d
ld/testsuite/ld-mmix/bpo-14.d
ld/testsuite/ld-mmix/bpo-14m.d
ld/testsuite/ld-mmix/bpo-15.d
ld/testsuite/ld-mmix/bpo-15m.d
ld/testsuite/ld-mmix/bpo-16.d
ld/testsuite/ld-mmix/bpo-16m.d
ld/testsuite/ld-mmix/bpo-17.d
ld/testsuite/ld-mmix/bpo-17m.d
ld/testsuite/ld-mmix/bpo-18.d
ld/testsuite/ld-mmix/bpo-18m.d
ld/testsuite/ld-mmix/bpo-19.d
ld/testsuite/ld-mmix/bpo-19m.d
ld/testsuite/ld-mmix/bpo-1m.d
ld/testsuite/ld-mmix/bpo-2.d
ld/testsuite/ld-mmix/bpo-2.s
ld/testsuite/ld-mmix/bpo-20.d
ld/testsuite/ld-mmix/bpo-20m.d
ld/testsuite/ld-mmix/bpo-21.d
ld/testsuite/ld-mmix/bpo-21m.d
ld/testsuite/ld-mmix/bpo-22.d
ld/testsuite/ld-mmix/bpo-2m.d
ld/testsuite/ld-mmix/bpo-3.d
ld/testsuite/ld-mmix/bpo-3.s
ld/testsuite/ld-mmix/bpo-3m.d
ld/testsuite/ld-mmix/bpo-4.d
ld/testsuite/ld-mmix/bpo-4.s
ld/testsuite/ld-mmix/bpo-4m.d
ld/testsuite/ld-mmix/bpo-5.d
ld/testsuite/ld-mmix/bpo-5.s
ld/testsuite/ld-mmix/bpo-5m.d
ld/testsuite/ld-mmix/bpo-6.d
ld/testsuite/ld-mmix/bpo-6.s
ld/testsuite/ld-mmix/bpo-6m.d
ld/testsuite/ld-mmix/bpo-7.d
ld/testsuite/ld-mmix/bpo-7.s
ld/testsuite/ld-mmix/bpo-7m.d
ld/testsuite/ld-mmix/bpo-8.d
ld/testsuite/ld-mmix/bpo-8.s
ld/testsuite/ld-mmix/bpo-8m.d
ld/testsuite/ld-mmix/bpo-9.d
ld/testsuite/ld-mmix/bpo-9.s
ld/testsuite/ld-mmix/bpo-9m.d
ld/testsuite/ld-mmix/bpo64addr.ld
ld/testsuite/ld-mmix/bspec1.d
ld/testsuite/ld-mmix/bspec1.s
ld/testsuite/ld-mmix/bspec1m.d
ld/testsuite/ld-mmix/bspec2.d
ld/testsuite/ld-mmix/bspec2.s
ld/testsuite/ld-mmix/bspec2m.d
ld/testsuite/ld-mmix/bspec801.s
ld/testsuite/ld-mmix/bspec802.s
ld/testsuite/ld-mmix/bspec803.s
ld/testsuite/ld-mmix/bspec804.s
ld/testsuite/ld-mmix/bspec805.s
ld/testsuite/ld-mmix/bspec806.s
ld/testsuite/ld-mmix/bspec807.s
ld/testsuite/ld-mmix/bspec808.s
ld/testsuite/ld-mmix/bza-1b.d
ld/testsuite/ld-mmix/bza-1f.d
ld/testsuite/ld-mmix/bza-2b.d
ld/testsuite/ld-mmix/bza-2f.d
ld/testsuite/ld-mmix/bza-7b.d
ld/testsuite/ld-mmix/bza-7f.d
ld/testsuite/ld-mmix/bza-8b.d
ld/testsuite/ld-mmix/bza-8f.d
ld/testsuite/ld-mmix/bza.s
ld/testsuite/ld-mmix/data1.s
ld/testsuite/ld-mmix/dloc1.s
ld/testsuite/ld-mmix/dloc2.s
ld/testsuite/ld-mmix/ext1-254.s
ld/testsuite/ld-mmix/ext1.s
ld/testsuite/ld-mmix/ext1g.s
ld/testsuite/ld-mmix/ext1l.s
ld/testsuite/ld-mmix/getaa-1b.d
ld/testsuite/ld-mmix/getaa-1f.d
ld/testsuite/ld-mmix/getaa-2b.d
ld/testsuite/ld-mmix/getaa-2f.d
ld/testsuite/ld-mmix/getaa-4b.d
ld/testsuite/ld-mmix/getaa-4f.d
ld/testsuite/ld-mmix/getaa-6b.d
ld/testsuite/ld-mmix/getaa-6f.d
ld/testsuite/ld-mmix/getaa-7b.d
ld/testsuite/ld-mmix/getaa-7f.d
ld/testsuite/ld-mmix/getaa-8b.d
ld/testsuite/ld-mmix/getaa-8f.d
ld/testsuite/ld-mmix/getaa.s
ld/testsuite/ld-mmix/getaa12b.d
ld/testsuite/ld-mmix/getaa12f.d
ld/testsuite/ld-mmix/getaa14b.d
ld/testsuite/ld-mmix/getaa14f.d
ld/testsuite/ld-mmix/greg-1.d
ld/testsuite/ld-mmix/greg-1.s
ld/testsuite/ld-mmix/greg-10.d
ld/testsuite/ld-mmix/greg-11.d
ld/testsuite/ld-mmix/greg-11b.d
ld/testsuite/ld-mmix/greg-12.d
ld/testsuite/ld-mmix/greg-13.d
ld/testsuite/ld-mmix/greg-14.d
ld/testsuite/ld-mmix/greg-14s.d
ld/testsuite/ld-mmix/greg-15.d
ld/testsuite/ld-mmix/greg-16.d
ld/testsuite/ld-mmix/greg-17.d
ld/testsuite/ld-mmix/greg-18.d
ld/testsuite/ld-mmix/greg-19.d
ld/testsuite/ld-mmix/greg-2.d
ld/testsuite/ld-mmix/greg-2.s
ld/testsuite/ld-mmix/greg-20.d
ld/testsuite/ld-mmix/greg-3.d
ld/testsuite/ld-mmix/greg-3.s
ld/testsuite/ld-mmix/greg-4.d
ld/testsuite/ld-mmix/greg-4.s
ld/testsuite/ld-mmix/greg-5.d
ld/testsuite/ld-mmix/greg-5.s
ld/testsuite/ld-mmix/greg-5s.d
ld/testsuite/ld-mmix/greg-6.d
ld/testsuite/ld-mmix/greg-7.d
ld/testsuite/ld-mmix/greg-8.d
ld/testsuite/ld-mmix/greg-9.d
ld/testsuite/ld-mmix/gregbza1.s
ld/testsuite/ld-mmix/gregget1.s
ld/testsuite/ld-mmix/gregget2.s
ld/testsuite/ld-mmix/gregldo1.s
ld/testsuite/ld-mmix/gregpsj1.s
ld/testsuite/ld-mmix/hdr-1.d
ld/testsuite/ld-mmix/jumpa-1b.d
ld/testsuite/ld-mmix/jumpa-1f.d
ld/testsuite/ld-mmix/jumpa-2b.d
ld/testsuite/ld-mmix/jumpa-2f.d
ld/testsuite/ld-mmix/jumpa-3b.d
ld/testsuite/ld-mmix/jumpa-3f.d
ld/testsuite/ld-mmix/jumpa-4b.d
ld/testsuite/ld-mmix/jumpa-4f.d
ld/testsuite/ld-mmix/jumpa-5b.d
ld/testsuite/ld-mmix/jumpa-5f.d
ld/testsuite/ld-mmix/jumpa-6b.d
ld/testsuite/ld-mmix/jumpa-6f.d
ld/testsuite/ld-mmix/jumpa-7b.d
ld/testsuite/ld-mmix/jumpa-7f.d
ld/testsuite/ld-mmix/jumpa-8b.d
ld/testsuite/ld-mmix/jumpa-8f.d
ld/testsuite/ld-mmix/jumpa-9b.d
ld/testsuite/ld-mmix/jumpa-9f.d
ld/testsuite/ld-mmix/jumpa.s
ld/testsuite/ld-mmix/jumpa12b.d
ld/testsuite/ld-mmix/jumpa12f.d
ld/testsuite/ld-mmix/jumpa13b.d
ld/testsuite/ld-mmix/jumpa13f.d
ld/testsuite/ld-mmix/jumpa14b.d
ld/testsuite/ld-mmix/jumpa14f.d
ld/testsuite/ld-mmix/loc1.d
ld/testsuite/ld-mmix/loc1.s
ld/testsuite/ld-mmix/loc1m.d
ld/testsuite/ld-mmix/loc2.d
ld/testsuite/ld-mmix/loc2.s
ld/testsuite/ld-mmix/loc2m.d
ld/testsuite/ld-mmix/loc3.d
ld/testsuite/ld-mmix/loc3m.d
ld/testsuite/ld-mmix/loc4.d
ld/testsuite/ld-mmix/loc4m.d
ld/testsuite/ld-mmix/loc5.d
ld/testsuite/ld-mmix/loc5m.d
ld/testsuite/ld-mmix/loc6.d
ld/testsuite/ld-mmix/loc6m.d
ld/testsuite/ld-mmix/loc7.d
ld/testsuite/ld-mmix/loc7m.d
ld/testsuite/ld-mmix/local1.d
ld/testsuite/ld-mmix/local1.s
ld/testsuite/ld-mmix/local10.d
ld/testsuite/ld-mmix/local10m.d
ld/testsuite/ld-mmix/local11.d
ld/testsuite/ld-mmix/local11m.d
ld/testsuite/ld-mmix/local12.d
ld/testsuite/ld-mmix/local12m.d
ld/testsuite/ld-mmix/local1m.d
ld/testsuite/ld-mmix/local2.d
ld/testsuite/ld-mmix/local2.s
ld/testsuite/ld-mmix/local2m.d
ld/testsuite/ld-mmix/local3.d
ld/testsuite/ld-mmix/local3m.d
ld/testsuite/ld-mmix/local4.d
ld/testsuite/ld-mmix/local4m.d
ld/testsuite/ld-mmix/local5.d
ld/testsuite/ld-mmix/local5m.d
ld/testsuite/ld-mmix/local6.d
ld/testsuite/ld-mmix/local6m.d
ld/testsuite/ld-mmix/local7.d
ld/testsuite/ld-mmix/local7m.d
ld/testsuite/ld-mmix/local8.d
ld/testsuite/ld-mmix/local8m.d
ld/testsuite/ld-mmix/local9.d
ld/testsuite/ld-mmix/local9m.d
ld/testsuite/ld-mmix/locdo-1.d
ld/testsuite/ld-mmix/locdo.s
ld/testsuite/ld-mmix/loct-1.d
ld/testsuite/ld-mmix/loct.s
ld/testsuite/ld-mmix/locto-1.d
ld/testsuite/ld-mmix/locto.s
ld/testsuite/ld-mmix/main1.s
ld/testsuite/ld-mmix/mmix.exp
ld/testsuite/ld-mmix/mmohdr1.ld
ld/testsuite/ld-mmix/mmosec1.ld
ld/testsuite/ld-mmix/mmosec2.ld
ld/testsuite/ld-mmix/nop123.s
ld/testsuite/ld-mmix/pad16.s
ld/testsuite/ld-mmix/pad2p18m32.s
ld/testsuite/ld-mmix/pad2p26m32.s
ld/testsuite/ld-mmix/pad4.s
ld/testsuite/ld-mmix/pushja.s
ld/testsuite/ld-mmix/pushja1b-s.d
ld/testsuite/ld-mmix/pushja1b.d
ld/testsuite/ld-mmix/pushja1f-s.d
ld/testsuite/ld-mmix/pushja1f.d
ld/testsuite/ld-mmix/pushja2b.d
ld/testsuite/ld-mmix/pushja2f.d
ld/testsuite/ld-mmix/pushja7b-s.d
ld/testsuite/ld-mmix/pushja7b.d
ld/testsuite/ld-mmix/pushja7f-s.d
ld/testsuite/ld-mmix/pushja7f.d
ld/testsuite/ld-mmix/pushja8b.d
ld/testsuite/ld-mmix/pushja8f.d
ld/testsuite/ld-mmix/pushjs1.d
ld/testsuite/ld-mmix/pushjs1b.d
ld/testsuite/ld-mmix/pushjs1bm.d
ld/testsuite/ld-mmix/pushjs1m.d
ld/testsuite/ld-mmix/pushjs1r.d
ld/testsuite/ld-mmix/pushjs2.d
ld/testsuite/ld-mmix/pushjs2b.d
ld/testsuite/ld-mmix/pushjs2bm.d
ld/testsuite/ld-mmix/pushjs2m.d
ld/testsuite/ld-mmix/pushjs2r.d
ld/testsuite/ld-mmix/pushjs3.d
ld/testsuite/ld-mmix/pushjs3b.d
ld/testsuite/ld-mmix/pushjs3bm.d
ld/testsuite/ld-mmix/pushjs3m.d
ld/testsuite/ld-mmix/pushjs3r.d
ld/testsuite/ld-mmix/pushjs4.d
ld/testsuite/ld-mmix/pushjs4b.d
ld/testsuite/ld-mmix/pushjs4bm.d
ld/testsuite/ld-mmix/pushjs4m.d
ld/testsuite/ld-mmix/pushjs4r.d
ld/testsuite/ld-mmix/reg-1.d
ld/testsuite/ld-mmix/reg-1m.d
ld/testsuite/ld-mmix/reg-2.d
ld/testsuite/ld-mmix/reg-2m.d
ld/testsuite/ld-mmix/regext1.s
ld/testsuite/ld-mmix/sec-1.d
ld/testsuite/ld-mmix/sec-1.s
ld/testsuite/ld-mmix/sec-2.d
ld/testsuite/ld-mmix/sec-2.s
ld/testsuite/ld-mmix/sec-3.d
ld/testsuite/ld-mmix/sec-4.d
ld/testsuite/ld-mmix/sec-5.d
ld/testsuite/ld-mmix/sec-6.d
ld/testsuite/ld-mmix/sec-6.s
ld/testsuite/ld-mmix/sec-6m.d
ld/testsuite/ld-mmix/sec-7a.s
ld/testsuite/ld-mmix/sec-7b.s
ld/testsuite/ld-mmix/sec-7c.s
ld/testsuite/ld-mmix/sec-7d.s
ld/testsuite/ld-mmix/sec-7e.s
ld/testsuite/ld-mmix/sec-7m.d
ld/testsuite/ld-mmix/sec-8a.s
ld/testsuite/ld-mmix/sec-8b.s
ld/testsuite/ld-mmix/sec-8d.s
ld/testsuite/ld-mmix/sec-8m.d
ld/testsuite/ld-mmix/sec-8m.s
ld/testsuite/ld-mmix/sec-9.d
ld/testsuite/ld-mmix/spec801.d
ld/testsuite/ld-mmix/spec802.d
ld/testsuite/ld-mmix/spec803.d
ld/testsuite/ld-mmix/spec804.d
ld/testsuite/ld-mmix/spec805.d
ld/testsuite/ld-mmix/spec806.d
ld/testsuite/ld-mmix/spec807.d
ld/testsuite/ld-mmix/spec808.d
ld/testsuite/ld-mmix/start-1.d
ld/testsuite/ld-mmix/start-2.d
ld/testsuite/ld-mmix/start.s
ld/testsuite/ld-mmix/start2.s
ld/testsuite/ld-mmix/start3.s
ld/testsuite/ld-mmix/start4.s
ld/testsuite/ld-mmix/sym-1.d
ld/testsuite/ld-mmix/sym-2.d
ld/testsuite/ld-mmix/sym-2.s
ld/testsuite/ld-mmix/undef-1.d
ld/testsuite/ld-mmix/undef-1.s
ld/testsuite/ld-mmix/undef-1m.d
ld/testsuite/ld-mmix/undef-2.d
ld/testsuite/ld-mmix/undef-2.s
ld/testsuite/ld-mmix/undef-2m.d
ld/testsuite/ld-mmix/undef-3.d
ld/testsuite/ld-mmix/undef-3m.d
ld/testsuite/ld-mmix/x.s
ld/testsuite/ld-mmix/y.s
ld/testsuite/ld-mmix/zeroeh.ld
ld/testsuite/ld-mmix/zeroehelf.d
ld/testsuite/ld-mmix/zeroehmmo.d
ld/testsuite/ld-pe/pe.exp
ld/testsuite/ld-pe/secrel.d
ld/testsuite/ld-pe/secrel1.s
ld/testsuite/ld-pe/secrel2.s
ld/testsuite/ld-pie/pie.c
ld/testsuite/ld-pie/pie.exp
ld/testsuite/ld-pie/weakundef-data.c
ld/testsuite/ld-pie/weakundef.c
ld/testsuite/ld-pie/weakundef.out
ld/testsuite/ld-powerpc/apuinfo.rd
ld/testsuite/ld-powerpc/apuinfo1.s
ld/testsuite/ld-powerpc/apuinfo2.s
ld/testsuite/ld-powerpc/powerpc.exp
ld/testsuite/ld-powerpc/reloc.d
ld/testsuite/ld-powerpc/reloc.s
ld/testsuite/ld-powerpc/sdadyn.d
ld/testsuite/ld-powerpc/sdadyn.s
ld/testsuite/ld-powerpc/sdalib.s
ld/testsuite/ld-powerpc/symtocbase-1.s
ld/testsuite/ld-powerpc/symtocbase-2.s
ld/testsuite/ld-powerpc/symtocbase.d
ld/testsuite/ld-powerpc/tls.d
ld/testsuite/ld-powerpc/tls.g
ld/testsuite/ld-powerpc/tls.s
ld/testsuite/ld-powerpc/tls.t
ld/testsuite/ld-powerpc/tls32.d
ld/testsuite/ld-powerpc/tls32.g
ld/testsuite/ld-powerpc/tls32.s
ld/testsuite/ld-powerpc/tls32.t
ld/testsuite/ld-powerpc/tlsexe.d
ld/testsuite/ld-powerpc/tlsexe.g
ld/testsuite/ld-powerpc/tlsexe.r
ld/testsuite/ld-powerpc/tlsexe.t
ld/testsuite/ld-powerpc/tlsexe32.d
ld/testsuite/ld-powerpc/tlsexe32.g
ld/testsuite/ld-powerpc/tlsexe32.r
ld/testsuite/ld-powerpc/tlsexe32.t
ld/testsuite/ld-powerpc/tlsexetoc.d
ld/testsuite/ld-powerpc/tlsexetoc.g
ld/testsuite/ld-powerpc/tlsexetoc.r
ld/testsuite/ld-powerpc/tlsexetoc.t
ld/testsuite/ld-powerpc/tlslib.s
ld/testsuite/ld-powerpc/tlslib32.s
ld/testsuite/ld-powerpc/tlsso.d
ld/testsuite/ld-powerpc/tlsso.g
ld/testsuite/ld-powerpc/tlsso.r
ld/testsuite/ld-powerpc/tlsso.t
ld/testsuite/ld-powerpc/tlsso32.d
ld/testsuite/ld-powerpc/tlsso32.g
ld/testsuite/ld-powerpc/tlsso32.r
ld/testsuite/ld-powerpc/tlsso32.t
ld/testsuite/ld-powerpc/tlstoc.d
ld/testsuite/ld-powerpc/tlstoc.g
ld/testsuite/ld-powerpc/tlstoc.s
ld/testsuite/ld-powerpc/tlstoc.t
ld/testsuite/ld-powerpc/tlstocso.d
ld/testsuite/ld-powerpc/tlstocso.g
ld/testsuite/ld-powerpc/tlstocso.r
ld/testsuite/ld-powerpc/tlstocso.t
ld/testsuite/ld-powerpc/vxworks1-lib.dd
ld/testsuite/ld-powerpc/vxworks1-lib.nd
ld/testsuite/ld-powerpc/vxworks1-lib.rd
ld/testsuite/ld-powerpc/vxworks1-lib.s
ld/testsuite/ld-powerpc/vxworks1-lib.sd
ld/testsuite/ld-powerpc/vxworks1-static.d
ld/testsuite/ld-powerpc/vxworks1.dd
ld/testsuite/ld-powerpc/vxworks1.ld
ld/testsuite/ld-powerpc/vxworks1.rd
ld/testsuite/ld-powerpc/vxworks1.s
ld/testsuite/ld-powerpc/vxworks2-static.sd
ld/testsuite/ld-powerpc/vxworks2.s
ld/testsuite/ld-powerpc/vxworks2.sd
ld/testsuite/ld-s390/s390.exp
ld/testsuite/ld-s390/tlsbin.dd
ld/testsuite/ld-s390/tlsbin.rd
ld/testsuite/ld-s390/tlsbin.s
ld/testsuite/ld-s390/tlsbin.sd
ld/testsuite/ld-s390/tlsbin.td
ld/testsuite/ld-s390/tlsbin_64.dd
ld/testsuite/ld-s390/tlsbin_64.rd
ld/testsuite/ld-s390/tlsbin_64.s
ld/testsuite/ld-s390/tlsbin_64.sd
ld/testsuite/ld-s390/tlsbin_64.td
ld/testsuite/ld-s390/tlsbinpic.s
ld/testsuite/ld-s390/tlsbinpic_64.s
ld/testsuite/ld-s390/tlslib.s
ld/testsuite/ld-s390/tlslib_64.s
ld/testsuite/ld-s390/tlspic.dd
ld/testsuite/ld-s390/tlspic.rd
ld/testsuite/ld-s390/tlspic.sd
ld/testsuite/ld-s390/tlspic.td
ld/testsuite/ld-s390/tlspic1.s
ld/testsuite/ld-s390/tlspic1_64.s
ld/testsuite/ld-s390/tlspic2.s
ld/testsuite/ld-s390/tlspic2_64.s
ld/testsuite/ld-s390/tlspic_64.dd
ld/testsuite/ld-s390/tlspic_64.rd
ld/testsuite/ld-s390/tlspic_64.sd
ld/testsuite/ld-s390/tlspic_64.td
ld/testsuite/ld-scripts/align.exp
ld/testsuite/ld-scripts/align.s
ld/testsuite/ld-scripts/align.t
ld/testsuite/ld-scripts/align2.t
ld/testsuite/ld-scripts/align2a.d
ld/testsuite/ld-scripts/align2a.s
ld/testsuite/ld-scripts/align2b.d
ld/testsuite/ld-scripts/align2b.s
ld/testsuite/ld-scripts/align2c.d
ld/testsuite/ld-scripts/align2c.s
ld/testsuite/ld-scripts/assert.exp
ld/testsuite/ld-scripts/assert.s
ld/testsuite/ld-scripts/assert.t
ld/testsuite/ld-scripts/cross1.c
ld/testsuite/ld-scripts/cross1.t
ld/testsuite/ld-scripts/cross2.c
ld/testsuite/ld-scripts/cross2.t
ld/testsuite/ld-scripts/cross3.c
ld/testsuite/ld-scripts/cross3.t
ld/testsuite/ld-scripts/cross4.c
ld/testsuite/ld-scripts/crossref.exp
ld/testsuite/ld-scripts/data.d
ld/testsuite/ld-scripts/data.exp
ld/testsuite/ld-scripts/data.s
ld/testsuite/ld-scripts/data.t
ld/testsuite/ld-scripts/defined.exp
ld/testsuite/ld-scripts/defined.s
ld/testsuite/ld-scripts/defined.t
ld/testsuite/ld-scripts/defined2.d
ld/testsuite/ld-scripts/defined2.t
ld/testsuite/ld-scripts/defined3.d
ld/testsuite/ld-scripts/defined3.t
ld/testsuite/ld-scripts/dynamic-sections-1.s
ld/testsuite/ld-scripts/dynamic-sections-2.s
ld/testsuite/ld-scripts/dynamic-sections.d
ld/testsuite/ld-scripts/dynamic-sections.exp
ld/testsuite/ld-scripts/dynamic-sections.t
ld/testsuite/ld-scripts/empty-aligned.d
ld/testsuite/ld-scripts/empty-aligned.exp
ld/testsuite/ld-scripts/empty-aligned.s
ld/testsuite/ld-scripts/empty-aligned.t
ld/testsuite/ld-scripts/empty-orphan.d
ld/testsuite/ld-scripts/empty-orphan.exp
ld/testsuite/ld-scripts/empty-orphan.s
ld/testsuite/ld-scripts/empty-orphan.t
ld/testsuite/ld-scripts/map-address.d
ld/testsuite/ld-scripts/map-address.exp
ld/testsuite/ld-scripts/map-address.t
ld/testsuite/ld-scripts/memory.t
ld/testsuite/ld-scripts/overlay-size-map.d
ld/testsuite/ld-scripts/overlay-size.d
ld/testsuite/ld-scripts/overlay-size.exp
ld/testsuite/ld-scripts/overlay-size.s
ld/testsuite/ld-scripts/overlay-size.t
ld/testsuite/ld-scripts/phdrs.exp
ld/testsuite/ld-scripts/phdrs.s
ld/testsuite/ld-scripts/phdrs.t
ld/testsuite/ld-scripts/phdrs2.exp
ld/testsuite/ld-scripts/phdrs2.s
ld/testsuite/ld-scripts/phdrs2.t
ld/testsuite/ld-scripts/provide-1.d
ld/testsuite/ld-scripts/provide-1.s
ld/testsuite/ld-scripts/provide-1.t
ld/testsuite/ld-scripts/provide-2.d
ld/testsuite/ld-scripts/provide-2.s
ld/testsuite/ld-scripts/provide-2.t
ld/testsuite/ld-scripts/provide-3.d
ld/testsuite/ld-scripts/provide-3.s
ld/testsuite/ld-scripts/provide-3.t
ld/testsuite/ld-scripts/provide.exp
ld/testsuite/ld-scripts/script.exp
ld/testsuite/ld-scripts/script.s
ld/testsuite/ld-scripts/script.t
ld/testsuite/ld-scripts/scriptm.t
ld/testsuite/ld-scripts/size-1.d
ld/testsuite/ld-scripts/size-1.s
ld/testsuite/ld-scripts/size-1.t
ld/testsuite/ld-scripts/size-2.d
ld/testsuite/ld-scripts/size-2.s
ld/testsuite/ld-scripts/size-2.t
ld/testsuite/ld-scripts/size.exp
ld/testsuite/ld-scripts/sizeof.exp
ld/testsuite/ld-scripts/sizeof.s
ld/testsuite/ld-scripts/sizeof.t
ld/testsuite/ld-scripts/sort.exp
ld/testsuite/ld-scripts/sort_b_a.d
ld/testsuite/ld-scripts/sort_b_a.s
ld/testsuite/ld-scripts/sort_b_a.t
ld/testsuite/ld-scripts/sort_b_a_a-1.d
ld/testsuite/ld-scripts/sort_b_a_a-2.d
ld/testsuite/ld-scripts/sort_b_a_a-3.d
ld/testsuite/ld-scripts/sort_b_a_a.t
ld/testsuite/ld-scripts/sort_b_a_n-1.d
ld/testsuite/ld-scripts/sort_b_a_n-2.d
ld/testsuite/ld-scripts/sort_b_a_n-3.d
ld/testsuite/ld-scripts/sort_b_a_n.t
ld/testsuite/ld-scripts/sort_b_n.d
ld/testsuite/ld-scripts/sort_b_n.s
ld/testsuite/ld-scripts/sort_b_n.t
ld/testsuite/ld-scripts/sort_b_n_a-1.d
ld/testsuite/ld-scripts/sort_b_n_a-2.d
ld/testsuite/ld-scripts/sort_b_n_a-3.d
ld/testsuite/ld-scripts/sort_b_n_a.t
ld/testsuite/ld-scripts/sort_b_n_n-1.d
ld/testsuite/ld-scripts/sort_b_n_n-2.d
ld/testsuite/ld-scripts/sort_b_n_n-3.d
ld/testsuite/ld-scripts/sort_b_n_n.t
ld/testsuite/ld-scripts/sort_n_a-a.s
ld/testsuite/ld-scripts/sort_n_a-b.s
ld/testsuite/ld-scripts/sort_no-1.d
ld/testsuite/ld-scripts/sort_no-2.d
ld/testsuite/ld-scripts/sort_no.t
ld/testsuite/ld-scripts/weak.exp
ld/testsuite/ld-scripts/weak.t
ld/testsuite/ld-scripts/weak1.s
ld/testsuite/ld-scripts/weak2.s
ld/testsuite/ld-selective/1.c
ld/testsuite/ld-selective/2.c
ld/testsuite/ld-selective/3.cc
ld/testsuite/ld-selective/4.cc
ld/testsuite/ld-selective/5.cc
ld/testsuite/ld-selective/keepdot.d
ld/testsuite/ld-selective/keepdot.ld
ld/testsuite/ld-selective/keepdot.s
ld/testsuite/ld-selective/keepdot0.d
ld/testsuite/ld-selective/keepdot0.ld
ld/testsuite/ld-selective/sel-dump.exp
ld/testsuite/ld-selective/selective.exp
ld/testsuite/ld-sh/arch/arch.exp
ld/testsuite/ld-sh/arch/arch_expected.txt
ld/testsuite/ld-sh/arch/sh-dsp.s
ld/testsuite/ld-sh/arch/sh.s
ld/testsuite/ld-sh/arch/sh2.s
ld/testsuite/ld-sh/arch/sh2a-nofpu-or-sh3-nommu.s
ld/testsuite/ld-sh/arch/sh2a-nofpu-or-sh4-nommu-nofpu.s
ld/testsuite/ld-sh/arch/sh2a-nofpu.s
ld/testsuite/ld-sh/arch/sh2a-or-sh3e.s
ld/testsuite/ld-sh/arch/sh2a-or-sh4.s
ld/testsuite/ld-sh/arch/sh2a.s
ld/testsuite/ld-sh/arch/sh2e.s
ld/testsuite/ld-sh/arch/sh3-dsp.s
ld/testsuite/ld-sh/arch/sh3-nommu.s
ld/testsuite/ld-sh/arch/sh3.s
ld/testsuite/ld-sh/arch/sh3e.s
ld/testsuite/ld-sh/arch/sh4-nofpu.s
ld/testsuite/ld-sh/arch/sh4-nommu-nofpu.s
ld/testsuite/ld-sh/arch/sh4.s
ld/testsuite/ld-sh/arch/sh4a-nofpu.s
ld/testsuite/ld-sh/arch/sh4a.s
ld/testsuite/ld-sh/arch/sh4al-dsp.s
ld/testsuite/ld-sh/ld-r-1.d
ld/testsuite/ld-sh/ldr1.s
ld/testsuite/ld-sh/ldr2.s
ld/testsuite/ld-sh/rd-sh.exp
ld/testsuite/ld-sh/refdbg-0-dso.d
ld/testsuite/ld-sh/refdbg-1.d
ld/testsuite/ld-sh/refdbg.s
ld/testsuite/ld-sh/refdbglib.s
ld/testsuite/ld-sh/sh.exp
ld/testsuite/ld-sh/sh1.s
ld/testsuite/ld-sh/sh2.c
ld/testsuite/ld-sh/sh64/abi32.sd
ld/testsuite/ld-sh/sh64/abi32.xd
ld/testsuite/ld-sh/sh64/abi64.sd
ld/testsuite/ld-sh/sh64/abi64.xd
ld/testsuite/ld-sh/sh64/abixx-noexp.sd
ld/testsuite/ld-sh/sh64/cmpct1.sd
ld/testsuite/ld-sh/sh64/cmpct1.xd
ld/testsuite/ld-sh/sh64/crange-1.s
ld/testsuite/ld-sh/sh64/crange-2a.s
ld/testsuite/ld-sh/sh64/crange-2b.s
ld/testsuite/ld-sh/sh64/crange-2c.s
ld/testsuite/ld-sh/sh64/crange-2d.s
ld/testsuite/ld-sh/sh64/crange-2e.s
ld/testsuite/ld-sh/sh64/crange-2f.s
ld/testsuite/ld-sh/sh64/crange-2g.s
ld/testsuite/ld-sh/sh64/crange-2h.s
ld/testsuite/ld-sh/sh64/crange-2i.s
ld/testsuite/ld-sh/sh64/crange1.rd
ld/testsuite/ld-sh/sh64/crange2.rd
ld/testsuite/ld-sh/sh64/crange3-cmpct.rd
ld/testsuite/ld-sh/sh64/crange3-media.rd
ld/testsuite/ld-sh/sh64/crange3.dd
ld/testsuite/ld-sh/sh64/crange3.rd
ld/testsuite/ld-sh/sh64/crangerel1.rd
ld/testsuite/ld-sh/sh64/crangerel2.rd
ld/testsuite/ld-sh/sh64/dlsection-1.s
ld/testsuite/ld-sh/sh64/dlsection.sd
ld/testsuite/ld-sh/sh64/endian.dbd
ld/testsuite/ld-sh/sh64/endian.dld
ld/testsuite/ld-sh/sh64/endian.ld
ld/testsuite/ld-sh/sh64/endian.s
ld/testsuite/ld-sh/sh64/endian.sbd
ld/testsuite/ld-sh/sh64/endian.sld
ld/testsuite/ld-sh/sh64/gotplt.d
ld/testsuite/ld-sh/sh64/gotplt.map
ld/testsuite/ld-sh/sh64/gotplt.s
ld/testsuite/ld-sh/sh64/init-cmpct.d
ld/testsuite/ld-sh/sh64/init-media.d
ld/testsuite/ld-sh/sh64/init.s
ld/testsuite/ld-sh/sh64/init64.d
ld/testsuite/ld-sh/sh64/mix1-noexp.sd
ld/testsuite/ld-sh/sh64/mix1.sd
ld/testsuite/ld-sh/sh64/mix1.xd
ld/testsuite/ld-sh/sh64/mix2-noexp.sd
ld/testsuite/ld-sh/sh64/mix2.sd
ld/testsuite/ld-sh/sh64/mix2.xd
ld/testsuite/ld-sh/sh64/rd-sh64.exp
ld/testsuite/ld-sh/sh64/rel-1.s
ld/testsuite/ld-sh/sh64/rel-2.s
ld/testsuite/ld-sh/sh64/rel32.xd
ld/testsuite/ld-sh/sh64/rel64.xd
ld/testsuite/ld-sh/sh64/relax.exp
ld/testsuite/ld-sh/sh64/relax1.s
ld/testsuite/ld-sh/sh64/relax2.s
ld/testsuite/ld-sh/sh64/relax3.s
ld/testsuite/ld-sh/sh64/relax4.s
ld/testsuite/ld-sh/sh64/reldl-1.s
ld/testsuite/ld-sh/sh64/reldl-2.s
ld/testsuite/ld-sh/sh64/reldl32.rd
ld/testsuite/ld-sh/sh64/reldl64.rd
ld/testsuite/ld-sh/sh64/relfail.exp
ld/testsuite/ld-sh/sh64/relfail.s
ld/testsuite/ld-sh/sh64/sh64-1.s
ld/testsuite/ld-sh/sh64/sh64-2.s
ld/testsuite/ld-sh/sh64/sh64.exp
ld/testsuite/ld-sh/sh64/shcmp-1.s
ld/testsuite/ld-sh/sh64/shdl-1.s
ld/testsuite/ld-sh/sh64/shdl-2.s
ld/testsuite/ld-sh/sh64/shdl32.xd
ld/testsuite/ld-sh/sh64/shdl64.sd
ld/testsuite/ld-sh/sh64/shdl64.xd
ld/testsuite/ld-sh/sh64/shmix-1.s
ld/testsuite/ld-sh/sh64/shmix-2.s
ld/testsuite/ld-sh/sh64/shmix-3.s
ld/testsuite/ld-sh/sh64/stobin-0-dso.d
ld/testsuite/ld-sh/sh64/stobin-1.d
ld/testsuite/ld-sh/sh64/stobin.s
ld/testsuite/ld-sh/sh64/stolib.s
ld/testsuite/ld-sh/shared-1.d
ld/testsuite/ld-sh/shared-2.d
ld/testsuite/ld-sh/start.s
ld/testsuite/ld-sh/sub2l-1.d
ld/testsuite/ld-sh/sub2l.s
ld/testsuite/ld-sh/textrel1.s
ld/testsuite/ld-sh/textrel2.s
ld/testsuite/ld-sh/tlsbin-0-dso.d
ld/testsuite/ld-sh/tlsbin-1.d
ld/testsuite/ld-sh/tlsbin-2.d
ld/testsuite/ld-sh/tlsbin-3.d
ld/testsuite/ld-sh/tlsbin-4.d
ld/testsuite/ld-sh/tlsbin.s
ld/testsuite/ld-sh/tlsbinpic.s
ld/testsuite/ld-sh/tlslib.s
ld/testsuite/ld-sh/tlspic-1.d
ld/testsuite/ld-sh/tlspic-2.d
ld/testsuite/ld-sh/tlspic-3.d
ld/testsuite/ld-sh/tlspic-4.d
ld/testsuite/ld-sh/tlspic1.s
ld/testsuite/ld-sh/tlspic2.s
ld/testsuite/ld-sh/tlstpoff-1.d
ld/testsuite/ld-sh/tlstpoff-2.d
ld/testsuite/ld-sh/tlstpoff1.s
ld/testsuite/ld-sh/tlstpoff2.s
ld/testsuite/ld-sh/weak1.d
ld/testsuite/ld-sh/weak1.s
ld/testsuite/ld-shared/elf-offset.ld
ld/testsuite/ld-shared/main.c
ld/testsuite/ld-shared/sh1.c
ld/testsuite/ld-shared/sh2.c
ld/testsuite/ld-shared/shared.dat
ld/testsuite/ld-shared/shared.exp
ld/testsuite/ld-shared/sun4.dat
ld/testsuite/ld-shared/symbolic.dat
ld/testsuite/ld-shared/xcoff.dat
ld/testsuite/ld-sparc/sparc.exp
ld/testsuite/ld-sparc/tlsg32.s
ld/testsuite/ld-sparc/tlsg32.sd
ld/testsuite/ld-sparc/tlsg64.s
ld/testsuite/ld-sparc/tlsg64.sd
ld/testsuite/ld-sparc/tlslib.s
ld/testsuite/ld-sparc/tlsnopic.s
ld/testsuite/ld-sparc/tlspic.s
ld/testsuite/ld-sparc/tlssunbin32.dd
ld/testsuite/ld-sparc/tlssunbin32.rd
ld/testsuite/ld-sparc/tlssunbin32.s
ld/testsuite/ld-sparc/tlssunbin32.sd
ld/testsuite/ld-sparc/tlssunbin32.td
ld/testsuite/ld-sparc/tlssunbin64.dd
ld/testsuite/ld-sparc/tlssunbin64.rd
ld/testsuite/ld-sparc/tlssunbin64.s
ld/testsuite/ld-sparc/tlssunbin64.sd
ld/testsuite/ld-sparc/tlssunbin64.td
ld/testsuite/ld-sparc/tlssunbinpic32.s
ld/testsuite/ld-sparc/tlssunbinpic64.s
ld/testsuite/ld-sparc/tlssunnopic32.dd
ld/testsuite/ld-sparc/tlssunnopic32.rd
ld/testsuite/ld-sparc/tlssunnopic32.s
ld/testsuite/ld-sparc/tlssunnopic32.sd
ld/testsuite/ld-sparc/tlssunnopic64.dd
ld/testsuite/ld-sparc/tlssunnopic64.rd
ld/testsuite/ld-sparc/tlssunnopic64.s
ld/testsuite/ld-sparc/tlssunnopic64.sd
ld/testsuite/ld-sparc/tlssunpic32.dd
ld/testsuite/ld-sparc/tlssunpic32.rd
ld/testsuite/ld-sparc/tlssunpic32.s
ld/testsuite/ld-sparc/tlssunpic32.sd
ld/testsuite/ld-sparc/tlssunpic32.td
ld/testsuite/ld-sparc/tlssunpic64.dd
ld/testsuite/ld-sparc/tlssunpic64.rd
ld/testsuite/ld-sparc/tlssunpic64.s
ld/testsuite/ld-sparc/tlssunpic64.sd
ld/testsuite/ld-sparc/tlssunpic64.td
ld/testsuite/ld-sparc/vxworks1-lib.dd
ld/testsuite/ld-sparc/vxworks1-lib.nd
ld/testsuite/ld-sparc/vxworks1-lib.rd
ld/testsuite/ld-sparc/vxworks1-lib.s
ld/testsuite/ld-sparc/vxworks1-static.d
ld/testsuite/ld-sparc/vxworks1.dd
ld/testsuite/ld-sparc/vxworks1.ld
ld/testsuite/ld-sparc/vxworks1.rd
ld/testsuite/ld-sparc/vxworks1.s
ld/testsuite/ld-sparc/vxworks2-static.sd
ld/testsuite/ld-sparc/vxworks2.s
ld/testsuite/ld-sparc/vxworks2.sd
ld/testsuite/ld-srec/sr1.c
ld/testsuite/ld-srec/sr2.c
ld/testsuite/ld-srec/sr3.cc
ld/testsuite/ld-srec/srec.exp
ld/testsuite/ld-undefined/undefined.c
ld/testsuite/ld-undefined/undefined.exp
ld/testsuite/ld-undefined/weak-undef.exp
ld/testsuite/ld-undefined/weak-undef.s
ld/testsuite/ld-undefined/weak-undef.t
ld/testsuite/ld-v850/split-lo16.d
ld/testsuite/ld-v850/split-lo16.ld
ld/testsuite/ld-v850/split-lo16.s
ld/testsuite/ld-v850/v850.exp
ld/testsuite/ld-versados/t1-1.ro
ld/testsuite/ld-versados/t1-2.ro
ld/testsuite/ld-versados/t1.ld
ld/testsuite/ld-versados/t1.ook
ld/testsuite/ld-versados/t2-1.ro
ld/testsuite/ld-versados/t2-2.ro
ld/testsuite/ld-versados/t2-3.ro
ld/testsuite/ld-versados/t2.ld
ld/testsuite/ld-versados/t2.ook
ld/testsuite/ld-versados/versados.exp
ld/testsuite/ld-x86-64/abs.d
ld/testsuite/ld-x86-64/pcrel16.d
ld/testsuite/ld-x86-64/pcrel8.d
ld/testsuite/ld-x86-64/tlsbin.dd
ld/testsuite/ld-x86-64/tlsbin.rd
ld/testsuite/ld-x86-64/tlsbin.s
ld/testsuite/ld-x86-64/tlsbin.sd
ld/testsuite/ld-x86-64/tlsbin.td
ld/testsuite/ld-x86-64/tlsbindesc.dd
ld/testsuite/ld-x86-64/tlsbindesc.rd
ld/testsuite/ld-x86-64/tlsbindesc.s
ld/testsuite/ld-x86-64/tlsbindesc.sd
ld/testsuite/ld-x86-64/tlsbindesc.td
ld/testsuite/ld-x86-64/tlsbinpic.s
ld/testsuite/ld-x86-64/tlsdesc.dd
ld/testsuite/ld-x86-64/tlsdesc.pd
ld/testsuite/ld-x86-64/tlsdesc.rd
ld/testsuite/ld-x86-64/tlsdesc.s
ld/testsuite/ld-x86-64/tlsdesc.sd
ld/testsuite/ld-x86-64/tlsdesc.td
ld/testsuite/ld-x86-64/tlsg.s
ld/testsuite/ld-x86-64/tlsg.sd
ld/testsuite/ld-x86-64/tlsgdesc.dd
ld/testsuite/ld-x86-64/tlsgdesc.rd
ld/testsuite/ld-x86-64/tlsgdesc.s
ld/testsuite/ld-x86-64/tlslib.s
ld/testsuite/ld-x86-64/tlspic.dd
ld/testsuite/ld-x86-64/tlspic.rd
ld/testsuite/ld-x86-64/tlspic.sd
ld/testsuite/ld-x86-64/tlspic.td
ld/testsuite/ld-x86-64/tlspic1.s
ld/testsuite/ld-x86-64/tlspic2.s
ld/testsuite/ld-x86-64/x86-64.exp
ld/testsuite/ld-xc16x/absrel.d
ld/testsuite/ld-xc16x/absrel.s
ld/testsuite/ld-xc16x/offset.d
ld/testsuite/ld-xc16x/offset.s
ld/testsuite/ld-xc16x/pcreloc.d
ld/testsuite/ld-xc16x/pcreloc.s
ld/testsuite/ld-xc16x/pcrelocl.d
ld/testsuite/ld-xc16x/xc16x.exp
ld/testsuite/ld-xstormy16/external.s
ld/testsuite/ld-xstormy16/pcrel.d
ld/testsuite/ld-xstormy16/pcrel.s
ld/testsuite/ld-xstormy16/xstormy16.exp
ld/testsuite/ld-xtensa/coalesce.exp
ld/testsuite/ld-xtensa/coalesce.t
ld/testsuite/ld-xtensa/coalesce1.s
ld/testsuite/ld-xtensa/coalesce2.s
ld/testsuite/ld-xtensa/lcall.exp
ld/testsuite/ld-xtensa/lcall.t
ld/testsuite/ld-xtensa/lcall1.s
ld/testsuite/ld-xtensa/lcall2.s
ld/testsuite/lib/ld-lib.exp
opcodes/ChangeLog
opcodes/ChangeLog-0001
opcodes/ChangeLog-0203
opcodes/ChangeLog-2004
opcodes/ChangeLog-2005
opcodes/ChangeLog-9297
opcodes/ChangeLog-9899
opcodes/MAINTAINERS
opcodes/Makefile.am
opcodes/Makefile.in
opcodes/acinclude.m4
opcodes/aclocal.m4
opcodes/alpha-dis.c
opcodes/alpha-opc.c
opcodes/arc-dis.c
opcodes/arc-dis.h
opcodes/arc-ext.c
opcodes/arc-ext.h
opcodes/arc-opc.c
opcodes/arm-dis.c
opcodes/avr-dis.c
opcodes/bfin-dis.c
opcodes/cgen-asm.c
opcodes/cgen-asm.in
opcodes/cgen-bitset.c
opcodes/cgen-dis.c
opcodes/cgen-dis.in
opcodes/cgen-ibld.in
opcodes/cgen-opc.c
opcodes/cgen-ops.h
opcodes/cgen-types.h
opcodes/cgen.sh
opcodes/config.in
opcodes/configure
opcodes/configure.in
opcodes/cris-dis.c
opcodes/cris-opc.c
opcodes/crx-dis.c
opcodes/crx-opc.c
opcodes/d10v-dis.c
opcodes/d10v-opc.c
opcodes/d30v-dis.c
opcodes/d30v-opc.c
opcodes/dep-in.sed
opcodes/dis-buf.c
opcodes/dis-init.c
opcodes/disassemble.c
opcodes/dlx-dis.c
opcodes/fr30-asm.c
opcodes/fr30-desc.c
opcodes/fr30-desc.h
opcodes/fr30-dis.c
opcodes/fr30-ibld.c
opcodes/fr30-opc.c
opcodes/fr30-opc.h
opcodes/frv-asm.c
opcodes/frv-desc.c
opcodes/frv-desc.h
opcodes/frv-dis.c
opcodes/frv-ibld.c
opcodes/frv-opc.c
opcodes/frv-opc.h
opcodes/h8300-dis.c
opcodes/h8500-dis.c
opcodes/h8500-opc.h
opcodes/hppa-dis.c
opcodes/i370-dis.c
opcodes/i370-opc.c
opcodes/i386-dis.c
opcodes/i860-dis.c
opcodes/i960-dis.c
opcodes/ia64-asmtab.c
opcodes/ia64-asmtab.h
opcodes/ia64-dis.c
opcodes/ia64-gen.c
opcodes/ia64-ic.tbl
opcodes/ia64-opc-a.c
opcodes/ia64-opc-b.c
opcodes/ia64-opc-d.c
opcodes/ia64-opc-f.c
opcodes/ia64-opc-i.c
opcodes/ia64-opc-m.c
opcodes/ia64-opc-x.c
opcodes/ia64-opc.c
opcodes/ia64-opc.h
opcodes/ia64-raw.tbl
opcodes/ia64-war.tbl
opcodes/ia64-waw.tbl
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
opcodes/iq2000-asm.c
opcodes/iq2000-desc.c
opcodes/iq2000-desc.h
opcodes/iq2000-dis.c
opcodes/iq2000-ibld.c
opcodes/iq2000-opc.c
opcodes/iq2000-opc.h
opcodes/m10200-dis.c
opcodes/m10200-opc.c
opcodes/m10300-dis.c
opcodes/m10300-opc.c
opcodes/m32c-asm.c
opcodes/m32c-desc.c
opcodes/m32c-desc.h
opcodes/m32c-dis.c
opcodes/m32c-ibld.c
opcodes/m32c-opc.c
opcodes/m32c-opc.h
opcodes/m32r-asm.c
opcodes/m32r-desc.c
opcodes/m32r-desc.h
opcodes/m32r-dis.c
opcodes/m32r-ibld.c
opcodes/m32r-opc.c
opcodes/m32r-opc.h
opcodes/m32r-opinst.c
opcodes/m68hc11-dis.c
opcodes/m68hc11-opc.c
opcodes/m68k-dis.c
opcodes/m68k-opc.c
opcodes/m88k-dis.c
opcodes/makefile.vms
opcodes/maxq-dis.c
opcodes/mcore-dis.c
opcodes/mcore-opc.h
opcodes/mips-dis.c
opcodes/mips-opc.c
opcodes/mips16-opc.c
opcodes/mmix-dis.c
opcodes/mmix-opc.c
opcodes/msp430-dis.c
opcodes/mt-asm.c
opcodes/mt-desc.c
opcodes/mt-desc.h
opcodes/mt-dis.c
opcodes/mt-ibld.c
opcodes/mt-opc.c
opcodes/mt-opc.h
opcodes/ns32k-dis.c
opcodes/openrisc-asm.c
opcodes/openrisc-desc.c
opcodes/openrisc-desc.h
opcodes/openrisc-dis.c
opcodes/openrisc-ibld.c
opcodes/openrisc-opc.c
opcodes/openrisc-opc.h
opcodes/opintl.h
opcodes/or32-dis.c
opcodes/or32-opc.c
opcodes/pdp11-dis.c
opcodes/pdp11-opc.c
opcodes/pj-dis.c
opcodes/pj-opc.c
opcodes/po/.cvsignore
opcodes/po/Make-in
opcodes/po/POTFILES.in
opcodes/po/da.po
opcodes/po/de.po
opcodes/po/es.po
opcodes/po/fi.po
opcodes/po/fr.po
opcodes/po/ga.po
opcodes/po/id.po
opcodes/po/nl.po
opcodes/po/opcodes.pot
opcodes/po/pt_BR.po
opcodes/po/ro.po
opcodes/po/sv.po
opcodes/po/tr.po
opcodes/po/vi.po
opcodes/po/zh_CN.po
opcodes/ppc-dis.c
opcodes/ppc-opc.c
opcodes/s390-dis.c
opcodes/s390-mkopc.c
opcodes/s390-opc.c
opcodes/s390-opc.txt
opcodes/sh-dis.c
opcodes/sh-opc.h
opcodes/sh64-dis.c
opcodes/sh64-opc.c
opcodes/sh64-opc.h
opcodes/sparc-dis.c
opcodes/sparc-opc.c
opcodes/stamp-h.in
opcodes/sysdep.h
opcodes/tic30-dis.c
opcodes/tic4x-dis.c
opcodes/tic54x-dis.c
opcodes/tic54x-opc.c
opcodes/tic80-dis.c
opcodes/tic80-opc.c
opcodes/v850-dis.c
opcodes/v850-opc.c
opcodes/vax-dis.c
opcodes/w65-dis.c
opcodes/w65-opc.h
opcodes/xc16x-asm.c
opcodes/xc16x-desc.c
opcodes/xc16x-desc.h
opcodes/xc16x-dis.c
opcodes/xc16x-ibld.c
opcodes/xc16x-opc.c
opcodes/xc16x-opc.h
opcodes/xstormy16-asm.c
opcodes/xstormy16-desc.c
opcodes/xstormy16-desc.h
opcodes/xstormy16-dis.c
opcodes/xstormy16-ibld.c
opcodes/xstormy16-opc.c
opcodes/xstormy16-opc.h
opcodes/xtensa-dis.c
opcodes/z80-dis.c
opcodes/z8k-dis.c
opcodes/z8k-opc.h
opcodes/z8kgen.c
readline/CHANGELOG
readline/CHANGES
readline/COPYING
readline/ChangeLog.gdb
readline/INSTALL
readline/MANIFEST
readline/Makefile.in
readline/NEWS
readline/README
readline/USAGE
readline/aclocal.m4
readline/ansi_stdlib.h
readline/bind.c
readline/callback.c
readline/chardefs.h
readline/compat.c
readline/complete.c
readline/config.h.in
readline/configure
readline/configure.in
readline/cross-build/cygwin.cache
readline/display.c
readline/doc/ChangeLog.gdb
readline/doc/Makefile.in
readline/doc/fdl.texi
readline/doc/history.3
readline/doc/history.texi
readline/doc/hstech.texi
readline/doc/hsuser.texi
readline/doc/inc-hist.texinfo
readline/doc/readline.3
readline/doc/rlman.texi
readline/doc/rltech.texi
readline/doc/rluser.texi
readline/doc/rluserman.texi
readline/doc/texi2dvi
readline/doc/texi2html
readline/doc/version.texi
readline/emacs_keymap.c
readline/examples/ChangeLog.gdb
readline/examples/Inputrc
readline/examples/Makefile.in
readline/examples/excallback.c
readline/examples/fileman.c
readline/examples/histexamp.c
readline/examples/manexamp.c
readline/examples/readlinebuf.h
readline/examples/rl-fgets.c
readline/examples/rl.c
readline/examples/rlcat.c
readline/examples/rlfe/ChangeLog
readline/examples/rlfe/Makefile.in
readline/examples/rlfe/README
readline/examples/rlfe/config.h.in
readline/examples/rlfe/configure
readline/examples/rlfe/configure.in
readline/examples/rlfe/extern.h
readline/examples/rlfe/os.h
readline/examples/rlfe/pty.c
readline/examples/rlfe/rlfe.c
readline/examples/rlfe/screen.h
readline/examples/rlptytest.c
readline/examples/rltest.c
readline/examples/rlversion.c
readline/funmap.c
readline/histexpand.c
readline/histfile.c
readline/histlib.h
readline/history.c
readline/history.h
readline/histsearch.c
readline/input.c
readline/isearch.c
readline/keymaps.c
readline/keymaps.h
readline/kill.c
readline/macro.c
readline/mbutil.c
readline/misc.c
readline/nls.c
readline/parens.c
readline/posixdir.h
readline/posixjmp.h
readline/posixstat.h
readline/readline.c
readline/readline.h
readline/rlconf.h
readline/rldefs.h
readline/rlmbutil.h
readline/rlprivate.h
readline/rlshell.h
readline/rlstdc.h
readline/rltty.c
readline/rltty.h
readline/rltypedefs.h
readline/rlwinsize.h
readline/savestring.c
readline/search.c
readline/shell.c
readline/shlib/Makefile.in
readline/signals.c
readline/support/config.guess
readline/support/config.rpath
readline/support/config.sub
readline/support/install.sh
readline/support/mkdirs
readline/support/mkdist
readline/support/mkinstalldirs
readline/support/shlib-install
readline/support/shobj-conf
readline/support/wcwidth.c
readline/tcap.h
readline/terminal.c
readline/text.c
readline/tilde.c
readline/tilde.h
readline/undo.c
readline/util.c
readline/vi_keymap.c
readline/vi_mode.c
readline/xmalloc.c
readline/xmalloc.h
sim/ChangeLog
sim/MAINTAINERS
sim/Makefile.in
sim/README-HACKING
sim/arm/COPYING
sim/arm/ChangeLog
sim/arm/Makefile.in
sim/arm/README
sim/arm/acconfig.h
sim/arm/armcopro.c
sim/arm/armdefs.h
sim/arm/armemu.c
sim/arm/armemu.h
sim/arm/armfpe.h
sim/arm/arminit.c
sim/arm/armopts.h
sim/arm/armos.c
sim/arm/armos.h
sim/arm/armrdi.c
sim/arm/armsupp.c
sim/arm/armvirt.c
sim/arm/bag.c
sim/arm/bag.h
sim/arm/communicate.c
sim/arm/communicate.h
sim/arm/config.in
sim/arm/configure
sim/arm/configure.ac
sim/arm/dbg_conf.h
sim/arm/dbg_cp.h
sim/arm/dbg_hif.h
sim/arm/dbg_rdi.h
sim/arm/gdbhost.c
sim/arm/gdbhost.h
sim/arm/iwmmxt.c
sim/arm/iwmmxt.h
sim/arm/kid.c
sim/arm/main.c
sim/arm/maverick.c
sim/arm/parent.c
sim/arm/tconfig.in
sim/arm/thumbemu.c
sim/arm/wrapper.c
sim/common/ChangeLog
sim/common/Make-common.in
sim/common/Makefile.in
sim/common/acconfig.h
sim/common/aclocal.m4
sim/common/callback.c
sim/common/cgen-accfp.c
sim/common/cgen-cpu.h
sim/common/cgen-defs.h
sim/common/cgen-engine.h
sim/common/cgen-fpu.c
sim/common/cgen-fpu.h
sim/common/cgen-mem.h
sim/common/cgen-ops.h
sim/common/cgen-par.c
sim/common/cgen-par.h
sim/common/cgen-run.c
sim/common/cgen-scache.c
sim/common/cgen-scache.h
sim/common/cgen-sim.h
sim/common/cgen-trace.c
sim/common/cgen-trace.h
sim/common/cgen-types.h
sim/common/cgen-utils.c
sim/common/cgen.sh
sim/common/common.m4
sim/common/config.in
sim/common/configure
sim/common/configure.ac
sim/common/dv-core.c
sim/common/dv-glue.c
sim/common/dv-pal.c
sim/common/dv-sockser.c
sim/common/dv-sockser.h
sim/common/gdbinit.in
sim/common/genmloop.sh
sim/common/gennltvals.sh
sim/common/gentmap.c
sim/common/gentvals.sh
sim/common/hw-alloc.c
sim/common/hw-alloc.h
sim/common/hw-base.c
sim/common/hw-base.h
sim/common/hw-device.c
sim/common/hw-device.h
sim/common/hw-events.c
sim/common/hw-events.h
sim/common/hw-handles.c
sim/common/hw-handles.h
sim/common/hw-instances.c
sim/common/hw-instances.h
sim/common/hw-main.h
sim/common/hw-ports.c
sim/common/hw-ports.h
sim/common/hw-properties.c
sim/common/hw-properties.h
sim/common/hw-tree.c
sim/common/hw-tree.h
sim/common/nltvals.def
sim/common/nrun.c
sim/common/run-sim.h
sim/common/run.1
sim/common/run.c
sim/common/sim-abort.c
sim/common/sim-alu.h
sim/common/sim-arange.c
sim/common/sim-arange.h
sim/common/sim-assert.h
sim/common/sim-base.h
sim/common/sim-basics.h
sim/common/sim-bits.c
sim/common/sim-bits.h
sim/common/sim-config.c
sim/common/sim-config.h
sim/common/sim-core.c
sim/common/sim-core.h
sim/common/sim-cpu.c
sim/common/sim-cpu.h
sim/common/sim-endian.c
sim/common/sim-endian.h
sim/common/sim-engine.c
sim/common/sim-engine.h
sim/common/sim-events.c
sim/common/sim-events.h
sim/common/sim-fpu.c
sim/common/sim-fpu.h
sim/common/sim-hload.c
sim/common/sim-hrw.c
sim/common/sim-hw.c
sim/common/sim-hw.h
sim/common/sim-info.c
sim/common/sim-inline.c
sim/common/sim-inline.h
sim/common/sim-io.c
sim/common/sim-io.h
sim/common/sim-load.c
sim/common/sim-memopt.c
sim/common/sim-memopt.h
sim/common/sim-model.c
sim/common/sim-model.h
sim/common/sim-module.c
sim/common/sim-module.h
sim/common/sim-n-bits.h
sim/common/sim-n-core.h
sim/common/sim-n-endian.h
sim/common/sim-options.c
sim/common/sim-options.h
sim/common/sim-profile.c
sim/common/sim-profile.h
sim/common/sim-reason.c
sim/common/sim-reg.c
sim/common/sim-resume.c
sim/common/sim-run.c
sim/common/sim-signal.c
sim/common/sim-signal.h
sim/common/sim-stop.c
sim/common/sim-trace.c
sim/common/sim-trace.h
sim/common/sim-types.h
sim/common/sim-utils.c
sim/common/sim-utils.h
sim/common/sim-watch.c
sim/common/sim-watch.h
sim/common/syscall.c
sim/common/tconfig.in
sim/configure
sim/configure.ac
sim/cris/Makefile.in
sim/cris/arch.c
sim/cris/arch.h
sim/cris/config.in
sim/cris/configure
sim/cris/configure.ac
sim/cris/cpuall.h
sim/cris/cpuv10.c
sim/cris/cpuv10.h
sim/cris/cpuv32.c
sim/cris/cpuv32.h
sim/cris/cris-desc.c
sim/cris/cris-desc.h
sim/cris/cris-opc.h
sim/cris/cris-sim.h
sim/cris/cris-tmpl.c
sim/cris/crisv10f.c
sim/cris/crisv32f.c
sim/cris/decodev10.c
sim/cris/decodev10.h
sim/cris/decodev32.c
sim/cris/decodev32.h
sim/cris/devices.c
sim/cris/dv-cris.c
sim/cris/dv-rv.c
sim/cris/mloop.in
sim/cris/modelv10.c
sim/cris/modelv32.c
sim/cris/rvdummy.c
sim/cris/semcrisv10f-switch.c
sim/cris/semcrisv32f-switch.c
sim/cris/sim-if.c
sim/cris/sim-main.h
sim/cris/tconfig.in
sim/cris/traps.c
sim/d10v/ChangeLog
sim/d10v/Makefile.in
sim/d10v/acconfig.h
sim/d10v/config.in
sim/d10v/configure
sim/d10v/configure.ac
sim/d10v/d10v_sim.h
sim/d10v/endian.c
sim/d10v/gencode.c
sim/d10v/interp.c
sim/d10v/simops.c
sim/erc32/ChangeLog
sim/erc32/Makefile.in
sim/erc32/NEWS
sim/erc32/README.erc32
sim/erc32/README.gdb
sim/erc32/README.sis
sim/erc32/acconfig.h
sim/erc32/config.in
sim/erc32/configure
sim/erc32/configure.ac
sim/erc32/end.c
sim/erc32/erc32.c
sim/erc32/exec.c
sim/erc32/float.c
sim/erc32/func.c
sim/erc32/help.c
sim/erc32/interf.c
sim/erc32/sis.c
sim/erc32/sis.h
sim/erc32/startsim
sim/frv/ChangeLog
sim/frv/Makefile.in
sim/frv/README
sim/frv/TODO
sim/frv/arch.c
sim/frv/arch.h
sim/frv/cache.c
sim/frv/cache.h
sim/frv/config.in
sim/frv/configure
sim/frv/configure.ac
sim/frv/cpu.c
sim/frv/cpu.h
sim/frv/cpuall.h
sim/frv/decode.c
sim/frv/decode.h
sim/frv/devices.c
sim/frv/frv-sim.h
sim/frv/frv.c
sim/frv/interrupts.c
sim/frv/memory.c
sim/frv/mloop.in
sim/frv/model.c
sim/frv/options.c
sim/frv/pipeline.c
sim/frv/profile-fr400.c
sim/frv/profile-fr400.h
sim/frv/profile-fr450.c
sim/frv/profile-fr500.c
sim/frv/profile-fr500.h
sim/frv/profile-fr550.c
sim/frv/profile-fr550.h
sim/frv/profile.c
sim/frv/profile.h
sim/frv/registers.c
sim/frv/registers.h
sim/frv/reset.c
sim/frv/sem.c
sim/frv/sim-if.c
sim/frv/sim-main.h
sim/frv/tconfig.in
sim/frv/traps.c
sim/h8300/ChangeLog
sim/h8300/Makefile.in
sim/h8300/acconfig.h
sim/h8300/compile.c
sim/h8300/config.in
sim/h8300/configure
sim/h8300/configure.ac
sim/h8300/inst.h
sim/h8300/sim-main.h
sim/h8300/tconfig.in
sim/h8300/writecode.c
sim/igen/ChangeLog
sim/igen/Makefile.in
sim/igen/acconfig.h
sim/igen/compare_igen_models
sim/igen/config.in
sim/igen/configure
sim/igen/configure.ac
sim/igen/filter.c
sim/igen/filter.h
sim/igen/filter_host.c
sim/igen/filter_host.h
sim/igen/gen-engine.c
sim/igen/gen-engine.h
sim/igen/gen-icache.c
sim/igen/gen-icache.h
sim/igen/gen-idecode.c
sim/igen/gen-idecode.h
sim/igen/gen-itable.c
sim/igen/gen-itable.h
sim/igen/gen-model.c
sim/igen/gen-model.h
sim/igen/gen-semantics.c
sim/igen/gen-semantics.h
sim/igen/gen-support.c
sim/igen/gen-support.h
sim/igen/gen.c
sim/igen/gen.h
sim/igen/igen.c
sim/igen/igen.h
sim/igen/ld-cache.c
sim/igen/ld-cache.h
sim/igen/ld-decode.c
sim/igen/ld-decode.h
sim/igen/ld-insn.c
sim/igen/ld-insn.h
sim/igen/lf.c
sim/igen/lf.h
sim/igen/misc.c
sim/igen/misc.h
sim/igen/table.c
sim/igen/table.h
sim/iq2000/ChangeLog
sim/iq2000/Makefile.in
sim/iq2000/acconfig.h
sim/iq2000/arch.c
sim/iq2000/arch.h
sim/iq2000/config.in
sim/iq2000/configure
sim/iq2000/configure.ac
sim/iq2000/cpu.c
sim/iq2000/cpu.h
sim/iq2000/cpuall.h
sim/iq2000/decode.c
sim/iq2000/decode.h
sim/iq2000/iq2000-sim.h
sim/iq2000/iq2000.c
sim/iq2000/mloop.in
sim/iq2000/model.c
sim/iq2000/sem-switch.c
sim/iq2000/sem.c
sim/iq2000/sim-if.c
sim/iq2000/sim-main.h
sim/iq2000/tconfig.in
sim/m32c/ChangeLog
sim/m32c/Makefile.in
sim/m32c/blinky.S
sim/m32c/config.in
sim/m32c/configure
sim/m32c/configure.in
sim/m32c/cpu.h
sim/m32c/gdb-if.c
sim/m32c/gloss.S
sim/m32c/int.c
sim/m32c/int.h
sim/m32c/load.c
sim/m32c/load.h
sim/m32c/m32c.opc
sim/m32c/main.c
sim/m32c/mem.c
sim/m32c/mem.h
sim/m32c/misc.c
sim/m32c/misc.h
sim/m32c/opc2c.c
sim/m32c/r8c.opc
sim/m32c/reg.c
sim/m32c/safe-fgets.c
sim/m32c/safe-fgets.h
sim/m32c/sample.S
sim/m32c/sample.ld
sim/m32c/sample2.c
sim/m32c/srcdest.c
sim/m32c/syscall.h
sim/m32c/syscalls.c
sim/m32c/syscalls.h
sim/m32c/trace.c
sim/m32c/trace.h
sim/m32r/ChangeLog
sim/m32r/Makefile.in
sim/m32r/README
sim/m32r/TODO
sim/m32r/acconfig.h
sim/m32r/arch.c
sim/m32r/arch.h
sim/m32r/config.in
sim/m32r/configure
sim/m32r/configure.ac
sim/m32r/cpu.c
sim/m32r/cpu.h
sim/m32r/cpu2.c
sim/m32r/cpu2.h
sim/m32r/cpuall.h
sim/m32r/cpux.c
sim/m32r/cpux.h
sim/m32r/decode.c
sim/m32r/decode.h
sim/m32r/decode2.c
sim/m32r/decode2.h
sim/m32r/decodex.c
sim/m32r/decodex.h
sim/m32r/devices.c
sim/m32r/m32r-sim.h
sim/m32r/m32r.c
sim/m32r/m32r2.c
sim/m32r/m32rx.c
sim/m32r/mloop.in
sim/m32r/mloop2.in
sim/m32r/mloopx.in
sim/m32r/model.c
sim/m32r/model2.c
sim/m32r/modelx.c
sim/m32r/sem-switch.c
sim/m32r/sem.c
sim/m32r/sem2-switch.c
sim/m32r/semx-switch.c
sim/m32r/sim-if.c
sim/m32r/sim-main.h
sim/m32r/syscall.h
sim/m32r/tconfig.in
sim/m32r/traps-linux.c
sim/m32r/traps.c
sim/m68hc11/ChangeLog
sim/m68hc11/Makefile.in
sim/m68hc11/config.in
sim/m68hc11/configure
sim/m68hc11/configure.ac
sim/m68hc11/dv-m68hc11.c
sim/m68hc11/dv-m68hc11eepr.c
sim/m68hc11/dv-m68hc11sio.c
sim/m68hc11/dv-m68hc11spi.c
sim/m68hc11/dv-m68hc11tim.c
sim/m68hc11/dv-nvram.c
sim/m68hc11/emulos.c
sim/m68hc11/gencode.c
sim/m68hc11/interp.c
sim/m68hc11/interrupts.c
sim/m68hc11/interrupts.h
sim/m68hc11/m68hc11_sim.c
sim/m68hc11/sim-main.h
sim/mcore/ChangeLog
sim/mcore/Makefile.in
sim/mcore/config.in
sim/mcore/configure
sim/mcore/configure.ac
sim/mcore/interp.c
sim/mcore/sysdep.h
sim/mips/ChangeLog
sim/mips/Makefile.in
sim/mips/acconfig.h
sim/mips/config.in
sim/mips/configure
sim/mips/configure.ac
sim/mips/cp1.c
sim/mips/cp1.h
sim/mips/dsp.c
sim/mips/dsp.igen
sim/mips/dv-tx3904cpu.c
sim/mips/dv-tx3904irc.c
sim/mips/dv-tx3904sio.c
sim/mips/dv-tx3904tmr.c
sim/mips/interp.c
sim/mips/m16.dc
sim/mips/m16.igen
sim/mips/m16e.igen
sim/mips/m16run.c
sim/mips/mdmx.c
sim/mips/mdmx.igen
sim/mips/mips.dc
sim/mips/mips.igen
sim/mips/mips3264r2.igen
sim/mips/mips3d.igen
sim/mips/sb1.igen
sim/mips/sim-main.c
sim/mips/sim-main.h
sim/mips/tconfig.in
sim/mips/tx.igen
sim/mips/vr.igen
sim/mn10300/ChangeLog
sim/mn10300/Makefile.in
sim/mn10300/acconfig.h
sim/mn10300/am33-2.igen
sim/mn10300/am33.igen
sim/mn10300/config.in
sim/mn10300/configure
sim/mn10300/configure.ac
sim/mn10300/dv-mn103cpu.c
sim/mn10300/dv-mn103int.c
sim/mn10300/dv-mn103iop.c
sim/mn10300/dv-mn103ser.c
sim/mn10300/dv-mn103tim.c
sim/mn10300/interp.c
sim/mn10300/mn10300.dc
sim/mn10300/mn10300.igen
sim/mn10300/mn10300_sim.h
sim/mn10300/op_utils.c
sim/mn10300/sim-main.c
sim/mn10300/sim-main.h
sim/mn10300/tconfig.in
sim/ppc/.gdbinit
sim/ppc/BUGS
sim/ppc/COPYING
sim/ppc/COPYING.LIB
sim/ppc/ChangeLog
sim/ppc/ChangeLog.00
sim/ppc/INSTALL
sim/ppc/Makefile.in
sim/ppc/README
sim/ppc/RUN
sim/ppc/acconfig.h
sim/ppc/aclocal.m4
sim/ppc/altivec.igen
sim/ppc/altivec_expression.h
sim/ppc/altivec_registers.h
sim/ppc/basics.h
sim/ppc/bits.c
sim/ppc/bits.h
sim/ppc/cap.c
sim/ppc/cap.h
sim/ppc/config.in
sim/ppc/configure
sim/ppc/configure.ac
sim/ppc/corefile-n.h
sim/ppc/corefile.c
sim/ppc/corefile.h
sim/ppc/cpu.c
sim/ppc/cpu.h
sim/ppc/dc-complex
sim/ppc/dc-simple
sim/ppc/dc-stupid
sim/ppc/dc-test.01
sim/ppc/dc-test.02
sim/ppc/debug.c
sim/ppc/debug.h
sim/ppc/device.c
sim/ppc/device.h
sim/ppc/device_table.c
sim/ppc/device_table.h
sim/ppc/dgen.c
sim/ppc/double.c
sim/ppc/dp-bit.c
sim/ppc/e500.igen
sim/ppc/e500_expression.h
sim/ppc/e500_registers.h
sim/ppc/emul_bugapi.c
sim/ppc/emul_bugapi.h
sim/ppc/emul_chirp.c
sim/ppc/emul_chirp.h
sim/ppc/emul_generic.c
sim/ppc/emul_generic.h
sim/ppc/emul_netbsd.c
sim/ppc/emul_netbsd.h
sim/ppc/emul_unix.c
sim/ppc/emul_unix.h
sim/ppc/events.c
sim/ppc/events.h
sim/ppc/filter.c
sim/ppc/filter.h
sim/ppc/filter_filename.c
sim/ppc/filter_filename.h
sim/ppc/gdb-sim.c
sim/ppc/gen-icache.c
sim/ppc/gen-icache.h
sim/ppc/gen-idecode.c
sim/ppc/gen-idecode.h
sim/ppc/gen-itable.c
sim/ppc/gen-itable.h
sim/ppc/gen-model.c
sim/ppc/gen-model.h
sim/ppc/gen-semantics.c
sim/ppc/gen-semantics.h
sim/ppc/gen-support.c
sim/ppc/gen-support.h
sim/ppc/hw_com.c
sim/ppc/hw_core.c
sim/ppc/hw_cpu.c
sim/ppc/hw_cpu.h
sim/ppc/hw_disk.c
sim/ppc/hw_eeprom.c
sim/ppc/hw_glue.c
sim/ppc/hw_htab.c
sim/ppc/hw_ide.c
sim/ppc/hw_init.c
sim/ppc/hw_iobus.c
sim/ppc/hw_memory.c
sim/ppc/hw_nvram.c
sim/ppc/hw_opic.c
sim/ppc/hw_pal.c
sim/ppc/hw_phb.c
sim/ppc/hw_phb.h
sim/ppc/hw_register.c
sim/ppc/hw_trace.c
sim/ppc/hw_vm.c
sim/ppc/idecode_branch.h
sim/ppc/idecode_expression.h
sim/ppc/idecode_fields.h
sim/ppc/igen.c
sim/ppc/igen.h
sim/ppc/inline.c
sim/ppc/inline.h
sim/ppc/interrupts.c
sim/ppc/interrupts.h
sim/ppc/ld-cache.c
sim/ppc/ld-cache.h
sim/ppc/ld-decode.c
sim/ppc/ld-decode.h
sim/ppc/ld-insn.c
sim/ppc/ld-insn.h
sim/ppc/lf.c
sim/ppc/lf.h
sim/ppc/main.c
sim/ppc/misc.c
sim/ppc/misc.h
sim/ppc/mon.c
sim/ppc/mon.h
sim/ppc/options.c
sim/ppc/options.h
sim/ppc/os_emul.c
sim/ppc/os_emul.h
sim/ppc/pk_disklabel.c
sim/ppc/ppc-instructions
sim/ppc/ppc-spr-table
sim/ppc/ppc.mt
sim/ppc/psim.c
sim/ppc/psim.h
sim/ppc/psim.texinfo
sim/ppc/registers.c
sim/ppc/registers.h
sim/ppc/sim-endian-n.h
sim/ppc/sim-endian.c
sim/ppc/sim-endian.h
sim/ppc/sim-main.h
sim/ppc/sim_callbacks.h
sim/ppc/sim_calls.c
sim/ppc/std-config.h
sim/ppc/table.c
sim/ppc/table.h
sim/ppc/tree.c
sim/ppc/tree.h
sim/ppc/vm.c
sim/ppc/vm.h
sim/ppc/vm_n.h
sim/ppc/words.h
sim/sh/ChangeLog
sim/sh/Makefile.in
sim/sh/acconfig.h
sim/sh/config.in
sim/sh/configure
sim/sh/configure.ac
sim/sh/gencode.c
sim/sh/interp.c
sim/sh/syscall.h
sim/sh/tconfig.in
sim/sh64/ChangeLog
sim/sh64/Makefile.in
sim/sh64/arch.c
sim/sh64/arch.h
sim/sh64/config.in
sim/sh64/configure
sim/sh64/configure.ac
sim/sh64/cpu.c
sim/sh64/cpu.h
sim/sh64/cpuall.h
sim/sh64/decode-compact.c
sim/sh64/decode-compact.h
sim/sh64/decode-media.c
sim/sh64/decode-media.h
sim/sh64/decode.h
sim/sh64/defs-compact.h
sim/sh64/defs-media.h
sim/sh64/eng-compact.h
sim/sh64/eng-media.h
sim/sh64/eng.h
sim/sh64/mloop-compact.c
sim/sh64/mloop-media.c
sim/sh64/sem-compact-switch.c
sim/sh64/sem-compact.c
sim/sh64/sem-media-switch.c
sim/sh64/sem-media.c
sim/sh64/sh-desc.c
sim/sh64/sh-desc.h
sim/sh64/sh-opc.h
sim/sh64/sh64-sim.h
sim/sh64/sh64.c
sim/sh64/sim-if.c
sim/sh64/sim-main.h
sim/sh64/tconfig.in
sim/testsuite/ChangeLog
sim/testsuite/Makefile.in
sim/testsuite/common/Make-common.in
sim/testsuite/common/Makefile.in
sim/testsuite/common/alu-n-tst.h
sim/testsuite/common/alu-tst.c
sim/testsuite/common/bits-gen.c
sim/testsuite/common/bits-tst.c
sim/testsuite/common/fpu-tst.c
sim/testsuite/config/default.exp
sim/testsuite/configure
sim/testsuite/configure.ac
sim/testsuite/d10v-elf/ChangeLog
sim/testsuite/d10v-elf/Makefile.in
sim/testsuite/d10v-elf/configure
sim/testsuite/d10v-elf/configure.ac
sim/testsuite/d10v-elf/exit47.s
sim/testsuite/d10v-elf/hello.s
sim/testsuite/d10v-elf/loop.s
sim/testsuite/d10v-elf/t-ae-ld-d.s
sim/testsuite/d10v-elf/t-ae-ld-i.s
sim/testsuite/d10v-elf/t-ae-ld-id.s
sim/testsuite/d10v-elf/t-ae-ld-im.s
sim/testsuite/d10v-elf/t-ae-ld-ip.s
sim/testsuite/d10v-elf/t-ae-ld2w-d.s
sim/testsuite/d10v-elf/t-ae-ld2w-i.s
sim/testsuite/d10v-elf/t-ae-ld2w-id.s
sim/testsuite/d10v-elf/t-ae-ld2w-im.s
sim/testsuite/d10v-elf/t-ae-ld2w-ip.s
sim/testsuite/d10v-elf/t-ae-st-d.s
sim/testsuite/d10v-elf/t-ae-st-i.s
sim/testsuite/d10v-elf/t-ae-st-id.s
sim/testsuite/d10v-elf/t-ae-st-im.s
sim/testsuite/d10v-elf/t-ae-st-ip.s
sim/testsuite/d10v-elf/t-ae-st-is.s
sim/testsuite/d10v-elf/t-ae-st2w-d.s
sim/testsuite/d10v-elf/t-ae-st2w-i.s
sim/testsuite/d10v-elf/t-ae-st2w-id.s
sim/testsuite/d10v-elf/t-ae-st2w-im.s
sim/testsuite/d10v-elf/t-ae-st2w-ip.s
sim/testsuite/d10v-elf/t-ae-st2w-is.s
sim/testsuite/d10v-elf/t-dbt.s
sim/testsuite/d10v-elf/t-ld-st.s
sim/testsuite/d10v-elf/t-mac.s
sim/testsuite/d10v-elf/t-macros.i
sim/testsuite/d10v-elf/t-mod-ld-pre.s
sim/testsuite/d10v-elf/t-msbu.s
sim/testsuite/d10v-elf/t-mulxu.s
sim/testsuite/d10v-elf/t-mvtac.s
sim/testsuite/d10v-elf/t-mvtc.s
sim/testsuite/d10v-elf/t-rac.s
sim/testsuite/d10v-elf/t-rachi.s
sim/testsuite/d10v-elf/t-rdt.s
sim/testsuite/d10v-elf/t-rep.s
sim/testsuite/d10v-elf/t-rie-xx.s
sim/testsuite/d10v-elf/t-rte.s
sim/testsuite/d10v-elf/t-sac.s
sim/testsuite/d10v-elf/t-sachi.s
sim/testsuite/d10v-elf/t-sadd.s
sim/testsuite/d10v-elf/t-slae.s
sim/testsuite/d10v-elf/t-sp.s
sim/testsuite/d10v-elf/t-sub.s
sim/testsuite/d10v-elf/t-sub2w.s
sim/testsuite/d10v-elf/t-subi.s
sim/testsuite/d10v-elf/t-trap.s
sim/testsuite/frv-elf/ChangeLog
sim/testsuite/frv-elf/Makefile.in
sim/testsuite/frv-elf/cache.s
sim/testsuite/frv-elf/configure
sim/testsuite/frv-elf/configure.ac
sim/testsuite/frv-elf/exit47.s
sim/testsuite/frv-elf/grloop.s
sim/testsuite/frv-elf/hello.s
sim/testsuite/frv-elf/loop.s
sim/testsuite/lib/sim-defs.exp
sim/testsuite/m32r-elf/ChangeLog
sim/testsuite/m32r-elf/Makefile.in
sim/testsuite/m32r-elf/configure
sim/testsuite/m32r-elf/configure.ac
sim/testsuite/m32r-elf/exit47.s
sim/testsuite/m32r-elf/hello.s
sim/testsuite/m32r-elf/loop.s
sim/testsuite/mips64el-elf/ChangeLog
sim/testsuite/mips64el-elf/Makefile.in
sim/testsuite/mips64el-elf/configure
sim/testsuite/mips64el-elf/configure.ac
sim/testsuite/sim/arm/adc.cgs
sim/testsuite/sim/arm/add.cgs
sim/testsuite/sim/arm/allinsn.exp
sim/testsuite/sim/arm/and.cgs
sim/testsuite/sim/arm/b.cgs
sim/testsuite/sim/arm/bic.cgs
sim/testsuite/sim/arm/bl.cgs
sim/testsuite/sim/arm/bx.cgs
sim/testsuite/sim/arm/cmn.cgs
sim/testsuite/sim/arm/cmp.cgs
sim/testsuite/sim/arm/eor.cgs
sim/testsuite/sim/arm/hello.ms
sim/testsuite/sim/arm/iwmmxt/iwmmxt.exp
sim/testsuite/sim/arm/iwmmxt/tbcst.cgs
sim/testsuite/sim/arm/iwmmxt/testutils.inc
sim/testsuite/sim/arm/iwmmxt/textrm.cgs
sim/testsuite/sim/arm/iwmmxt/tinsr.cgs
sim/testsuite/sim/arm/iwmmxt/tmia.cgs
sim/testsuite/sim/arm/iwmmxt/tmiaph.cgs
sim/testsuite/sim/arm/iwmmxt/tmiaxy.cgs
sim/testsuite/sim/arm/iwmmxt/tmovmsk.cgs
sim/testsuite/sim/arm/iwmmxt/wacc.cgs
sim/testsuite/sim/arm/iwmmxt/wadd.cgs
sim/testsuite/sim/arm/iwmmxt/waligni.cgs
sim/testsuite/sim/arm/iwmmxt/walignr.cgs
sim/testsuite/sim/arm/iwmmxt/wand.cgs
sim/testsuite/sim/arm/iwmmxt/wandn.cgs
sim/testsuite/sim/arm/iwmmxt/wavg2.cgs
sim/testsuite/sim/arm/iwmmxt/wcmpeq.cgs
sim/testsuite/sim/arm/iwmmxt/wcmpgt.cgs
sim/testsuite/sim/arm/iwmmxt/wmac.cgs
sim/testsuite/sim/arm/iwmmxt/wmadd.cgs
sim/testsuite/sim/arm/iwmmxt/wmax.cgs
sim/testsuite/sim/arm/iwmmxt/wmin.cgs
sim/testsuite/sim/arm/iwmmxt/wmov.cgs
sim/testsuite/sim/arm/iwmmxt/wmul.cgs
sim/testsuite/sim/arm/iwmmxt/wor.cgs
sim/testsuite/sim/arm/iwmmxt/wpack.cgs
sim/testsuite/sim/arm/iwmmxt/wror.cgs
sim/testsuite/sim/arm/iwmmxt/wsad.cgs
sim/testsuite/sim/arm/iwmmxt/wshufh.cgs
sim/testsuite/sim/arm/iwmmxt/wsll.cgs
sim/testsuite/sim/arm/iwmmxt/wsra.cgs
sim/testsuite/sim/arm/iwmmxt/wsrl.cgs
sim/testsuite/sim/arm/iwmmxt/wsub.cgs
sim/testsuite/sim/arm/iwmmxt/wunpckeh.cgs
sim/testsuite/sim/arm/iwmmxt/wunpckel.cgs
sim/testsuite/sim/arm/iwmmxt/wunpckih.cgs
sim/testsuite/sim/arm/iwmmxt/wunpckil.cgs
sim/testsuite/sim/arm/iwmmxt/wxor.cgs
sim/testsuite/sim/arm/iwmmxt/wzero.cgs
sim/testsuite/sim/arm/ldm.cgs
sim/testsuite/sim/arm/ldr.cgs
sim/testsuite/sim/arm/ldrb.cgs
sim/testsuite/sim/arm/ldrh.cgs
sim/testsuite/sim/arm/ldrsb.cgs
sim/testsuite/sim/arm/ldrsh.cgs
sim/testsuite/sim/arm/misaligned1.ms
sim/testsuite/sim/arm/misaligned2.ms
sim/testsuite/sim/arm/misaligned3.ms
sim/testsuite/sim/arm/misc.exp
sim/testsuite/sim/arm/mla.cgs
sim/testsuite/sim/arm/mov.cgs
sim/testsuite/sim/arm/mrs.cgs
sim/testsuite/sim/arm/msr.cgs
sim/testsuite/sim/arm/mul.cgs
sim/testsuite/sim/arm/mvn.cgs
sim/testsuite/sim/arm/orr.cgs
sim/testsuite/sim/arm/rsb.cgs
sim/testsuite/sim/arm/rsc.cgs
sim/testsuite/sim/arm/sbc.cgs
sim/testsuite/sim/arm/smlal.cgs
sim/testsuite/sim/arm/smull.cgs
sim/testsuite/sim/arm/stm.cgs
sim/testsuite/sim/arm/str.cgs
sim/testsuite/sim/arm/strb.cgs
sim/testsuite/sim/arm/strh.cgs
sim/testsuite/sim/arm/sub.cgs
sim/testsuite/sim/arm/swi.cgs
sim/testsuite/sim/arm/swp.cgs
sim/testsuite/sim/arm/swpb.cgs
sim/testsuite/sim/arm/teq.cgs
sim/testsuite/sim/arm/testutils.inc
sim/testsuite/sim/arm/thumb/adc.cgs
sim/testsuite/sim/arm/thumb/add-hd-hs.cgs
sim/testsuite/sim/arm/thumb/add-hd-rs.cgs
sim/testsuite/sim/arm/thumb/add-rd-hs.cgs
sim/testsuite/sim/arm/thumb/add-sp.cgs
sim/testsuite/sim/arm/thumb/add.cgs
sim/testsuite/sim/arm/thumb/addi.cgs
sim/testsuite/sim/arm/thumb/addi8.cgs
sim/testsuite/sim/arm/thumb/allthumb.exp
sim/testsuite/sim/arm/thumb/and.cgs
sim/testsuite/sim/arm/thumb/asr.cgs
sim/testsuite/sim/arm/thumb/b.cgs
sim/testsuite/sim/arm/thumb/bcc.cgs
sim/testsuite/sim/arm/thumb/bcs.cgs
sim/testsuite/sim/arm/thumb/beq.cgs
sim/testsuite/sim/arm/thumb/bge.cgs
sim/testsuite/sim/arm/thumb/bgt.cgs
sim/testsuite/sim/arm/thumb/bhi.cgs
sim/testsuite/sim/arm/thumb/bic.cgs
sim/testsuite/sim/arm/thumb/bl-hi.cgs
sim/testsuite/sim/arm/thumb/bl-lo.cgs
sim/testsuite/sim/arm/thumb/ble.cgs
sim/testsuite/sim/arm/thumb/bls.cgs
sim/testsuite/sim/arm/thumb/blt.cgs
sim/testsuite/sim/arm/thumb/bmi.cgs
sim/testsuite/sim/arm/thumb/bne.cgs
sim/testsuite/sim/arm/thumb/bpl.cgs
sim/testsuite/sim/arm/thumb/bvc.cgs
sim/testsuite/sim/arm/thumb/bvs.cgs
sim/testsuite/sim/arm/thumb/bx-hs.cgs
sim/testsuite/sim/arm/thumb/bx-rs.cgs
sim/testsuite/sim/arm/thumb/cmn.cgs
sim/testsuite/sim/arm/thumb/cmp-hd-hs.cgs
sim/testsuite/sim/arm/thumb/cmp-hd-rs.cgs
sim/testsuite/sim/arm/thumb/cmp-rd-hs.cgs
sim/testsuite/sim/arm/thumb/cmp.cgs
sim/testsuite/sim/arm/thumb/eor.cgs
sim/testsuite/sim/arm/thumb/lda-pc.cgs
sim/testsuite/sim/arm/thumb/lda-sp.cgs
sim/testsuite/sim/arm/thumb/ldmia.cgs
sim/testsuite/sim/arm/thumb/ldr-imm.cgs
sim/testsuite/sim/arm/thumb/ldr-pc.cgs
sim/testsuite/sim/arm/thumb/ldr-sprel.cgs
sim/testsuite/sim/arm/thumb/ldr.cgs
sim/testsuite/sim/arm/thumb/ldrb-imm.cgs
sim/testsuite/sim/arm/thumb/ldrb.cgs
sim/testsuite/sim/arm/thumb/ldrh-imm.cgs
sim/testsuite/sim/arm/thumb/ldrh.cgs
sim/testsuite/sim/arm/thumb/ldsb.cgs
sim/testsuite/sim/arm/thumb/ldsh.cgs
sim/testsuite/sim/arm/thumb/lsl.cgs
sim/testsuite/sim/arm/thumb/lsr.cgs
sim/testsuite/sim/arm/thumb/mov-hd-hs.cgs
sim/testsuite/sim/arm/thumb/mov-hd-rs.cgs
sim/testsuite/sim/arm/thumb/mov-rd-hs.cgs
sim/testsuite/sim/arm/thumb/mov.cgs
sim/testsuite/sim/arm/thumb/mul.cgs
sim/testsuite/sim/arm/thumb/mvn.cgs
sim/testsuite/sim/arm/thumb/neg.cgs
sim/testsuite/sim/arm/thumb/orr.cgs
sim/testsuite/sim/arm/thumb/pop-pc.cgs
sim/testsuite/sim/arm/thumb/pop.cgs
sim/testsuite/sim/arm/thumb/push-lr.cgs
sim/testsuite/sim/arm/thumb/push.cgs
sim/testsuite/sim/arm/thumb/ror.cgs
sim/testsuite/sim/arm/thumb/sbc.cgs
sim/testsuite/sim/arm/thumb/stmia.cgs
sim/testsuite/sim/arm/thumb/str-imm.cgs
sim/testsuite/sim/arm/thumb/str-sprel.cgs
sim/testsuite/sim/arm/thumb/str.cgs
sim/testsuite/sim/arm/thumb/strb-imm.cgs
sim/testsuite/sim/arm/thumb/strb.cgs
sim/testsuite/sim/arm/thumb/strh-imm.cgs
sim/testsuite/sim/arm/thumb/strh.cgs
sim/testsuite/sim/arm/thumb/sub-sp.cgs
sim/testsuite/sim/arm/thumb/sub.cgs
sim/testsuite/sim/arm/thumb/subi.cgs
sim/testsuite/sim/arm/thumb/subi8.cgs
sim/testsuite/sim/arm/thumb/swi.cgs
sim/testsuite/sim/arm/thumb/testutils.inc
sim/testsuite/sim/arm/thumb/tst.cgs
sim/testsuite/sim/arm/tst.cgs
sim/testsuite/sim/arm/umlal.cgs
sim/testsuite/sim/arm/umull.cgs
sim/testsuite/sim/arm/xscale/blx.cgs
sim/testsuite/sim/arm/xscale/mia.cgs
sim/testsuite/sim/arm/xscale/miaph.cgs
sim/testsuite/sim/arm/xscale/miaxy.cgs
sim/testsuite/sim/arm/xscale/mra.cgs
sim/testsuite/sim/arm/xscale/testutils.inc
sim/testsuite/sim/arm/xscale/xscale.exp
sim/testsuite/sim/cris/asm/abs.ms
sim/testsuite/sim/cris/asm/addc.ms
sim/testsuite/sim/cris/asm/addcpc.ms
sim/testsuite/sim/cris/asm/addcv32c.ms
sim/testsuite/sim/cris/asm/addcv32m.ms
sim/testsuite/sim/cris/asm/addcv32r.ms
sim/testsuite/sim/cris/asm/addi.ms
sim/testsuite/sim/cris/asm/addiv32.ms
sim/testsuite/sim/cris/asm/addm.ms
sim/testsuite/sim/cris/asm/addoc.ms
sim/testsuite/sim/cris/asm/addom.ms
sim/testsuite/sim/cris/asm/addoq.ms
sim/testsuite/sim/cris/asm/addq.ms
sim/testsuite/sim/cris/asm/addqpc.ms
sim/testsuite/sim/cris/asm/addr.ms
sim/testsuite/sim/cris/asm/addswpc.ms
sim/testsuite/sim/cris/asm/addxc.ms
sim/testsuite/sim/cris/asm/addxm.ms
sim/testsuite/sim/cris/asm/addxr.ms
sim/testsuite/sim/cris/asm/andc.ms
sim/testsuite/sim/cris/asm/andm.ms
sim/testsuite/sim/cris/asm/andq.ms
sim/testsuite/sim/cris/asm/andr.ms
sim/testsuite/sim/cris/asm/asm.exp
sim/testsuite/sim/cris/asm/asr.ms
sim/testsuite/sim/cris/asm/ba.ms
sim/testsuite/sim/cris/asm/bare1.ms
sim/testsuite/sim/cris/asm/bare2.ms
sim/testsuite/sim/cris/asm/bas.ms
sim/testsuite/sim/cris/asm/bccb.ms
sim/testsuite/sim/cris/asm/bdapc.ms
sim/testsuite/sim/cris/asm/bdapm.ms
sim/testsuite/sim/cris/asm/bdapq.ms
sim/testsuite/sim/cris/asm/bdapqpc.ms
sim/testsuite/sim/cris/asm/biap.ms
sim/testsuite/sim/cris/asm/boundc.ms
sim/testsuite/sim/cris/asm/boundm.ms
sim/testsuite/sim/cris/asm/boundmv32.ms
sim/testsuite/sim/cris/asm/boundr.ms
sim/testsuite/sim/cris/asm/break.ms
sim/testsuite/sim/cris/asm/btst.ms
sim/testsuite/sim/cris/asm/ccr-v10.ms
sim/testsuite/sim/cris/asm/ccs-v32.ms
sim/testsuite/sim/cris/asm/clearfv10.ms
sim/testsuite/sim/cris/asm/clearfv32.ms
sim/testsuite/sim/cris/asm/clrjmp1.ms
sim/testsuite/sim/cris/asm/cmpc.ms
sim/testsuite/sim/cris/asm/cmpm.ms
sim/testsuite/sim/cris/asm/cmpq.ms
sim/testsuite/sim/cris/asm/cmpr.ms
sim/testsuite/sim/cris/asm/cmpxc.ms
sim/testsuite/sim/cris/asm/cmpxm.ms
sim/testsuite/sim/cris/asm/dflags.ms
sim/testsuite/sim/cris/asm/dip.ms
sim/testsuite/sim/cris/asm/dstep.ms
sim/testsuite/sim/cris/asm/fidxd.ms
sim/testsuite/sim/cris/asm/fidxi.ms
sim/testsuite/sim/cris/asm/ftagd.ms
sim/testsuite/sim/cris/asm/ftagi.ms
sim/testsuite/sim/cris/asm/halt.ms
sim/testsuite/sim/cris/asm/io1.ms
sim/testsuite/sim/cris/asm/io2.ms
sim/testsuite/sim/cris/asm/io3.ms
sim/testsuite/sim/cris/asm/io4.ms
sim/testsuite/sim/cris/asm/io5.ms
sim/testsuite/sim/cris/asm/io6.ms
sim/testsuite/sim/cris/asm/io7.ms
sim/testsuite/sim/cris/asm/io8.ms
sim/testsuite/sim/cris/asm/io9.ms
sim/testsuite/sim/cris/asm/jsr.ms
sim/testsuite/sim/cris/asm/jsrmv10.ms
sim/testsuite/sim/cris/asm/jumpmp.ms
sim/testsuite/sim/cris/asm/jumppv32.ms
sim/testsuite/sim/cris/asm/lapc.ms
sim/testsuite/sim/cris/asm/lsl.ms
sim/testsuite/sim/cris/asm/lsr.ms
sim/testsuite/sim/cris/asm/lz.ms
sim/testsuite/sim/cris/asm/mcp.ms
sim/testsuite/sim/cris/asm/movdelsr1.ms
sim/testsuite/sim/cris/asm/movecpc.ms
sim/testsuite/sim/cris/asm/movecr.ms
sim/testsuite/sim/cris/asm/movecrt10.ms
sim/testsuite/sim/cris/asm/movecrt32.ms
sim/testsuite/sim/cris/asm/movect10.ms
sim/testsuite/sim/cris/asm/movei.ms
sim/testsuite/sim/cris/asm/movempc.ms
sim/testsuite/sim/cris/asm/movemr.ms
sim/testsuite/sim/cris/asm/movemrv10.ms
sim/testsuite/sim/cris/asm/movemrv32.ms
sim/testsuite/sim/cris/asm/movepcb.ms
sim/testsuite/sim/cris/asm/movepcd.ms
sim/testsuite/sim/cris/asm/movepcw.ms
sim/testsuite/sim/cris/asm/moveq.ms
sim/testsuite/sim/cris/asm/moveqpc.ms
sim/testsuite/sim/cris/asm/mover.ms
sim/testsuite/sim/cris/asm/moverbpc.ms
sim/testsuite/sim/cris/asm/moverdpc.ms
sim/testsuite/sim/cris/asm/moverm.ms
sim/testsuite/sim/cris/asm/moverpcb.ms
sim/testsuite/sim/cris/asm/moverpcd.ms
sim/testsuite/sim/cris/asm/moverpcw.ms
sim/testsuite/sim/cris/asm/moverwpc.ms
sim/testsuite/sim/cris/asm/movesmp.ms
sim/testsuite/sim/cris/asm/movmp.ms
sim/testsuite/sim/cris/asm/movmp8.ms
sim/testsuite/sim/cris/asm/movpmv10.ms
sim/testsuite/sim/cris/asm/movpmv32.ms
sim/testsuite/sim/cris/asm/movppc.ms
sim/testsuite/sim/cris/asm/movpr.ms
sim/testsuite/sim/cris/asm/movprv10.ms
sim/testsuite/sim/cris/asm/movprv32.ms
sim/testsuite/sim/cris/asm/movrss.ms
sim/testsuite/sim/cris/asm/movscpc.ms
sim/testsuite/sim/cris/asm/movscr.ms
sim/testsuite/sim/cris/asm/movsm.ms
sim/testsuite/sim/cris/asm/movsmpc.ms
sim/testsuite/sim/cris/asm/movsr.ms
sim/testsuite/sim/cris/asm/movsrpc.ms
sim/testsuite/sim/cris/asm/movssr.ms
sim/testsuite/sim/cris/asm/movucpc.ms
sim/testsuite/sim/cris/asm/movucr.ms
sim/testsuite/sim/cris/asm/movum.ms
sim/testsuite/sim/cris/asm/movumpc.ms
sim/testsuite/sim/cris/asm/movur.ms
sim/testsuite/sim/cris/asm/movurpc.ms
sim/testsuite/sim/cris/asm/mstep.ms
sim/testsuite/sim/cris/asm/msteppc1.ms
sim/testsuite/sim/cris/asm/msteppc2.ms
sim/testsuite/sim/cris/asm/msteppc3.ms
sim/testsuite/sim/cris/asm/mulv10.ms
sim/testsuite/sim/cris/asm/mulv32.ms
sim/testsuite/sim/cris/asm/mulx.ms
sim/testsuite/sim/cris/asm/neg.ms
sim/testsuite/sim/cris/asm/nopv10t.ms
sim/testsuite/sim/cris/asm/nopv32t.ms
sim/testsuite/sim/cris/asm/nopv32t2.ms
sim/testsuite/sim/cris/asm/nopv32t3.ms
sim/testsuite/sim/cris/asm/nopv32t4.ms
sim/testsuite/sim/cris/asm/not.ms
sim/testsuite/sim/cris/asm/op3.ms
sim/testsuite/sim/cris/asm/opterr1.ms
sim/testsuite/sim/cris/asm/opterr2.ms
sim/testsuite/sim/cris/asm/option1.ms
sim/testsuite/sim/cris/asm/option2.ms
sim/testsuite/sim/cris/asm/orc.ms
sim/testsuite/sim/cris/asm/orm.ms
sim/testsuite/sim/cris/asm/orq.ms
sim/testsuite/sim/cris/asm/orr.ms
sim/testsuite/sim/cris/asm/pcplus.ms
sim/testsuite/sim/cris/asm/raw1.ms
sim/testsuite/sim/cris/asm/raw10.ms
sim/testsuite/sim/cris/asm/raw11.ms
sim/testsuite/sim/cris/asm/raw12.ms
sim/testsuite/sim/cris/asm/raw13.ms
sim/testsuite/sim/cris/asm/raw14.ms
sim/testsuite/sim/cris/asm/raw15.ms
sim/testsuite/sim/cris/asm/raw16.ms
sim/testsuite/sim/cris/asm/raw17.ms
sim/testsuite/sim/cris/asm/raw2.ms
sim/testsuite/sim/cris/asm/raw3.ms
sim/testsuite/sim/cris/asm/raw4.ms
sim/testsuite/sim/cris/asm/raw5.ms
sim/testsuite/sim/cris/asm/raw6.ms
sim/testsuite/sim/cris/asm/raw7.ms
sim/testsuite/sim/cris/asm/raw8.ms
sim/testsuite/sim/cris/asm/raw9.ms
sim/testsuite/sim/cris/asm/ret.ms
sim/testsuite/sim/cris/asm/rfe.ms
sim/testsuite/sim/cris/asm/rfg.ms
sim/testsuite/sim/cris/asm/rfn.ms
sim/testsuite/sim/cris/asm/sbfs.ms
sim/testsuite/sim/cris/asm/scc.ms
sim/testsuite/sim/cris/asm/sfe.ms
sim/testsuite/sim/cris/asm/subc.ms
sim/testsuite/sim/cris/asm/subm.ms
sim/testsuite/sim/cris/asm/subq.ms
sim/testsuite/sim/cris/asm/subqpc.ms
sim/testsuite/sim/cris/asm/subr.ms
sim/testsuite/sim/cris/asm/subxc.ms
sim/testsuite/sim/cris/asm/subxm.ms
sim/testsuite/sim/cris/asm/subxr.ms
sim/testsuite/sim/cris/asm/swap.ms
sim/testsuite/sim/cris/asm/tb.ms
sim/testsuite/sim/cris/asm/test.ms
sim/testsuite/sim/cris/asm/testutils.inc
sim/testsuite/sim/cris/asm/tjmpsrv32-2.ms
sim/testsuite/sim/cris/asm/tjmpsrv32.ms
sim/testsuite/sim/cris/asm/tjsrcv10.ms
sim/testsuite/sim/cris/asm/tjsrcv32.ms
sim/testsuite/sim/cris/asm/tmemv10.ms
sim/testsuite/sim/cris/asm/tmemv32.ms
sim/testsuite/sim/cris/asm/tmulv10.ms
sim/testsuite/sim/cris/asm/tmulv32.ms
sim/testsuite/sim/cris/asm/tmvm1.ms
sim/testsuite/sim/cris/asm/tmvm2.ms
sim/testsuite/sim/cris/asm/tmvmrv10.ms
sim/testsuite/sim/cris/asm/tmvmrv32.ms
sim/testsuite/sim/cris/asm/tmvrmv10.ms
sim/testsuite/sim/cris/asm/tmvrmv32.ms
sim/testsuite/sim/cris/asm/user.ms
sim/testsuite/sim/cris/asm/x0-v10.ms
sim/testsuite/sim/cris/asm/x0-v32.ms
sim/testsuite/sim/cris/asm/x1-v10.ms
sim/testsuite/sim/cris/asm/x1-v32.ms
sim/testsuite/sim/cris/asm/x10-v10.ms
sim/testsuite/sim/cris/asm/x2-v10.ms
sim/testsuite/sim/cris/asm/x2-v32.ms
sim/testsuite/sim/cris/asm/x3-v10.ms
sim/testsuite/sim/cris/asm/x3-v32.ms
sim/testsuite/sim/cris/asm/x4-v32.ms
sim/testsuite/sim/cris/asm/x5-v10.ms
sim/testsuite/sim/cris/asm/x5-v32.ms
sim/testsuite/sim/cris/asm/x6-v10.ms
sim/testsuite/sim/cris/asm/x6-v32.ms
sim/testsuite/sim/cris/asm/x7-v10.ms
sim/testsuite/sim/cris/asm/x7-v32.ms
sim/testsuite/sim/cris/asm/x8-v10.ms
sim/testsuite/sim/cris/asm/x9-v10.ms
sim/testsuite/sim/cris/asm/xor.ms
sim/testsuite/sim/cris/c/append1.c
sim/testsuite/sim/cris/c/c.exp
sim/testsuite/sim/cris/c/clone1.c
sim/testsuite/sim/cris/c/clone2.c
sim/testsuite/sim/cris/c/clone3.c
sim/testsuite/sim/cris/c/clone4.c
sim/testsuite/sim/cris/c/clone5.c
sim/testsuite/sim/cris/c/ex1.c
sim/testsuite/sim/cris/c/fcntl1.c
sim/testsuite/sim/cris/c/fdopen1.c
sim/testsuite/sim/cris/c/fdopen2.c
sim/testsuite/sim/cris/c/freopen1.c
sim/testsuite/sim/cris/c/ftruncate1.c
sim/testsuite/sim/cris/c/ftruncate2.c
sim/testsuite/sim/cris/c/getcwd1.c
sim/testsuite/sim/cris/c/gettod.c
sim/testsuite/sim/cris/c/hello.c
sim/testsuite/sim/cris/c/kill1.c
sim/testsuite/sim/cris/c/kill2.c
sim/testsuite/sim/cris/c/kill3.c
sim/testsuite/sim/cris/c/mapbrk.c
sim/testsuite/sim/cris/c/mmap1.c
sim/testsuite/sim/cris/c/mmap2.c
sim/testsuite/sim/cris/c/mmap3.c
sim/testsuite/sim/cris/c/mprotect1.c
sim/testsuite/sim/cris/c/mremap.c
sim/testsuite/sim/cris/c/openpf1.c
sim/testsuite/sim/cris/c/openpf2.c
sim/testsuite/sim/cris/c/openpf3.c
sim/testsuite/sim/cris/c/openpf4.c
sim/testsuite/sim/cris/c/openpf5.c
sim/testsuite/sim/cris/c/pipe1.c
sim/testsuite/sim/cris/c/pipe2.c
sim/testsuite/sim/cris/c/pipe3.c
sim/testsuite/sim/cris/c/pipe4.c
sim/testsuite/sim/cris/c/pipe5.c
sim/testsuite/sim/cris/c/pipe6.c
sim/testsuite/sim/cris/c/pipe7.c
sim/testsuite/sim/cris/c/readlink1.c
sim/testsuite/sim/cris/c/readlink10.c
sim/testsuite/sim/cris/c/readlink2.c
sim/testsuite/sim/cris/c/readlink3.c
sim/testsuite/sim/cris/c/readlink4.c
sim/testsuite/sim/cris/c/readlink5.c
sim/testsuite/sim/cris/c/readlink6.c
sim/testsuite/sim/cris/c/readlink7.c
sim/testsuite/sim/cris/c/readlink8.c
sim/testsuite/sim/cris/c/readlink9.c
sim/testsuite/sim/cris/c/rename2.c
sim/testsuite/sim/cris/c/rtsigprocmask1.c
sim/testsuite/sim/cris/c/rtsigsuspend1.c
sim/testsuite/sim/cris/c/sched1.c
sim/testsuite/sim/cris/c/sched2.c
sim/testsuite/sim/cris/c/sched3.c
sim/testsuite/sim/cris/c/sched4.c
sim/testsuite/sim/cris/c/sched5.c
sim/testsuite/sim/cris/c/sched6.c
sim/testsuite/sim/cris/c/sched7.c
sim/testsuite/sim/cris/c/sched8.c
sim/testsuite/sim/cris/c/sched9.c
sim/testsuite/sim/cris/c/seek1.c
sim/testsuite/sim/cris/c/seek2.c
sim/testsuite/sim/cris/c/setrlimit1.c
sim/testsuite/sim/cris/c/sig1.c
sim/testsuite/sim/cris/c/sig10.c
sim/testsuite/sim/cris/c/sig11.c
sim/testsuite/sim/cris/c/sig12.c
sim/testsuite/sim/cris/c/sig2.c
sim/testsuite/sim/cris/c/sig3.c
sim/testsuite/sim/cris/c/sig4.c
sim/testsuite/sim/cris/c/sig5.c
sim/testsuite/sim/cris/c/sig6.c
sim/testsuite/sim/cris/c/sig7.c
sim/testsuite/sim/cris/c/sig8.c
sim/testsuite/sim/cris/c/sig9.c
sim/testsuite/sim/cris/c/sigreturn1.c
sim/testsuite/sim/cris/c/sigreturn2.c
sim/testsuite/sim/cris/c/sjlj.c
sim/testsuite/sim/cris/c/sock1.c
sim/testsuite/sim/cris/c/stat1.c
sim/testsuite/sim/cris/c/stat2.c
sim/testsuite/sim/cris/c/stat3.c
sim/testsuite/sim/cris/c/stat4.c
sim/testsuite/sim/cris/c/stat5.c
sim/testsuite/sim/cris/c/stat7.c
sim/testsuite/sim/cris/c/stat8.c
sim/testsuite/sim/cris/c/syscall1.c
sim/testsuite/sim/cris/c/syscall2.c
sim/testsuite/sim/cris/c/sysctl1.c
sim/testsuite/sim/cris/c/sysctl2.c
sim/testsuite/sim/cris/c/thread2.c
sim/testsuite/sim/cris/c/thread3.c
sim/testsuite/sim/cris/c/thread4.c
sim/testsuite/sim/cris/c/thread5.c
sim/testsuite/sim/cris/c/time1.c
sim/testsuite/sim/cris/c/time2.c
sim/testsuite/sim/cris/c/truncate1.c
sim/testsuite/sim/cris/c/truncate2.c
sim/testsuite/sim/cris/c/ugetrlimit1.c
sim/testsuite/sim/cris/hw/rv-n-cris/host1.ms
sim/testsuite/sim/cris/hw/rv-n-cris/irq1.ms
sim/testsuite/sim/cris/hw/rv-n-cris/irq2.ms
sim/testsuite/sim/cris/hw/rv-n-cris/irq3.ms
sim/testsuite/sim/cris/hw/rv-n-cris/irq4.ms
sim/testsuite/sim/cris/hw/rv-n-cris/irq5.ms
sim/testsuite/sim/cris/hw/rv-n-cris/irq6.ms
sim/testsuite/sim/cris/hw/rv-n-cris/mbox1.ms
sim/testsuite/sim/cris/hw/rv-n-cris/mem1.ms
sim/testsuite/sim/cris/hw/rv-n-cris/mem2.ms
sim/testsuite/sim/cris/hw/rv-n-cris/poll1.ms
sim/testsuite/sim/cris/hw/rv-n-cris/quit.s
sim/testsuite/sim/cris/hw/rv-n-cris/rvc.exp
sim/testsuite/sim/cris/hw/rv-n-cris/std.dev
sim/testsuite/sim/cris/hw/rv-n-cris/testutils.inc
sim/testsuite/sim/cris/hw/rv-n-cris/trivial1.ms
sim/testsuite/sim/cris/hw/rv-n-cris/trivial2.ms
sim/testsuite/sim/cris/hw/rv-n-cris/trivial3.ms
sim/testsuite/sim/cris/hw/rv-n-cris/trivial4.ms
sim/testsuite/sim/cris/hw/rv-n-cris/trivial4.r
sim/testsuite/sim/cris/hw/rv-n-cris/trivial5.ms
sim/testsuite/sim/cris/hw/rv-n-cris/wd1.ms
sim/testsuite/sim/fr30/add.cgs
sim/testsuite/sim/fr30/add.ms
sim/testsuite/sim/fr30/add2.cgs
sim/testsuite/sim/fr30/addc.cgs
sim/testsuite/sim/fr30/addn.cgs
sim/testsuite/sim/fr30/addn2.cgs
sim/testsuite/sim/fr30/addsp.cgs
sim/testsuite/sim/fr30/allinsn.exp
sim/testsuite/sim/fr30/and.cgs
sim/testsuite/sim/fr30/andb.cgs
sim/testsuite/sim/fr30/andccr.cgs
sim/testsuite/sim/fr30/andh.cgs
sim/testsuite/sim/fr30/asr.cgs
sim/testsuite/sim/fr30/asr2.cgs
sim/testsuite/sim/fr30/bandh.cgs
sim/testsuite/sim/fr30/bandl.cgs
sim/testsuite/sim/fr30/bc.cgs
sim/testsuite/sim/fr30/beorh.cgs
sim/testsuite/sim/fr30/beorl.cgs
sim/testsuite/sim/fr30/beq.cgs
sim/testsuite/sim/fr30/bge.cgs
sim/testsuite/sim/fr30/bgt.cgs
sim/testsuite/sim/fr30/bhi.cgs
sim/testsuite/sim/fr30/ble.cgs
sim/testsuite/sim/fr30/bls.cgs
sim/testsuite/sim/fr30/blt.cgs
sim/testsuite/sim/fr30/bn.cgs
sim/testsuite/sim/fr30/bnc.cgs
sim/testsuite/sim/fr30/bne.cgs
sim/testsuite/sim/fr30/bno.cgs
sim/testsuite/sim/fr30/bnv.cgs
sim/testsuite/sim/fr30/borh.cgs
sim/testsuite/sim/fr30/borl.cgs
sim/testsuite/sim/fr30/bp.cgs
sim/testsuite/sim/fr30/bra.cgs
sim/testsuite/sim/fr30/btsth.cgs
sim/testsuite/sim/fr30/btstl.cgs
sim/testsuite/sim/fr30/bv.cgs
sim/testsuite/sim/fr30/call.cgs
sim/testsuite/sim/fr30/cmp.cgs
sim/testsuite/sim/fr30/cmp2.cgs
sim/testsuite/sim/fr30/copld.cgs
sim/testsuite/sim/fr30/copop.cgs
sim/testsuite/sim/fr30/copst.cgs
sim/testsuite/sim/fr30/copsv.cgs
sim/testsuite/sim/fr30/div.ms
sim/testsuite/sim/fr30/div0s.cgs
sim/testsuite/sim/fr30/div0u.cgs
sim/testsuite/sim/fr30/div1.cgs
sim/testsuite/sim/fr30/div2.cgs
sim/testsuite/sim/fr30/div3.cgs
sim/testsuite/sim/fr30/div4s.cgs
sim/testsuite/sim/fr30/dmov.cgs
sim/testsuite/sim/fr30/dmovb.cgs
sim/testsuite/sim/fr30/dmovh.cgs
sim/testsuite/sim/fr30/enter.cgs
sim/testsuite/sim/fr30/eor.cgs
sim/testsuite/sim/fr30/eorb.cgs
sim/testsuite/sim/fr30/eorh.cgs
sim/testsuite/sim/fr30/extsb.cgs
sim/testsuite/sim/fr30/extsh.cgs
sim/testsuite/sim/fr30/extub.cgs
sim/testsuite/sim/fr30/extuh.cgs
sim/testsuite/sim/fr30/hello.ms
sim/testsuite/sim/fr30/int.cgs
sim/testsuite/sim/fr30/inte.cgs
sim/testsuite/sim/fr30/jmp.cgs
sim/testsuite/sim/fr30/ld.cgs
sim/testsuite/sim/fr30/ldi20.cgs
sim/testsuite/sim/fr30/ldi32.cgs
sim/testsuite/sim/fr30/ldi8.cgs
sim/testsuite/sim/fr30/ldm0.cgs
sim/testsuite/sim/fr30/ldm1.cgs
sim/testsuite/sim/fr30/ldres.cgs
sim/testsuite/sim/fr30/ldub.cgs
sim/testsuite/sim/fr30/lduh.cgs
sim/testsuite/sim/fr30/leave.cgs
sim/testsuite/sim/fr30/lsl.cgs
sim/testsuite/sim/fr30/lsl2.cgs
sim/testsuite/sim/fr30/lsr.cgs
sim/testsuite/sim/fr30/lsr2.cgs
sim/testsuite/sim/fr30/misc.exp
sim/testsuite/sim/fr30/mov.cgs
sim/testsuite/sim/fr30/mul.cgs
sim/testsuite/sim/fr30/mulh.cgs
sim/testsuite/sim/fr30/mulu.cgs
sim/testsuite/sim/fr30/muluh.cgs
sim/testsuite/sim/fr30/nop.cgs
sim/testsuite/sim/fr30/or.cgs
sim/testsuite/sim/fr30/orb.cgs
sim/testsuite/sim/fr30/orccr.cgs
sim/testsuite/sim/fr30/orh.cgs
sim/testsuite/sim/fr30/ret.cgs
sim/testsuite/sim/fr30/reti.cgs
sim/testsuite/sim/fr30/st.cgs
sim/testsuite/sim/fr30/stb.cgs
sim/testsuite/sim/fr30/sth.cgs
sim/testsuite/sim/fr30/stilm.cgs
sim/testsuite/sim/fr30/stm0.cgs
sim/testsuite/sim/fr30/stm1.cgs
sim/testsuite/sim/fr30/stres.cgs
sim/testsuite/sim/fr30/sub.cgs
sim/testsuite/sim/fr30/subc.cgs
sim/testsuite/sim/fr30/subn.cgs
sim/testsuite/sim/fr30/testutils.inc
sim/testsuite/sim/fr30/xchb.cgs
sim/testsuite/sim/frv/add.cgs
sim/testsuite/sim/frv/add.pcgs
sim/testsuite/sim/frv/addcc.cgs
sim/testsuite/sim/frv/addi.cgs
sim/testsuite/sim/frv/addicc.cgs
sim/testsuite/sim/frv/addx.cgs
sim/testsuite/sim/frv/addxcc.cgs
sim/testsuite/sim/frv/addxi.cgs
sim/testsuite/sim/frv/addxicc.cgs
sim/testsuite/sim/frv/allinsn.exp
sim/testsuite/sim/frv/and.cgs
sim/testsuite/sim/frv/andcc.cgs
sim/testsuite/sim/frv/andcr.cgs
sim/testsuite/sim/frv/andi.cgs
sim/testsuite/sim/frv/andicc.cgs
sim/testsuite/sim/frv/andncr.cgs
sim/testsuite/sim/frv/bar.cgs
sim/testsuite/sim/frv/bc.cgs
sim/testsuite/sim/frv/bcclr.cgs
sim/testsuite/sim/frv/bceqlr.cgs
sim/testsuite/sim/frv/bcgelr.cgs
sim/testsuite/sim/frv/bcgtlr.cgs
sim/testsuite/sim/frv/bchilr.cgs
sim/testsuite/sim/frv/bclelr.cgs
sim/testsuite/sim/frv/bclr.cgs
sim/testsuite/sim/frv/bclslr.cgs
sim/testsuite/sim/frv/bcltlr.cgs
sim/testsuite/sim/frv/bcnclr.cgs
sim/testsuite/sim/frv/bcnelr.cgs
sim/testsuite/sim/frv/bcnlr.cgs
sim/testsuite/sim/frv/bcnolr.cgs
sim/testsuite/sim/frv/bcnvlr.cgs
sim/testsuite/sim/frv/bcplr.cgs
sim/testsuite/sim/frv/bcralr.cgs
sim/testsuite/sim/frv/bctrlr.cgs
sim/testsuite/sim/frv/bcvlr.cgs
sim/testsuite/sim/frv/beq.cgs
sim/testsuite/sim/frv/beqlr.cgs
sim/testsuite/sim/frv/bge.cgs
sim/testsuite/sim/frv/bgelr.cgs
sim/testsuite/sim/frv/bgt.cgs
sim/testsuite/sim/frv/bgtlr.cgs
sim/testsuite/sim/frv/bhi.cgs
sim/testsuite/sim/frv/bhilr.cgs
sim/testsuite/sim/frv/ble.cgs
sim/testsuite/sim/frv/blelr.cgs
sim/testsuite/sim/frv/bls.cgs
sim/testsuite/sim/frv/blslr.cgs
sim/testsuite/sim/frv/blt.cgs
sim/testsuite/sim/frv/bltlr.cgs
sim/testsuite/sim/frv/bn.cgs
sim/testsuite/sim/frv/bnc.cgs
sim/testsuite/sim/frv/bnclr.cgs
sim/testsuite/sim/frv/bne.cgs
sim/testsuite/sim/frv/bnelr.cgs
sim/testsuite/sim/frv/bnlr.cgs
sim/testsuite/sim/frv/bno.cgs
sim/testsuite/sim/frv/bnolr.cgs
sim/testsuite/sim/frv/bnv.cgs
sim/testsuite/sim/frv/bnvlr.cgs
sim/testsuite/sim/frv/bp.cgs
sim/testsuite/sim/frv/bplr.cgs
sim/testsuite/sim/frv/bra.cgs
sim/testsuite/sim/frv/bralr.cgs
sim/testsuite/sim/frv/branch.pcgs
sim/testsuite/sim/frv/break.cgs
sim/testsuite/sim/frv/bv.cgs
sim/testsuite/sim/frv/bvlr.cgs
sim/testsuite/sim/frv/cadd.cgs
sim/testsuite/sim/frv/caddcc.cgs
sim/testsuite/sim/frv/call.cgs
sim/testsuite/sim/frv/call.pcgs
sim/testsuite/sim/frv/callil.cgs
sim/testsuite/sim/frv/calll.cgs
sim/testsuite/sim/frv/cand.cgs
sim/testsuite/sim/frv/candcc.cgs
sim/testsuite/sim/frv/ccalll.cgs
sim/testsuite/sim/frv/cckc.cgs
sim/testsuite/sim/frv/cckeq.cgs
sim/testsuite/sim/frv/cckge.cgs
sim/testsuite/sim/frv/cckgt.cgs
sim/testsuite/sim/frv/cckhi.cgs
sim/testsuite/sim/frv/cckle.cgs
sim/testsuite/sim/frv/cckls.cgs
sim/testsuite/sim/frv/ccklt.cgs
sim/testsuite/sim/frv/cckn.cgs
sim/testsuite/sim/frv/ccknc.cgs
sim/testsuite/sim/frv/cckne.cgs
sim/testsuite/sim/frv/cckno.cgs
sim/testsuite/sim/frv/ccknv.cgs
sim/testsuite/sim/frv/cckp.cgs
sim/testsuite/sim/frv/cckra.cgs
sim/testsuite/sim/frv/cckv.cgs
sim/testsuite/sim/frv/ccmp.cgs
sim/testsuite/sim/frv/cfabss.cgs
sim/testsuite/sim/frv/cfadds.cgs
sim/testsuite/sim/frv/cfckeq.cgs
sim/testsuite/sim/frv/cfckge.cgs
sim/testsuite/sim/frv/cfckgt.cgs
sim/testsuite/sim/frv/cfckle.cgs
sim/testsuite/sim/frv/cfcklg.cgs
sim/testsuite/sim/frv/cfcklt.cgs
sim/testsuite/sim/frv/cfckne.cgs
sim/testsuite/sim/frv/cfckno.cgs
sim/testsuite/sim/frv/cfcko.cgs
sim/testsuite/sim/frv/cfckra.cgs
sim/testsuite/sim/frv/cfcku.cgs
sim/testsuite/sim/frv/cfckue.cgs
sim/testsuite/sim/frv/cfckug.cgs
sim/testsuite/sim/frv/cfckuge.cgs
sim/testsuite/sim/frv/cfckul.cgs
sim/testsuite/sim/frv/cfckule.cgs
sim/testsuite/sim/frv/cfcmps.cgs
sim/testsuite/sim/frv/cfdivs.cgs
sim/testsuite/sim/frv/cfitos.cgs
sim/testsuite/sim/frv/cfmadds.cgs
sim/testsuite/sim/frv/cfmas.cgs
sim/testsuite/sim/frv/cfmovs.cgs
sim/testsuite/sim/frv/cfmss.cgs
sim/testsuite/sim/frv/cfmsubs.cgs
sim/testsuite/sim/frv/cfmuls.cgs
sim/testsuite/sim/frv/cfnegs.cgs
sim/testsuite/sim/frv/cfsqrts.cgs
sim/testsuite/sim/frv/cfstoi.cgs
sim/testsuite/sim/frv/cfsubs.cgs
sim/testsuite/sim/frv/cjmpl.cgs
sim/testsuite/sim/frv/ckc.cgs
sim/testsuite/sim/frv/ckeq.cgs
sim/testsuite/sim/frv/ckge.cgs
sim/testsuite/sim/frv/ckgt.cgs
sim/testsuite/sim/frv/ckhi.cgs
sim/testsuite/sim/frv/ckle.cgs
sim/testsuite/sim/frv/ckls.cgs
sim/testsuite/sim/frv/cklt.cgs
sim/testsuite/sim/frv/ckn.cgs
sim/testsuite/sim/frv/cknc.cgs
sim/testsuite/sim/frv/ckne.cgs
sim/testsuite/sim/frv/ckno.cgs
sim/testsuite/sim/frv/cknv.cgs
sim/testsuite/sim/frv/ckp.cgs
sim/testsuite/sim/frv/ckra.cgs
sim/testsuite/sim/frv/ckv.cgs
sim/testsuite/sim/frv/cld.cgs
sim/testsuite/sim/frv/cldbf.cgs
sim/testsuite/sim/frv/cldbfu.cgs
sim/testsuite/sim/frv/cldd.cgs
sim/testsuite/sim/frv/clddf.cgs
sim/testsuite/sim/frv/clddfu.cgs
sim/testsuite/sim/frv/clddu.cgs
sim/testsuite/sim/frv/cldf.cgs
sim/testsuite/sim/frv/cldfu.cgs
sim/testsuite/sim/frv/cldhf.cgs
sim/testsuite/sim/frv/cldhfu.cgs
sim/testsuite/sim/frv/cldq.cgs
sim/testsuite/sim/frv/cldqu.cgs
sim/testsuite/sim/frv/cldsb.cgs
sim/testsuite/sim/frv/cldsbu.cgs
sim/testsuite/sim/frv/cldsh.cgs
sim/testsuite/sim/frv/cldshu.cgs
sim/testsuite/sim/frv/cldu.cgs
sim/testsuite/sim/frv/cldub.cgs
sim/testsuite/sim/frv/cldubu.cgs
sim/testsuite/sim/frv/clduh.cgs
sim/testsuite/sim/frv/clduhu.cgs
sim/testsuite/sim/frv/clrfa.cgs
sim/testsuite/sim/frv/clrfr.cgs
sim/testsuite/sim/frv/clrga.cgs
sim/testsuite/sim/frv/clrgr.cgs
sim/testsuite/sim/frv/cmaddhss.cgs
sim/testsuite/sim/frv/cmaddhus.cgs
sim/testsuite/sim/frv/cmand.cgs
sim/testsuite/sim/frv/cmbtoh.cgs
sim/testsuite/sim/frv/cmbtohe.cgs
sim/testsuite/sim/frv/cmcpxis.cgs
sim/testsuite/sim/frv/cmcpxiu.cgs
sim/testsuite/sim/frv/cmcpxrs.cgs
sim/testsuite/sim/frv/cmcpxru.cgs
sim/testsuite/sim/frv/cmexpdhd.cgs
sim/testsuite/sim/frv/cmexpdhw.cgs
sim/testsuite/sim/frv/cmhtob.cgs
sim/testsuite/sim/frv/cmmachs.cgs
sim/testsuite/sim/frv/cmmachu.cgs
sim/testsuite/sim/frv/cmmulhs.cgs
sim/testsuite/sim/frv/cmmulhu.cgs
sim/testsuite/sim/frv/cmnot.cgs
sim/testsuite/sim/frv/cmor.cgs
sim/testsuite/sim/frv/cmov.cgs
sim/testsuite/sim/frv/cmovfg.cgs
sim/testsuite/sim/frv/cmovfgd.cgs
sim/testsuite/sim/frv/cmovgf.cgs
sim/testsuite/sim/frv/cmovgfd.cgs
sim/testsuite/sim/frv/cmp.cgs
sim/testsuite/sim/frv/cmpb.cgs
sim/testsuite/sim/frv/cmpba.cgs
sim/testsuite/sim/frv/cmpi.cgs
sim/testsuite/sim/frv/cmqmachs.cgs
sim/testsuite/sim/frv/cmqmachu.cgs
sim/testsuite/sim/frv/cmqmulhs.cgs
sim/testsuite/sim/frv/cmqmulhu.cgs
sim/testsuite/sim/frv/cmsubhss.cgs
sim/testsuite/sim/frv/cmsubhus.cgs
sim/testsuite/sim/frv/cmxor.cgs
sim/testsuite/sim/frv/cnot.cgs
sim/testsuite/sim/frv/commitfa.cgs
sim/testsuite/sim/frv/commitfr.cgs
sim/testsuite/sim/frv/commitga.cgs
sim/testsuite/sim/frv/commitgr.cgs
sim/testsuite/sim/frv/cop1.cgs
sim/testsuite/sim/frv/cop2.cgs
sim/testsuite/sim/frv/cor.cgs
sim/testsuite/sim/frv/corcc.cgs
sim/testsuite/sim/frv/cscan.cgs
sim/testsuite/sim/frv/csdiv.cgs
sim/testsuite/sim/frv/csll.cgs
sim/testsuite/sim/frv/csllcc.cgs
sim/testsuite/sim/frv/csmul.cgs
sim/testsuite/sim/frv/csmulcc.cgs
sim/testsuite/sim/frv/csra.cgs
sim/testsuite/sim/frv/csracc.cgs
sim/testsuite/sim/frv/csrl.cgs
sim/testsuite/sim/frv/csrlcc.cgs
sim/testsuite/sim/frv/cst.cgs
sim/testsuite/sim/frv/cstb.cgs
sim/testsuite/sim/frv/cstbf.cgs
sim/testsuite/sim/frv/cstbfu.cgs
sim/testsuite/sim/frv/cstbu.cgs
sim/testsuite/sim/frv/cstd.cgs
sim/testsuite/sim/frv/cstdf.cgs
sim/testsuite/sim/frv/cstdfu.cgs
sim/testsuite/sim/frv/cstdu.cgs
sim/testsuite/sim/frv/cstf.cgs
sim/testsuite/sim/frv/cstfu.cgs
sim/testsuite/sim/frv/csth.cgs
sim/testsuite/sim/frv/csthf.cgs
sim/testsuite/sim/frv/csthfu.cgs
sim/testsuite/sim/frv/csthu.cgs
sim/testsuite/sim/frv/cstq.cgs
sim/testsuite/sim/frv/cstu.cgs
sim/testsuite/sim/frv/csub.cgs
sim/testsuite/sim/frv/csubcc.cgs
sim/testsuite/sim/frv/cswap.cgs
sim/testsuite/sim/frv/cudiv.cgs
sim/testsuite/sim/frv/cxor.cgs
sim/testsuite/sim/frv/cxorcc.cgs
sim/testsuite/sim/frv/dcef.cgs
sim/testsuite/sim/frv/dcei.cgs
sim/testsuite/sim/frv/dcf.cgs
sim/testsuite/sim/frv/dci.cgs
sim/testsuite/sim/frv/fabsd.cgs
sim/testsuite/sim/frv/fabss.cgs
sim/testsuite/sim/frv/faddd.cgs
sim/testsuite/sim/frv/fadds.cgs
sim/testsuite/sim/frv/fbeq.cgs
sim/testsuite/sim/frv/fbeqlr.cgs
sim/testsuite/sim/frv/fbge.cgs
sim/testsuite/sim/frv/fbgelr.cgs
sim/testsuite/sim/frv/fbgt.cgs
sim/testsuite/sim/frv/fbgtlr.cgs
sim/testsuite/sim/frv/fble.cgs
sim/testsuite/sim/frv/fblelr.cgs
sim/testsuite/sim/frv/fblg.cgs
sim/testsuite/sim/frv/fblglr.cgs
sim/testsuite/sim/frv/fblt.cgs
sim/testsuite/sim/frv/fbltlr.cgs
sim/testsuite/sim/frv/fbne.cgs
sim/testsuite/sim/frv/fbnelr.cgs
sim/testsuite/sim/frv/fbno.cgs
sim/testsuite/sim/frv/fbnolr.cgs
sim/testsuite/sim/frv/fbo.cgs
sim/testsuite/sim/frv/fbolr.cgs
sim/testsuite/sim/frv/fbra.cgs
sim/testsuite/sim/frv/fbralr.cgs
sim/testsuite/sim/frv/fbu.cgs
sim/testsuite/sim/frv/fbue.cgs
sim/testsuite/sim/frv/fbuelr.cgs
sim/testsuite/sim/frv/fbug.cgs
sim/testsuite/sim/frv/fbuge.cgs
sim/testsuite/sim/frv/fbugelr.cgs
sim/testsuite/sim/frv/fbuglr.cgs
sim/testsuite/sim/frv/fbul.cgs
sim/testsuite/sim/frv/fbule.cgs
sim/testsuite/sim/frv/fbulelr.cgs
sim/testsuite/sim/frv/fbullr.cgs
sim/testsuite/sim/frv/fbulr.cgs
sim/testsuite/sim/frv/fcbeqlr.cgs
sim/testsuite/sim/frv/fcbgelr.cgs
sim/testsuite/sim/frv/fcbgtlr.cgs
sim/testsuite/sim/frv/fcblelr.cgs
sim/testsuite/sim/frv/fcblglr.cgs
sim/testsuite/sim/frv/fcbltlr.cgs
sim/testsuite/sim/frv/fcbnelr.cgs
sim/testsuite/sim/frv/fcbnolr.cgs
sim/testsuite/sim/frv/fcbolr.cgs
sim/testsuite/sim/frv/fcbralr.cgs
sim/testsuite/sim/frv/fcbuelr.cgs
sim/testsuite/sim/frv/fcbugelr.cgs
sim/testsuite/sim/frv/fcbuglr.cgs
sim/testsuite/sim/frv/fcbulelr.cgs
sim/testsuite/sim/frv/fcbullr.cgs
sim/testsuite/sim/frv/fcbulr.cgs
sim/testsuite/sim/frv/fckeq.cgs
sim/testsuite/sim/frv/fckge.cgs
sim/testsuite/sim/frv/fckgt.cgs
sim/testsuite/sim/frv/fckle.cgs
sim/testsuite/sim/frv/fcklg.cgs
sim/testsuite/sim/frv/fcklt.cgs
sim/testsuite/sim/frv/fckne.cgs
sim/testsuite/sim/frv/fckno.cgs
sim/testsuite/sim/frv/fcko.cgs
sim/testsuite/sim/frv/fckra.cgs
sim/testsuite/sim/frv/fcku.cgs
sim/testsuite/sim/frv/fckue.cgs
sim/testsuite/sim/frv/fckug.cgs
sim/testsuite/sim/frv/fckuge.cgs
sim/testsuite/sim/frv/fckul.cgs
sim/testsuite/sim/frv/fckule.cgs
sim/testsuite/sim/frv/fcmpd.cgs
sim/testsuite/sim/frv/fcmps.cgs
sim/testsuite/sim/frv/fdabss.cgs
sim/testsuite/sim/frv/fdadds.cgs
sim/testsuite/sim/frv/fdcmps.cgs
sim/testsuite/sim/frv/fddivs.cgs
sim/testsuite/sim/frv/fditos.cgs
sim/testsuite/sim/frv/fdivd.cgs
sim/testsuite/sim/frv/fdivs.cgs
sim/testsuite/sim/frv/fdmadds.cgs
sim/testsuite/sim/frv/fdmas.cgs
sim/testsuite/sim/frv/fdmovs.cgs
sim/testsuite/sim/frv/fdmss.cgs
sim/testsuite/sim/frv/fdmulcs.cgs
sim/testsuite/sim/frv/fdmuls.cgs
sim/testsuite/sim/frv/fdnegs.cgs
sim/testsuite/sim/frv/fdsads.cgs
sim/testsuite/sim/frv/fdsqrts.cgs
sim/testsuite/sim/frv/fdstoi.cgs
sim/testsuite/sim/frv/fdsubs.cgs
sim/testsuite/sim/frv/fdtoi.cgs
sim/testsuite/sim/frv/fitod.cgs
sim/testsuite/sim/frv/fitos.cgs
sim/testsuite/sim/frv/fmad.cgs
sim/testsuite/sim/frv/fmaddd.cgs
sim/testsuite/sim/frv/fmadds.cgs
sim/testsuite/sim/frv/fmas.cgs
sim/testsuite/sim/frv/fmovd.cgs
sim/testsuite/sim/frv/fmovs.cgs
sim/testsuite/sim/frv/fmsd.cgs
sim/testsuite/sim/frv/fmss.cgs
sim/testsuite/sim/frv/fmsubd.cgs
sim/testsuite/sim/frv/fmsubs.cgs
sim/testsuite/sim/frv/fmuld.cgs
sim/testsuite/sim/frv/fmuls.cgs
sim/testsuite/sim/frv/fnegd.cgs
sim/testsuite/sim/frv/fnegs.cgs
sim/testsuite/sim/frv/fnop.cgs
sim/testsuite/sim/frv/fr400/addss.cgs
sim/testsuite/sim/frv/fr400/allinsn.exp
sim/testsuite/sim/frv/fr400/csdiv.cgs
sim/testsuite/sim/frv/fr400/maddaccs.cgs
sim/testsuite/sim/frv/fr400/masaccs.cgs
sim/testsuite/sim/frv/fr400/maveh.cgs
sim/testsuite/sim/frv/fr400/mclracc.cgs
sim/testsuite/sim/frv/fr400/mhdseth.cgs
sim/testsuite/sim/frv/fr400/mhdsets.cgs
sim/testsuite/sim/frv/fr400/mhsethih.cgs
sim/testsuite/sim/frv/fr400/mhsethis.cgs
sim/testsuite/sim/frv/fr400/mhsetloh.cgs
sim/testsuite/sim/frv/fr400/mhsetlos.cgs
sim/testsuite/sim/frv/fr400/movgs.cgs
sim/testsuite/sim/frv/fr400/movsg.cgs
sim/testsuite/sim/frv/fr400/msubaccs.cgs
sim/testsuite/sim/frv/fr400/scutss.cgs
sim/testsuite/sim/frv/fr400/sdiv.cgs
sim/testsuite/sim/frv/fr400/sdivi.cgs
sim/testsuite/sim/frv/fr400/slass.cgs
sim/testsuite/sim/frv/fr400/smass.cgs
sim/testsuite/sim/frv/fr400/smsss.cgs
sim/testsuite/sim/frv/fr400/smu.cgs
sim/testsuite/sim/frv/fr400/subss.cgs
sim/testsuite/sim/frv/fr400/udiv.cgs
sim/testsuite/sim/frv/fr400/udivi.cgs
sim/testsuite/sim/frv/fr500/allinsn.exp
sim/testsuite/sim/frv/fr500/cmqaddhss.cgs
sim/testsuite/sim/frv/fr500/cmqaddhus.cgs
sim/testsuite/sim/frv/fr500/cmqsubhss.cgs
sim/testsuite/sim/frv/fr500/cmqsubhus.cgs
sim/testsuite/sim/frv/fr500/dcpl.cgs
sim/testsuite/sim/frv/fr500/dcul.cgs
sim/testsuite/sim/frv/fr500/mclracc.cgs
sim/testsuite/sim/frv/fr500/mqaddhss.cgs
sim/testsuite/sim/frv/fr500/mqaddhus.cgs
sim/testsuite/sim/frv/fr500/mqsubhss.cgs
sim/testsuite/sim/frv/fr500/mqsubhus.cgs
sim/testsuite/sim/frv/fr550/allinsn.exp
sim/testsuite/sim/frv/fr550/cmaddhss.cgs
sim/testsuite/sim/frv/fr550/cmaddhus.cgs
sim/testsuite/sim/frv/fr550/cmcpxiu.cgs
sim/testsuite/sim/frv/fr550/cmcpxru.cgs
sim/testsuite/sim/frv/fr550/cmmachs.cgs
sim/testsuite/sim/frv/fr550/cmmachu.cgs
sim/testsuite/sim/frv/fr550/cmqaddhss.cgs
sim/testsuite/sim/frv/fr550/cmqaddhus.cgs
sim/testsuite/sim/frv/fr550/cmqmachs.cgs
sim/testsuite/sim/frv/fr550/cmqmachu.cgs
sim/testsuite/sim/frv/fr550/cmqsubhss.cgs
sim/testsuite/sim/frv/fr550/cmqsubhus.cgs
sim/testsuite/sim/frv/fr550/cmsubhss.cgs
sim/testsuite/sim/frv/fr550/cmsubhus.cgs
sim/testsuite/sim/frv/fr550/dcpl.cgs
sim/testsuite/sim/frv/fr550/dcul.cgs
sim/testsuite/sim/frv/fr550/mabshs.cgs
sim/testsuite/sim/frv/fr550/maddaccs.cgs
sim/testsuite/sim/frv/fr550/maddhss.cgs
sim/testsuite/sim/frv/fr550/maddhus.cgs
sim/testsuite/sim/frv/fr550/masaccs.cgs
sim/testsuite/sim/frv/fr550/mdaddaccs.cgs
sim/testsuite/sim/frv/fr550/mdasaccs.cgs
sim/testsuite/sim/frv/fr550/mdsubaccs.cgs
sim/testsuite/sim/frv/fr550/mmachs.cgs
sim/testsuite/sim/frv/fr550/mmachu.cgs
sim/testsuite/sim/frv/fr550/mmrdhs.cgs
sim/testsuite/sim/frv/fr550/mmrdhu.cgs
sim/testsuite/sim/frv/fr550/mqaddhss.cgs
sim/testsuite/sim/frv/fr550/mqaddhus.cgs
sim/testsuite/sim/frv/fr550/mqmachs.cgs
sim/testsuite/sim/frv/fr550/mqmachu.cgs
sim/testsuite/sim/frv/fr550/mqmacxhs.cgs
sim/testsuite/sim/frv/fr550/mqsubhss.cgs
sim/testsuite/sim/frv/fr550/mqsubhus.cgs
sim/testsuite/sim/frv/fr550/mqxmachs.cgs
sim/testsuite/sim/frv/fr550/mqxmacxhs.cgs
sim/testsuite/sim/frv/fr550/msubaccs.cgs
sim/testsuite/sim/frv/fr550/msubhss.cgs
sim/testsuite/sim/frv/fr550/msubhus.cgs
sim/testsuite/sim/frv/fr550/mtrap.cgs
sim/testsuite/sim/frv/fr550/udiv.cgs
sim/testsuite/sim/frv/fr550/udivi.cgs
sim/testsuite/sim/frv/fsqrtd.cgs
sim/testsuite/sim/frv/fsqrts.cgs
sim/testsuite/sim/frv/fstoi.cgs
sim/testsuite/sim/frv/fsubd.cgs
sim/testsuite/sim/frv/fsubs.cgs
sim/testsuite/sim/frv/fteq.cgs
sim/testsuite/sim/frv/ftge.cgs
sim/testsuite/sim/frv/ftgt.cgs
sim/testsuite/sim/frv/ftieq.cgs
sim/testsuite/sim/frv/ftige.cgs
sim/testsuite/sim/frv/ftigt.cgs
sim/testsuite/sim/frv/ftile.cgs
sim/testsuite/sim/frv/ftilg.cgs
sim/testsuite/sim/frv/ftilt.cgs
sim/testsuite/sim/frv/ftine.cgs
sim/testsuite/sim/frv/ftino.cgs
sim/testsuite/sim/frv/ftio.cgs
sim/testsuite/sim/frv/ftira.cgs
sim/testsuite/sim/frv/ftiu.cgs
sim/testsuite/sim/frv/ftiue.cgs
sim/testsuite/sim/frv/ftiug.cgs
sim/testsuite/sim/frv/ftiuge.cgs
sim/testsuite/sim/frv/ftiul.cgs
sim/testsuite/sim/frv/ftle.cgs
sim/testsuite/sim/frv/ftlg.cgs
sim/testsuite/sim/frv/ftlt.cgs
sim/testsuite/sim/frv/ftne.cgs
sim/testsuite/sim/frv/ftno.cgs
sim/testsuite/sim/frv/fto.cgs
sim/testsuite/sim/frv/ftra.cgs
sim/testsuite/sim/frv/ftu.cgs
sim/testsuite/sim/frv/ftue.cgs
sim/testsuite/sim/frv/ftug.cgs
sim/testsuite/sim/frv/ftuge.cgs
sim/testsuite/sim/frv/ftul.cgs
sim/testsuite/sim/frv/ftule.cgs
sim/testsuite/sim/frv/icei.cgs
sim/testsuite/sim/frv/ici.cgs
sim/testsuite/sim/frv/icpl.cgs
sim/testsuite/sim/frv/icul.cgs
sim/testsuite/sim/frv/interrupts.exp
sim/testsuite/sim/frv/interrupts/Ipipe-fr400.cgs
sim/testsuite/sim/frv/interrupts/Ipipe-fr500.cgs
sim/testsuite/sim/frv/interrupts/badalign-fr550.cgs
sim/testsuite/sim/frv/interrupts/badalign.cgs
sim/testsuite/sim/frv/interrupts/compound-fr550.cgs
sim/testsuite/sim/frv/interrupts/compound.cgs
sim/testsuite/sim/frv/interrupts/data_store_error-fr550.cgs
sim/testsuite/sim/frv/interrupts/data_store_error.cgs
sim/testsuite/sim/frv/interrupts/fp_exception-fr550.cgs
sim/testsuite/sim/frv/interrupts/fp_exception.cgs
sim/testsuite/sim/frv/interrupts/illinsn.cgs
sim/testsuite/sim/frv/interrupts/insn_access_error-fr550.cgs
sim/testsuite/sim/frv/interrupts/insn_access_error.cgs
sim/testsuite/sim/frv/interrupts/mp_exception.cgs
sim/testsuite/sim/frv/interrupts/privileged_instruction.cgs
sim/testsuite/sim/frv/interrupts/regalign.cgs
sim/testsuite/sim/frv/interrupts/reset.cgs
sim/testsuite/sim/frv/interrupts/shadow_regs.cgs
sim/testsuite/sim/frv/interrupts/timer.cgs
sim/testsuite/sim/frv/jmpil.cgs
sim/testsuite/sim/frv/jmpl.cgs
sim/testsuite/sim/frv/jmpl.pcgs
sim/testsuite/sim/frv/ld.cgs
sim/testsuite/sim/frv/ldbf.cgs
sim/testsuite/sim/frv/ldbfi.cgs
sim/testsuite/sim/frv/ldbfu.cgs
sim/testsuite/sim/frv/ldc.cgs
sim/testsuite/sim/frv/ldcu.cgs
sim/testsuite/sim/frv/ldd.cgs
sim/testsuite/sim/frv/lddc.cgs
sim/testsuite/sim/frv/lddcu.cgs
sim/testsuite/sim/frv/lddf.cgs
sim/testsuite/sim/frv/lddfi.cgs
sim/testsuite/sim/frv/lddfu.cgs
sim/testsuite/sim/frv/lddi.cgs
sim/testsuite/sim/frv/lddu.cgs
sim/testsuite/sim/frv/ldf.cgs
sim/testsuite/sim/frv/ldfi.cgs
sim/testsuite/sim/frv/ldfu.cgs
sim/testsuite/sim/frv/ldhf.cgs
sim/testsuite/sim/frv/ldhfi.cgs
sim/testsuite/sim/frv/ldhfu.cgs
sim/testsuite/sim/frv/ldi.cgs
sim/testsuite/sim/frv/ldq.cgs
sim/testsuite/sim/frv/ldqc.cgs
sim/testsuite/sim/frv/ldqcu.cgs
sim/testsuite/sim/frv/ldqf.cgs
sim/testsuite/sim/frv/ldqfi.cgs
sim/testsuite/sim/frv/ldqfu.cgs
sim/testsuite/sim/frv/ldqi.cgs
sim/testsuite/sim/frv/ldqu.cgs
sim/testsuite/sim/frv/ldsb.cgs
sim/testsuite/sim/frv/ldsbi.cgs
sim/testsuite/sim/frv/ldsbu.cgs
sim/testsuite/sim/frv/ldsh.cgs
sim/testsuite/sim/frv/ldshi.cgs
sim/testsuite/sim/frv/ldshu.cgs
sim/testsuite/sim/frv/ldu.cgs
sim/testsuite/sim/frv/ldub.cgs
sim/testsuite/sim/frv/ldubi.cgs
sim/testsuite/sim/frv/ldubu.cgs
sim/testsuite/sim/frv/lduh.cgs
sim/testsuite/sim/frv/lduhi.cgs
sim/testsuite/sim/frv/lduhu.cgs
sim/testsuite/sim/frv/lrbranch.pcgs
sim/testsuite/sim/frv/mabshs.cgs
sim/testsuite/sim/frv/maddhss.cgs
sim/testsuite/sim/frv/maddhus.cgs
sim/testsuite/sim/frv/mand.cgs
sim/testsuite/sim/frv/maveh.cgs
sim/testsuite/sim/frv/mbtoh.cgs
sim/testsuite/sim/frv/mbtohe.cgs
sim/testsuite/sim/frv/mclracc.cgs
sim/testsuite/sim/frv/mcmpsh.cgs
sim/testsuite/sim/frv/mcmpuh.cgs
sim/testsuite/sim/frv/mcop1.cgs
sim/testsuite/sim/frv/mcop2.cgs
sim/testsuite/sim/frv/mcplhi.cgs
sim/testsuite/sim/frv/mcpli.cgs
sim/testsuite/sim/frv/mcpxis.cgs
sim/testsuite/sim/frv/mcpxiu.cgs
sim/testsuite/sim/frv/mcpxrs.cgs
sim/testsuite/sim/frv/mcpxru.cgs
sim/testsuite/sim/frv/mcut.cgs
sim/testsuite/sim/frv/mcuti.cgs
sim/testsuite/sim/frv/mcutss.cgs
sim/testsuite/sim/frv/mcutssi.cgs
sim/testsuite/sim/frv/mdaddaccs.cgs
sim/testsuite/sim/frv/mdasaccs.cgs
sim/testsuite/sim/frv/mdcutssi.cgs
sim/testsuite/sim/frv/mdpackh.cgs
sim/testsuite/sim/frv/mdrotli.cgs
sim/testsuite/sim/frv/mdsubaccs.cgs
sim/testsuite/sim/frv/mdunpackh.cgs
sim/testsuite/sim/frv/membar.cgs
sim/testsuite/sim/frv/mexpdhd.cgs
sim/testsuite/sim/frv/mexpdhw.cgs
sim/testsuite/sim/frv/mhdseth.cgs
sim/testsuite/sim/frv/mhdsets.cgs
sim/testsuite/sim/frv/mhsethih.cgs
sim/testsuite/sim/frv/mhsethis.cgs
sim/testsuite/sim/frv/mhsetloh.cgs
sim/testsuite/sim/frv/mhsetlos.cgs
sim/testsuite/sim/frv/mhtob.cgs
sim/testsuite/sim/frv/mmachs.cgs
sim/testsuite/sim/frv/mmachu.cgs
sim/testsuite/sim/frv/mmrdhs.cgs
sim/testsuite/sim/frv/mmrdhu.cgs
sim/testsuite/sim/frv/mmulhs.cgs
sim/testsuite/sim/frv/mmulhu.cgs
sim/testsuite/sim/frv/mmulxhs.cgs
sim/testsuite/sim/frv/mmulxhu.cgs
sim/testsuite/sim/frv/mnop.cgs
sim/testsuite/sim/frv/mnot.cgs
sim/testsuite/sim/frv/mor.cgs
sim/testsuite/sim/frv/mov.cgs
sim/testsuite/sim/frv/movfg.cgs
sim/testsuite/sim/frv/movfgd.cgs
sim/testsuite/sim/frv/movfgq.cgs
sim/testsuite/sim/frv/movgf.cgs
sim/testsuite/sim/frv/movgfd.cgs
sim/testsuite/sim/frv/movgfq.cgs
sim/testsuite/sim/frv/movgs.cgs
sim/testsuite/sim/frv/movsg.cgs
sim/testsuite/sim/frv/mpackh.cgs
sim/testsuite/sim/frv/mqcpxis.cgs
sim/testsuite/sim/frv/mqcpxiu.cgs
sim/testsuite/sim/frv/mqcpxrs.cgs
sim/testsuite/sim/frv/mqcpxru.cgs
sim/testsuite/sim/frv/mqlclrhs.cgs
sim/testsuite/sim/frv/mqlmths.cgs
sim/testsuite/sim/frv/mqmachs.cgs
sim/testsuite/sim/frv/mqmachu.cgs
sim/testsuite/sim/frv/mqmacxhs.cgs
sim/testsuite/sim/frv/mqmulhs.cgs
sim/testsuite/sim/frv/mqmulhu.cgs
sim/testsuite/sim/frv/mqmulxhs.cgs
sim/testsuite/sim/frv/mqmulxhu.cgs
sim/testsuite/sim/frv/mqsaths.cgs
sim/testsuite/sim/frv/mqsllhi.cgs
sim/testsuite/sim/frv/mqsrahi.cgs
sim/testsuite/sim/frv/mqxmachs.cgs
sim/testsuite/sim/frv/mqxmacxhs.cgs
sim/testsuite/sim/frv/mrdacc.cgs
sim/testsuite/sim/frv/mrdaccg.cgs
sim/testsuite/sim/frv/mrotli.cgs
sim/testsuite/sim/frv/mrotri.cgs
sim/testsuite/sim/frv/msaths.cgs
sim/testsuite/sim/frv/msathu.cgs
sim/testsuite/sim/frv/msllhi.cgs
sim/testsuite/sim/frv/msrahi.cgs
sim/testsuite/sim/frv/msrlhi.cgs
sim/testsuite/sim/frv/msubhss.cgs
sim/testsuite/sim/frv/msubhus.cgs
sim/testsuite/sim/frv/mtrap.cgs
sim/testsuite/sim/frv/munpackh.cgs
sim/testsuite/sim/frv/mwcut.cgs
sim/testsuite/sim/frv/mwcuti.cgs
sim/testsuite/sim/frv/mwtacc.cgs
sim/testsuite/sim/frv/mwtaccg.cgs
sim/testsuite/sim/frv/mxor.cgs
sim/testsuite/sim/frv/nandcr.cgs
sim/testsuite/sim/frv/nandncr.cgs
sim/testsuite/sim/frv/nfadds.cgs
sim/testsuite/sim/frv/nfdadds.cgs
sim/testsuite/sim/frv/nfdcmps.cgs
sim/testsuite/sim/frv/nfddivs.cgs
sim/testsuite/sim/frv/nfditos.cgs
sim/testsuite/sim/frv/nfdivs.cgs
sim/testsuite/sim/frv/nfdmadds.cgs
sim/testsuite/sim/frv/nfdmas.cgs
sim/testsuite/sim/frv/nfdmss.cgs
sim/testsuite/sim/frv/nfdmulcs.cgs
sim/testsuite/sim/frv/nfdmuls.cgs
sim/testsuite/sim/frv/nfdsads.cgs
sim/testsuite/sim/frv/nfdsqrts.cgs
sim/testsuite/sim/frv/nfdstoi.cgs
sim/testsuite/sim/frv/nfdsubs.cgs
sim/testsuite/sim/frv/nfitos.cgs
sim/testsuite/sim/frv/nfmadds.cgs
sim/testsuite/sim/frv/nfmas.cgs
sim/testsuite/sim/frv/nfmss.cgs
sim/testsuite/sim/frv/nfmsubs.cgs
sim/testsuite/sim/frv/nfmuls.cgs
sim/testsuite/sim/frv/nfsqrts.cgs
sim/testsuite/sim/frv/nfstoi.cgs
sim/testsuite/sim/frv/nfsubs.cgs
sim/testsuite/sim/frv/nld.cgs
sim/testsuite/sim/frv/nldbf.cgs
sim/testsuite/sim/frv/nldbfi.cgs
sim/testsuite/sim/frv/nldbfu.cgs
sim/testsuite/sim/frv/nldd.cgs
sim/testsuite/sim/frv/nlddf.cgs
sim/testsuite/sim/frv/nlddfi.cgs
sim/testsuite/sim/frv/nlddfu.cgs
sim/testsuite/sim/frv/nlddi.cgs
sim/testsuite/sim/frv/nlddu.cgs
sim/testsuite/sim/frv/nldf.cgs
sim/testsuite/sim/frv/nldfi.cgs
sim/testsuite/sim/frv/nldfu.cgs
sim/testsuite/sim/frv/nldhf.cgs
sim/testsuite/sim/frv/nldhfi.cgs
sim/testsuite/sim/frv/nldhfu.cgs
sim/testsuite/sim/frv/nldi.cgs
sim/testsuite/sim/frv/nldq.cgs
sim/testsuite/sim/frv/nldqf.cgs
sim/testsuite/sim/frv/nldqfi.cgs
sim/testsuite/sim/frv/nldqfu.cgs
sim/testsuite/sim/frv/nldqu.cgs
sim/testsuite/sim/frv/nldsb.cgs
sim/testsuite/sim/frv/nldsbi.cgs
sim/testsuite/sim/frv/nldsbu.cgs
sim/testsuite/sim/frv/nldsh.cgs
sim/testsuite/sim/frv/nldshi.cgs
sim/testsuite/sim/frv/nldshu.cgs
sim/testsuite/sim/frv/nldu.cgs
sim/testsuite/sim/frv/nldub.cgs
sim/testsuite/sim/frv/nldubi.cgs
sim/testsuite/sim/frv/nldubu.cgs
sim/testsuite/sim/frv/nlduh.cgs
sim/testsuite/sim/frv/nlduhi.cgs
sim/testsuite/sim/frv/nlduhu.cgs
sim/testsuite/sim/frv/nop.cgs
sim/testsuite/sim/frv/norcr.cgs
sim/testsuite/sim/frv/norncr.cgs
sim/testsuite/sim/frv/not.cgs
sim/testsuite/sim/frv/notcr.cgs
sim/testsuite/sim/frv/nsdiv.cgs
sim/testsuite/sim/frv/nsdivi.cgs
sim/testsuite/sim/frv/nudiv.cgs
sim/testsuite/sim/frv/nudivi.cgs
sim/testsuite/sim/frv/or.cgs
sim/testsuite/sim/frv/orcc.cgs
sim/testsuite/sim/frv/orcr.cgs
sim/testsuite/sim/frv/ori.cgs
sim/testsuite/sim/frv/oricc.cgs
sim/testsuite/sim/frv/orncr.cgs
sim/testsuite/sim/frv/parallel.exp
sim/testsuite/sim/frv/ret.cgs
sim/testsuite/sim/frv/rett.cgs
sim/testsuite/sim/frv/scan.cgs
sim/testsuite/sim/frv/scani.cgs
sim/testsuite/sim/frv/sdiv.cgs
sim/testsuite/sim/frv/sdivi.cgs
sim/testsuite/sim/frv/sethi.cgs
sim/testsuite/sim/frv/sethilo.pcgs
sim/testsuite/sim/frv/setlo.cgs
sim/testsuite/sim/frv/setlos.cgs
sim/testsuite/sim/frv/sll.cgs
sim/testsuite/sim/frv/sllcc.cgs
sim/testsuite/sim/frv/slli.cgs
sim/testsuite/sim/frv/sllicc.cgs
sim/testsuite/sim/frv/smul.cgs
sim/testsuite/sim/frv/smulcc.cgs
sim/testsuite/sim/frv/smuli.cgs
sim/testsuite/sim/frv/smulicc.cgs
sim/testsuite/sim/frv/sra.cgs
sim/testsuite/sim/frv/sracc.cgs
sim/testsuite/sim/frv/srai.cgs
sim/testsuite/sim/frv/sraicc.cgs
sim/testsuite/sim/frv/srl.cgs
sim/testsuite/sim/frv/srlcc.cgs
sim/testsuite/sim/frv/srli.cgs
sim/testsuite/sim/frv/srlicc.cgs
sim/testsuite/sim/frv/st.cgs
sim/testsuite/sim/frv/stb.cgs
sim/testsuite/sim/frv/stbf.cgs
sim/testsuite/sim/frv/stbfi.cgs
sim/testsuite/sim/frv/stbfu.cgs
sim/testsuite/sim/frv/stbi.cgs
sim/testsuite/sim/frv/stbu.cgs
sim/testsuite/sim/frv/stc.cgs
sim/testsuite/sim/frv/stcu.cgs
sim/testsuite/sim/frv/std.cgs
sim/testsuite/sim/frv/std.pcgs
sim/testsuite/sim/frv/stdc.cgs
sim/testsuite/sim/frv/stdc.pcgs
sim/testsuite/sim/frv/stdcu.cgs
sim/testsuite/sim/frv/stdf.cgs
sim/testsuite/sim/frv/stdf.pcgs
sim/testsuite/sim/frv/stdfi.cgs
sim/testsuite/sim/frv/stdfu.cgs
sim/testsuite/sim/frv/stdi.cgs
sim/testsuite/sim/frv/stdu.cgs
sim/testsuite/sim/frv/stf.cgs
sim/testsuite/sim/frv/stfi.cgs
sim/testsuite/sim/frv/stfu.cgs
sim/testsuite/sim/frv/sth.cgs
sim/testsuite/sim/frv/sthf.cgs
sim/testsuite/sim/frv/sthfi.cgs
sim/testsuite/sim/frv/sthfu.cgs
sim/testsuite/sim/frv/sthi.cgs
sim/testsuite/sim/frv/sthu.cgs
sim/testsuite/sim/frv/sti.cgs
sim/testsuite/sim/frv/stq.cgs
sim/testsuite/sim/frv/stq.pcgs
sim/testsuite/sim/frv/stqc.cgs
sim/testsuite/sim/frv/stqc.pcgs
sim/testsuite/sim/frv/stqcu.cgs
sim/testsuite/sim/frv/stqf.cgs
sim/testsuite/sim/frv/stqf.pcgs
sim/testsuite/sim/frv/stqfi.cgs
sim/testsuite/sim/frv/stqfu.cgs
sim/testsuite/sim/frv/stqi.cgs
sim/testsuite/sim/frv/stqu.cgs
sim/testsuite/sim/frv/stu.cgs
sim/testsuite/sim/frv/sub.cgs
sim/testsuite/sim/frv/subcc.cgs
sim/testsuite/sim/frv/subi.cgs
sim/testsuite/sim/frv/subicc.cgs
sim/testsuite/sim/frv/subx.cgs
sim/testsuite/sim/frv/subxcc.cgs
sim/testsuite/sim/frv/subxi.cgs
sim/testsuite/sim/frv/subxicc.cgs
sim/testsuite/sim/frv/swap.cgs
sim/testsuite/sim/frv/swapi.cgs
sim/testsuite/sim/frv/tc.cgs
sim/testsuite/sim/frv/teq.cgs
sim/testsuite/sim/frv/testutils.inc
sim/testsuite/sim/frv/tge.cgs
sim/testsuite/sim/frv/tgt.cgs
sim/testsuite/sim/frv/thi.cgs
sim/testsuite/sim/frv/tic.cgs
sim/testsuite/sim/frv/tieq.cgs
sim/testsuite/sim/frv/tige.cgs
sim/testsuite/sim/frv/tigt.cgs
sim/testsuite/sim/frv/tihi.cgs
sim/testsuite/sim/frv/tile.cgs
sim/testsuite/sim/frv/tils.cgs
sim/testsuite/sim/frv/tilt.cgs
sim/testsuite/sim/frv/tin.cgs
sim/testsuite/sim/frv/tinc.cgs
sim/testsuite/sim/frv/tine.cgs
sim/testsuite/sim/frv/tino.cgs
sim/testsuite/sim/frv/tinv.cgs
sim/testsuite/sim/frv/tip.cgs
sim/testsuite/sim/frv/tira.cgs
sim/testsuite/sim/frv/tiv.cgs
sim/testsuite/sim/frv/tle.cgs
sim/testsuite/sim/frv/tls.cgs
sim/testsuite/sim/frv/tlt.cgs
sim/testsuite/sim/frv/tn.cgs
sim/testsuite/sim/frv/tnc.cgs
sim/testsuite/sim/frv/tne.cgs
sim/testsuite/sim/frv/tno.cgs
sim/testsuite/sim/frv/tnv.cgs
sim/testsuite/sim/frv/tp.cgs
sim/testsuite/sim/frv/tra.cgs
sim/testsuite/sim/frv/tv.cgs
sim/testsuite/sim/frv/udiv.cgs
sim/testsuite/sim/frv/udivi.cgs
sim/testsuite/sim/frv/umul.cgs
sim/testsuite/sim/frv/umulcc.cgs
sim/testsuite/sim/frv/umuli.cgs
sim/testsuite/sim/frv/umulicc.cgs
sim/testsuite/sim/frv/xor.cgs
sim/testsuite/sim/frv/xorcc.cgs
sim/testsuite/sim/frv/xorcr.cgs
sim/testsuite/sim/frv/xori.cgs
sim/testsuite/sim/frv/xoricc.cgs
sim/testsuite/sim/h8300/ChangeLog
sim/testsuite/sim/h8300/addb.s
sim/testsuite/sim/h8300/addl.s
sim/testsuite/sim/h8300/adds.s
sim/testsuite/sim/h8300/addw.s
sim/testsuite/sim/h8300/addx.s
sim/testsuite/sim/h8300/allinsn.exp
sim/testsuite/sim/h8300/andb.s
sim/testsuite/sim/h8300/andl.s
sim/testsuite/sim/h8300/andw.s
sim/testsuite/sim/h8300/band.s
sim/testsuite/sim/h8300/bfld.s
sim/testsuite/sim/h8300/biand.s
sim/testsuite/sim/h8300/bra.s
sim/testsuite/sim/h8300/brabc.s
sim/testsuite/sim/h8300/bset.s
sim/testsuite/sim/h8300/cmpb.s
sim/testsuite/sim/h8300/cmpl.s
sim/testsuite/sim/h8300/cmpw.s
sim/testsuite/sim/h8300/daa.s
sim/testsuite/sim/h8300/das.s
sim/testsuite/sim/h8300/dec.s
sim/testsuite/sim/h8300/div.s
sim/testsuite/sim/h8300/extl.s
sim/testsuite/sim/h8300/extw.s
sim/testsuite/sim/h8300/inc.s
sim/testsuite/sim/h8300/jmp.s
sim/testsuite/sim/h8300/ldc.s
sim/testsuite/sim/h8300/ldm.s
sim/testsuite/sim/h8300/mac.s
sim/testsuite/sim/h8300/mova.s
sim/testsuite/sim/h8300/movb.s
sim/testsuite/sim/h8300/movl.s
sim/testsuite/sim/h8300/movmd.s
sim/testsuite/sim/h8300/movsd.s
sim/testsuite/sim/h8300/movw.s
sim/testsuite/sim/h8300/mul.s
sim/testsuite/sim/h8300/neg.s
sim/testsuite/sim/h8300/nop.s
sim/testsuite/sim/h8300/not.s
sim/testsuite/sim/h8300/orb.s
sim/testsuite/sim/h8300/orl.s
sim/testsuite/sim/h8300/orw.s
sim/testsuite/sim/h8300/rotl.s
sim/testsuite/sim/h8300/rotr.s
sim/testsuite/sim/h8300/rotxl.s
sim/testsuite/sim/h8300/rotxr.s
sim/testsuite/sim/h8300/shal.s
sim/testsuite/sim/h8300/shar.s
sim/testsuite/sim/h8300/shll.s
sim/testsuite/sim/h8300/shlr.s
sim/testsuite/sim/h8300/stack.s
sim/testsuite/sim/h8300/stc.s
sim/testsuite/sim/h8300/subb.s
sim/testsuite/sim/h8300/subl.s
sim/testsuite/sim/h8300/subs.s
sim/testsuite/sim/h8300/subw.s
sim/testsuite/sim/h8300/subx.s
sim/testsuite/sim/h8300/tas.s
sim/testsuite/sim/h8300/testutils.inc
sim/testsuite/sim/h8300/xorb.s
sim/testsuite/sim/h8300/xorl.s
sim/testsuite/sim/h8300/xorw.s
sim/testsuite/sim/m32r/add.cgs
sim/testsuite/sim/m32r/add3.cgs
sim/testsuite/sim/m32r/addi.cgs
sim/testsuite/sim/m32r/addv.cgs
sim/testsuite/sim/m32r/addv3.cgs
sim/testsuite/sim/m32r/addx.cgs
sim/testsuite/sim/m32r/allinsn.exp
sim/testsuite/sim/m32r/and.cgs
sim/testsuite/sim/m32r/and3.cgs
sim/testsuite/sim/m32r/bc24.cgs
sim/testsuite/sim/m32r/bc8.cgs
sim/testsuite/sim/m32r/beq.cgs
sim/testsuite/sim/m32r/beqz.cgs
sim/testsuite/sim/m32r/bgez.cgs
sim/testsuite/sim/m32r/bgtz.cgs
sim/testsuite/sim/m32r/bl24.cgs
sim/testsuite/sim/m32r/bl8.cgs
sim/testsuite/sim/m32r/blez.cgs
sim/testsuite/sim/m32r/bltz.cgs
sim/testsuite/sim/m32r/bnc24.cgs
sim/testsuite/sim/m32r/bnc8.cgs
sim/testsuite/sim/m32r/bne.cgs
sim/testsuite/sim/m32r/bnez.cgs
sim/testsuite/sim/m32r/bra24.cgs
sim/testsuite/sim/m32r/bra8.cgs
sim/testsuite/sim/m32r/cmp.cgs
sim/testsuite/sim/m32r/cmpi.cgs
sim/testsuite/sim/m32r/cmpu.cgs
sim/testsuite/sim/m32r/cmpui.cgs
sim/testsuite/sim/m32r/div.cgs
sim/testsuite/sim/m32r/divu.cgs
sim/testsuite/sim/m32r/hello.ms
sim/testsuite/sim/m32r/hw-trap.ms
sim/testsuite/sim/m32r/jl.cgs
sim/testsuite/sim/m32r/jmp.cgs
sim/testsuite/sim/m32r/ld-d.cgs
sim/testsuite/sim/m32r/ld-plus.cgs
sim/testsuite/sim/m32r/ld.cgs
sim/testsuite/sim/m32r/ld24.cgs
sim/testsuite/sim/m32r/ldb-d.cgs
sim/testsuite/sim/m32r/ldb.cgs
sim/testsuite/sim/m32r/ldh-d.cgs
sim/testsuite/sim/m32r/ldh.cgs
sim/testsuite/sim/m32r/ldi16.cgs
sim/testsuite/sim/m32r/ldi8.cgs
sim/testsuite/sim/m32r/ldub-d.cgs
sim/testsuite/sim/m32r/ldub.cgs
sim/testsuite/sim/m32r/lduh-d.cgs
sim/testsuite/sim/m32r/lduh.cgs
sim/testsuite/sim/m32r/lock.cgs
sim/testsuite/sim/m32r/machi.cgs
sim/testsuite/sim/m32r/maclo.cgs
sim/testsuite/sim/m32r/macwhi.cgs
sim/testsuite/sim/m32r/macwlo.cgs
sim/testsuite/sim/m32r/misc.exp
sim/testsuite/sim/m32r/mul.cgs
sim/testsuite/sim/m32r/mulhi.cgs
sim/testsuite/sim/m32r/mullo.cgs
sim/testsuite/sim/m32r/mulwhi.cgs
sim/testsuite/sim/m32r/mulwlo.cgs
sim/testsuite/sim/m32r/mv.cgs
sim/testsuite/sim/m32r/mvfachi.cgs
sim/testsuite/sim/m32r/mvfaclo.cgs
sim/testsuite/sim/m32r/mvfacmi.cgs
sim/testsuite/sim/m32r/mvfc.cgs
sim/testsuite/sim/m32r/mvtachi.cgs
sim/testsuite/sim/m32r/mvtaclo.cgs
sim/testsuite/sim/m32r/mvtc.cgs
sim/testsuite/sim/m32r/neg.cgs
sim/testsuite/sim/m32r/nop.cgs
sim/testsuite/sim/m32r/not.cgs
sim/testsuite/sim/m32r/or.cgs
sim/testsuite/sim/m32r/or3.cgs
sim/testsuite/sim/m32r/rac.cgs
sim/testsuite/sim/m32r/rach.cgs
sim/testsuite/sim/m32r/rem.cgs
sim/testsuite/sim/m32r/remu.cgs
sim/testsuite/sim/m32r/rte.cgs
sim/testsuite/sim/m32r/seth.cgs
sim/testsuite/sim/m32r/sll.cgs
sim/testsuite/sim/m32r/sll3.cgs
sim/testsuite/sim/m32r/slli.cgs
sim/testsuite/sim/m32r/sra.cgs
sim/testsuite/sim/m32r/sra3.cgs
sim/testsuite/sim/m32r/srai.cgs
sim/testsuite/sim/m32r/srl.cgs
sim/testsuite/sim/m32r/srl3.cgs
sim/testsuite/sim/m32r/srli.cgs
sim/testsuite/sim/m32r/st-d.cgs
sim/testsuite/sim/m32r/st-minus.cgs
sim/testsuite/sim/m32r/st-plus.cgs
sim/testsuite/sim/m32r/st.cgs
sim/testsuite/sim/m32r/stb-d.cgs
sim/testsuite/sim/m32r/stb.cgs
sim/testsuite/sim/m32r/sth-d.cgs
sim/testsuite/sim/m32r/sth.cgs
sim/testsuite/sim/m32r/sub.cgs
sim/testsuite/sim/m32r/subv.cgs
sim/testsuite/sim/m32r/subx.cgs
sim/testsuite/sim/m32r/testutils.inc
sim/testsuite/sim/m32r/trap.cgs
sim/testsuite/sim/m32r/unlock.cgs
sim/testsuite/sim/m32r/uread16.ms
sim/testsuite/sim/m32r/uread32.ms
sim/testsuite/sim/m32r/uwrite16.ms
sim/testsuite/sim/m32r/uwrite32.ms
sim/testsuite/sim/m32r/xor.cgs
sim/testsuite/sim/m32r/xor3.cgs
sim/testsuite/sim/mips/ChangeLog
sim/testsuite/sim/mips/basic.exp
sim/testsuite/sim/mips/fpu64-ps-sb1.s
sim/testsuite/sim/mips/fpu64-ps.s
sim/testsuite/sim/mips/hilo-hazard-1.s
sim/testsuite/sim/mips/hilo-hazard-2.s
sim/testsuite/sim/mips/hilo-hazard-3.s
sim/testsuite/sim/mips/mdmx-ob-sb1.s
sim/testsuite/sim/mips/mdmx-ob.s
sim/testsuite/sim/mips/mips32-dsp.s
sim/testsuite/sim/mips/sanity.s
sim/testsuite/sim/mips/testutils.inc
sim/testsuite/sim/mips/utils-dsp.inc
sim/testsuite/sim/mips/utils-fpu.inc
sim/testsuite/sim/mips/utils-mdmx.inc
sim/testsuite/sim/sh/ChangeLog
sim/testsuite/sim/sh/add.s
sim/testsuite/sim/sh/allinsn.exp
sim/testsuite/sim/sh/and.s
sim/testsuite/sim/sh/bandor.s
sim/testsuite/sim/sh/bandornot.s
sim/testsuite/sim/sh/bclr.s
sim/testsuite/sim/sh/bld.s
sim/testsuite/sim/sh/bldnot.s
sim/testsuite/sim/sh/bset.s
sim/testsuite/sim/sh/bst.s
sim/testsuite/sim/sh/bxor.s
sim/testsuite/sim/sh/clip.s
sim/testsuite/sim/sh/div.s
sim/testsuite/sim/sh/dmxy.s
sim/testsuite/sim/sh/fabs.s
sim/testsuite/sim/sh/fadd.s
sim/testsuite/sim/sh/fail.s
sim/testsuite/sim/sh/fcmpeq.s
sim/testsuite/sim/sh/fcmpgt.s
sim/testsuite/sim/sh/fcnvds.s
sim/testsuite/sim/sh/fcnvsd.s
sim/testsuite/sim/sh/fdiv.s
sim/testsuite/sim/sh/fipr.s
sim/testsuite/sim/sh/fldi0.s
sim/testsuite/sim/sh/fldi1.s
sim/testsuite/sim/sh/flds.s
sim/testsuite/sim/sh/float.s
sim/testsuite/sim/sh/fmac.s
sim/testsuite/sim/sh/fmov.s
sim/testsuite/sim/sh/fmul.s
sim/testsuite/sim/sh/fneg.s
sim/testsuite/sim/sh/fpchg.s
sim/testsuite/sim/sh/frchg.s
sim/testsuite/sim/sh/fsca.s
sim/testsuite/sim/sh/fschg.s
sim/testsuite/sim/sh/fsqrt.s
sim/testsuite/sim/sh/fsrra.s
sim/testsuite/sim/sh/fsub.s
sim/testsuite/sim/sh/ftrc.s
sim/testsuite/sim/sh/ldrc.s
sim/testsuite/sim/sh/loop.s
sim/testsuite/sim/sh/macl.s
sim/testsuite/sim/sh/macw.s
sim/testsuite/sim/sh/mov.s
sim/testsuite/sim/sh/movi.s
sim/testsuite/sim/sh/movli.s
sim/testsuite/sim/sh/movua.s
sim/testsuite/sim/sh/movxy.s
sim/testsuite/sim/sh/mulr.s
sim/testsuite/sim/sh/pabs.s
sim/testsuite/sim/sh/padd.s
sim/testsuite/sim/sh/paddc.s
sim/testsuite/sim/sh/pand.s
sim/testsuite/sim/sh/pass.s
sim/testsuite/sim/sh/pclr.s
sim/testsuite/sim/sh/pdec.s
sim/testsuite/sim/sh/pdmsb.s
sim/testsuite/sim/sh/pinc.s
sim/testsuite/sim/sh/pmuls.s
sim/testsuite/sim/sh/prnd.s
sim/testsuite/sim/sh/pshai.s
sim/testsuite/sim/sh/pshar.s
sim/testsuite/sim/sh/pshli.s
sim/testsuite/sim/sh/pshlr.s
sim/testsuite/sim/sh/psub.s
sim/testsuite/sim/sh/pswap.s
sim/testsuite/sim/sh/pushpop.s
sim/testsuite/sim/sh/resbank.s
sim/testsuite/sim/sh/sett.s
sim/testsuite/sim/sh/shll.s
sim/testsuite/sim/sh/shll16.s
sim/testsuite/sim/sh/shll2.s
sim/testsuite/sim/sh/shll8.s
sim/testsuite/sim/sh/shlr.s
sim/testsuite/sim/sh/shlr16.s
sim/testsuite/sim/sh/shlr2.s
sim/testsuite/sim/sh/shlr8.s
sim/testsuite/sim/sh/swap.s
sim/testsuite/sim/sh/testutils.inc
sim/testsuite/sim/sh64/ChangeLog
sim/testsuite/sim/sh64/compact.exp
sim/testsuite/sim/sh64/compact/ChangeLog
sim/testsuite/sim/sh64/compact/add.cgs
sim/testsuite/sim/sh64/compact/addc.cgs
sim/testsuite/sim/sh64/compact/addi.cgs
sim/testsuite/sim/sh64/compact/addv.cgs
sim/testsuite/sim/sh64/compact/and.cgs
sim/testsuite/sim/sh64/compact/andb.cgs
sim/testsuite/sim/sh64/compact/andi.cgs
sim/testsuite/sim/sh64/compact/bf.cgs
sim/testsuite/sim/sh64/compact/bfs.cgs
sim/testsuite/sim/sh64/compact/bra.cgs
sim/testsuite/sim/sh64/compact/braf.cgs
sim/testsuite/sim/sh64/compact/brk.cgs
sim/testsuite/sim/sh64/compact/bsr.cgs
sim/testsuite/sim/sh64/compact/bsrf.cgs
sim/testsuite/sim/sh64/compact/bt.cgs
sim/testsuite/sim/sh64/compact/bts.cgs
sim/testsuite/sim/sh64/compact/clrmac.cgs
sim/testsuite/sim/sh64/compact/clrs.cgs
sim/testsuite/sim/sh64/compact/clrt.cgs
sim/testsuite/sim/sh64/compact/cmpeq.cgs
sim/testsuite/sim/sh64/compact/cmpeqi.cgs
sim/testsuite/sim/sh64/compact/cmpge.cgs
sim/testsuite/sim/sh64/compact/cmpgt.cgs
sim/testsuite/sim/sh64/compact/cmphi.cgs
sim/testsuite/sim/sh64/compact/cmphs.cgs
sim/testsuite/sim/sh64/compact/cmppl.cgs
sim/testsuite/sim/sh64/compact/cmppz.cgs
sim/testsuite/sim/sh64/compact/cmpstr.cgs
sim/testsuite/sim/sh64/compact/div0s.cgs
sim/testsuite/sim/sh64/compact/div0u.cgs
sim/testsuite/sim/sh64/compact/div1.cgs
sim/testsuite/sim/sh64/compact/dmulsl.cgs
sim/testsuite/sim/sh64/compact/dmulul.cgs
sim/testsuite/sim/sh64/compact/dt.cgs
sim/testsuite/sim/sh64/compact/extsb.cgs
sim/testsuite/sim/sh64/compact/extsw.cgs
sim/testsuite/sim/sh64/compact/extub.cgs
sim/testsuite/sim/sh64/compact/extuw.cgs
sim/testsuite/sim/sh64/compact/fabs.cgs
sim/testsuite/sim/sh64/compact/fadd.cgs
sim/testsuite/sim/sh64/compact/fcmpeq.cgs
sim/testsuite/sim/sh64/compact/fcmpgt.cgs
sim/testsuite/sim/sh64/compact/fcnvds.cgs
sim/testsuite/sim/sh64/compact/fcnvsd.cgs
sim/testsuite/sim/sh64/compact/fdiv.cgs
sim/testsuite/sim/sh64/compact/fipr.cgs
sim/testsuite/sim/sh64/compact/fldi0.cgs
sim/testsuite/sim/sh64/compact/fldi1.cgs
sim/testsuite/sim/sh64/compact/flds.cgs
sim/testsuite/sim/sh64/compact/float.cgs
sim/testsuite/sim/sh64/compact/fmac.cgs
sim/testsuite/sim/sh64/compact/fmov.cgs
sim/testsuite/sim/sh64/compact/fmul.cgs
sim/testsuite/sim/sh64/compact/fneg.cgs
sim/testsuite/sim/sh64/compact/frchg.cgs
sim/testsuite/sim/sh64/compact/fschg.cgs
sim/testsuite/sim/sh64/compact/fsqrt.cgs
sim/testsuite/sim/sh64/compact/fsts.cgs
sim/testsuite/sim/sh64/compact/fsub.cgs
sim/testsuite/sim/sh64/compact/ftrc.cgs
sim/testsuite/sim/sh64/compact/ftrv.cgs
sim/testsuite/sim/sh64/compact/jmp.cgs
sim/testsuite/sim/sh64/compact/jsr.cgs
sim/testsuite/sim/sh64/compact/ldc-gbr.cgs
sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs
sim/testsuite/sim/sh64/compact/lds-fpscr.cgs
sim/testsuite/sim/sh64/compact/lds-fpul.cgs
sim/testsuite/sim/sh64/compact/lds-mach.cgs
sim/testsuite/sim/sh64/compact/lds-macl.cgs
sim/testsuite/sim/sh64/compact/lds-pr.cgs
sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs
sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs
sim/testsuite/sim/sh64/compact/ldsl-mach.cgs
sim/testsuite/sim/sh64/compact/ldsl-macl.cgs
sim/testsuite/sim/sh64/compact/ldsl-pr.cgs
sim/testsuite/sim/sh64/compact/macl.cgs
sim/testsuite/sim/sh64/compact/macw.cgs
sim/testsuite/sim/sh64/compact/mov.cgs
sim/testsuite/sim/sh64/compact/mova.cgs
sim/testsuite/sim/sh64/compact/movb1.cgs
sim/testsuite/sim/sh64/compact/movb10.cgs
sim/testsuite/sim/sh64/compact/movb2.cgs
sim/testsuite/sim/sh64/compact/movb3.cgs
sim/testsuite/sim/sh64/compact/movb4.cgs
sim/testsuite/sim/sh64/compact/movb5.cgs
sim/testsuite/sim/sh64/compact/movb6.cgs
sim/testsuite/sim/sh64/compact/movb7.cgs
sim/testsuite/sim/sh64/compact/movb8.cgs
sim/testsuite/sim/sh64/compact/movb9.cgs
sim/testsuite/sim/sh64/compact/movcal.cgs
sim/testsuite/sim/sh64/compact/movi.cgs
sim/testsuite/sim/sh64/compact/movl1.cgs
sim/testsuite/sim/sh64/compact/movl10.cgs
sim/testsuite/sim/sh64/compact/movl11.cgs
sim/testsuite/sim/sh64/compact/movl2.cgs
sim/testsuite/sim/sh64/compact/movl3.cgs
sim/testsuite/sim/sh64/compact/movl4.cgs
sim/testsuite/sim/sh64/compact/movl5.cgs
sim/testsuite/sim/sh64/compact/movl6.cgs
sim/testsuite/sim/sh64/compact/movl7.cgs
sim/testsuite/sim/sh64/compact/movl8.cgs
sim/testsuite/sim/sh64/compact/movl9.cgs
sim/testsuite/sim/sh64/compact/movt.cgs
sim/testsuite/sim/sh64/compact/movw1.cgs
sim/testsuite/sim/sh64/compact/movw10.cgs
sim/testsuite/sim/sh64/compact/movw11.cgs
sim/testsuite/sim/sh64/compact/movw2.cgs
sim/testsuite/sim/sh64/compact/movw3.cgs
sim/testsuite/sim/sh64/compact/movw4.cgs
sim/testsuite/sim/sh64/compact/movw5.cgs
sim/testsuite/sim/sh64/compact/movw6.cgs
sim/testsuite/sim/sh64/compact/movw7.cgs
sim/testsuite/sim/sh64/compact/movw8.cgs
sim/testsuite/sim/sh64/compact/movw9.cgs
sim/testsuite/sim/sh64/compact/mull.cgs
sim/testsuite/sim/sh64/compact/mulsw.cgs
sim/testsuite/sim/sh64/compact/muluw.cgs
sim/testsuite/sim/sh64/compact/neg.cgs
sim/testsuite/sim/sh64/compact/negc.cgs
sim/testsuite/sim/sh64/compact/nop.cgs
sim/testsuite/sim/sh64/compact/not.cgs
sim/testsuite/sim/sh64/compact/ocbi.cgs
sim/testsuite/sim/sh64/compact/ocbp.cgs
sim/testsuite/sim/sh64/compact/ocbwb.cgs
sim/testsuite/sim/sh64/compact/or.cgs
sim/testsuite/sim/sh64/compact/orb.cgs
sim/testsuite/sim/sh64/compact/ori.cgs
sim/testsuite/sim/sh64/compact/pref.cgs
sim/testsuite/sim/sh64/compact/rotcl.cgs
sim/testsuite/sim/sh64/compact/rotcr.cgs
sim/testsuite/sim/sh64/compact/rotl.cgs
sim/testsuite/sim/sh64/compact/rotr.cgs
sim/testsuite/sim/sh64/compact/rts.cgs
sim/testsuite/sim/sh64/compact/sets.cgs
sim/testsuite/sim/sh64/compact/sett.cgs
sim/testsuite/sim/sh64/compact/shad.cgs
sim/testsuite/sim/sh64/compact/shal.cgs
sim/testsuite/sim/sh64/compact/shar.cgs
sim/testsuite/sim/sh64/compact/shld.cgs
sim/testsuite/sim/sh64/compact/shll.cgs
sim/testsuite/sim/sh64/compact/shll16.cgs
sim/testsuite/sim/sh64/compact/shll2.cgs
sim/testsuite/sim/sh64/compact/shll8.cgs
sim/testsuite/sim/sh64/compact/shlr.cgs
sim/testsuite/sim/sh64/compact/shlr16.cgs
sim/testsuite/sim/sh64/compact/shlr2.cgs
sim/testsuite/sim/sh64/compact/shlr8.cgs
sim/testsuite/sim/sh64/compact/stc-gbr.cgs
sim/testsuite/sim/sh64/compact/stcl-gbr.cgs
sim/testsuite/sim/sh64/compact/sts-fpscr.cgs
sim/testsuite/sim/sh64/compact/sts-fpul.cgs
sim/testsuite/sim/sh64/compact/sts-mach.cgs
sim/testsuite/sim/sh64/compact/sts-macl.cgs
sim/testsuite/sim/sh64/compact/sts-pr.cgs
sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs
sim/testsuite/sim/sh64/compact/stsl-fpul.cgs
sim/testsuite/sim/sh64/compact/stsl-mach.cgs
sim/testsuite/sim/sh64/compact/stsl-macl.cgs
sim/testsuite/sim/sh64/compact/stsl-pr.cgs
sim/testsuite/sim/sh64/compact/sub.cgs
sim/testsuite/sim/sh64/compact/subc.cgs
sim/testsuite/sim/sh64/compact/subv.cgs
sim/testsuite/sim/sh64/compact/swapb.cgs
sim/testsuite/sim/sh64/compact/swapw.cgs
sim/testsuite/sim/sh64/compact/tasb.cgs
sim/testsuite/sim/sh64/compact/testutils.inc
sim/testsuite/sim/sh64/compact/trapa.cgs
sim/testsuite/sim/sh64/compact/tst.cgs
sim/testsuite/sim/sh64/compact/tstb.cgs
sim/testsuite/sim/sh64/compact/tsti.cgs
sim/testsuite/sim/sh64/compact/xor.cgs
sim/testsuite/sim/sh64/compact/xorb.cgs
sim/testsuite/sim/sh64/compact/xori.cgs
sim/testsuite/sim/sh64/compact/xtrct.cgs
sim/testsuite/sim/sh64/interwork.exp
sim/testsuite/sim/sh64/media.exp
sim/testsuite/sim/sh64/media/ChangeLog
sim/testsuite/sim/sh64/media/add.cgs
sim/testsuite/sim/sh64/media/addi.cgs
sim/testsuite/sim/sh64/media/addil.cgs
sim/testsuite/sim/sh64/media/addl.cgs
sim/testsuite/sim/sh64/media/addzl.cgs
sim/testsuite/sim/sh64/media/alloco.cgs
sim/testsuite/sim/sh64/media/and.cgs
sim/testsuite/sim/sh64/media/andc.cgs
sim/testsuite/sim/sh64/media/andi.cgs
sim/testsuite/sim/sh64/media/beq.cgs
sim/testsuite/sim/sh64/media/beqi.cgs
sim/testsuite/sim/sh64/media/bge.cgs
sim/testsuite/sim/sh64/media/bgeu.cgs
sim/testsuite/sim/sh64/media/bgt.cgs
sim/testsuite/sim/sh64/media/bgtu.cgs
sim/testsuite/sim/sh64/media/blink.cgs
sim/testsuite/sim/sh64/media/bne.cgs
sim/testsuite/sim/sh64/media/bnei.cgs
sim/testsuite/sim/sh64/media/brk.cgs
sim/testsuite/sim/sh64/media/byterev.cgs
sim/testsuite/sim/sh64/media/cmpeq.cgs
sim/testsuite/sim/sh64/media/cmpgt.cgs
sim/testsuite/sim/sh64/media/cmpgtu.cgs
sim/testsuite/sim/sh64/media/cmveq.cgs
sim/testsuite/sim/sh64/media/cmvne.cgs
sim/testsuite/sim/sh64/media/fabsd.cgs
sim/testsuite/sim/sh64/media/fabss.cgs
sim/testsuite/sim/sh64/media/faddd.cgs
sim/testsuite/sim/sh64/media/fadds.cgs
sim/testsuite/sim/sh64/media/fcmpeqd.cgs
sim/testsuite/sim/sh64/media/fcmpeqs.cgs
sim/testsuite/sim/sh64/media/fcmpged.cgs
sim/testsuite/sim/sh64/media/fcmpges.cgs
sim/testsuite/sim/sh64/media/fcmpgtd.cgs
sim/testsuite/sim/sh64/media/fcmpgts.cgs
sim/testsuite/sim/sh64/media/fcmpund.cgs
sim/testsuite/sim/sh64/media/fcmpuns.cgs
sim/testsuite/sim/sh64/media/fcnvds.cgs
sim/testsuite/sim/sh64/media/fcnvsd.cgs
sim/testsuite/sim/sh64/media/fdivd.cgs
sim/testsuite/sim/sh64/media/fdivs.cgs
sim/testsuite/sim/sh64/media/fgetscr.cgs
sim/testsuite/sim/sh64/media/fiprs.cgs
sim/testsuite/sim/sh64/media/fldd.cgs
sim/testsuite/sim/sh64/media/fldp.cgs
sim/testsuite/sim/sh64/media/flds.cgs
sim/testsuite/sim/sh64/media/fldxd.cgs
sim/testsuite/sim/sh64/media/fldxp.cgs
sim/testsuite/sim/sh64/media/fldxs.cgs
sim/testsuite/sim/sh64/media/floatld.cgs
sim/testsuite/sim/sh64/media/floatls.cgs
sim/testsuite/sim/sh64/media/floatqd.cgs
sim/testsuite/sim/sh64/media/floatqs.cgs
sim/testsuite/sim/sh64/media/fmacs.cgs
sim/testsuite/sim/sh64/media/fmovd.cgs
sim/testsuite/sim/sh64/media/fmovdq.cgs
sim/testsuite/sim/sh64/media/fmovls.cgs
sim/testsuite/sim/sh64/media/fmovqd.cgs
sim/testsuite/sim/sh64/media/fmovs.cgs
sim/testsuite/sim/sh64/media/fmovsl.cgs
sim/testsuite/sim/sh64/media/fmuld.cgs
sim/testsuite/sim/sh64/media/fmuls.cgs
sim/testsuite/sim/sh64/media/fnegd.cgs
sim/testsuite/sim/sh64/media/fnegs.cgs
sim/testsuite/sim/sh64/media/fputscr.cgs
sim/testsuite/sim/sh64/media/fsqrtd.cgs
sim/testsuite/sim/sh64/media/fsqrts.cgs
sim/testsuite/sim/sh64/media/fstd.cgs
sim/testsuite/sim/sh64/media/fstp.cgs
sim/testsuite/sim/sh64/media/fsts.cgs
sim/testsuite/sim/sh64/media/fstxd.cgs
sim/testsuite/sim/sh64/media/fstxp.cgs
sim/testsuite/sim/sh64/media/fstxs.cgs
sim/testsuite/sim/sh64/media/fsubd.cgs
sim/testsuite/sim/sh64/media/fsubs.cgs
sim/testsuite/sim/sh64/media/ftrcdl.cgs
sim/testsuite/sim/sh64/media/ftrcdq.cgs
sim/testsuite/sim/sh64/media/ftrcsl.cgs
sim/testsuite/sim/sh64/media/ftrcsq.cgs
sim/testsuite/sim/sh64/media/ftrvs.cgs
sim/testsuite/sim/sh64/media/getcfg.cgs
sim/testsuite/sim/sh64/media/getcon.cgs
sim/testsuite/sim/sh64/media/gettr.cgs
sim/testsuite/sim/sh64/media/icbi.cgs
sim/testsuite/sim/sh64/media/ldb.cgs
sim/testsuite/sim/sh64/media/ldhil.cgs
sim/testsuite/sim/sh64/media/ldhiq.cgs
sim/testsuite/sim/sh64/media/ldl.cgs
sim/testsuite/sim/sh64/media/ldlol.cgs
sim/testsuite/sim/sh64/media/ldloq.cgs
sim/testsuite/sim/sh64/media/ldq.cgs
sim/testsuite/sim/sh64/media/ldub.cgs
sim/testsuite/sim/sh64/media/lduw.cgs
sim/testsuite/sim/sh64/media/ldw.cgs
sim/testsuite/sim/sh64/media/ldxb.cgs
sim/testsuite/sim/sh64/media/ldxl.cgs
sim/testsuite/sim/sh64/media/ldxq.cgs
sim/testsuite/sim/sh64/media/ldxub.cgs
sim/testsuite/sim/sh64/media/ldxuw.cgs
sim/testsuite/sim/sh64/media/ldxw.cgs
sim/testsuite/sim/sh64/media/mabsl.cgs
sim/testsuite/sim/sh64/media/mabsw.cgs
sim/testsuite/sim/sh64/media/maddl.cgs
sim/testsuite/sim/sh64/media/maddsl.cgs
sim/testsuite/sim/sh64/media/maddsub.cgs
sim/testsuite/sim/sh64/media/maddsw.cgs
sim/testsuite/sim/sh64/media/maddw.cgs
sim/testsuite/sim/sh64/media/mcmpeqb.cgs
sim/testsuite/sim/sh64/media/mcmpeql.cgs
sim/testsuite/sim/sh64/media/mcmpeqw.cgs
sim/testsuite/sim/sh64/media/mcmpgtl.cgs
sim/testsuite/sim/sh64/media/mcmpgtub.cgs
sim/testsuite/sim/sh64/media/mcmpgtw.cgs
sim/testsuite/sim/sh64/media/mcmv.cgs
sim/testsuite/sim/sh64/media/mcnvslw.cgs
sim/testsuite/sim/sh64/media/mcnvswb.cgs
sim/testsuite/sim/sh64/media/mcnvswub.cgs
sim/testsuite/sim/sh64/media/mextr1.cgs
sim/testsuite/sim/sh64/media/mextr2.cgs
sim/testsuite/sim/sh64/media/mextr3.cgs
sim/testsuite/sim/sh64/media/mextr4.cgs
sim/testsuite/sim/sh64/media/mextr5.cgs
sim/testsuite/sim/sh64/media/mextr6.cgs
sim/testsuite/sim/sh64/media/mextr7.cgs
sim/testsuite/sim/sh64/media/mmacfxwl.cgs
sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs
sim/testsuite/sim/sh64/media/mmulfxl.cgs
sim/testsuite/sim/sh64/media/mmulfxrpw.cgs
sim/testsuite/sim/sh64/media/mmulfxw.cgs
sim/testsuite/sim/sh64/media/mmulhiwl.cgs
sim/testsuite/sim/sh64/media/mmull.cgs
sim/testsuite/sim/sh64/media/mmullowl.cgs
sim/testsuite/sim/sh64/media/mmulsumwq.cgs
sim/testsuite/sim/sh64/media/mmulw.cgs
sim/testsuite/sim/sh64/media/movi.cgs
sim/testsuite/sim/sh64/media/mpermw.cgs
sim/testsuite/sim/sh64/media/msadubq.cgs
sim/testsuite/sim/sh64/media/mshaldsl.cgs
sim/testsuite/sim/sh64/media/mshaldsw.cgs
sim/testsuite/sim/sh64/media/mshardl.cgs
sim/testsuite/sim/sh64/media/mshardsq.cgs
sim/testsuite/sim/sh64/media/mshardw.cgs
sim/testsuite/sim/sh64/media/mshfhib.cgs
sim/testsuite/sim/sh64/media/mshfhil.cgs
sim/testsuite/sim/sh64/media/mshfhiw.cgs
sim/testsuite/sim/sh64/media/mshflob.cgs
sim/testsuite/sim/sh64/media/mshflol.cgs
sim/testsuite/sim/sh64/media/mshflow.cgs
sim/testsuite/sim/sh64/media/mshlldl.cgs
sim/testsuite/sim/sh64/media/mshlldw.cgs
sim/testsuite/sim/sh64/media/mshlrdl.cgs
sim/testsuite/sim/sh64/media/mshlrdw.cgs
sim/testsuite/sim/sh64/media/msubl.cgs
sim/testsuite/sim/sh64/media/msubsl.cgs
sim/testsuite/sim/sh64/media/msubsub.cgs
sim/testsuite/sim/sh64/media/msubsw.cgs
sim/testsuite/sim/sh64/media/msubw.cgs
sim/testsuite/sim/sh64/media/mulsl.cgs
sim/testsuite/sim/sh64/media/mulul.cgs
sim/testsuite/sim/sh64/media/nop.cgs
sim/testsuite/sim/sh64/media/nsb.cgs
sim/testsuite/sim/sh64/media/ocbi.cgs
sim/testsuite/sim/sh64/media/ocbp.cgs
sim/testsuite/sim/sh64/media/ocbwb.cgs
sim/testsuite/sim/sh64/media/or.cgs
sim/testsuite/sim/sh64/media/ori.cgs
sim/testsuite/sim/sh64/media/prefi.cgs
sim/testsuite/sim/sh64/media/pta.cgs
sim/testsuite/sim/sh64/media/ptabs.cgs
sim/testsuite/sim/sh64/media/ptb.cgs
sim/testsuite/sim/sh64/media/ptrel.cgs
sim/testsuite/sim/sh64/media/putcfg.cgs
sim/testsuite/sim/sh64/media/putcon.cgs
sim/testsuite/sim/sh64/media/rte.cgs
sim/testsuite/sim/sh64/media/shard.cgs
sim/testsuite/sim/sh64/media/shardl.cgs
sim/testsuite/sim/sh64/media/shari.cgs
sim/testsuite/sim/sh64/media/sharil.cgs
sim/testsuite/sim/sh64/media/shlld.cgs
sim/testsuite/sim/sh64/media/shlldl.cgs
sim/testsuite/sim/sh64/media/shlli.cgs
sim/testsuite/sim/sh64/media/shllil.cgs
sim/testsuite/sim/sh64/media/shlrd.cgs
sim/testsuite/sim/sh64/media/shlrdl.cgs
sim/testsuite/sim/sh64/media/shlri.cgs
sim/testsuite/sim/sh64/media/shlril.cgs
sim/testsuite/sim/sh64/media/shori.cgs
sim/testsuite/sim/sh64/media/sleep.cgs
sim/testsuite/sim/sh64/media/stb.cgs
sim/testsuite/sim/sh64/media/sthil.cgs
sim/testsuite/sim/sh64/media/sthiq.cgs
sim/testsuite/sim/sh64/media/stl.cgs
sim/testsuite/sim/sh64/media/stlol.cgs
sim/testsuite/sim/sh64/media/stloq.cgs
sim/testsuite/sim/sh64/media/stq.cgs
sim/testsuite/sim/sh64/media/stw.cgs
sim/testsuite/sim/sh64/media/stxb.cgs
sim/testsuite/sim/sh64/media/stxl.cgs
sim/testsuite/sim/sh64/media/stxq.cgs
sim/testsuite/sim/sh64/media/stxw.cgs
sim/testsuite/sim/sh64/media/sub.cgs
sim/testsuite/sim/sh64/media/subl.cgs
sim/testsuite/sim/sh64/media/swapq.cgs
sim/testsuite/sim/sh64/media/synci.cgs
sim/testsuite/sim/sh64/media/synco.cgs
sim/testsuite/sim/sh64/media/testutils.inc
sim/testsuite/sim/sh64/media/trapa.cgs
sim/testsuite/sim/sh64/media/xor.cgs
sim/testsuite/sim/sh64/media/xori.cgs
sim/testsuite/sim/sh64/misc/fr-dr.s
sim/v850/ChangeLog
sim/v850/Makefile.in
sim/v850/acconfig.h
sim/v850/config.in
sim/v850/configure
sim/v850/configure.ac
sim/v850/interp.c
sim/v850/sim-main.h
sim/v850/simops.c
sim/v850/simops.h
sim/v850/v850-dc
sim/v850/v850.igen
sim/v850/v850_sim.h
texinfo/texinfo.tex
Diffstat (limited to 'sim/common')
125 files changed, 0 insertions, 54481 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog deleted file mode 100644 index 1768b40..0000000 --- a/sim/common/ChangeLog +++ /dev/null @@ -1,5228 +0,0 @@ -2006-06-13 Richard Earnshaw <rearnsha@arm.com> - - * aclocal.m4: Pass ../../intl to ZW_GNU_GETTEXT_SISTER_DIR. - * common.m4: Likewise. - * configure: Regenerated. - -2006-06-05 Daniel Jacobowitz <dan@codesourcery.com> - - * aclocal.m4: Use ZW_GNU_GETTEXT_SISTER_DIR. - * configure: Regenerated. - -2006-05-31 Daniel Jacobowitz <dan@codesourcery.com> - - * Make-common.in: Replace INTLLIBS and INTLDEPS with LIBINTL - and LIBINTL_DEP everywhere. - (CSEARCH): Use INCINTL. - * aclocal.m4: Use ZW_GNU_GETTEXT_SISTER_DIR. Include new - gettext macros. - * configure: Regenerated. - -2006-03-29 Hans-Peter Nilsson <hp@axis.com> - - * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Correct duplicate- - option-contents test. - -2005-11-28 Mark Mitchell <mark@codesourcery.com> - - * sim-signal.c (sim_signal_to_target): Fix typos. - - * sim-reason.c (sim_stop_reason): Use - sim_signal_to_target, not sim_signal_to_host. - * sim-signal.c (sim_signal_to_host): Fix typo. - (sim_signal_to_target): New function. - -2005-07-10 Hans-Peter Nilsson <hp@bitrange.com> - - * sim-load.c (xprintf, eprintf): Remove fallout from ANSI_PROTOTYPES - change. - -2005-07-08 Ian Lance Taylor <ian@airs.com> - - * sim-fpu.c (sim_fpu_abs): Always clear the sign bit. - - * sim-fpu.c (pack_fpu): If SIM_QUIET_NAN_NEGATED is defined, use a - different fraction for a quiet NaN. - (unpack_fpu): Likewise. - -2005-07-08 Ben Elliston <bje@au.ibm.com> - - * callback.c: Remove ANSI_PROTOTYPES conditional code. - * sim-load.c: Likewise. - * syscall.c: Likewise. - -2005-05-24 Corinna Vinschen <vinschen@redhat.com> - - * Make-common.in (LIBDEPS): Correctly use INTLDEPS for dependency - check. - -2005-05-17 Daniel Jacobowitz <dan@codesourcery.com> - - * Make-common.in (install-common, installdirs): Honor $DESTDIR. - -2005-04-20 Manoj Iyer <manjo@austin.ibm.com> - - * sim-types.h: Changed unsigned32 and unsigned64 to signed32 - and signed64 for __ALPHA__. - -2005-03-23 Mark Kettenis <kettenis@gnu.org> - - * aclocal.m4 Include ../../gettext.m4. - (CY_WITH_NLS, CY_GNU_GETTEXT, AM_PATH_PROG_WITH_TEST) - (AM_LC_MESSAGES): Remove. - * configure: Regenerate. - -2005-02-28 Jim Blandy <jimb@redhat.com> - - * aclocal.m4 (SIM_AC_OPTION_WARNINGS): Don't include - -Wuninitialized in the default list of build warnings if CFLAGS is - set, and doesn't include -O. (Using -Wuninitialized without - optimization produces a warning, which interferes with compilation - with -Werror.) - -2005-02-21 Jim Blandy <jimb@redhat.com> - - * callback.c (os_fstat): Don't declare 't' unless it's used. - -2005-02-09 Jim Blandy <jimb@redhat.com> - - * Make-common.in (CGEN): Load guile.scm, and include a trailing - '-s' argument. - (CGEN_FLAGS_TO_PASS): Include single quotes around the reference - to $(CGEN), to ensure that the command substitution happens where - the variable is referenced in the submake, not when the submake's - arguments are expanded. - (cgen.sh): Be prepared for the 'cgen' argument to contain spaces. - (arch, cpu, decode, cpu-decode, defs, desc): Place the name of the - application Scheme script directly after ${cgen}; don't precede it - with a -s. - -2005-01-28 Hans-Peter Nilsson <hp@axis.com> - - * syscall.c (cb_syscall) <case CB_SYS_pipe>: New case. - * callback.c [HAVE_LIMITS_H]: Include limits.h. - Include libiberty.h. - (os_close, os_read, os_write, os_fstat, os_ftruncate): Support fd - being either end of a pipe. - (os_pipe, os_pipe_empty, os_pipe_nonempty): New functions. - (os_shutdown): Clear pipe state. - (default_callback): Initialize new members. - - * callback.c (default_callback): Initialize target_endian. - (cb_store_target_endian): Renamed from store, new first parameter - host_callback *cb, drop last parameter big_p. Take endianness - from cb. - (cb_host_to_target_stat): Change to use cb_store_target_endian. - Remove variable big_p. - * nrun.c (main): Initialize default_callback.target_endian. - -2005-01-14 Andrew Cagney <cagney@gnu.org> - - * configure.ac: Replace SIM_AC_COMMON with sinclude of common.m4. - Add explicit call to AC_CONFIG_HEADER. - * common.m4: Delete call to AC_CONFIG_HEADER, update usage. - * configure: Re-generate. - -2005-01-12 Andrew Cagney <cagney@gnu.org> - - * common.m4: New file, based on of aclocal.m4. - -2005-01-11 Andrew Cagney <cagney@localhost.localdomain> - - * aclocal.m4 (SIM_AC_OUTPUT): Rewrite to use 2.59 macros. - * configure: Regenerated to track ../common/aclocal.m4 changes. - -2005-01-07 Andrew Cagney <cagney@gnu.org> - - * configure.ac: Rename configure.in, require autoconf 2.59. - * aclocal.m4 (SIM_AC_COMMON): Delete call to AC_CONFIG_AUX_DIR. - * configure: Re-generate. - -2004-12-15 Hans-Peter Nilsson <hp@axis.com> - - * syscall.c (cb_syscall) <case CB_SYS_truncate> - <case CB_SYS_ftruncate>: New cases. - -2004-12-13 Hans-Peter Nilsson <hp@axis.com> - - * syscall.c (cb_syscall) <case CB_SYS_lstat>: New case. - (cb_syscall) <case CB_SYS_rename>: New case. - * callback.c (os_lstat): New function. - -2004-12-08 Hans-Peter Nilsson <hp@axis.com> - - * run.1: Document --sysroot=filepath. - * sim-options.c (STANDARD_OPTIONS): New member OPTION_SYSROOT. - (standard_options): Support --sysroot=<path>. - (standard_option_handler): Handle OPTION_SYSROOT. - * syscall.c (simulator_sysroot): Define, initialized empty. - (get_path): Prepend simulator_sysroot to absolute file path. - [HAVE_STRING_H]: Include string.h. - [!HAVE_STRING_H && HAVE_STRINGS_H]: Include strings.h. - * nrun.c [HAVE_UNISTD_H]: Include unistd.h. - (main): If simulator_sysroot is not empty, chdir there. - * sim-config.h (simulator_sysroot): Declare. - - * aclocal.m4 (SIM_AC_OUTPUT): Substitute @cgen_breaks@ for "break - cgen_rtx_error" in a CGEN-generated simulator. - * gdbinit.in: Break on sim_core_signal too. Have autoconf - replacement for CGEN-related breakpoints. - -2004-12-07 Hans-Peter Nilsson <hp@axis.com> - - * Make-common.in (sim-basics_h): Add $(callback_h). - -2004-12-03 Hans-Peter Nilsson <hp@axis.com> - - * configure.in (SIM_CHECK_MEMBERS): Call for struct stat members - st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid, st_rdev, - st_size, st_blksize, st_blocks, st_atime, st_mtime and st_ctime. - * aclocal.m4 (SIM_CHECK_MEMBER, SIM_CHECK_MEMBERS_1) - (SIM_CHECK_MEMBERS): New macros. - * callback.c (cb_host_to_target_stat): Use temporary macro ST_x - for struct stat member test and write. Add ST_x calls for each - struct stat member tested in configure.in. Wrap each ST_x call in - #ifdef of configure macro for that member. - * configure, config.in: Regenerate. - -2004-12-01 Hans-Peter Nilsson <hp@axis.com> - - * cgen.sh: New thirteenth parameter opcfile, defaulting to - /dev/null. - <case desc>: Pass -OPC opcfile. - * Make-common.in (cgen-desc): Pass $(opcfile) as thirteenth - parameter to cgen.sh. - -2004-11-30 Richard Earnshaw <rearnsha@arm.com> - - * Make-common.in (sim-basics_h): Correct dependencies on - cconfig.h and tconfig.h - (sim-load.o): Correct typo in sim-basics_h dependency. - -2004-11-18 Richard Earnshaw <rearnsha@arm.com> - - * Make-common.in (sim-*_h): Add macros for all sim headers listing - sub-dependencies for other sim files that they include. - (sim_main_headers): Use sim-*_h macros. - (sim-load.o): Depend on sim-basics_h, not sim_main_headers. - -2004-11-16 Hans-Peter Nilsson <hp@axis.com> - - * sim-config.c (sim_config): Recognize when a bfd has unspecified - endian information. - - * Make-common.in (sim-load.o): Depend on $(sim_main_headers) and - $(remote_sim_h) too. - (sim_main_headers): Add sim-utils.h. - -2004-10-07 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> - - * cgen-defs.h (ENDSWITCH): Changed to compile with gcc-3.4.2. - -2004-07-26 Andrew Cagney <cagney@gnu.org> - - Problem from Olaf Hering <olh@suse.de>. - * Makefile.in (install-man, installdirs): Add DESTDIR prefix. - -2004-07-10 Ben Elliston <bje@au.ibm.com> - - * hw-tree.c (parse_integer_property): Typo fix in comments. - * sim-options.c (sim_args_command): Likewise. - -2004-06-28 Andrew Cagney <cagney@gnu.org> - - * run.c: Rename ui_loop_hook to deprecated_ui_loop_hook. - -2004-06-27 J"orn Rennecke <joern.rennecke@superh.com> - - * callback.c (os_shutdown): Fix bug in last change: actually - mark file descriptors as available on startup. - -2004-06-25 J"orn Rennecke <joern.rennecke@superh.com> - - [ include/gdb: * callback.h (host_callback_struct): Replace - members fdopen and alwaysopen with fd_buddy. ] - * callback.c: Changed all users. - -2004-06-15 Alan Modra <amodra@bigpond.net.au> - - * sim-load.c (sim_load_file): Use bfd_get_section_size - instead of bfd_get_section_size_before_reloc. - -2004-05-18 Daniel Jacobowitz <dan@debian.org> - - * dv-glue.c (hw_glue_finish): Cast result of sizeof to long before - passing it to printf. - -2004-05-10 Daniel Jacobowitz <dan@debian.org> - - * callback.c: Update copyright dates. - * run.c: Likewise. - * sim-basics.h: Likewise. - * sim-load.c: Likewise. - * syscall.c: Likewise. - -2004-05-10 Maciej W. Rozycki <macro@ds2.pg.gda.pl> - - * callback.c: Include cconfig.h instead of config.h. - * run.c: Likewise. - * sim-basics.h: Likewise. - * sim-load.c: Likewise. - * syscall.c: Likewise. - -2004-01-16 Ben Elliston <bje@wasabisystems.com> - - * Makefile.in (clean): Remove rm -f $(ALL), as $(ALL) is empty. - -2003-12-19 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> - - * sim-core.c (sim_core_trans_addr): Added for m32r-linux-run. - -2003-11-22 Kazu Hirata <kazu@cs.umass.edu> - - * sim-options.c (standard_options): Fix the names of H8 - variants. - -2003-10-30 Andrew Cagney <cagney@redhat.com> - - * sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry" - with "struct bfd_symbol". - -2003-10-21 Andrew Cagney <cagney@redhat.com> - - * callback.c (os_truncate): Call "truncate", and not "stat". - -2003-10-20 Andrew Cagney <cagney@redhat.com> - - * sim-base.h: Replace "struct sec" with "struct bfd_section". - -2003-10-15 J"orn Rennecke <joern.rennecke@superh.com> - - * callback.c (os_ftruncate, os_truncate): New functions. - (default_callback): Initialize ftruncate and truncate members. - -2003-09-08 Dave Brolley <brolley@redhat.com> - - On behalf of Doug Evans <dje@sebabeach.org> - * cgen.sh: New arg archfile. - * Make-common.in (cgen-arch,cgen-cpu,cgen-defs,cgen-decode, - cgen-cpu-decode,cgen-desc): Update call to cgen.sh. - -2003-08-28 Andrew Cagney <cagney@redhat.com> - - * dv-glue.c (hw_glue_finish): Change %d to %ld to match sizeof. - * sim-options.c (print_help): Cast the format with specifier to - "int". - -2003-08-20 Michael Snyder <msnyder@redhat.com> - Dave Brolley <brolley@redhat.com> - - * cgen-par.h (flags, word1): New target-specific - fields of CGEN_WRITE_QUEUE_ELEMENT. - (CGEN_WRITE_QUEUE_ELEMENT_FLAGS): New accessor macro. - (CGEN_WRITE_QUEUE_ELEMENT_WORD1): New accessor macro. - * gennltvals.sh: Add frv target. - * nltvals.def: Add frv target. - -2003-06-23 Michael Snyder <msnyder@redhat.com> - - * nrun.c (main): Delete h8/300 ifdef (sim now handles signals). - * sim-reg.c: Fix cut-and-paste bug in comment. - -2003-06-22 Andrew Cagney <cagney@redhat.com> - - From matthew green <mrg@redhat.com>: - * sim-fpu.h: Update copyright. - (sim_fpu_fraction, sim_fpu_guard): New prototypes. - * sim-fpu.c: Update copyright. - (sim_fpu_fraction, sim_fpu_guard): New inline functions. - -2003-06-17 Frank Ch. Eigler <fche@redhat.com> - - From Doug Evans <dje@sebabeach.org>: - * cgen-trace.h (sim_disasm_read_memory): Update args to be compatible - with disassemble_info:read_memory_func. - * cgen-trace.c (sim_disasm_read_memory): Ditto. - -2003-06-04 Michael Snyder <msnyder@redhat.com> - - * common/run.c (main): Remove SIM_H8300 ifdef. - (usage): Ditto. - * common/sim-options.c (STANDARD_OPTIONS): Add SIM_H8300SX. - (standard_options): Add '-x' for h8/300sx. - (standard_option_handler): Add case for SIM_H8300SX. - -2003-04-13 Michael Snyder <msnyder@redhat.com> - - * Make-common.in (sim-events.o, sim-config.o): Depend on sim-main.h. - -2003-03-01 Andrew Cagney <cagney@redhat.com> - - * sim-engine.c (sim_engine_halt): If jmpbuf is invalid, abort. - (sim_engine_vabort): Ditto. - -2003-02-27 Andrew Cagney <cagney@redhat.com> - - * sim-utils.h (sim_analyze_program, sim_load_file): Rename _bfd to bfd. - * sim-hload.c (sim_load), sim-base.h (sim_state_base): Ditto. - * nrun.c (main): Ditto. - -2003-02-26 Andrew Cagney <cagney@redhat.com> - - * sim-engine.h (sim_engine_abort): Add noreturn attribute. - (sim_engine_vabort): Ditto. - (sim_engine_halt, sim_engine_restart): Ditto. - -2003-02-20 Andrew Cagney <ac131313@redhat.com> - - * Make-common.in (SIM_NEW_COMMON_OBJS): Remove sim-break.o - (sim-break_h): Delete macro. - (sim-break.o): Delete rule. - * sim-break.c: Delete file. - * sim-break.h: Delete file. - * sim-base.h [SIM_HAVE_BREAKPOINTS]: Don't include "sim-break.h". - (STATE_BREAKPOINTS): Delete macro. - (sim_state_base): Delete field breakpoints. - * sim-module.c (modules) [SIM_HAVE_BREAKPOINTS]: Don't add - sim_break_install to array. - -2003-01-08 Kazu Hirata <kazu@cs.umass.edu> - - * run.c (usage): Fix typos. - -2002-11-27 Richard Sandiford <rsandifo@redhat.com> - - * sim-fpu.c (sim_fpu_inv): Use sim_fpu_div. - -2002-11-22 Andrew Cagney <ac131313@redhat.com> - - * dv-core.c: Update copyright. sim/common contributed to the FSF. - * dv-glue.c, dv-pal.c, hw-base.c, hw-base.h, hw-device.c: Ditto. - * hw-device.h, hw-handles.c, hw-handles.h: Ditto. - * hw-instances.c, hw-instances.h, hw-properties.c: Ditto. - * hw-properties.h, hw-tree.c, hw-tree.h, sim-alu.h: Ditto. - * sim-basics.h, sim-bits.c, sim-bits.h, sim-config.c: Ditto. - * sim-config.h, sim-core.c, sim-core.h, sim-endian.c: Ditto. - * sim-endian.h, sim-events.c, sim-events.h, sim-inline.c: Ditto. - * sim-inline.h, sim-io.c, sim-io.h, sim-n-bits.h: Ditto. - * sim-n-core.h, sim-n-endian.h, sim-types.h: Ditto. - -2002-11-13 Andrew Cagney <cagney@redhat.com> - - * run.c (main): Remove SIM_HAVE_ENVIRONMENT from #endif. - -2002-11-06 Richard Sandiford <rsandifo@redhat.com> - - * Make-common.in (SIM_EXTRA_DISTCLEAN): New macro. - (distclean): Depend on it. - -2002-10-14 Alan Modra <amodra@bigpond.net.au> - - * cgen-trace.h: Test __BFD_H_SEEN__ rather than BFD_VERSION. - -2002-08-29 Dave Brolley <brolley@redhat.com> - - * Make-common.in (CGEN_READ_SCM): Remove ../../cgen/stamp-cgen. - -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 - between run() and libsim.a which are not used by GDB. - * run.c: Include run-sim.h. - (main): If SIM_TARGET_SWITCHES is defined call - sim_target_parse_command_line. - (usage): If SIM_TARGET_SWITCHES is defined call - sim_target_display_usage. - -2002-05-17 Andrey Volkov <avolkov@transas.com> - - * run.c: Made h8300s as new target, not h8300h alias. - Added new option -S (h8300s target) - * sim-options.c: Ditto. - -2002-05-01 Chris Demetriou <cgd@broadcom.com> - - * callback.c: Use 'deprecated' rather than 'depreciated.' - -2002-02-24 Andrew Cagney <ac131313@redhat.com> - - From wiz at danbala: - * sim-fpu.h: Fix grammar and typos. - Fix PR gdb/287. - -2002-02-10 Chris Demetriou <cgd@broadcom.com> - - * callback.c: Fix some spelling errors. - * hw-device.h: Likewise. - * hw-tree.c: Likewise. - * sim-abort.c: Likewise. - * sim-alu.h: Likewise. - * sim-core.h: Likewise. - * sim-events.c: Likewise. - * sim-events.h: Likewise. - * sim-fpu.h: Likewise. - * sim-profile.h: Likewise. - * sim-utils.c: Likewise. - -2002-01-31 Hans-Peter Nilsson <hp@axis.com> - - * cgen-ops.h (ADDCQI, ADDCFQI, ADDOFQI, SUBCQI, SUBCFQI, SUBOFQI): - New functions. - -2002-01-20 Ben Elliston <bje@redhat.com> - - * sim-fpu.h (SIM_FPU_IS_QNAN): Replace "Quite" with "Quiet" in - the comment for this enumerator. - -2002-01-14 Ben Elliston <bje@redhat.com> - - * sim-fpu.h: Fix comment about sim_fpu_* constants. - -2001-12-20 Kazu Hirata <kazu@hxi.com> - - * run.c (usage): Fix a typo. - -2001-07-05 Ben Elliston <bje@redhat.com> - - * Make-common.in (srccgen): Remove. - (CGEN_CPU_DIR): Define. - (CGEN_READ_SCM): Redefine without $(srccgen). - (CGEN_ARCH_SCM): Ditto. - (CGEN_CPU_SCM): Ditto. - (CGEN_DECODE_SCM): Ditto. - (CGEN_DESC_SCM): Ditto. - -2001-04-25 Frank Ch. Eigler <fche@redhat.com> - - * sim-load.c (sim_load_file): Put it back: external now. - * sim-utils.c (sim_analyze_program): Ditto. Nyuk nyuk nyuk. - -2001-04-21 Andrew Cagney <ac131313@redhat.com> - - * sim-load.c (sim_load_file): Delete call bfd_cache_close. BFD - internal interface. - * sim-utils.c (sim_analyze_program): Ditto. - -2001-04-19 Frank Ch. Eigler <fche@redhat.com> - - * sim-utils.c (sim_analyze_program): Call bfd_cache_close after - we're finished with its immediate use. - * sim-load.c (sim_load_file): Ditto. - -2001-03-16 Frank Ch. Eigler <fche@redhat.com> - - Add support for mmap-based memory regions. - * sim-memopt.c (mmap_next_fd): New global. - (sim_memory_init): Reinitialize it. - (OPTION_MEMORY_MAPFILE, memory_option_handler): Support new - "--memory-mapfile FILE" option. Check for some errors. - (do_memopt_add): Conditionally do mmap instead of malloc for - backing store of simulated memory. Check for more errors. - (do_simopt_delete, sim_memory_uninstall): Corresponding cleanup. - * sim-memopt.h (munmap_length): New member of _sim_memopt. - * configure.in: Look for mmap/fstat related functions and headers. - * config.in, configure: Regenerated. - -2001-03-15 Frank Ch. Eigler <fche@redhat.com> - - * sim-core.c (sim_core_map_attach): Correct overlap-related - error messages. - -2001-03-07 Michael Meissner <meissner@redhat.com> - - * run.c (alloca-conf.h): Delete, no longer provided. - -2001-02-22 Ben Elliston <bje@redhat.com> - - * sim-trace.h (TRACE_VPU_IDX): Add. - (TRACE_vpu): Define. - (WITH_TRACE_VPU_P): Likewise. - (TRACE_VPU_P): Likewise. - * sim-trace.c (OPTION_TRACE_VPU): Define. - (trace_options): Add --trace-vpu. - (trace_option_handler): Handle OPTION_TRACE_VPU. - (trace_option_handler): Include VPU tracing in --trace-semantics. - (trace_idx_to_str): Handle TRACE_VPU_IDX. - -2001-02-21 Ben Elliston <bje@redhat.com> - - * sim-trace.h (TRACE_BRANCH_INPUT1): New macro. - (TRACE_BRANCH_INPUT2): Likewise. - -2001-02-09 Ben Elliston <bje@redhat.com> - - * (profile_print_pc): Write header out in target byte order. - -2001-02-09 Ben Elliston <bje@redhat.com> - - * sim-profile.c (profile_pc_init): Correct bug in loop logic when - adjusting the pc shift value. - -2001-01-12 Chris Demetriou <cgd@sibyte.com> - - * aclocal.m4 (SIM_AC_OPTION_SCACHE): Properly handle the case - where a numeric value is supplied. - -2001-01-06 Ben Elliston <bje@redhat.com> - - * cgen.sh: Allow extrafiles to include the semantics files when - generating an ISA-specific decoder. - -2000-12-27 Alexandre Oliva <aoliva@redhat.com> - - * Make-common.in (sim-io.o): Depend on targ-vals.h. - -2000-12-23 Ben Elliston <bje@redhat.com> - - * cgen-trace.c (trace_result): Handle 'f' type operands; output - them to the trace stream using sim_fpu_printn_fpu. Include - "sim-fpu.h". - -2000-12-15 Ben Elliston <bje@redhat.com> - - * sim-fpu.h (sim_fpu_printn_fpu): Declare. - * sim-fpu.c (print_bits): Add digits parameter. Print only as many - trailing digits as specified (-1 to print all digits). - (sim_fpu_print_fpu): New wrapper around sim_fpu_printn_fpu. - (sim_fpu_printn_fpu): Rename from sim_fpu_print_fpu; update calls - to print_bits (). - -2000-12-13 Ben Elliston <bje@redhat.com> - - * cgen.sh: Set prefix/PREFIX (append ISA if applicable). Factor - sed expressions into $sedscript, substituting @prefix@/@PREFIX@. - (defs): New action. - -2000-12-12 Geoffrey Keating <geoffk@redhat.com> - - * sim-endian.h: Don't have parameters on macro definitions which - are simply renaming functions, to permit use of XCONCAT2 in both - the macro name and the arguments in a use of such a definition. - -2000-12-11 Ben Elliston <bje@redhat.com> - - * cgen-ops.h (SUBWORDDFDI): New function. - -2000-12-05 Ben Elliston <bje@redhat.com> - - * Make-common.in (cgen-defs): New target. - (cgen-decode): Pass $(EXTRAFILES). - - * genmloop.sh: Use @prefix@, not @cpu@ throughout. Add -prefix and - -outfile-suffix options. - -2000-12-04 Ben Elliston <bje@redhat.com> - - * cgen-ops.h (SUBWORDSIQI): Mask off top bits. - (SUBWORDSIUQI): Likewise. - (SUBWORDDIHI): Likewise. - (SUBWORDDIQI): New function. - - * cgen-trace.c (disassemble_insn): Remove unused declaration. - * cgen-scache.c (scache_option_handler): Remove unused local var. - -2000-12-03 Ben Elliston <bje@redhat.com> - - * sim-profile.c (profile_option_handler): Remove unused prof_nr. - -2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr> - - * hw-events.c (delete_hw_event_data): Remove the scheduled events. - -2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr> - - * dv-core.c (dv_core_attach_address_callback): Don't abort if - space is not zero. - -2000-11-24 Stephane Carrez <Stephane.Carrez@worldnet.fr> - - * hw-base.c (hw_delete): Don't free base_of_hw since it's freed. - (set_hw_delete): Moved the macro as a function. - * hw-base.h (set_hw_delete): Declare as external function. - * hw-alloc.c (delete_hw_alloc_data): Allow to free the memory - allocated using hw_malloc. - -2000-11-24 Stephane Carrez <Stephane.Carrez@worldnet.fr> - - * sim-options.c (sim_parse_args): Free the memory used for - long_options, short_options, handlers, opt_cpu, orig_val. - -2000-11-20 Ben Elliston <bje@redhat.com> - - * cgen-ops.h (SUBBI): New macro. - (SUBWORDSIQI, SUBWORDSIHI, SUBWORDSIUQI): New functions. - (SUBWORDDIHI, SUBWORDDIUQI, SUBWORDDIDF): Likewise. - -2000-11-16 Ben Elliston <bje@redhat.com> - - * cgen-types.h (VOID): New type. - -2000-11-09 Ben Elliston <bje@redhat.com> - - * sim-fpu.c (sim_fpu_one): Set exponent to 0. - (sim_fpu_two): Set exponent to 1. - -2000-10-26 Ben Elliston <bje@redhat.com> - - * cgen.sh: Handle an isa argument between cpu and mach. Default to - `all'. Pass `-i' options to cgen applications. - * Make-common.in (cgen-arch, cgen-cpu, cgen-decode, cgen-cpu-decode, - cgen-desc): Pass $(isa) to cgen.sh. - -2000-10-08 Ben Elliston <bje@redhat.com> - - * cgen-utils.c (cgen_rtx_error): New function. - -2000-10-07 Ben Elliston <bje@redhat.com> - - * cgen-trace.c (sim_cgen_disassemble_insn): Handle failure - conditions for sim_core_read_buffer(). - -2000-09-26 Dave Brolley <brolley@redhat.com> - - * cgen-utils.c (RORQI): New function. - (ROLQI): New function. - (RORHI): New function. - (ROLHI): New function. - -2000-08-28 Dave Brolley <brolley@redhat.com> - - * cgen-trace.c (sim_cgen_disassemble_insn): Make sure entire insn is - in insn_value if it will fit. - -2000-08-21 Frank Ch. Eigler <fche@redhat.com> - - * Make-common.in, cgen.sh: Contribute CGEN-related build targets/rules. - -2000-08-15 Dave Brolley <brolley@redhat.com> - - * sim-profile.c (profile_print_speed): Print cpu frequency if not zero. - -2000-08-15 Dave Brolley <brolley@redhat.com> - - * sim-profile.h (PROFILE_DATA): Add cpu_freq. - (PROFILE_CPU_FREQ): New macro. - * sim-profile.c (OPTION_PROFILE_CPU_FREQUENCY): New enumerator. - (profile-options): Add profile-cpu-frequency. - (parse_frequency): New function. - (profile_option_handler): Handle OPTION_PROFILE_CPU_FREQUENCY. - (profile_print_speed): Print cpu frequency and simulated execution time. - Re-indent other items to match. - -2000-08-09 Andrew Cagney <cagney@lulu.cygnus.com> - - * dv-sockser.c (dv_sockser_init): Eliminate MIN macro. - -2000-07-27 Frank Ch. Eigler <fche@redhat.com> - - From Maciej W. Rozycki <macro@ds2.pg.gda.pl> - * Makefile.in (install): Install run.1 man page. - -Thu Jul 27 21:56:08 2000 Andrew Cagney <cagney@b1.cygnus.com> - - From 2000-06-23 Doug Evans <dje@casey.transmeta.com>: - * Makefile.in (headers,nltvals.def): Merge. - -Thu Jul 27 20:37:47 2000 Andrew Cagney <cagney@b1.cygnus.com> - - From 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>: - * nrun.c (main): Print the simulator statistics only in - verbose mode. - * hw-properties.h (hw_find_integer_array_property): Fix - prototype (use signed_cell). - - From 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>: - * sim-events.c (sim_events_remain_time): New function returning - the time that remains before the event is raised. - * hw-events.c (hw_event_remain_time): Likewise. - * sim-events.h (sim_events_remain_time): Declare. - * hw-events.h (hw_event_remain_time): Declare. - - From 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>: - * sim-hw.c: Use <errno.h> instead of <sys/errno.h> - (OPTION_HW_LIST): New option --hw-list to list the devices. - (hw_option_handler): List the device tree with 'sim_hw_print'. - - From 2000-06-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>: - * sim-bits.h (_MSB_16, _LSB_16): Define for 16-bit targets. - (MASK, LSBIT, MSBIT): Likewise and use _MSB_16 and _LSB_16. - (EXTENDED): Define for 16-bit word size. - * sim-bits.c (LSEXTRACTED, MSEXTRACTED, LSINSERTED, - MSINSERTED, LSSEXT, MSSEXT): Implement for 16-bit word size. - * sim-types.h: Added support for 16-bit targets. - -2000-06-23 Frank Ch. Eigler <fche@redhat.com> - - * cgen-trace.h (TRACE_USEFUL_MASK): Remove TRACE_EVENTS_IDX. - -2000-06-24 Frank Ch. Eigler <fche@redhat.com> - - From Maciej W. Rozycki <macro@ds2.pg.gda.pl>: - * Makefile.in (distclean): Clean cconfig.h also. - -Tue May 23 21:39:23 2000 Andrew Cagney <cagney@b1.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Tue May 23 21:35:53 2000 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (sim-profile): Enable the profiler by default. - -Tue May 23 20:30:12 2000 Andrew Cagney <cagney@amy.cygnus.com> - - * run.c (main): Initialize sigrc. - -Wed Apr 26 16:18:44 2000 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-events.c (update_time_from_event): Add more detailed event - tracing. - -2000-03-30 Dave Brolley <brolley@redhat.com> - - * aclocal.m4 (cgen): Use guile to run cgen. - -2000-03-23 Dave Brolley <brolley@redhat.com> - - * cgen-fpu.h: Rename extsfdf to fextsfdf. Rename truncdfsf to - ftruncdfsf. - * cgen-accfp.c (fextsfdf): New function. - (ftruncdfsf): New function. - (cgen_init_accurate_fpu): Initialize fextsfdf and ftruncdfsf. - -2000-03-13 Jeff Johnston <jjohnstn@cygnus.com> - - * cgen-ops.h: Added TRUNCSISI. - -2000-03-08 Dave Brolley <brolley@redhat.com> - - * cgen-par.h (cgen_write_queue_kind): Add CGEN_FN_SF_WRITE. - (CGEN_WRITE_QUEUE_ELEMENT): Add fn_sf_write. - (sim_queue_fn_si_write): Last argument is has type USI. - (sim_queue_fn_sf_write): New function. - * cgen-par.c (sim_queue_fn_si_write): Declare 'value' as USI. - (sim_queue_fn_sf_write): New function. - (cgen_write_queue_element_execute): Handle CGEN_FN_SF_WRITE. - -Tue Feb 22 16:45:09 2000 Andrew Cagney <cagney@b1.cygnus.com> - - * run.c (main): When SIM_HAVE_ENVIRONMENT enable tracing with - sim_set_trace and run simulator using sim_resume. - (main): Add option ``-o'' - operating environment. Only continue - after a signal when operating environment. - (main): Always set REASON and SIGRC using sim_stop_reason. - (sim_trace): Delete extern declaration. - -2000-02-08 Nick Clifton <nickc@cygnus.com> - - * callback.c: Fix compile time warning messages. - * run.c: Fix compile time warning messages. - -1999-12-17 Dave Brolley <brolley@cygnus.com> - - * sim-profile.h: (set_profile_option_mask): Add prototype. - * sim-profile.c (set_profile_option_mask): No longer static. - -Wed Dec 8 21:47:13 1999 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-arange.c: Include <string.h> - -1999-12-07 Dave Brolley <brolley@cygnus.com> - - * sim-options.c (print_help): '=' required before optional argument. - * cgen-par.h (CGEN_FN_MEM_QI_WRITE): New enumerator. - (CGEN_FN_MEM_HI_WRITE): New enumerator. - (CGEN_FN_MEM_SI_WRITE): New enumerator. - (CGEN_FN_MEM_DI_WRITE): New enumerator. - (CGEN_FN_MEM_DF_WRITE): New enumerator. - (CGEN_FN_MEM_XI_WRITE): New enumerator. - (fn_mem_qi_write): New union members. - (fn_mem_hi_write): New union members. - (fn_mem_si_write): New union members. - (fn_mem_di_write): New union members. - (fn_mem_df_write): New union members. - (fn_mem_xi_write): New union members. - (sim_queue_fn_mem_qi_write): New function. - (sim_queue_fn_mem_hi_write): New function. - (sim_queue_fn_mem_si_write): New function. - (sim_queue_fn_mem_di_write): New function. - (sim_queue_fn_mem_df_write): New function. - (sim_queue_fn_mem_xi_write): New function. - * cgen-par.c (sim_queue_fn_mem_qi_write): New function. - (sim_queue_fn_mem_hi_write): New function. - (sim_queue_fn_mem_si_write): New function. - (sim_queue_fn_mem_di_write): New function. - (sim_queue_fn_mem_df_write): New function. - (sim_queue_fn_mem_xi_write): New function. - (cgen_write_queue_element_execute): Handle CGEN_FN_MEM_QI_WRITE, - CGEN_FN_MEM_HI_WRITE, CGEN_FN_MEM_SI_WRITE, CGEN_FN_MEM_DI_WRITE, - CGEN_FN_MEM_DF_WRITE, CGEN_FN_MEM_XI_WRITE. - -1999-12-01 Dave Brolley <brolley@cygnus.com> - - * cgen-accfp.c (subsf): Check status code. - (mulsf): Ditto. - (negsf): Ditto. - (abssf): Ditto. - (sqrtsf): Ditto. - (invsf): Ditto. - (minsf): Ditto. - (maxsf): Ditto. - (subdf): Ditto. - (muldf): Ditto. - (divdf): Ditto. - (negdf): Ditto. - (absdf): Ditto. - (sqrtdf): Ditto. - (invdf): Ditto. - (mindf): Ditto. - (maxdf): Ditto. - -1999-11-26 Dave Brolley <brolley@cygnus.com> - - * cgen-par.h (fn_df_write): Mode of data is DF. - (sim_queue_fn_df_write): Mode of data is DF. - * cgen-par.c (sim_queue_fn_df_write): Mode of data is DF. - -1999-11-22 Dave Brolley <brolley@cygnus.com> - - * cgen-trace.c (SIZE_TRACE_BUF): Inxrease size of trace buffer. - * cgen-par.h (CGEN_WRITE_QUEUE_SIZE): Increase size of queue. - -1999-11-04 Dave Brolley <brolley@cygnus.com> - - * cgen-par.h (cgen_write_queue_kind): Add CGEN_FN_XI_WRITE and - CGEN_MEM_XI_WRITE members. - (CGEN_WRITE_QUEUE_ELEMENT): Add fn_xi_write and mem_xi_write members. - (sim_queue_fn_xi_write): New function. - (sim_queue_mem_xi_write): New function. - - * cgen-par.c (sim_queue_fn_xi_write): New function. - (sim_queue_mem_xi_write): New function. - (cgen_write_queue_element_execute): Handle CGEN_FN_XI_WRITE and - CGEN_MEM_XI_WRITE. - -1999-10-22 Dave Brolley <brolley@cygnus.com> - - * cgen-par.h (insn_address): New field in CGEN_WRITE_QUEUE_ELEMENT. - (CGEN_WRITE_QUEUE_ELEMENT_IADDR): New macro. - * cgen-par.c: Set insn_address for each queued write. Get pc from - cpu when executing queued writes. - -1999-10-19 Dave Brolley <brolley@cygnus.com> - - * cgen-par.h (sim_queue_fn_pc_write): New function. - (CGEN_FN_PC_WRITE): New enumerator. - (fn_pc_write): New union member. - * cgen-par.c (sim_queue_fn_pc_write): New function. - (cgen_write_queue_element_execute): Handle CGEN_FN_PC_WRITE. - -1999-10-18 Dave Brolley <brolley@cygnus.com> - - * cgen-par.h (CGEN_MEM_DI_WRITE): New enumerator. - (CGEN_MEM_DF_WRITE): New enumerator. - (mem_di_write): New union member. - (mem_df_write): New union member. - * cgen-par.c (sim_queue_mem_di_write): New function. - (sim_queue_mem_df_write): New function. - (cgen_write_queue_element_execute): Handle CGEN_MEM_DI_WRITE and - CGEN_MEM_DF_WRITE. - * cgen-accfp.c (divsf): Check for division errors. - -1999-10-14 Doug Evans <devans@casey.cygnus.com> - - * cgen-engine.h (EXTRACT_INT,EXTRACT_UINT): Delete. - -1999-10-07 Dave Brolley <brolley@cygnus.com> - - * cgen-par.h (CGEN_FN_HI_WRITE): New enumerator. - (fn_hi_write): New union member. - (sim_queue_fn_hi_write): New function. - * cgen-par.c (sim_queue_fn_hi_write): New function. - (cgen_write_queue_element_execute): Handle CGEN_FN_HI_WRITE. - -1999-09-29 Doug Evans <devans@casey.cygnus.com> - - * cgen-defs.h (sim_engine_invalid_insn): New arg `vpc'. - Change type of result to SEM_PC. - -Wed Sep 29 14:43:57 1999 Dave Brolley <brolley@cygnus.com> - - * cgen-defs.h (sim_engine_invalid_insn): Now returns PC. - -1999-09-25 Doug Evans <devans@casey.cygnus.com> - - * cgen-ops.h (SUBWORD*): Delete cpu arg. - (JOIN*): Delete cpu arg. - -Tue Sep 21 17:14:16 1999 Dave Brolley <brolley@cygnus.com> - - * genmloop.sh (@cpu@_scache_lookup): No longer takes last_insn_p - parameter. - (SET_LAST_INSN_P): Set last_insn_p flag in the scache element. - -Mon Sep 20 21:44:06 1999 Geoffrey Keating <geoffk@cygnus.com> - - * sim-fpu.c (i2fpu): Keep the guard bits sticky when converting - large values. - -Tue Feb 8 16:33:48 2000 Andrew Cagney <cagney@b1.cygnus.com> - - * run.c (main): Check the sim_stop_reason and only halt simulation - when a valid stop condition is identified. - -Wed Sep 15 14:12:37 1999 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-tree.c, hw-properties.c, hw-instances.c: Include "sim-io.h". - -Tue Sep 14 14:15:47 1999 Dave Brolley <brolley@cygnus.com> - - * cgen-par.h (CGEN_BI_WRITE): New enumerator. - (bi_write): New union element. - (sim_queue_bi_write): New function. - * cgen-par.c (sim_queue_bi_write): New function. - (cgen_write_queue_element_execute): Handle CGEN_BI_WRITE. - -Thu Sep 2 18:15:53 1999 Andrew Cagney <cagney@b1.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - - * aclocal.m4 (WERROR_CFLAGS, WARN_CFLAGS): Merge from - ../gdb/configure.in. - * Make-common.in (WERROR_CFLAGS, WARN_CFLAGS): Define. - (SIM_WERROR_CFLAGS, SIM_WARN_CFLAGS): Define. - (SIM_WARNINGS): Delete - (CONFIG_CFLAGS): Update. - -Tue Aug 31 16:01:42 1999 Dave Brolley <brolley@cygnus.com> - - * cgen-par.c: New file. - * cgen-par.h: New file. - * cgen-sim.h (cgen-par.h): #include it. - * cgen-cpu.h (write_queue): New field. - (CPU_WRITE_QUEUE): New access macro. - * Make-common.in (CGEN_MAIN_CPU_DEPS): Add cgen-par.h. - (cgen-par.o): New target. - -1999-08-28 Doug Evans <devans@casey.cygnus.com> - - * cgen-types.h (mode_type,MODE_VOID): Renamed from MODE_VM. - * cgen-utils.c (mode_names): Update. - -1999-08-20 Doug Evans <devans@casey.cygnus.com> - - * genmloop.sh: New args -parallel-generic-write, -parallel-only. - * cgen-engine.h (SEMANTIC_FN): Don't use version with PAREXEC - buffer arg if WITH_PARALLEL_GENWRITE. - (struct insn_sem): Handle WITH_PARALLEL_GENWRITE. - (struct idesc): Ditto. - -Wed Aug 18 18:17:28 1999 Doug Evans <devans@canuck.cygnus.com> - - * sim-model.c (model_option_handler): Add \n to error message. - -1999-08-08 Doug Evans <devans@casey.cygnus.com> - - * cgen-engine.h (SEM_FN_NAME,SEMF_FN_NAME): Delete. - (insn_sem): Rewrite. - (sem_fn_desc): New struct. - (idesc): Rewrite. - * genmloop.sh (scache case,@cpu@_scache_lookup): Profile scache hit, - misses if ! FAST_P. - (scache case): Split into non-parallel/parallel versions. - (@cpu@_engine_run_{full,fast}): Call @cpu@_{sem,semf}_init_idesc_table - if not use semantic switch version. - -1999-08-04 Doug Evans <devans@casey.cygnus.com> - - * cgen-defs.h (SEM_BRANCH_TYPE): New enum. - * cgen-engine.h (SEM_BRANCH_UNTAKEN,SEM_BRANCH_UNCACHEABLE): Delete. - (SEM_BRANCH_INIT_EXTRACT): Delete. - (SEM_BRANCH_INIT): Replace npc_ptr with br_type. - (SEM_BRANCH_FINI): Ditto. - (SEM_BRANCH_VIA_ADDR): Ditto. - (SEM_BRANCH_VIA_CACHE): Ditto. Delete cachvarptr arg. - (SEM_BRANCH_ADDR_CACHE): Delete. - (SEM_SKIP_COMPILE,SEM_SKIP_INSN): New macros. - * cgen-scache.h (cpu_scache): Replace member pbb_pr_npc_ptr with - pbb_br_type. - * genmloop.sh (eng.hin): Update prototype of ${cpu}_pbb_cti_chain. - (@cpu@_pbb_begin): Initialize branch_target. - (@cpu@_pbb_cti_chain): Replace arg new_vpc_ptr with br_type. - (@cpu@_engine_run_full): Replace local pbb_br_npc_ptr with - pbb_br_type. - (@cpu@_engine_run_fast): Ditto. - -Fri Jul 16 14:47:53 1999 Dave Brolley <brolley@cygnus.com> - - * cgen-utils.c (RORSI): New function. - (ROLSI): New function. - -1999-07-14 Doug Evans <devans@casey.cygnus.com> - - * Makefile.in (TAGS): Tweak TAGS regex. - * cgen-mem.h (*): Add TAGS markers. - -Sun Jul 11 23:47:20 1999 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-resume.c (sim_resume): Ensure that the siggnal [sic] is only - passed in when sim_resume is first entered - don't re-pass it - after a restart. - -Sun Jul 11 23:34:44 1999 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-options.c (standard_option_handler): Add OPTION_LOAD_VMA and - OPTION_LOAD_LMA but only when is defined. - (standard_options): When SIM_HANDLES_LMA is defined include - options --load-lma and --load-vma. - (standard_install): Initialize STATE_LOAD_AT_LMA_P. - - * sim-base.h (STATE_LOAD_AT_LMA_P): Define. - (struct sim_state_base): Add load_at_lma_p. - * sim-hload.c (sim_load): Replace SIM_HANDLES_LMA with - STATE_LOAD_AT_LMA_P. - -Sun Jul 11 12:03:36 1999 Andrew Cagney <cagney@b1.cygnus.com> - - * nrun.c (main): Re-format loop gnu style. - -Wed Jul 7 19:56:03 1999 Andrew Cagney <cagney@b1.cygnus.com> - - * dv-sockser.c (connected_p): Initialize addrlen. - -1999-07-06 Dave Brolley <brolley@cygnus.com> - - * cgen-accfp.c (floatsidf): New function. - (fixdfsi): New function. - -1999-07-06 Doug Evans <devans@casey.cygnus.com> - - * sim-model.c (sim_model_init): Issue error if machine is unsupported. - -1999-07-05 Doug Evans <devans@casey.cygnus.com> - - * Make-common.in (CGEN_MAIN_CPU_DEPS): Add cgen-fpu.h. - (cgen-fpu.o,cgen-accfp.o): Add rules for. - * cgen-fpu.c: New file. - * cgen-fpu.h: New file. - * cgen-accfp.c: New file. - * cgen-cpu.h (CGEN_CPU): New member fpu. - * cgen-mem.h: Redo fp support. - * cgen-ops.h: Delete k&r support. Redo fp support. - * cgen-sim.h: Include cgen-fpu.h. - * cgen-types.h (SF,DF,XF,TF): Moved to cgen-fpu.h. - -1999-06-23 Doug Evans <devans@casey.cygnus.com> - - * cgen-engine.h (TARGET_SEM_BRANCH_FINI): Remove cruft at end of - ifndef. - * genmloop.sh (@cpu@_scache_lookup): Delete unused local var. - (@cpu@_pbb_cti_chain): Minor clean up. - -1999-05-08 Felix Lee <flee@cygnus.com> - - * aclocal.m4: Use AC_EXEEXT instead of AM_EXEEXT. Delete defn of - AM_CYGWIN32 and AM_EXEEXT. - * configure: Regenerate. - -Fri Apr 16 16:43:22 1999 Doug Evans <devans@charmed.cygnus.com> - - * sim-core.c (device_error,device_io_read_buffer, - device_io_write_buffer): Delete decls. - * sim-core.h: Put them here. - - * sim-core.c (sim_core_read_buffer): Pass sd to device_io_read_buffer. - (sim_core_write_buffer): Pass sd to device_io_write_buffer. - * sim-n-core.h (sim_core_read_aligned_N): Ditto. - (sim_core_write_aligned_N): Ditto. - -1999-04-14 Stephane Carrez <stcarrez@worldnet.fr> - - * sim-memopt.c (sim_memory_uninstall): Don't look into - free()d memory. - -1999-04-14 Doug Evans <devans@casey.cygnus.com> - - * cgen-utils.scm (virtual_insn_entries): Update attribute definition. - -1999-04-13 Doug Evans <devans@casey.cygnus.com> - - * sim-core.c (sim_core_read_buffer): Handle NULL cpu when WITH_DEVICES. - (sim_core_write_buffer): Ditto. - -1999-04-02 Keith Seitz <keiths@cygnus.com> - - * sim-io.c (sim_io_poll_quit): Only call the poll_quit callback - after the interval counter has expired. - (POLL_QUIT_INTERVAL): Define. Used to tweak the frequency of - poll_quit callbacks. May be overridden by Makefile. - (poll_quit_counter): New global. - * sim-events.c: Remove all mentions of ui_loop_hook. The - host callback "poll_quit" will serve the purpose. - * run.c: Add definition of ui_loop_hook when NEED_UI_LOOP_HOOK - is defined. - * nrun.c: Remove declaration of ui_loop_hook. - -Wed Mar 31 18:55:41 1999 Doug Evans <devans@canuck.cygnus.com> - - * cgen-run.c (sim_resume): Don't tell main loop to run "forever" - if being used by gdb. - -1999-03-22 Doug Evans <devans@casey.cygnus.com> - - * cgen-types.h (XF,TF): Tweak. - * cgen-ops.h: Redo inline support. Delete DI_FN_SUPPORT, - in cgen-types.h. - (SUBWORD*,JOIN*): Define. - * cgen-trace.c (sim_cgen_disassemble_insn): Update, base_insn_bitsize - moved into cpu descriptor. - * sim-model.h (MACH): New member `num'. - -1999-02-09 Doug Evans <devans@casey.cygnus.com> - - * cgen-cpu.h (CGEN_DISASSEMBLER): New type. - (CGEN_CPU): Member opcode renamed to cpu_desc. - New members get_idata,disassembler. - * cgen-defs.h (CGEN_INSN_VIRTUAL_P): CGEN_INSN_ATTR renamed to - CGEN_INSN_ATTR_VALUE. - (CGEN_STATE): Delete member opcode_table. - (sim_disassemble_insn): Delete decl. - * cgen-engine.h (struct insn_sem): Moved to here from <cpu>-decode.c. - (struct idesc): Moved to here from <cpu>-decode.h. - * cgen-run.c (prime_cpu): Call prepare_run callback. - * cgen-trace.h (SFILE): New type. - (sim_disasm_sprintf): Declare. - (sim_disasm_read_memory,sim_disasm_perror_memory): Declare. - (sim_cgen_disassemble_insn): Declare. - * cgen-trace.c: Include errno.h,dis-asm.h. Don't include cpu-opc.h. - (insn_fields): Delete. - (trace_insn_fini): STATE_OPCODE_TABLE (sd) replaced with - CPU_CPU_DESC (cpu). - (trace_insn): Call CPU_DISASSEMBLER hook. - (sim_disasm_sprintf): New function. - (sim_disasm_read_memory): New function. - (sim_disasm_perror_memory): New function. - (sim_cgen_disassemble_insn): New function. - * cgen-utils.c: Don't include cpu-opc.h. - (virtual_insn_entries): New static local. - (cgen_virtual_insn_table): Renamed from cgen_virtual_opcode_table. - (cgen_insn_name): Rewrite. - (disasm_sprintf,sim_disassemble_insn): Moved to cgen-trace.c. - * cgen.sh (desc): New file generator handler. - * genmloop.sh: -parallel changed to -parallel-read/-parallel-write. - Define WITH_PARALLEL_READ/WITH_PARALLEL_WRITE appropriately. - Don't include cpu-opc.h,cpu-sim.h. - * sim-model.c (model_set): Delete SIM_DESC arg. - (sim_model_set): Update. - * sim-model.h (MACH): New member prepare_run. - -1999-01-28 Frank Ch. Eigler <fche@cygnus.com> - - * sim-memopt.c (memory_option_handler): Avoid memset() calls - if redundant with allocator functions. - -Wed Jan 27 17:19:09 1999 Doug Evans <devans@canuck.cygnus.com> - - * cgen-engine.h (EXTRACT_LSB0_{INT,UINT}): Fix. - - * sim-profile.h: Make like sim-trace.h. - (PROFILE_USEFUL_MASK): New macro. - * sim-profile.c (profile_options): Make like trace_options, allow - optional on|off arg where applicable. - (set_profile_option_mask): New function. - (sim_profile_set_option): New function. - (profile_option_handler): Simplify. - Have -p only enable selected things, not everything. - Add missing break to OPTION_PROFILE_PC_RANGE. - * cgen-scache.c (scache_options): Allow optional on|off arg to - --profile-scache. - (scache_option_handler): Use sim_profile_set_option. - -1999-01-26 Frank Ch. Eigler <fche@cygnus.com> - - * sim-memopt.c (memory_options): Add MEMORY_FILL option. - (memory_option_handler): Implement MEMORY_FILL option. Make - MEMORY_CLEAR an alias for MEMORY_FILL=0. - (parse_ulong_value): New function. - (do_memopt_add): Allocate all buffers. Optionally fill them. - -1999-01-15 Richard Henderson <rth@cygnus.com> - - * hw-events.c (hw_event_queue_schedule): _vtracef takes a - va_list, not an integer. - * sim-events.c (sim_events_schedule): Likewise. - - * sim-types.h (UNSIGNED32, UNSIGNED64): Properly cast to - the appropriate type. - -1999-01-14 Doug Evans <devans@casey.cygnus.com> - - * cgen-defs.h (PCADDR,CIA): Define in terms of IADDR. - (sim_disassemble_insn): Update prototype. - (sim_engine_invalid_insn): Ditto. - * cgen-engine.h (SEMANTIC_FN): Add !WITH_SCACHE version. - (SEM_BRANCH_INIT): PCADDR->IADDR. - (SEM_NBRANCH_FINI): New macro for !WITH_SCACHE case. - * cgen-scache.c (scache_lookup,scache_lookup_or_alloc): PCADDR->IADDR. - * cgen-scache.h (*): Ditto. - * cgen-trace.c (*): Ditto. - * cgen-trace.h (*): Ditto. - * cgen-utils.c (*): Ditto. - * cgen-types.h (integer modes): Use signedNN/unsignedNN types. - (insn_t): Delete. - * genmloop.sh (@cpu@_fill_argbuf): Add !WITH_SCACHE support. - (simple engine framework): Rewrite. - * sim-module.c (modules): Install model module sooner (and in - particular before the profile module). - -1999-01-12 Doug Evans <devans@casey.cygnus.com> - - * sim-model.h (sim_mach_lookup_bfd_name): Add prototype. - * sim-model.c (sim_mach_lookup_bfd_name): New function. - (sim_model_init): Call it. - - * cgen-trace.c (trace_insn): Pass pc to trace_prefix for virtual insns. - -1999-01-05 Doug Evans <devans@casey.cygnus.com> - - * Make-common.in (CGEN_INCLUDE_DEPS): Add cgen-defs.h, cgen-engine.h. - * cgen-engine.h (SEM_BRANCH_FINI): New arg pcvar, all uses updated. - (SEM_BRANCH_INIT_EXTRACT): New macro. - (SEM_BRANCH_INIT): Add taken_p. - (TARGET_SEM_BRANCH_FINI): Provide default definition. - (SEM_BRANCH_FINI): Use it. - (SEM_INSN): Update. - * cgen-run.c (sim_resume): Handle tracing of last insn. - * cgen-scache.h (WITH_SCACHE): Define as 0 if not defined. - * cgen-trace.c (current_abuf): New static global. - (trace_insn_init): Initialize it. - (trace_insn_fini): Use it. - (trace_insn): Set it. - * cgen.sh (arch case): Pass -m ${mach} to cgen. - * genmloop.sh (@cpu@_emit_before): Only define if WITH_SCACHE_PBB. - (@cpu@_emit_after): Ditto. - (simple @cpu@_engine_run_full): New local `pc'. Initialize semantic - labels if WITH_SEM_SWITCH_FULL. - * sim-model.c: Include bfd.h. - (sim_model_init): New function. - (sim_model_install): Record init fn. - * sim-model.h (MACH): New member bfd_name. - * sim-module.c (modules): Initialize model before scache. - -1998-12-24 Frank Ch. Eigler <fche@cygnus.com> - - * dv-sockser.c (DEFAULT_TIMEOUT): Increase to 1 ms. - - * nrun.c (main): Remain in simulation loop for traps and - exceptions when in operating environment mode. - (ui_loop_hook): New stub hook for standalone use. - * sim-events.c (sim_events_process): Call ui_loop_hook - periodically on CYGWIN host. - - * sim-reason.c (sim_stop_reason): Return host signal numbers - to gdb on sim_stopped and sim_signalled cases. - * sim-engine.c (sim_engine_halt): Call SIM_CPU_EXCEPTION_SUSPEND - hook just before longjmp. - * sim-resume.c (sim_resume): Call SIM_CPU_EXCEPTION_RESUME - hook just before sim_engine_run. - - * sim-n-core.h (sim_core_trace_M): Allay const warning. - * sim-trace.h (trace_generic): Ditto. - * sim-trace.c (trace_generic): Ditto. - -1998-12-14 Doug Evans <devans@casey.cygnus.com> - - * Make-common.in (SIM_MAIN_DEPS): New var. - (CGEN_MAIN_CPU_DEPS): New var. - * aclocal.m4: Add --enable-cgen-maint option. - * cgen-mem.h (GETMEM*): New arg `pc'. Pass to sim_core routine. - (SETMEM*): Ditto. - (GETIMEM*): Pass pc value to sim_core routine. - -Fri Dec 11 16:58:36 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-handles.c (hw_handle_add_ihandle, hw_handle_add_phandle): - Compare with ZERO not NULL. - -Thu Dec 10 14:14:39 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-properties.c, hw-instances.c, hw-tree.c: Include - "sim-assert.h". - -1998-12-09 Doug Evans <devans@casey.cygnus.com> - - * sim-arange.c: Include libiberty.h, and stdlib.h if present. - * sim-trace.c: Include stdlib.h if present. - * dv-sockser.c: Include unistd.h if present. - (dv_sockser_init): Add missing arg to call to sim_io_eprintf. - * cgen-scache.c (scache_flush): Delete unused locals i,sc. - -1998-12-08 James E Wilson <wilson@wilson-pc.cygnus.com> - - * gennltvals.sh: Add i960. - * nltvals.def: Rebuild. - -1998-12-04 Doug Evans <devans@casey.cygnus.com> - - * cgen-defs.h: New file, old cgen-sim.h. - * cgen-sim.h: Simple header that includes others. - * sim-arange.c: New file. - * sim-arange.h: New file. - * sim-basics.h: Include it. - * Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-arange.o. - (sim-arange.o): Add rule for. - * sim-cpu.h (sim_cpu_msg_prefix): Add prototype. - (sim_io_eprintf_cpu): Add prototype. - * sim-inline.h (HAVE_INLINE): Define if GNUC. - (INLINE2): New macro. - (EXTERN_INLINE): New macro. - * sim-module.c (sim_post_argv_init): Initialize cpu backlink - before calling module init fns. - * sim-profile.c (OPTION_PROFILE_*): Move into enum. - (profile_init): New function. - (profile_options): New option --profile-range. - (profile_option_handler): Handle --profile-range. - (profile_print_insn): Qualify address range specific section titles. - (profile_print_addr_ranges): New function. - (profile_info): Print address ranges if specified. - (profile_install): Set profile_init init fn. - * sim-profile.h (PROFILE_DATA): New member `range'. - * sim-trace.c (trace_init): New function. - (trace_options): New option --trace-range. - (trace_option_handler): Handle --trace-range. - (trace_install): Set trace_init init fn. - * sim-trace.h (TRACE_DATA): New member `range'. - * sim-utils.c (sim_cpu_msg_prefix): New function. - (sim_io_eprintf_cpu): New function. - * cgen-engine.h (PC_IN_TRACE_RANGE_P): New macro. - (PC_IN_PROFILE_RANGE_P): New macro. - * cgen-trace.c (trace_insn_init): Set current_insn to NULL. - (trace_insn_fini): New arg abuf. All callers updated. - Exit early if trace_insn not called. Check ARGBUF_PROFILE_P before - printing cycle counts. - * cgen-trace.h (trace_insn_fini): Update prototype. - (TRACE_RESULT_P): New macro. - (TRACE_INSN_INIT,TRACE_INSN_FINI): New arg abuf. All callers updated. - (TRACE_INSN): Check ARGBUF_TRACE_P. - (TRACE_EXTRACT,TRACE_RESULT): New arg abuf. All callers updated. - * cgen-types.h (SIM_INLINE): Delete. - (SIM_HAVE_MODEL,SIM_HAVE_ADDR_RANGE): Define. - * cgen-utils.c: Don't include cgen-engine.h - * genmloop.sh (@cpu@_fill_argbuf): New function. - (@cpu@_fill_argbuf_tp): New function. - (@cpu@_emit_before,@cpu@_emit_after): New functions. - (@cpu@_pbb_begin): Prefix cti_sc,insn_count with '_'. - (SET_CTI_VPC,SET_INSN_COUNT): Update. - (@cpu@_pbb_before): Check ARGBUF_PROFILE_P before calling - doing profiling. Update call to TRACE_INSN_INIT,TRACE_INSN_FINI. - (@cpu@_pbb_after): Check ARGBUF_PROFILE_P before calling - doing profiling. Update call to TRACE_INSN_FINI. - - * sim-memopt.c (sim_memory_uninstall): Result type is `void'. - -1998-12-03 Frank Ch. Eigler <fche@cygnus.com> - - * sim-memopt.c (sim_memory_uninstall): Deallocate all memory - regions. - -1998-12-01 Doug Evans <devans@casey.cygnus.com> - - * sim-inline.c (SIM_INLINE_P): Fix typo. - -1998-11-30 Doug Evans <devans@casey.cygnus.com> - - * cgen-utils.c (cgen_virtual_opcode_table): Update. - -Tue Nov 24 18:40:03 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * gennltvals.sh: Add v850 and d10v. Sort alphabetically. - * nltvals.def: Re-generate. - -Mon Nov 23 13:28:38 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.c (reverse_n, sim_core_uninstall, sim_core_init, - sim_core_map_attach, sim_core_map_detach, next_event_queue, - new_sim_core_mapping): Only define when EXTERN_SIM_CORE_P, pacify - GCC. - * sim-events.c (sim_events_uninstall, sim_events_suspend, - sim_events_resume, sim_events_zalloc, insert_sim_event): Ditto. - -1998-11-22 Doug Evans <devans@tobor.to.cygnus.com> - - * genmloop.sh (${cpu}_pbb_chain): Watch for Ctrl-C's. - (${cpu}_pbb_cti_chain): Ditto. - -1998-11-18 Doug Evans <devans@casey.cygnus.com> - - * Make-common.in (cgen-utils.o): Depend on cgen-engine.h. - * cgen-engine.h (EXTRACT_[ML]SB0_{INT,UINT}): New macros. - (EXTRACT_INT,EXTRACT_UINT): New macros. - (SEM_SEM_ARG): New macro. - (SEM_NEXT_VPC): New arg `pc'. - * cgen-sim.h (EXTRACT_SIGNED,EXTRACT_UNSIGNED): Delete. - (sim_disassemble_insn): Update prototype. - * cgen-trace.c (current_insn,insn_fields): New static locals. - (trace_insn): Set them. - * cgen-utils.c: #include cgen-engine.h. - (sim_disassemble_insn): New arg insn_fields. - Handle variable length insns. - * genmloop.sh: Only emit pbb decls if -pbb. - (${cpu}_scache_lookup): New arg `vpc'. - (scache support): Fetch pc before entering loop. - - * gennltvals.sh: Add fr30 support. - * nltvals.def: Rebuild. - -Wed Nov 18 10:22:22 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-types.h: Re-do type system so that GCC's attribute and mode - are used to specify types. Handle case of ALPHA. - -1998-11-13 Frank Ch. Eigler <fche@elastic.org> - - * aclocal.m4: Add tests for dlopen family. - * config.in: Regenerated. - -Wed Nov 11 14:02:25 1998 Doug Evans <devans@canuck.cygnus.com> - - * sim-hload.c (sim_load): Pass `prog_name' to sim_load_file, not NULL. - -Wed Nov 4 23:51:19 1998 Doug Evans <devans@seba.cygnus.com> - - * genmloop.sh (eng.hin): Rename HAVE_PARALLEL_EXEC to - HAVE_PARALLEL_INSNS, define as 0 or 1. Emit decls of fns in mloop.cin. - * cgen-engine.h: Typedefs of IADDR,CIA,SEM_ARG,SEM_PC moved ... - * cgen-sim.h: ... to here. - -Wed Oct 28 12:00:57 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (enable-build-warnings): Replace - enable-sim-warnings. Extend =LIST syntax so that prepend and - append of options is possible. Drop -Werror, add - -Wstrict-prototypes for GDB compatibility. - * Make-common.in (SIM_WARNINGS): Update. - -Mon Oct 19 13:56:32 1998 Doug Evans <devans@seba.cygnus.com> - - * Make-common.in (CGEN_INCLUDE_DEPS): Define. - (sim-core.o): Delete duplicate dependence on $(SIM_EXTRA_DEPS). - (sim-cpu.o,sim-endian.o,sim-hw.o): Ditto. - (cgen-run.o,cgen-scache.o,cgen-trace.o,cgen-utils.o): Delete - explicit cgen header dependencies, require SIM_EXTRA_DEPS to include - CGEN_INCLUDE_DEPS. - * cgen-cpu.h: New file. - * cgen-engine.h: New file. - * cgen-scache.h: New file. - * cgen-sim.h: Delete portions moved to new files. - * genmloop.sh: Generate two files eng.hin,mloop.cin explicitly, - rather than sending result to stdout. - -Fri Oct 9 14:20:22 1998 Doug Evans <devans@seba.cygnus.com> - - * Make-common.in (sim-reg.o): New rule. - (cgen-run.o): New rule. - * cgen-ops.h: Delete many BI macros. Change all UBI -> BI. - * cgen-run.c (prime_cpu): New function. - * cgen-scache.c: Add pseudo-basic-block (pbb) scaching support. - (scache_option_handler, case OPTION_PROFILE_SCACHE): Handle explicitly - mentioned cpu. - (scache_flush_cpu,scache_lookup,scache_lookup_or_alloc): New fns. - * cgen-sim.h (CGEN_INSN_VIRTUAL_TYPE): New enum. - (CGEN_INSN_VIRTUAL_P): New macro. - (SEM_PC): New typedef. - (SEMANTIC_FN): Change type of result to SEM_PC. - (SEM_SET_FULL_CODE,SEM_SET_FAST_CODE,SEM_SET_CODE): New macros. - (IDESC_CTI_P,IDESC_SKIP_P): New macros. - (SCACHE_MAP): New typedef. - (CPU_SCACHE): Add pbb support. - (scace_lookup,scache_lookup_or_alloc,scache_flush_cpu): Declare. - (SEM_BRANCH_INIT_EXTRACT,SEM_BRANCH_INIT,SEM_BRANCH_FINI): New macros. - (CGEN_CPU): New members running_p,insn_count,{fast,full}_engine_fn, - max_slice_insns. - (INSN_NAME): Delete. - (cgen_insn_name): Declare. - (sim_engine_invalid_insn): Renamed from sim_engine_illegal_insn. - * cgen-trace.c (trace_buf): Shrink from 1024 to 256 bytes. - (first_insn_p): Make static. - (trace_insn): Handle virtual insns specially. - (cgen_trace_printf): Ensure we haven't overflowed the buffer. - * cgen-types.h (UBI): Delete. - (MODE_TYPE): New enum. - (HOSTINT,HOSTUINT,HOSTPTR): Delete. - * cgen-utils.c (mode_names): Delete UBI. Add INT,UINT,PTR. - (cgen_virtual_opcode_table): New global. - (cgen_insn_name): New function. - (sim_disassemble_insn): Ignore virtual insns. - * genmloop.sh: Delete top level loop generation. Add pbb support. - * sim-cpu.h (CPU_INSN_NAME_FN): New typedef. - (sim_cpu_base): New members max_insns,insn_name,model_data. - (CPU_PC_GET,CPU_PC_SET): New macros. - (sim_pc_get,sim_pc_set): Declare. - * sim-model.c (model_set): Call model init fn. - * sim-model.h (MODEL_FN): New typedef. - (INSN_TIMING): New member model_fn. - (MODEL): New members num,init. - * sim-profile.c (sim_profile_print_bar): Renamed from print_bar. - All callers updated. - (profile_insn_init): New fn. - (profile_print_insn): Update, INSN_NAME -> CPU_INSN_NAME. - Exit early if insn profiling not supported. - (profile_print_memory): Update, MAX_MODES -> MODE_TARGET_MAX. - (profile_install): Record profile_insn_init as init fn. - (profile_uninstall): Free PROFILE_INSN_COUNT if non-null. - * sim-profile.h: Update, MAX_MODES -> MODE_TARGET_MAX. - (PROFILE_DATA): Delete member exec_time. - Change insn_count to pointer to array, rather than the array. - (sim_profile_print_bar): Declare. - -Wed Oct 7 16:56:42 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-run.c: New file. - * sim-reg.c: New file. - -Mon Sep 14 10:58:19 1998 Frank Ch. Eigler <fche@cygnus.com> - - * aclocal.m4: Add checks for -lsocket and -lnsl. - - * dv-sockser.c (dv_sockser_init): Use SO_REUSEADDR to - allow local port reuse on listening socket. - -Tue Sep 1 15:36:52 1998 Frank Ch. Eigler <fche@cygnus.com> - - * sim-config.h: Remove reference to linux kernel header. - -Tue Aug 25 12:45:27 1998 Frank Ch. Eigler <fche@cygnus.com> - - * dv-sockser.c (sockser_addr): Make variable non-static. - -Mon Aug 24 11:47:37 1998 Joyce Janczyn <janczyn@cygnus.com> - - * sim-hw.{c,h} (sim_hw_parse): Return struct hw pointer. - -Tue Aug 11 18:12:19 1998 Doug Evans <devans@canuck.cygnus.com> - - * sim-events.c (sim_events_elapsed_time): Fix calculation. - -Tue Aug 4 20:36:46 1998 Jeff Holcomb <jeffh@cygnus.com> - - * Make-common.in (install-common): Add $(EXEEXT) when installing - run. - -Mon Aug 3 11:46:01 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-sim.h (cgen_state): New member opcode_table. - * cgen-utils.c (sim_disassemble_insn): Use it. - -Fri Jul 24 10:14:18 1998 Doug Evans <devans@canuck.cygnus.com> - - * cgen-mem.h (DECLARE_SETT): Fix return type. - * cgen-sim.h (sim_engine_illegal_insn): Declare. - * cgen-scache.c: Include stdlib.h. - * cgen-trace.c (trace_extract): Use %lx for PCADDR. - * sim-model.c (model_option_handler): Remove unused variable `n'. - -Tue Jul 21 16:27:43 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-utils.c: Include bfd.h. - (sim_disassemble_insn): Update call to CGEN_EXTRACT_FN. - -Wed Jul 8 18:24:10 1998 Jeffrey A Law (law@cygnus.com) - - * sim-bits.h (EXTEND24): Fix typo. - -Wed Jul 8 17:41:47 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-events.c (ETRACE_P): New macro. - (struct _sim_event): Add member trace. - (sim_events_free): Reclaim trace message. - - * sim-events.c, sim-events.h (sim_events_schedule_vtracef, - sim_events_schedule_tracef): New functions, include printf trace - information in argument list. If tracing, store asprintf'd trace - message in sim_event. - - * hw-events.c, hw-events.h (hw_event_queue_schedule_tracef, - hw_event_queue_schedule_vtracef): New functions, mimic - sim_event_tracef. - -Mon Jul 6 15:51:14 1998 Jeffrey A Law (law@cygnus.com) - - * sim-bits.h (EXTEND24): Define. - -Thu Jul 2 17:13:25 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-sim.h (CPU_SCACHE): Make size unsigned. - (CPU_SCACHE_HASH_MASK): New macro. - (SCACHE_HASH_PC): Rewrite. - * genmloop.sh (engine_resume_{full,fast}): Move some of hash - computation out of main loop. - -Wed Jul 1 16:44:12 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-sim.h (RECORD_IADDR): Delete. - * cgen-types.h (HOSTINT,HOSTUINT,HOSTPTR): New types. - * genmloop.sh (engine_resume_{full,fast}): Delete icount. - -Wed Jun 17 12:25:08 1998 Mark Alexander <marka@cygnus.com> - - * gennltvals.def (mn10200): Add entry. - * nltvals.def: Regenerate with MN10200 additions. - -Wed Jun 17 13:18:28 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-inline.h (EXTERN_*): Replace with EXTERN_*_P. Correct - documentation on how it works. - - * sim-core.h, sim-core.c (sim_core_install, sim_core_attach, - sim_core_detach, sim_core_read_buffer, sim_core_write_buffer, - sim_core_set_xor, sim_core_xor_read_buffer, - sim_core_xor_write_buffer): Update. - - * sim-events.h, sim-events.c (sim_events_install, - sim_events_watch_clock, sim_events_schedule_after_signal, - sim_events_schedule, sim_events_watch_sim, sim_events_watch_core, - sim_events_deschedule): Update. - - * sim-fpu.h, sim-fpu.c (sim_fpu_zero, sim_fpu_one, sim_fpu_two, - sim_fpu_max32, sim_fpu_max64): Update. - -Sat Jun 13 07:45:38 1998 Doug Evans <devans@fallis.cygnus.com> - - * cgen-trace.c (trace_insn_fini): Redo cycle handling. - * sim-profile.h (PROFILE_DATA): Rename cycle handling members. - * sim-profile.c (profile_print_model): Update. - -Fri Jun 12 18:35:07 1998 Doug Evans <devans@seba.cygnus.com> - - * gennltvals.def (m32r): Use common syscall.h now. - (mn10300): Add entry. - * nltvals.def: Regenerate. - - * sim-engine.c (sim_engine_get_run_state): New function. - * sim-engine.h (sim_engine_get_run_state): Declare it. - -Thu Jun 11 00:50:03 1998 Doug Evans <devans@seba.cygnus.com> - - * sim-core.h (SIM_CORE_SIGNAL_FN): New typedef. - * sim-core.c (sim_core_signal): Make extern, always define. - -Wed Jun 10 16:02:29 1998 Doug Evans <devans@seba.cygnus.com> - - * Make-common.in (CGEN_FLAGS_TO_PASS): New variable. - * cgen-ops.h (ANDIF): New macro. - (ANDIF[BQHSD]I): Delete. - -Thu Jun 4 13:53:54 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-events.c (create_hw_event, delete_hw_event): Delete. - (hw_event_queue_schedule, hw_event_queue_deschedule, - bounce_hw_event): Fix hw-event memory corruptions found by Joyce - Janczyn. - - * hw-alloc.h (HW_NZALLOC): Define. - - * Make-common.in (test-hw-events): Add target for testing the - hw-event code. - -Mon May 25 21:11:26 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * Make-common.in (SIM_COMMON_HW_OBJS): Add hw-handles.o and - hw-instances.o. - hw-handles.c, hw-instances.c, hw-handles.h, hw-instances.h: New - files. - * hw-main.h: Include hw-handles.h, hw-instances.h. - * hw-base.h ({create,delete}_hw_{handles,instances}_data): Declare - * hw-base.c (hw_create, hw_delete): Call same. - -Mon May 25 18:55:35 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * dv-core.c: Include hw-main.h and sim-main.h. - * dv-pal.c: Include hw-main.h and sim-io.h. - * dv-glue.c: Include hw-main.h. - - * hw-main.h: New file. Move list of includes to here. - * hw-base.h: From here. - * Make-common.in (hw_base_headers): Rename to hw_main_headers. - (hw-*.o, dv-*.o): Update. - * hw-tree.c, hw-base.c, hw-properties.c, hw-ports.c, hw-device.c, - hw-events.c, hw-alloc.c, sim-hw.c: Include hw-main.h instead of - sim-main.h. - - * hw-base.h (do_hw_attach_regs, do_hw_poll_read_method, - do_hw_poll_read): Move declarations from here. - * hw-main.h: To here. - - * hw-base.h (struct hw_device_descriptor, hw_finish_callback): - Move from here. - * hw-main.h (struct hw_descriptor, hw_finish_method): To here, - rename. - * Make-common.in (hw-config.h): Update - * hw-base.c, dv-pal.c, dv-glue.c: Update - - * dv-glue.c, hw-device.h, hw-base.h, hw-ports.c: Rename - `*_callback' to `*_method. - -Mon May 25 18:41:18 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-base.h (set_*): Move set method macros from here. - * hw-device.h: To here. - -Mon May 25 18:21:38 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-base.h (create_hw_property_data, delete_hw_property_data): - Declare. - - * hw-base.c (hw_create, hw_delete): Call - * hw-properties.c (create_hw_property_data, - delete_hw_property_data): Define. - -Mon May 25 17:40:46 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-device.c, hw-properties.c: Include hw-base.h - - * hw-alloc.h, hw-alloc.c: New files. Move alloc code to here. - * hw-device.c: From here. - * hw-base.h: Include "hw-events.h". - - * hw-base.h (create_hw_alloc_data, delete_hw_alloc_data): Declare. - * hw-base.c (hw_create, hw_delete): Call. - * hw-alloc.c (create_hw_alloc_data, delete_hw_alloc_data): Define. - - * Make-common.in (SIM_NEW_COMMON_OBJS): Add hw-alloc.o. - (hw-alloc.o): New target. - -Mon May 25 17:14:27 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-events.h, hw-events.c: New files. Move event code to here. - * sim-hw.c: From here. - * hw-base.h: Include "hw-events.h". - * Make-common.in (SIM_NEW_COMMON_OBJS): Add hw-events.o. - (hw-events.o): New target. - - * hw-device.h (struct hw): Add struct hw_event_data events_of_hw. - * hw-events.h (struct hw_event): Replace typedef hw_event. - - * hw-base.h (create_hw_event_data, delete_hw_event_data): Declare. - * hw-base.c (hw_create, hw_delete): Call. - * hw-events.c (create_hw_event_data, delete_hw_event_data): Define. - - * dv-pal.c: Update. - -Mon May 25 16:55:16 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-base.c (panic_hw_port_event, empty_hw_ports): Move from here. - * hw-ports.c: To here. - - * hw-base.h, hw-ports.c (create_hw_port_data, - delete_hw_port_data): New functions. - * hw-base.c (hw_delete, hw_create): Call same. - - * hw-base.h (set_hw_ports, set_hw_port_event): Move set functions - from here. - * hw-ports.h: To here. - -Mon May 25 16:42:48 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-device.c (hw_ioctl), hw-device.h (hw_ioctl_callback): Drop - PROCESSOR and CIA arguments. - -Fri May 22 12:16:27 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (SIM_AC_OPTION_HW): Add enable / disable argument. - Move common object files from here. - * Make-common.in (SIM_COMMON_HW_OBJS): To here. - -Thu May 21 17:57:16 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-hw.c: Include ctype.h. - (do_hw_poll_read): Do not assume EAGAIN. - -Wed May 20 04:37:57 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-trace.c (first_insn_p): New static local. - (trace_insn_init): Set it. - (trace_insn_fini): Use TRACE_PREFIX. - (trace_insn): Rewrite to use trace_prefix. - * sim-trace.c (trace_prefix): Don't print filename arg if NULL. - Adjust width accordingly. - - * sim-profile.h (PROFILE_DATA): New member profile_any_p. - (PROFILE_ANY_P,PROFILE_INSN_P,PROFILE_MEMORY): New macros. - (PROFILE_SCACHE_P,PROFILE_PC_P,PROFILE_CORE_P): New macros. - (PROFILE_COUNT_INSN,PROFILE_COUNT_READ,PROFILE_COUNT_WRITE): Simplify. - (PROFILE_COUNT_CORE): Simplify. - * sim-profile.c (profile_option_handler): Compute profile_any_p. - -Tue May 19 23:55:30 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-ops.h (ADDCFSI): Fix typo. - -Sat May 16 12:44:52 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-sim.h (CGEN_CPU): New members idesc_{read,sem}_init_p. - * genmloop.sh: Use them rather than static locals. - - * sim-engine.c (sim_engine_set_run_state): New function. - * sim-engine.h (sim_engine_set_run_state): Declare. - * genmloop.sh (pending_reason,pending_sigrc): New static locals. - (@cpu@_engine_stop): New args reason,sigrc. All callers updated. - (engine_resume): Reorganize. Allow synchronous exit from main loop. - -Fri May 15 16:06:05 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-trace.c (trace_insn_init): New arg first_p. - All callers updated. - (trace_insn_fini): New arg last_p. All callers updated. - * cgen-trace.h (trace_insn_init,trace_insn_fini): Update. - (TRACE_INSN_INIT,TRACE_INSN_FINI): Update. - * genmloop.sh (engine_resume): Update. - -Fri May 15 15:59:00 1998 Joyce Janczyn <janczyn@cygnus.com> - - * Make-common.in (install-common): Run ranlib on installed copy of - libsim.a. - -Fri May 15 15:03:00 1998 Joyce Janczyn <janczyn@cygnus.com> - - * Make-common.in (install-common): Rename and install libsim.a. - -Tue May 12 15:23:57 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-io.c (unistd.h): Include. - -Wed May 6 16:04:18 1998 Doug Evans <devans@seba.cygnus.com> - - * Make-common (sim_main_headers): Sort. - (cgen-*.o): Add cgen-sim.h dependency. - - * cgen-scache.c (scache_init): Only allocate space if scache element - size is non-zero. - (scache_flush,scache_print_profile): Check if scache in use first. - - * cgen-sim.h (IDESC): Provide forward declaration. - (DECODE): Delete. - (CGEN_CPU): Always define scache member. New members idesc,opcode. - (cgen_cpu_max_extra_bytes): Declare. - * cgen-utils.c (cgen_cpu_max_extra_bytes): New function. - - * sim-cpu.h: New file. sim_cpu_base moved here. - Move sim_cpu_lookup decl here. - * sim-base.h: #include "sim-cpu.h". - * sim-cpu.c: New file. - * Make-common (sim_main_headers): Add sim-cpu.h. - (sim-cpu.o): Add rule for. - - * sim-model.c (set_model): Delete. - (sim_model_set,model_set): New functions. - (sim_model_install): Renamed from model_install. - Don't set default model here. - (model_option_handler): Rewrite --model processing. - (sim_model_lookup,sim_mach_lookup): New functions. - * sim-model.h (MAX_MODELS,MAX_INSNS): Delete. - (insn_timing): Delete. - (INSN_TIMING): New member `num'. - (IMP_PROPERTIES): Always define scache_elm_size member. - (MACH): New member init_cpu. - (sim_machs): Renamed from machs. - (sim_model_install): Renamed from model_install. - (sim_model_set,sim_model_lookup,sim_mach_lookup): Declare. - * sim-module.c (modules): Update. - - * sim-profile.c (profile_print_insn): Add cpu arg to INSN_NAME macro. - - * sim-io.c: #include <errno.h>. - -Wed May 6 12:39:15 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * dv-pal.c (struct hw_pal_device): Add reader. - (hw_pal_finish): Initialize reader. - (scan_hw_pal): Use reader. - - * hw-base.h, sim-hw.c (do_hw_poll_read): New function. - (HW_IO_EOF, HW_IO_NOT_READY): Define. - * dv-pal.c: Use. - - * sim-io.h, sim-io.c (sim_io_poll_read): New function. Copy from - ../ppc/main.c sim_io_read_stdin. - -Fri May 1 12:11:02 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-tree.h (hw_tree_print): Paramaterize with print and file - arguments. - * hw-tree.c: Update. - - * hw-base.h (hw_port_event_callback): Delete CPU/CIA args. - * hw-device.h (hw_io_read_buffer, hw_io_write_buffer): Delete - CPU/CIA args. - * hw-ports.h (hw_port_event): Ditto. - * hw-ports.c (hw_port_event): Update. - * hw-base.c (panic_hw_io_read_buffer, panic_hw_io_write_buffer): - Update. - * dv-pal.c (hw_pal_io_read_buffer, hw_pal_io_write_buffer): - Update. - (hw_pal_io_write_buffer): Call hw_halt not sim_engine_halt. - (do_counter_event): Update. - * dv-glue.c (hw_glue_io_read_buffer): Update. - (hw_glue_port_event): Update. - - * hw-device.h (SIM_DESC): Replace with struct sim_state. - * hw-base.h (hw_create): Ditto. - * hw-base.c (hw_create): Ditto. - - * hw-device.c (hw_abort, hw_trace, hw_hw_event_queue_schedule, - hw_event_queue_deschedule, hw_event_queue_time): Delete, moved - from here to. - * sim-hw.c: Here. - * hw-device.h (hw_system_cpu): Declare. - * sim-hw.c (hw_system_cpu): New function. - - * sim-core.c (sim_core_map_attach, sim_core_attach): Call - sim_hw_abort not hw_abort. - (sim-hw.h): Include. - (sim_core_read_buffer, sim_core_write_buffer): Call - sim_hw_io_read_buffer and sim_hw_io_write_buffer. Do not pass CPU - argument. - (sim_core_set_xor): Do not pass CPU when aborting. - - * sim-n-core.h (sim_core_read_aligned_N, - sim_core_write_aligned_N): Call sim_hw_abort not hw_abort. - (sim_core_read_aligned_N, sim_core_write_aligned_N): Call - sim_cpu_hw_io_read_buffer and sim_cpu_hw_io_write_buffer. Does not - return length. - - * sim-hw.h: Declare sim_hw_io_{read,write}_buffer. Declare - sim_hw_print. - * sim-hw.c (sim_hw_io_read_buffer, sim_hw_io_write_buffer, - sim_cpu_hw_io_read_buffer, sim_cpu_hw_io_write_buffer): New - functions. - (sim_hw_print): New function. - - * sim-engine.h (sim_engine_vabort): Declare. - * sim-engine.c (sim_engine_vabort): New function. - -Wed Apr 29 23:58:52 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-trace.c (print_data): For floating-point numbers trace raw - hex value. - (trace_result_fp2): New function. - * sim-trace.h (trace_result_fp2): New declaration. - (TRACE_FP_RESULT2): New macro. - -Tue Apr 28 18:28:58 1998 Geoffrey Noer <noer@cygnus.com> - - * common/aclocal.m4: call AM_EXEEXT in SIM_AC_COMMON, define - AM_CYGWIN32 and AM_EXEEXT. - * common/Make-common.in: set EXEEXT, add missing EXEEXTs - to run and install-common rules. - * common/configure: regenerate - -Sat Apr 25 17:45:01 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-types.h (cell_word): New type. - (natural_cell): Delete type. - -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:25:07 1998 Tom Tromey <tromey@cygnus.com> - - * acconfig.h (NEED_DECLARATION_PRINTF): Removed. - -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:38:08 1998 Tom Tromey <tromey@cygnus.com> - - * acconfig.h: New file. - * Make-common.in (top_builddir): New macro. - (INTL_LIB): Removed. - (INTLLIBS): New macro. - (INTLDEPS): Likewise. - (LIBDEPS): Use INTLDEPS. - (EXTRA_LIBS): Use INTLLIBS. - * aclocal.m4 (SIM_AC_COMMON): Call CY_GNU_GETTEXT. - (CY_WITH_NLS, CY_GNU_GETTEXT, AM_PATH_PROG_WITH_TEST, - AM_LC_MESSAGES): New macros from GNU gettext. - -Fri Apr 24 19:57:59 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-config.h: Discard leading _ from macros. - * sim-types.h: Ditto. - -Wed Apr 22 14:14:19 1998 Michael Meissner <meissner@cygnus.com> - - * Make-common.in (CSEARCH): Add -I to intl directories. - (INTL_LIB): Point to libintl.a. - (LIBDEPS): Add $(INTL_LIB). - (EXTRA_LIBS): Ditto. - -Tue Apr 21 12:44:27 1998 Doug Evans <devans@canuck.cygnus.com> - - * cgen-types.h (GETHIDI,MAKEDI): Tweak. - - * cgen-ops.h (ADDCFSI): Fix. - (SUBCFSI): Tweak. - -Tue Apr 21 13:18:41 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-types.h (signed_address, unsigned_address): Define. - -Mon Apr 20 21:47:54 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.c (sim_fpu_2d): Don't return an SNaN, convert it into a - QNaN. - -Thu Apr 16 10:30:14 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.c, sim-fpu.h (sim_fpu_fractionto, sim_fpu_tofraction): - New functions, pack / unpack sim_fpu struct using raw values. - (sim_fpu_is): Differentiate between negative and positive - infinity. - -Tue Apr 14 18:49:31 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-bits.h (EXTEND4): Define. - (EXTEND4, EXTEND15, EXTEND11): Ditto. - -Tue Apr 14 16:31:35 1998 John Metzler <jmetzler@cygnus.com> - - * sim-memopt.c (parse_addr): Sunos 4.5 does not have strtol - declared so we need this cast to prevent long long addresses - from being misconfigures. Results in access to unmapped memory. - -Tue Apr 14 13:19:14 1998 Doug Evans <devans@canuck.cygnus.com> - - * Make-common.in (RUNTESTFLAGS): Define. - (check): Pass RUNTESTFLAGS to recursive make. - -Tue Apr 14 15:09:19 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-info.c (sim_info): Be verbose when either VERBOSE or - STATE_VERBOSE_P. - -Sat Apr 4 23:24:17 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (sim-inline): By default, disable sim-inline when - cross compiling. - -Sat Apr 4 20:36:25 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (sim-cflags): Add -fomit-frame-pointer to defaults. - (sim-inline): Update to match sim-inline.[hc] - * configure: Regenerated to track ../common/aclocal.m4 changes. - - * Make-common.in (sim_main_headers): Add sim-inline.h - - * sim-bits.h (sim-bits.c): Include when H_REVEALS_MODULE_P. - selected. - * sim-endian.h (sim-endian.c): Ditto. - - * sim-events.h (_SIM_EVENTS_H_): Replace with SIM_EVENTS_H. - (sim_events_set_trace): Delete unused prototype. - - * sim-core.h (_SIM_CORE_H_): Replace with SIM_CORE_H. - * sim-core.c (_SIM_CORE_C_): Ditto for SIM_CORE_C. - - * sim-fpu.h (sim-fpu.c): Include when H_REVEALS_MODULE_P. - (sim_fpu_to232i, sim_fpu_to232u, sim_fpu_i232to, sim_fpu_u232to): - Comment out, not yet implemented in sim-fpu.c. - (sim_fpu_zero, sim_fpu_one, sim_fpu_two, sim_fpu_qnan, - sim_fpu_max32, sim_fpu_max64): Mark as EXTERN_SIM_FPU. - - * sim-inline.h: Rewrite description. - (H_REVEALS_MODULE_P, C_REVEALS_MODULE_P): Define. - (SIM_MAIN_INLINE): Add inline option. - - * sim-inline.c (semantics.c, idecode.c, engine.c, ...): Do not - include generated files. Handled by generator directly. - -Sat Apr 4 01:07:06 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-trace.c (set_trace_option_mask): Keep TRACE_ANY_P - up-to-date. - - * sim-trace.h (TRACE_ANY_P): Define. - (struct _trace_data): Add trace_any_p. - -Mon Mar 30 17:11:55 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * run.c (main): Handle all alternatives of enum sim_stop. - (main): Delete unused `asection *s'. - -Fri Mar 27 16:15:52 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-tree.h, hw-tree.c (hw_tree_vparse): New function - - * configure: Regenerated to track ../common/aclocal.m4 changes. - - * sim-hw.c: New file. - * sim-hw.h (sim_hw_parse): Declare function. - (hw-tree.h): Do not include. - - * sim-base.h (STATE_HW): Define. - (struct sim_state_base): Add member struct *hw. - - * sim-module.c (sim-hw.h): Include. - (modules): Add sim_hw_install. - - * aclocal.m4 (sim_hw_obj): Add sim-hw.o - -Fri Mar 27 14:55:06 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-base.h (CPU_INDEX): Define. - - * sim-utils.c (sim_state_alloc): Initialize. - * sim-module.c (sim_post_argv_init): Ditto. - -Thu Mar 26 10:07:57 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk> - - * aclocal.m4 (sim_hw_obj): Fix sed expression to generate - properly formatted lists. - -Thu Mar 26 10:37:22 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * dv-pal.c (enum hw_pal_address_mask): From Stu Grossman, was - 0x2f needs to be 0x3f. - -Thu Mar 26 09:10:56 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-tree.c (hw_tree_find_property): Return NULL when device is - not found. - (hw_tree_find_*_property): Clean up error message when property is - not found. - - * dv-pal.c (hw_pal_io_read_buffer): Check the smp property is - present before looking for it. - -Wed Mar 25 16:17:38 1998 Ian Carmichael <iancarm@cygnus.com> - - * aclocal.m4 (AC_CHECK_HEADERS): Add check for fpu_control.h. - (AC_CHECK_FUNCS): Add check for __setfpucw. - * configure: Regenerated. - -Wed Mar 25 09:18:34 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * dv-pal.c (hw_pal_countdown, hw_pal_countdown_value, - hw_pal_timer, hw_pal_timer_value): Define. - (hw_pal_io_read_buffer, hw_pal_io_write_buffer): Add timer support - (do_counter_event, do_counter_read, do_counter_value, - do_counter_write): new functions. - -Tue Mar 24 12:24:24 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-tree.c (hw_printf): Send tree dump to stderr, same as other - trace output. - - * hw-base.c (hw_create): Stop searching for a device when one is - found. - -Wed Mar 25 12:35:29 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Mon Mar 23 10:25:08 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Add second argument, - appends extra devices. - (SIM_AC_OPTION_HARDWARE): Substute sim_hw, a non-duplicate list of - the device names. - - * Make-common.in (hw-config.h): New target, create hw-config.h - file. - (SIM_HW): Definition from @sim_hw@. - (hw-base.o): Depend on hw-config.h - -Tue Mar 24 17:41:35 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk> - - * Make-common.in: Get SHELL from configure. - * (stamp-tvals sim-inline.c): Use $(SHELL) when invoking - move-if-change. Fixes NT native build problem. - * Makefile.in (nltvals.def): Use $(SHELL) when invoking - move-if-change. Fixes NT native build problem. - * configure: Regenerate with autoconf 2.12.1 to fix shell issues for - NT native builds. - -Sun Mar 22 16:54:40 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-device.h, hw-device.c (hw_strdup): New function. - - * hw-base.c (hw_create): Use hw_strdup when saving a copy of the - strings name, family and args. - (full_name_of_hw): Use hw_strdup when returning the full path. - - * hw-properties.c: Clean up property not found / wrong type error - messages. - - * hw-tree.c (hw_tree_parse): Finish a devices initialization - before attaching any ports. - - * hw-base.c (hw-config.): Include. Replace hardwired table. - - * dv-glue.c: Copy over ../ppc/hw_glue.c. Update to new framework. - - * Make-common.in: Add rule for dv-glue.o. - -Sun Mar 22 16:45:54 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-base.c (hw_finish): Move setting of trace level to here. - (hw_create): From here. - - * hw-base.h, hw-base.c (do_hw_attach_regs): Copy function from - ../ppc/device_table.c. - - * dv-pal.c (hw_pal_finish): Attach PAL device to parent bus. - - * hw-tree.c (print_properties): Supress path when printing - properties of root node. - -Sun Mar 22 16:21:15 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-device.h (HW_TRACE): Define. - (hw_trace): Declare. - * hw-device.c (hw_trace): Implement function. - - * hw-base.c (hw_create): Set hw trace level from "trace?" - property. - - * dv-core.c (dv_core_attach_address_callback): Add trace. - - * dv-pal.c: Replace DTRACE with HW_TRACE. - -Sun Mar 22 15:23:35 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-device.h (HW_ZALLOC, HW_MALLOC): New macros. - (hw_alloc_data): Delcare. - (struct hw): Add member alloc_of_hw. - - * hw-device.c (hw_zalloc, hw_malloc, hw_free, hw_free_all): New - functions. Assocate memory with a device. - (stdlib.h): Include. - - * hw-base.h (set_hw_delete): Define. - (hw_delete_callback): Declare. - (hw_delete): Declare. - - * hw-base.c (hw_delete): Implement function. - (struct hw_base_data): Add member to_delete. - (ignore_hw_delete): New function, does nothing. - (hw_create): Set the hw_delete method. - (hw_create): Allocate the base type using HW_ZALLOC before setting - any methods. - - * hw-tree.h, hw-tree.c (hw_tree_delete): New function. - - * hw-properties.c: Replace zalloc/zfree with hw_zalloc/hw_free. - - * hw-ports.c: Replace zalloc/zfree with hw_zalloc/hw_free. - (attach_hw_port_edge): Add struct hw argument - - * dv-pal.c (hw_pal_finish): Replace zalloc/zfree with - hw_zalloc/hw_free. - -Sun Mar 22 15:09:52 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * hw-device.h (hw_attach_address_callback, - hw_detach_address_callback): Attach to a single space not a space - mask. Clarify interpretation of SPACE:ADDR parameters. - - * hw-base.c (passthrough_hw_attach_address, - passthrough_hw_detach_address): Update. - * dv-core.c (dv_core_attach_address_callback): Ditto. - * dv-pal.c (hw_pal_attach_address): Ditto. - -Thu Mar 19 00:41:00 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-options.h: Document additional CPU arg to OPTION_HANDLER. - -Wed Mar 18 14:13:02 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * Make-common.in (SIM_HW_OBJS, SIM_HW_SRC, SIM_DV_OBJS): Define. - (hw-base_h, hw-device_h, hw-handles_h, hw-instances_h, hw_ports_h, - hw-properties_h, hw-tree_h): Define, point at corresponding - header. - (hw_base_headers): Define list of headers included by hw-base.h - (hw-base.o, hw-device.o, hw-instances.o, hw-handles.o, hw-ports.o, - hw-properties.o, hw-tree.o): Specify dependencies. - (dv-core.o, dv-pal.o): Ditto. - - * sim-hw.h: New file. - - * hw-device.h, hw-device.c, hw-properties.h, hw-properties.c, - hw-ports.h, hw-ports.c: New files. Copied from ../ppc/device.[ch]. - - * hw-tree.h, hw-tree.c: New files. Copied from ../ppc/tree.[hc]. - - * hw-base.h, hw-base.c: new files. Copied from - ../ppc/device_table.[hc]. - - * dv-core.c, dv-pal.c: New files. Copied from - ../ppc/hw_{core,pal}.c - - * sim-basics.h (struct hw): Declare. - (enum port_direction, enum object_disposition): Declare. - -Wed Mar 18 12:38:12 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Set sim_hw_obj, sim_dv_obj, - sim_dv_src in Makefile. Take list of devices as parameter to m4 - macro.. - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Mon Mar 16 12:37:33 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-trace.h, sim-trace.c (trace_prefix): Pass in sim_cia so that - trace_prefix can abort cleanly. - -Sat Mar 14 18:36:12 1998 Doug Evans <devans@seba.cygnus.com> - - * dv-sockser.c, dv-sockser.h: New files. - * Make-common.in (dv-sockser.o): Add rule for. - * aclocal.m4: Check for fcntl.h. - * config.h: Add HAVE_FCNTL_H. - - * sim-break.c (remove_breakpoint): Fix thinko. - - * sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA. - Use SIM_HANDLES_LMA for lma_p arg to sim_load_file. - -1998-03-13 Fred Fish <fnf@cygnus.com> - - * sim-base.h (struct sim_state_base): Add prog_syms and - define macro STATE_PROG_SYMS. - * sim-trace.c (trace_prefix): Add variables abfd, symsize, - symbol_count, and asymbols. Call bfd_get_symtab_upper_bound - and bfd_canonicalize_symtab, to get symbol table on first use - and preserve it via STATE_PROG_SYMS for future calls to - bfd_find_nearest_line. - -Wed Mar 11 14:02:47 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.h, sim-core.c (sim_core_map_to_str): Delete. - - * sim-core.c (sim_core_attach): Handle a generic number of maps - - up to nr_maps, not just access_* maps. - - * sim-profile.h (struct PROFILE_DATA): Track nr_maps different - maps. - - * sim-profile.c (profile_print_core): Make map unsigned. Iterate - over nr_maps not sim_core_nr_maps. - - * sim-events.h, sim-events.c (sim_events_watch_core): Change - core_map argument to unsigned. - (struct _sim_core): Ditto for struct member core_map. - - * sim-core.h (nr_sim_core_maps, sim_core_*_map): Delete - - * sim-basics.h (access_io, access_*_io): Define. - (map_read, map_write, map_exec, map_io): Define. - - * sim-core.c, sim-core.h (sim_core_attach): Replace argument - attach with more generic mapmask. - (sim_core_{read,write}_*): Change map argument to unsigned. - - * sim-core.c (sim_core_uninstall, sim_core_attach, - sim_core_detach): Iterate over nr_maps instead of - sim_core_nr_maps. - - * sim-break.c (insert_breakpoint): Write breakpoints to exec_map - instead of the write_map. - (remove_breakpoint): Ditto. - - * genmloop.sh (engine_resume_full): Replace sim_core_*_map - with read_map, write_map, exec_map resp. - - * cgen-mem.h (DECLARE_GETMEM, DECLARE_SETMEM, DECLARE_GETIMEM): - Ditto. - - * cgen-utils.c (sim_disassemble_insn): Ditto. - - * sim-hrw.c (sim_write, sim_write): Ditto. - - * sim-utils.h, sim-utils.c (access_to_str, map_to_str, - transfer_to_str): New functions. - -Mon Mar 9 12:50:59 1998 Doug Evans <devans@seba.cygnus.com> - - * sim-base.h (sim_state_base): New member environment. - (STATE_ENVIRONMENT): New macro. - * sim-config.c (current_environment): Delete. - (sim_config_default): New function. - (sim_config): Set STATE_ENVIRONMENT, not current_environment. - * sim-config.h (current_environment,CURRENT_ENVIRONMENT): Delete. - (sim_config_default): Add prototype. - * sim-module.c (sim_pre_argv_init): Call sim_config_default. - * sim-options.c (standard_option_handler, case OPTION_ENVIRONMENT): - Set STATE_ENVIRONMENT, not current_environment. - -Mon Mar 9 11:59:03 1998 Jim Wilson <wilson@cygnus.com> - - * sim-fpu.c (NR_GUARDS64): Change NR_PAD32 to NR_PAD64. - -Tue Mar 3 10:53:05 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-types.h (SIGNED32, SIGNED64): Pacify GCC. - - * sim-alu.h (ALU64_BEGIN): Make alu64_r unsigned. - -Mon Mar 2 10:20:06 1998 Doug Evans <devans@seba.cygnus.com> - - * Make-common.in (TAGS): Make smarter. - * Makefile.in (TAGS): Ditto. - -Fri Feb 27 19:09:57 1998 Doug Evans <devans@canuck.cygnus.com> - - * sim-module.c (*): Fix typos in assertion tests. - -Sat Feb 28 13:54:10 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-module.c (sim_pre_argv_init): String passed to asprintf - can't be constant. - - * sim-options.c (sim_parse_args): Ditto. - (sim_args_command): Return OK, instead of nothing, for an empty - command. - -Fri Feb 27 13:29:13 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-profile.c (profile_info): Rename from profile_print. Drop - misc and misc_cpu callback arguments. Use - PROFILE_INFO_CPU_CALLBACK and STATE_PROFILE_INFO_CALLBACK instead. - (profile_install): Install profile_info function. - - * sim-profile.h (PROFILE_INFO_CPU_CALLBACK, - STATE_PROFILE_INFO_CALLBACK): Define. - (struct PROFILE_DATA): Add field info_cpu_callback. - (profile_print): Delete function. - - * sim-base.h (STATE_MODULES): Define. Replace individual - STATE_*_LIST with single struct module_list. - - * sim-module.h (MODULE_INFO_FN, MODULE_INFO_LIST): Declare. - (struct module_list): Declare. - - * sim-module.h, sim-module.c (sim_module_add_info_fn, - sim_module_info): New functions. - (sim_module_install): Clean up module data structures. - - * sim-info.c (sim_info): New file. New function. Call - sim_module_info. - - * Make-common.in (sim-info.o): Define rule. - (SIM_NEW_COMMON_OBJS): Add sim-info.o. - - -Fri Feb 27 18:26:16 1998 Doug Evans <devans@canuck.cygnus.com> - - * sim-base.h (sim_cpu_base): New members name, options. - (sim_cpu_lookup): Add prototype. - * sim-module.c (sim_pre_argv_init): Provide default names for cpus. - * sim-options.h (DECLARE_OPTION_HANDLER): New argument `cpu'. - (sim_add_option_table): Update prototype. - * sim-options.c (sim_add_option_table): New argument `cpu'. - (standard_option_handler,standard_install): Update. - (sim_parse_args): Handle cpu specific options. - (print_help): New static function. - (sim_print_help): Call it. Print cpu specific options. - (find_match): New static function. - (sim_args_command): Call it. Handle cpu specific options. - * sim-utils.c (sim_cpu_lookup): New function. - * sim-memopt.c (memory_option_handler): Update. - (sim_memopt_install): Update. - * sim-model.c (model_option_handler): Update. - (model_install): Update. - * sim-profile.c (profile_option_handler): Update. - (profile_install): Update. - * sim-trace.c (trace_option_handler): Update. - (trace_install): Update. - * sim-watch.c (watchpoint_option_handler): Update. - (sim_watchpoint_install): Update. - * cgen-scache.c (scache_option_handler): Update. - (scache_install): Update. - -Wed Feb 25 11:00:26 1998 Doug Evans <devans@canuck.cygnus.com> - - * Make-common.in (check): Run `make check' in testsuite dir. - -Wed Feb 25 14:40:24 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-trace.c (trace_result0): New function. - - * sim-trace.h (TRACE_FP_*, TRACE_FPU_*): Rename TRACE_FPU_* - macro's to TRACE_FP_*. TRACE_FPU_* should be defined and used when - tracing sim_fpu variables. - (TRACE_ALU_RESULT0): Define. - (TRACE_FP_RESULT_WORD): Define. - (TRACE_FP_INPUT_WORD1): Define. - - * sim-fpu.c, sim-fpu.h (sim_fpu_max32, sim_fpu_max64, sim_fpu_one, - sim_fpu_two): New constants. - (sim_fpu_op1, sim_fpu_op2): New types. - (struct _sim_fpu): Delete member result. Re-order other members. - (sim_fpu_sign, sim_fpu_exp): New functions. - (sim_fpu_max, sim_fpu_min): new functions. - (EXPMAX32, EXPMAX64, NR_PAD32, NR_PAD64, NR_GUARDS32, NR_GUARDS64, - NORMAL_EXPMAX32, NORMAL_EXPMAX64): Define. - -Tue Feb 24 22:45:39 1998 Doug Evans <devans@seba.cygnus.com> - - * sim-profile.c (profile_print): Delete duplicate test of - PROFILE_INSN_IDX. - (profile_print_pc): Exit early if data collection not set up. - (profile_print_core): Simplify by calling sim_core_map_to_str. - * sim-core.h (sim_core_map_to_str): Declare. - * sim-core.c (sim_core_map_to_str): Make non-static. - - * genmloop.sh (engine_resume): Update insn_count before exiting. - (engine_resume_full): Keep accurate core profile data. - - * cgen-utils.c (sim_disassemble_insn): Don't use - sim_core_read_aligned_N, it messes up profiling results. - -Mon Feb 23 20:45:57 1998 Mark Alexander <marka@cygnus.com> - - * nltvals.def: Regenerate with MN10300 additions. - -Tue Feb 24 13:18:42 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-trace.h (TRACE_ALU_RESULT2): Define. - - * sim-trace.h, sim-trace.c (trace_result_word2, - trace_input_word4, trace_result_word4): New function. - -Mon Feb 23 13:08:35 1998 Doug Evans <devans@canuck.cygnus.com> - - * cgen-sim.h (SEM_NEXT_PC): New arg `len'. - - * sim-xcat.h: Delete. - * cgen-mem.h: Delete inclusion of sim-xcat.h. - * cgen-sim.h: Ditto. - * sim-alu.h: Replace sim-xcat.h with symcat.h. - * sim-n-bits.h: Ditto. - * sim-n-core.h: Ditto. - * sim-n-endian.h: Ditto. - -Mon Feb 23 13:19:58 1998 Michael Meissner <meissner@cygnus.com> - - * syscall.c (cb_syscall): Handle short reads, and EOF. - -Tue Feb 24 00:29:57 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-trace.c (print_data): case trace_fmt_fp missing break. Use - sim_fpu to safely print fp_word values. - (print_data): Add trace_fmt_bool and trace_fmt_addr. - (trace_result_bool1, trace_result_addr1): New functions. - (trace_input_bool1, trace_input_addr1): New functions. - - * sim-trace.h (TRACE_FPU_*): Define. - -Mon Feb 23 13:24:54 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.h (enum sim_fpu_class): Add sim_fpu_class_denorm. - (sim_fpu_fpto, sim_fpu_tofp): Define. - -Fri Feb 20 18:08:51 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.c (sim_fpu_cmp): New function. - -Wed Feb 18 16:29:21 1998 Doug Evans <devans@canuck.cygnus.com> - - * cgen-utils.h (sim_disassemble_insn): Use CGEN_INSN_BITSIZE - instead of abuf->length. - * sim-trace.c (trace_options): Have -t only trace a few useful things. - (set_trace_option_mask): Renamed from set_trace_options. - (set_trace_option): New function. - (trace_option_handler): Update calls to set_trace_option{,_mask}. - * sim-trace.h (TRACE_USEFUL_MASK): New macro. - -Wed Feb 18 12:42:15 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-basics.h: Declare struct _sim_fpu. - -Tue Feb 17 16:27:46 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-trace.h (TRACE_ALU_INPUT*, TRACE_ALU_RESULT): Define. - (trace_prefix, trace_input*, trace_result*): Declare. - (trace_one_insn): Change declaration, assume trace_prefix called. - (trace_generic): Like trace_one_insn. - (TRACE_ALU_IDX, TRACE_*_IDX): Change #define's to enum. - (TRACE_alu, TRACE_[a-z]*): Update. - - * sim-trace.c (trace_prefix, trace_input*, trace_result*, - trace_insn, save_data, trace_idx_to_str, print_data): New - functions. - (trace_one_insn): Rewrite. - (trace_generic): New function. - -Tue Feb 17 17:27:30 1998 Doug Evans <devans@seba.cygnus.com> - - * aclocal.m4 (USE_MAINTAINER_MODE): New variable. - - * cgen-sim.h (SEMANTIC_CACHE_FN): Delete. - (SEMANTIC_FN): Rewrite declaration. - (DECODE): Update type of semantic_fast member. - ({EX,SEM}_FN_NAME): Have only one version. - * sim-base.h (sim_state_base): Delete conditionals surrounding - member scache_size. - -Tue Feb 10 18:31:49 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-load.c (sim_load_file): Print LMA/VMA according to value - used. - -Tue Feb 10 14:56:23 1998 Ian Carmichael <iancarm@cygnus.com> - - * sim-core.c: Add missing prototypes for WITH_DEVICES. - Add missing parameters to device_io calls. - * sim-core.h: Add missing parameters to device_io calls. - -Mon Feb 9 14:48:37 1998 Doug Evans <devans@canuck.cygnus.com> - - * cgen-sim.h (DECODE): Always use switch for `read' for now. - (PAREXEC): Renamed from PARALLEL_EXEC. All uses updated. - (SEMANTIC{,_CACHE}_FN): Fix return type. - * genmloop.sh (@cpu@_engine_run): Delete `current_state'. - (engine_resume): Likewise. Make `engine' volatile. Save copy - of cpu pointer in volatile object. Initialize read switch if - -parallel. - -Thu Feb 5 13:27:04 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-sim.h (EX_FN_NAME): _exc_ -> _ex_. - (SEM_INSN): New macro. - -Tue Feb 3 16:31:56 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-run.c (sim_engine_run): Assume IMEM is 32 bit. - -Sun Feb 1 16:47:51 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Sun Feb 1 16:16:57 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-types.h (fp_word): New type, define according to - WITH_TARGET_FLOATING_POINT_BITSIZE. - - * aclocal.m4 (default_sim_floating_point_bitsize): Add - configuration of size of floating point registers. - -Sun Feb 1 14:02:31 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-profile.c (profile_print): Only print CPU <N> if other - output is going to appear. - -Sat Jan 31 18:15:41 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Sat Jan 31 18:03:55 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-types.h (address_word): Typedef according to - WITH_TARGET_ADDRESS_BITSIZE. - (signed_cell, unsigned_cell, natural_cell): Ditto using - WITH_TARGET_CELL_BITSIZE. - - * sim-config.h (WITH_TARGET_ADDRESS_BITSIZE): Define. - (WITH_TARGET_CELL_BITSIZE): Define. - (WITH_HOST_WORD_BITSIZE): Delete. - - * sim-config.c (print_sim_config): Update. - - * aclocal.m4 (SIM_AC_OPTION_BITSIZE): Add support for - configuration of address and OpenFirmware cell sizes. - -Fri Jan 30 09:36:33 1998 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-engine.h (sim_engine_run): Add argument nr_cpus. - * sim-run.c (sim_engine_run): Update. - - * sim-engine.h (SIM_ENGINE_HALT_HOOK): Use SET_CPU_CIA instead of - CPU_CIA. - * sim-run.c (sim_engine_run): Ditto. - - * sim-resume.c (sim_resume): Obtain nr_cpus from sim_engine. - (sim_resume): Pass nr_cpus to sim_engine_run. - - * sim-engine.h (struct _sim_engine): Add member nr_cpus. - - * sim-engine.c (sim_engine_init): Hardwire nr_cpus to - MAX_NR_PROCESSORS. - (sim_engine_nr_cpus) sim-engine.c, sim-engine.h: New function - -Fri Jan 23 14:20:54 1998 Doug Evans <devans@seba.cygnus.com> - - * Make-common.in (stamp-tvals): New rule. - (targ-vals.h,targ-map.c): Depend on it. - (clean): Remove stamp-tvals. - -Tue Jan 20 21:35:13 1998 Michael Meissner <meissner@cygnus.com> - - * sim-utils.c (sim_state_alloc): #if 0 variable that is only used - in code also #if 0'ed. - -Mon Jan 19 22:26:29 1998 Doug Evans <devans@seba> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - * aclocal.m4: Recognize --enable-maintainer-mode. - -Mon Jan 19 12:45:45 1998 Doug Evans <devans@seba.cygnus.com> - - * cgen-scache.h: Deleted. - * Make-common.in (cgen-run.o,cgen-scache.o): Delete cgen-scache.h dep. - * cgen-scache.c: Only compile contents if WITH_SCACHE. - (scache_init): Use runtime computed size of SCACHE. - (scache_flush): Likewise. - * cgen-mem.h (GETIMEMU[QHSD]I): Declare. - ([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare. - * cgen-sim.h: Scache support moved here. - (PC): Redo definition. - (ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls. - (DECODE): Add parallel execution support. - Only include semantic label members if using switch. - (SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support. - (CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf. - (IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF, - SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here - from cgen-types.h. - (engine_{stop,run,resume,halt,signal}): Delete decls. - * cgen-types.h (CGEN_{XCAT3,CAT3}): Delete. - (argbuf,scache): Delete forward decls. - (STATE): Delete decl. - * cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h. - Include cgen-mem.h, cgen-ops.h. - (engine_halt,engine_signal): Delete. - ({ex,exc,sem,semc}_illegal): Delete. - (sim_disassemble_insn): Result of extract fn is in bits. - * genmloop.sh: Rewrite. - - * cgen-trace.c (trace_insn): Set printed_result_p=0 if not tracing - line numbers. - - * sim-base.h (sim_state_base): Delete member `model'. - (sim_cpu_base): Add member `model'. - * sim-model.h (IMP_PROPERTIES): New type. - (MACH): New members imp_props, models. - (models): Delete decl. - * sim-model.c (set_model): Update. - * sim-profile.c (profile_print_model): Update. - - * sim-utils.c (sim_state_alloc): Delete setting of cpu backlink here. - -Fri Jan 16 12:33:09 1998 Nick Clifton <nickc@cygnus.com> - - * cgen-trace.c (trace_insn): Call CGEN_INSN_MNEMONIC() rather than - CGEN_INSN_SYNTAX(). - -Mon Dec 15 23:17:11 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - * config.in: Ditto. - -Mon Dec 15 23:16:03 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (AR): Check for sigaction. - -Thu Dec 4 09:21:05 1997 Doug Evans <devans@canuck.cygnus.com> - - * Make-common.in (sim-core.o): Depend on $(sim_main_headers). - - * sim-config.h (WITH_TREE_PROPERTIES): Define as 0. - * sim-config.c (sim_config): Replace WITH_DEVICES with - WITH_TREE_PROPERTIES. - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Wed Dec 3 17:56:02 1997 Doug Evans <devans@canuck.cygnus.com> - - * Make-common.in (SIM_ENVIRONMENT): New variable. - (CONFIG_CFLAGS): Add it. - * aclocal.m4 (SIM_AC_OPTION_ENVIRONMENT): Handle - --enable-sim-environment option. - * configure: Regenerated. - * sim-config.h (environment support): Rewrite. - * sim-config.c (current_environment): Define as enum, unconditionally. - (current_alignment): Define unconditionally. - (config_environment_to_a): Update. - (config_alignment_to_a): Fix type of argument. Define unconditionally. - (sim_config): Handle environment and alignment determination - unconditionally. Delete sanity checks of current_environment, - unnecessary. - (print_sim_config): Update. - * sim-options.c (STANDARD_OPTIONS enum): Add OPTION_ENVIRONMENT. - (standard_options): Add --environment. - (standard_option_handler): Likewise. - -Fri Nov 28 12:21:25 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-alu.h: Add notes on carry vs borrow for subtraction. - (ALU{,8,16,32,64}ADD): Redefine ADD macro as add overflowing. - (ALU{,8,16,32,64}ADDC): Define - add carrying. - (ALU{,8,16,32,64}SUB): Redefine SUB macro as subtract overflowing. - (ALU{,8,16,32,64}SUBB): Define - subtract borrowing. - (ALU{,8,16,32,64}SUBC): Define - tract carrying. - (ALU{,8,16,32,64}ADD_CA, ALU{,8,16,32,64}ADDC_C): Replace single - argument ADD_CA macro with two argument ADDC_C - add carrying with - carry in. - (ALU{,8,16,32,64}SUB_CA, ALU{,8,16,32,64}SUBC_X): Replace single - argument SUB_CA macro with two argument SUBC_X - subtract - carrying, extended. - (ALU{,8,16,32,64}SUBB_B): Define - subtract borrowing with - borrow-in. - (ALU{,8,16,32,64}NEGC, ALU{,8,16,32,64}NEGB): Define. - -Sun Nov 30 17:40:57 1997 Michael Meissner <meissner@cygnus.com> - - * sim-io.c (sim_io_{syscalls,getstring}): Delete. No longer used. - * sim-io.h (sim_io_syscalls): Delete. - -Fri Nov 28 20:10:09 1997 Michael Meissner <meissner@cygnus.com> - - * syscall.c (cb_syscall): Add missing else, so write to stdout - isn't doubled. - - * sim-alu.h (ALU{,8,16,32,64}_SET_CARRY): Provide macros to import - the carry bit from the CPU's psw. - -Fri Nov 28 11:15:05 1997 Doug Evans <devans@canuck.cygnus.com> - - * gennltvals.sh: Redo syscall support. - * nltvals.def: Regenerated. - -Wed Nov 26 16:49:38 1997 Michael Meissner <meissner@cygnus.com> - - * syscall.c (cb_syscall): If writing to stdout or stderr, flush - the stream immediately. - -Wed Nov 26 12:32:11 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-io.c (sim_io_getstring): Delete unused len2. - (sim_io_syscalls): Ditto for sys_errno. - -Wed Nov 26 11:18:40 1997 Doug Evans <devans@canuck.cygnus.com> - - * syscall.c (cb_syscall): Test CB_SYSCALL struct magic number. - - * Make-common.in (run.o): Depend on remote-sim.h. - (nrun.o,sim-hload.o,sim-hrw.o): Likewise. - (sim-io.o,sim-reason.o,sim-resume.o): Likewise. - -Tue Nov 25 20:12:46 1997 Michael Meissner <meissner@cygnus.com> - - * sim-io.c (sim_io_syscalls): Disable lseek. - -Tue Nov 25 00:12:38 1997 Doug Evans <devans@seba.cygnus.com> - - * gennltvals.sh: Generate syscall values for d30v. - - * gennltvals.sh: Use libgloss/syscall.h for sparc. - * nltvals.def: Regenerate. - - * callback.c (os_stat): Make 3rd arg a host struct stat ptr. - (os_fstat): Likewise. Validate fd argument. - (cb_host_to_target_stat): Delete big_p arg. If HS arg is NULL, - just compute target stat struct length. - * syscall.c: #include "libiberty.h", <sys/types.h>, <sys/stat.h>. - (ENOSYS,ENAMETOOLONG): Provide definitions if missing. - (get_string): Return host errno values so they can be properly - translated later. - (cb_syscall): Likewise. - (cb_syscall, cases open,unlink): Use get_path instead of get_string. - (cb_syscall, case read): Use read_stdin for file descriptor 0. - (cb_syscall, case write): Use write_stderr for file descriptor 2. - (cb_syscall): Add cases for lseek, unlink, stat, fstat, time. - (get_path): New function. - -Mon Nov 24 18:56:07 1997 Michael Meissner <meissner@cygnus.com> - - * sim-io.c (sim_io_syscalls): New function to provide system call - emulation. Provide exit, open, close, read, write, lseek, and - unlink. - (sim_io_getstring): New function to return a string from a - simulated memory location. - - * sim-io.h (sim_io_syscalls): Add declaration. - -Mon Nov 24 12:09:59 1997 Doug Evans <devans@seba.cygnus.com> - - * sim-core.c (sim_core_signal): Fix spelling error in message. - - * sim-hrw.c (sim_read): Use read map, not write map. - - * Make-common.in (all): Add .gdbinit. - * gdbinit.in: Add dump command. - - * sim-model.c (model_options): Use '\0' for `shortopt'. - - * sim-trace.c (trace_option_handler): Set state trace file - for --trace-file in addition to cpu's values. - (trace_vprintf): If cpu == NULL, try state's trace file. - (trace_options): Reorganize table, reword some descriptions. - -Sun Nov 23 10:57:00 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.c (sim_fpu_abs, sim_fpu_neg, sim_fpu_inv), sim-fpu.h: - New functions. - -Sat Nov 22 19:16:54 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-reason.c (sim_stop_reason): For sim_signalled, return the - signal untranslated, document problem with this. - - * nrun.c (main): Check for a prog name of `*step'. If present, - step the simulator instead of allowing it to run free. - - * sim-signal.c (SIGQUIT): Define on _MSC_VER hosts. - - * Make-common.in (sim_main_headers): Add sim-signal.h. - -Fri Nov 21 09:32:32 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-signal.c (sim_signal_to_host): Return 0 for SIM_SIGNONE. - -Thu Nov 20 20:35:20 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-signal.h: Start simulator signals at 64 so that host signal - numbers can be detected and reported. - - * sim-signal.h (SIM_SIGFPE), sim-signal.h: Add signal. - -Wed Nov 19 12:02:41 1997 Doug Evans <devans@seba.cygnus.com> - - * callback.c (cb_host_to_target_stat): Fix return values. - - * cgen-sim.h (enum_signal_type): Delete. - (engine_signal): Update prototype. - * cgen-utils.c: Don't include <signal.h>. - (sim_signal_to_host): Delete, lives in sim-signal.c now. - (engine_signal): Update. - - * sim-utils.c (sim_state_alloc): Call SIM_STATE_ALLOC if defined. - (sim_state_free): Call SIM_STATE_FREE if defined. - - * sim-module.c (sim_module_install): Don't leave any modules - installed if one fails to install. - -Wed Nov 19 13:25:48 1997 Michael Meissner <meissner@cygnus.com> - - * sim-options.c: Don't include ../libiberty/alloca-conf.h any - more, since alloca is not used in this file. - - * sim-alu.h (ALU{32,64}_*): Rewrite 32 and 64 bit ALU support to - correctly set the carry and overflow bits for those types. - (ALU{8,16,32,64}_{ADD,SUB}_CA): Take VAL argument to add along - with carry, so carry is correct after doing both adds. - (ALU*): Space out '\' to make it easier to read. - -Tue Nov 18 15:53:45 1997 Doug Evans <devans@canuck.cygnus.com> - - * sim-core.c (sim_core_signal): Use sim_stopped instead of - sim_signalled. - - * sim-signal.c, sim-signal.h: New files. - * Make-common.in (sim-signal.o): Add rule for. - (SIM_NEW_COMMON_OBJS): Add sim-signal.o. - * sim-abort.c: Don't include <signal.h>. - * sim-basics.h: #include "sim-signal.h". - * sim-break.c: Don't include <signal.h>. - (sim_handle_breakpoint): Replace SIGTRAP with SIM_SIGTRAP. - * sim-core.c: Don't include <signal.h>. - (SIGBUS): Delete definition. - (sim_core_signal): Replace SIGSEGV,SIGBUS with SIM_SIGSEGV,SIM_SIGBUS. - * sim-engine.c: Don't include <signal.h>. - (sim_engine_abort): Replace SIGABRT with SIM_SIGABRT. - * sim-reason.c (sim_stop_reason): Call sim_signal_to_host. - * sim-resume.c: Don't include <signal.h>. - (SIGTRAP): Delete definition. - (has_stepped): Replace SIGTRAP with SIM_SIGTRAP. - * sim-stop.c: Don't include <signal.h>. - (control_c_simulation): Replace SIGINT with SIM_SIGINT. - * sim-watch.c: Don't include <signal.h>. - (handle_watchpoint): Replace SIGINT with SIM_SIGINT. - - * Make-common.in (SIM_NEW_COMMON_OBJS): New variable. - - * sim-base.h (CIA_ADDR): Provide default definition. - * sim-core.c (sim_core_signal): Use CIA_ADDR to fetch value. - * sim-break.c (sim_handle_breakpoint): Likewise. - -Mon Nov 17 14:15:31 1997 Doug Evans <devans@seba.cygnus.com> - - * Make-common.in (srccom): New variable. - - * Make-common.in (DEP, COMMON_DEP_CFLAGS): Define. - (LIB_OBJS): Add syscall.o. - (gentmap): Pass $(NL_TARGET) to $(CC). - (syscall.o): Add rule for. - (sim_main_headers): Add $(SIM_EXTRA_DEPS). - (sim-bits.o): Depend on $(sim-n-bits_h). - (sim-load.o): Depend on callback.h. - - * Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to - cgen-mem.h, sem-ops.h renamed to cgen-ops.h. - * cgen-mem.h, cgen-ops.h: New files. - - * aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no". - - * Makefile.in (nltvals.def): Depend on gennltvals.sh. - Rewrite build rule. - * callback.c: #include string.h or strings.h. - #include sys/types.h and sys/stat.h. - (cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare. - (os_get_errno,os_open): Update. - (os_stat,os_fstat): New functions. - (os_init): Initialize syscall_map, errno_map, open_map. - (default_callback): Add entries for os_stat, os_fstat, syscall_map, - errno_map, open_map, signal_map, stat_map. - (cb_read_target_syscall_maps): New function. - (cb_target_to_host_syscall): New function. - (cb_host_to_target_errno): Renamed from host_to_target_errno. - (cb_target_to_host_open): Renamed from target_to_host_open. - (store): New function. - (cb_host_to_target_stat): New function. - * syscall.c: New file. - * gentmap.c (sys_tdefs): New global. - (gen_targ_vals_h): Output target syscall numbers. - (gen_targ_map_c): Update. Output target syscall translation map. - * gentvals.sh: New first argument `target'. Preface table with - #ifdef NL_TARGET_$target if non-null target passed. - * gennltvals.sh: New file. - * nltvals.def: Regenerated. - -Fri Nov 14 11:33:34 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-n-core.h (sim_core_read_unaligned_N): Return static - sim_core_dummy_M. - (sim_core_dummy_M): Declare. - -Wed Nov 12 18:16:15 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.c (sim_core_signal): Print the address of the - instruction. - -Thu Nov 13 11:49:41 1997 Doug Evans <devans@seba.cygnus.com> - - * sim-base.h (sim_state_base): Move `magic' to end of struct. - - * sim-base.h (sim_state_base): Add member trace_data. - (STATE_TRACE_DATA): New macro. - * sim-trace.h (TRACE_DEBUG_IDX,TRACE_debug): New macros. - ({WITH_,}TRACE_DEBUG_P): New macros. - (STATE_TRACE_FLAGS,STRACE_P,STRACE_DEBUG_P): New macros. - (_sim_cpu): Delete forward reference. - (debug_printf): Update. - * sim-trace.c (OPTION_TRACE_DEBUG): Define. - (trace_options): Add --trace-debug. - (set_trace_options): Handle it. - (trace_option_handler): Likewise. - (trace_install): Init state trace_data struct. - (trace_uninstall): Close state trace file. - * sim-events.c (ETRACE): Only print source file and line number if - --trace-debug. - * sim-n-core.h (sim_core_trace_M): Likewise. - - * sim-core.c (sim_core_signal): Add missing "\n" in message. - -1997-11-13 Felix Lee <flee@cygnus.com> - - * sim-n-core.h (sim_core_read_unaligned_N): illegal empty - initializer. - * sim-types.h (unsigned128,signed128): fix typo for MSVC. - -Wed Nov 12 12:18:08 1997 Doug Evans <devans@canuck.cygnus.com> - - * aclocal.m4 (SIM_AC_OPTION_SCACHE): Fix typo. - - * Make-common.in (BUILT_SRC_FROM_COMMON): Remove files no longer - built this way. - (sim-config.o): Remove non-existent $(sim-nconfig_h) dependency. - (clean): Don't delete $(BUILT_SRC_FROM_COMMON) if building in - source tree. - -Tue Nov 11 13:28:02 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-events.c (sim_events_process): Re-compute the time - - update_time_from_event - as each event is processed. Reverses - previous change. - -Fri Nov 7 00:37:36 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * callback.c (os_poll_quit): Replace _WIN32 with _MSC_VER. - -Fri Nov 7 00:37:36 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-events.c (sim_events_process): Delete redundant call to - update_time_from_event. - (sim_events_slip): Always decrement time_from_event. - (sim_events_tick, sim_events_deschedule, update_time_from_event): - Delete assertion that time_from_event >=0 when work in queue, no - longer applicable. - -Thu Nov 6 12:06:46 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-options.c (STANDARD_OPTIONS): Change OPTION_* to an enum. - (standard_option_handler): Update. - - * sim-options.h: Clarify documentation. - (OPTION_LONG_ONLY_P): Delete definition. - (OPTION_VALID_P): Define. - - * sim-options.c (sim_print_help): Allow short only options. - (sim_parse_args): Ditto. - (sim_args_command): Skip short only options. - (sim_parse_args): Allocate space for NUM_OPTS not just 256. Make - separate entries for short and long options in the HANDLERS and - ORIG_VAL tables. - (sim_parse_args): Disable argument permutation. - -Wed Nov 5 13:40:31 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.h (DECLARE_SIM_CORE_WRITE_N. DECLARE_SIM_CORE_READ_N): - Add argument M, size of data type. - (sim_core_read_misaligned_3, sim_core_write_misaligned_3): - Declare, ditto for 5, 6 & 7 byte transfers. - (sim_core_write_unaligned_1, sim_core_write_unaligned_1): Define - as aligned variant. - - * sim-n-core.h (sim_core_trace_M): Rename from - sim_core_trace_N. Add nr_bytes argument. Replace transfer argument - with transfer type. Print transfer direction. Handle 1 and 2 byte - transfers. - (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Trace - unaligned accesses. - (unsigned_M, T2H_M, H2T_M): Rename from unsigned_N, T2H_N, H2T_N. - Update all functions. - - * sim-core.c: Generate functions starting with 16 not 1. - (sim_core_read_unaligned_3): Generate. Ditto for 3 byte write and - all 5, 6 & 7 byte transfers. - - * sim-n-core.h (sim_core_read_misaligned_N, - sim_core_write_misaligned_N): Implement. - -Mon Nov 3 15:03:04 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-endian.h (U16_8): Implement - - * sim-endian.c (sim_endian_split_16, sim_endian_join_16): New functions - - * sim-endian.h (VL8_16, VH8_16): Implement. - - * sim-memopt.c (memory_option_handler): Typecast 64bit value to - long in printf. - (memory_option_handler): Only zalloc modulo bytes when non-zero. - (memory_option_handler): Skip comma in alias address list - -Fri Oct 31 13:03:33 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-memopt.c (do_memopt_add, do_memopt_delete): Add level and - space params. - (parse_size, parse_addr): New functions - (memory_option_handler, memory_options): Parse address & size - using new functions. Pass level, space, modulo to do_memopt_add & - do_memopt_del. - - * sim-memopt.h (struct _sim_memopt): Add level & space fields. - - * sim-core.h (sim_core_arrach, sim_core_detach): Replace - `attach_type attach' argument with `unsigned level' argument. - Document. - - * sim-core.c (new_sim_core_mapping, sim_core_map_attach, - sim_core_attach): Replace argument attach with level. Update - verification of arguments. - (sim_core_map_detach, sim_core_detach): Replace argument attach - with level. - - * sim-basics.h (enum _attach_type): Delete. - -Thu Oct 30 13:45:00 1997 Doug Evans <devans@seba.cygnus.com> - - * sim-core.h (sim_core_write_8): Define. - -Tue Oct 28 12:29:22 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-bits.h: Document ROTn macro. - - * sim-endian.h (H2T): Handle 16 byte variables. - - * sim-n-core.h (sim_core_read_unaligned_N): Return a dummy when an - error. - - * sim-core.c: Do not generate sim_core_*_word. - - * sim-n-core.h (sim_core_trace_N): Add line_nr argument. - (sim_core_write_aligned_N, sim_core_read_aligned_N): Update. - - * sim-core.h (sim_core_read_unaligned_word, - sim_core_read_aligned_word, sim_core_read_word, - sim_core_write_unaligned_word, sim_core_write_aligned_word, - sim_core_write_word): Change to macros that map onto sim_core_*_N. - -Mon Oct 27 11:25:10 1997 Doug Evans <devans@canuck.cygnus.com> - - * sim-n-endian.h: Add TAGS entrys for 16 byte versions. - - * sim-endian.h: Disable 16 byte support. - -Mon Oct 27 12:00:48 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-endian.c (_SWAP_16): Define. Generate 126 bit swap code. - - * sim-n-core.h (sim_core_trace_N): New function. - (sim_core_read_aligned_N, sim_core_write_aligned_N): Use, - (sim_core_read_unaligned_N): Do not retyrn bogus value wden error. - - * sim-endian.h: Add 128 bit variant. - - * sim-core.h, sim-core.c: Add 128 bit variant. - - * sim-types.h: Add signed128 and unsigned128 types using a struct. - -Fri Oct 24 11:33:07 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-events.c (sim_events_process): Clear events->work_pending. - (sim_events_tickn, sim_events_tick): Accumulate, instead of - setting, nr_ticks_to_process. - (sim_events_preprocess): Allow nr_ticks_to_process to be non-zero - when the event queue isn't next. - - * sim-events.h, sim-events.c (sim_events_slip): New function. - -Wed Oct 22 14:18:38 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-hload.c (sim_load): Pass lma_p==0 and do_load=sim_load. - - * sim-utils.h, sim-load.c (sim_load_file): Add lma_p and do_load - arguments. - -Tue Oct 21 18:37:57 1997 Doug Evans <devans@canuck.cygnus.com> - - * nrun.c (main): Remove useless test of name != NULL. - Exit if bfd_openr fails. Call bfd_check_format after bfd_openr. - -Tue Oct 21 10:42:38 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.c (EXPMAX): Type is unsigned. - (MIN_INT, MAX_INT): Type is signed64. - (i2fpu): Type of val is signed64. - -Tue Oct 21 10:42:38 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-profile.h (PROFILE_PC_BUCKET_SIZE): Treat a shift of zero as - a bucket size of zero. - - * sim-profile.c (OPTION_PROFILE_PC_GRANULARITY, - OPTION_PROFILE_PC): Define. - (profile_option_handler): Add support for --profile-pc and - --profile-pc-granularity options. - (profile_pc_init): When possible, compute nr buckets from bucket - size. - - * sim-profile.c (profile_pc_init): Align the profile-pc end - address with the profile-pc bucket size. - - * sim-profile.h (PROFILE_PC_NR_BUCKETS): Rename PROFILE_PC_SIZE to - something less ambiguous. - (PROFILE_PC_BUCKET_SIZE): Ditto for PROFILE_PC_SAMPLE_SIZE. - - * sim-profile.c (profile_pc_cleanup): New function. Move - profile_pc_uninstall code to here. - (profile_pc_uninstall): Call. - (profile_pc_init): Call. - -Mon Oct 20 17:23:58 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-profile.c (profile_print_pc): Dump pc profile to dmon.out - file using BSD gprof format. - - * sim-bits.h (LSBIT, MSBIT, BIT): Force result to type - unsigned_word. - (LSBIT8, LSBIT16, LSBIT32, LSBIT64, MSBIT8, MSBIT16, MSBIT32, - MSBIT64): Force result to unsignedN. - -Thu Oct 16 11:38:56 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-alu.h (ALU16_BEGIN, ALU32_BEGIN, ALU64_BEGIN): Drop opening - brace from macro. - (ALU8_BEGIN, ALU8_SET, ALU8_ADD, ALU8_SUB, ALU8_NEGATE): Define. - (ALU16_ADD, ALU16_SUB, ALU16_NEGATE): Simplify arrithmetic. - (ALU32_ADD, ALU32_SUB, ALU32_NEGATE): Simplify arrithmetic. - (ALU64_ADD, ALU64_SUB, ALU64_NEGATE): Simplify arrithmetic. - -Wed Oct 15 09:24:19 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.h (struct _sim_core_mapping): Change free_buffer to - type void*. - - * sim-core.c (sim_core_uninstall, new_sim_core_mapping, - sim_core_map_attach, sim_core_map_detach): Change free_buffer to - type void*. - (sim_core_attach): Rename buffer_freed to free_buffer, type - void*. Ensure that allocated buffer is alligned according to - region's address. - -Mon Oct 13 11:34:50 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-alu.h (ALU64_HAD_OVERFLOW): Define. - (ALU64_SUB): Define. - - * Make-common.in (all): Build SIM_EXTRA_ALL first. - (.gdbinit): Remove dependencies, generate once per build. - -Tue Oct 14 19:20:09 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-n-core.h (sim_core_read_aligned_N, - sim_core_write_aligned_N): Make xaddr param type address_word not - unsigned_word. - -Fri Oct 3 09:49:18 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.h, sim-fpu.c: Rewrite. Change sim_fpu object to an - unpacked floating point struct. Pass sim_fpu object by reference. - Add preliminary support for rounding modes. - -Fri Oct 3 09:28:00 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Thu Oct 2 19:43:52 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (sim-bitsize): Fix typo, WITH_TARGET_WORD_BITSIZE not - WITH_TARGET_BITSIZE. - -Thu Sep 25 23:20:20 1997 Felix Lee <flee@yin.cygnus.com> - - * sim-profile.c (profile_print_core): label needs empty statement. - -Thu Sep 25 11:20:47 1997 Stu Grossman <grossman@babylon-5.cygnus.com> - - * sim-break.c (sim_set_breakpoint sim_clear_breakpoint): Use ZALLOC - and zfree instead of xmalloc and free. Prevents warnings. - -Wed Sep 24 17:38:57 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Wed Sep 24 17:23:31 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * Make-common.in (SIM_BITSIZE): Assign from configured value. - (CONFIG_CFLAGS): Add SIM_BITSIZE. - - * aclocal.m4 (--enable-sim-bitsize): Developer option for - controling the bitsize/msb of the target. - -Wed Sep 24 17:41:40 1997 Stu Grossman <grossman@babylon-5.cygnus.com> - - * Make-common.in: New files sim-break.c, sim-break.h. - * sim-base.h: Add point to breakpoint list to sim_state_base. - * sim-break.c sim-break.h: New modules that implement intrinsic - breakpoint support. - * sim-module.c: Add breakpoint module. - -Tue Sep 23 00:26:39 1997 Felix Lee <flee@yin.cygnus.com> - - * sim-events.c (SIM_EVENTS_POLL_RATE): poll more often than once - an hour. - * sim-n-core.h (WITH_XOR_ENDIAN): MSVC barfs on - if (0) { 1 % 0; } - * sim-core.c (sim_core_xor_write_buffer): WITH_XOR_ENDIAN + 1. - (SIGBUS) define for Windows. - * sim-trace.c (trace_printf,debug_printf): added ALMOST_STDC. - * sim-resume.c: define SIGTRAP for windows. - * sim-xcat.h: use token pasting if ALMOST_STDC. - -Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * Make-common.in (SIM_SCACHE, SIM_DEFAULT_MODEL): Assign - configured values. - (CONFIG_CFLAGS): Add same. - -Mon Sep 22 17:20:27 1997 Felix Lee <flee@cygnus.com> - - * sim-types.h (SIGNED64): ##i64 when _MSC_VER, not _WIN32. - (SIGNED32): use ##i32. - -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:07:47 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (sim-endian): Simplify logic determining [default] - endian of target. - - * Make-common.in (SIM_WARNINGS, SIM_ALIGNMENT, SIM_ENDIAN, - SIM_HOSTENDIAN, SIM_RESERVED_BITS, SIM_ASSERT, SIM_FLOAT, - SIM_HARDWARE, SIM_INLINE, SIM_PACKAGES, SIM_REGPARM, SIM_SMP, - SIM_STDCALL, SIM_XOR_ENDIAN): Assign configured values. - (CONFIG_CFLAGS): Add same. - - * aclocal.m4: Perform AC_SUBST on optional options. - -Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-config.h (WITH_DEFAULT_ALIGNMENT): Don't hardwire any alignment. - - * sim-options.c (standard_option_handler): Typo in warning message. - - * sim-base.h (STATE_MODEL): Make conditional on SIM_HAVE_MODEL. - - * sim-profile.c (profile_print_insn): Check 0 .. MAX_INSN for any - insn count. Make count conditional on there being a valid - INSN_NAME. - (profile_pc_init): Make default PC profile frequency an arbitrary - 256. - - * sim-base.h: Ditto. - - * sim-profile.h (WITH_PROFILE_MODEL_P): Only enable modeling when - SIM_HAVE_MODEL. - - * sim-model.h (struct MACH): Depreciate, to be replaced by bfd - archure struct. - -Mon Sep 22 11:46:20 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Mon Sep 22 11:45:00 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (sim_alignment): Simplify logic for selecting the - configured alignment. - -Fri Sep 19 17:45:25 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Fri Sep 19 17:26:14 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-config.c (sim_config): Check for default alignment. - - * sim-options.c (standard_option_handler): Add alignment option. - - * aclocal.m4 (sim_alignment): Allow configuration of hardwired and - default alignment requirements on memory accesses. - -Fri Sep 19 11:51:35 1997 Jeffrey A Law (law@cygnus.com) - - * sim-load.c (sim_load_file): Return failure if the executable - had no loadable sections. - -Wed Sep 17 13:33:28 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-events.c (ETRACE): Use trace_printf not sim_io_printf for - trace output. - - * sim-core.c (sim_core_signal): When bad access halt simulator - SIGSEGV / SIGBUS instead of aborting. - (signal.h): Include. - - * sim-watch.c (sim_watchpoint_install): Handler for watchpoint - options was missing. - - * sim-bits.h (MOVED): Define - -Wed Sep 17 10:33:28 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-alu.h (ALU32_HAD_OVERFLOW): Pacify GCC, Use MSBIT instead of - BIT. - - * sim-bits.h (LSBIT, MSBIT): Check for overflow of shift value. - - * sim-bits.c: Add 8 bit versions of bit macros. - - * sim-bits.h: Ditto. - -Tue Sep 16 16:15:16 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-bits.c (LSSEXT, MSSEXT): Replace SEXT. - (LSINSERTED, MSINSERTED): Ditto for INSERTED. - - * sim-n-bits.h (MSSEXTn, LSSEXTn): Replace SEXTn. - (LSINSERTDn, MSINSERTEDN): Ditto for INSERTEDn. - - * sim-bits.h (SEXT*): Define as MSEXT/LSEXT. - (INSERTED*): Ditto for LSINSERTED/MSINSERTED. - -Mon Sep 15 17:36:15 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (SIM_AC_COMMON): Add optional config.h file argument. - configure.in: Output to cconfig.h instead of config.h. - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Mon Sep 15 15:39:28 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-utils.c (sim_analyze_program): Set STATE_ARCHITECTURE from - BFD if known. - -Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com> - - * callback.c (os_write): divert stdout and stderr to their - respective hooks. - -Thu Sep 11 10:08:48 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-profile.c (profile_print_speed): Call - sim_events_elapsed_time instead of PROFILE_EXEC_TIME for moment. - - * sim-events.c (sim_events_elapsed_time): New function return nr - host MS consumed by the simulator. - (sim_watch_valid): Use. - - * sim-module.c (modules): Install sim_events very very early. - - * sim-profile.c (profile_print): Call profile_print_pc. - (print_bar): - (profile_pc_init): New function, set up processor for PC - profiling. - (profile_print_pc): New function, print a PC profile. - (profile_pc_event): New function, sample PC. - - * sim-profile.h (PROFILE_PC_COUNT, PROFILE_PC_START, - PROFILE_PC_END, PROFILE_PC_SHIFT, PROFILE_PC_SAMPLE_SIZE): Add to - profile struct. - - * sim-options.c (sim_print_help): Pacify GCC. - - * sim-n-core.h (sim_core_read_aligned_N, - sim_core_write_aligned_N): Add un-conditional profile call. - (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Add - profile call when aligned read/write isn't used. - - * sim-base.h: Include sim-profile, sim-model after sim-core & - sim-events allow sim-core to define useful values. - - * sim-profile.c (OPTION_PROFILE_CORE): Define. - (profile_option_handler, profile_options): Add support for - --profile-core option. - (print_bar): Include when core profiling. - (profile_print_core): New function, print core profile. - - * sim-config.c (print_sim_config): Print profile status. - - * sim-profile.h (PROFILE_NEXT_IDX, PROFILE_core, - WITH_PROFILE_PC_P): Define. - (PROFILE_CORE_COUNT): Count each core-map/size separatly. - (PROFILE_COUNT_CORE): Define. - -Thu Sep 11 08:44:52 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-watch.c (handle_watchpoint): Pass a char** index into the - interrupt_names array as the data. - (sim-watch.h): Document. - -Wed Sep 10 16:15:22 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-options.c (sim_print_help): When the doc string is to long - word wrap it. - - * sim-watch.c (sim_watchpoint_install): Use option.doc_name so - that only the first few the watch options are listed. Generate - meanginful usage messages. - - * sim-options.h (struct OPTION): Clarify use of doc_name field - -Wed Sep 10 13:23:24 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-options.c (OPTION_ARCHITECTURE_INFO): New option. - (standard_option_handler): Handle --architecture-info. - -Tue Sep 9 21:46:46 1997 Felix Lee <flee@cygnus.com> - - * sim-core.h (sim_cpu_core): [WITH_XOR_ENDIAN + 1], to avoid - illegal zero-sized array. - * sim-core.c (sim_core_xor_read_buffer): same. - -Tue Sep 9 11:20:35 1997 Doug Evans <dje@canuck.cygnus.com> - - * nltvals.def: Regenerate. - -Tue Sep 9 02:10:36 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.c (DP_FRACHIGH2): Define LL using SIGNED64. - -Mon Sep 8 12:22:20 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-bits.c (MASKED): Delete. - (EXTRACTED): Delete. - (LSEXTRACTED, MSEXTRACTED): New functions. - - * sim-n-bits.h (MASKEDn): Delete, define as MSMASKED or LSMASKED. - (MSMASKEDn, LSMASKEDn): Add last argument. - (MSMASK*): Ditto. - - * sim-bits.h (EXTEND8, EXTEND16): Define. - (EXTRACTED64): Define as 64 bit extract, not 32 bit. - - * sim-run.c (sim_engine_run): Use CPU_CIA macro. - - * sim-engine.h (SIM_ENGINE_HALT_HOOK): Use CPU_CIA to get at - current instruction address. - - * sim-inline.h (*_ENGINE): Define. - -Fri Sep 5 08:39:02 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.c (sim_core_attach): Fix checks of modulo/mask. - - * sim-watch.c (delete_watchpoint): Delete by ident and type. - (watch_option_handler): Call delete_watchpoint with ident or type. - (sim_watchpoint_install): Create interrupt specific watchpoint - commands on the fly. - (do_watchpoint_create): New function, create a watch point using - type/int-nr info encoded in the option nr. - (do_watchpoint_info): New function. List active watchpoints. - - * sim-watch.h: Change data structure to a list. - - * sim-memopt.c (memory_option_handler): Require explicit "all" - before deleting all memory regions. - - * sim-utils.c (sim_do_commandf): New function, printf version of - sim_do_command. - - * sim-basics.h (asprintf, vasprintf): Hack, define for CYGWIN32. - - * sim-alu.h (ALU64_ADD): Use explicit MSEXTRACTED64, do not assume - bit endianness. - (SIGNED64, UNSIGNED64): Delete. - (ALU64_ADD): Don't rely on bit endianness. - (ALU64_BEGIN): Define. - - * sim-n-bits.h (MSEXTRACTEDn, LSEXTRACTED): New functions. - (EXTRACTEDn): Delete, define as either LSEXTRACTED or MSEXTRACTED. - - * sim-types.h (SIGNED64, UNSIGNED64): New macros, attach relevant - suffix - u64, LL - to 64 bit constants. - -Thu Sep 4 09:27:54 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-config.c (sim_config): Add assert for SIM_MAGIC_NUMBER. - - * sim-utils.h (NZALLOC): Define - zalloc * N. - - * sim-hrw.c (sim_read, sim_write): New file. Provide generic - implementation of read/write functions. - - * Make-common.in (sim-hrw.o): New target. - - * sim-base.h (STATE_MEMOPT_P): Delete, simulators _always_ add - memory. - - * sim-memopt.c (memory_option_handler): Implement memory-size - command. Implement memory-alias command. Let memory-delete delete - all memory regions. - (add_memopt): New function. Add a memory region. - (do_memopt_delete): New function. Delete a memory region. - - * sim-utils.c (sim_elapsed_time_get): Never return zero. - - * sim-core.c (sim_core_detach): New function. - (sim_core_map_detach): New function. Perform the actual detach. - (sim_core_init): Move initialization code from here. - (sim_core_install): To here. - (sim_core_uninstall): And here. - - * sim-module.c: Add memopt module. - - * sim-base.h (STATE_MEMOPT, STATE_MEMOPT_P): Add memopt to - simulator base type. - - * Make-common.in (sim_main_headers): Add sim-memopt.h - (sim-memopt.o): New target. - - * sim-core.c (sim_core_install): Add core_options to the option - table. - - * sim-watch.c (watch_options): Make --delete-watch a synonym for - --watch-delete. - - * sim-config.h (WITH_MODULO_MEMORY): Define as 0. Update - comments. - - * sim-core.h (struct _sim_core_mapping): Change nr_bytes to type - address_word, add mask member. - - * sim-core.h, sim-core.c (sim_core_attach): Make nr_bytes of type - address_word, allow for 64bit targets in 32bit host. Add modulo - argument. - (sim_core_map_attach): Ditto. - (new_sim_core_mapping): Ditto. - (sim_core_translate): Mask address when modulo memory. - -Wed Sep 3 17:32:54 1997 Doug Evans <dje@seba.cygnus.com> - - * sim-hload.c (sim_load): Add assert for SIM_MAGIC_NUMBER. - - * gdbinit.in: New file. - * aclocal.m4 (SIM_AC_OUTPUT): Build .gdbinit. - * Make-common.in (distclean): Delete .gdbinit. - (.gdbinit): Add rule for. - * configure: Regenerated to track ../common/aclocal.m4 changes. - - * Make-common.in (cgen-run.o): Add rule for. - -Wed Sep 3 10:08:21 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-resume.c (sim_resume): Suspend/resume the simulator. - - * sim-events.c (sim_watch_valid): Compute total elapsed time from - both resumed and previous elapsed time. - (sim_events_init): Set initial_wallclock and current_wallclock to - zero. - (sim_events_install): Install sim_events_suspend and - sim_events_resume. - (sim_events_watch_clock): Allow for suspended simulator when - computing the time of the clock event. - - * sim-events.h (struct _sim_event): Add resume_wallclock, rename - initial_wallclock to elapsed_wallclock, set both to zero. - (sim_events_init, sim_events_uninstall): Delete prototypes. - - * sim-module.h (MODULE_SUSPEND_FN, MODULE_RESUME_FN): Define types. - - * sim-module.c(sim_module_resume, sim_module_suspend): New - functions. - -Wed Sep 3 10:08:21 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.c (sim_core_map_attach): Clarify memory overlap error - message. - -Tue Sep 2 14:57:06 1997 Doug Evans <dje@canuck.cygnus.com> - - * Makefile.in (TAGS): Add support for "/* TAGS: foo */" marker. - * Make-common.in (TAGS): Likewise. - * sim-n-bits.h: Add TAGS comments for all functions. - * sim-n-core.h: Likewise. - * sim-n-endian.h: Likewise. - -Mon Sep 1 10:50:11 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-utils.c (sim_state_alloc): Set CPU backlinks, callback and - kind. - - * sim-base.h (sim_state_alloc): Add callback and kind arguments. - - * sim-base.h (INVALID_INSTRUCTION_ADDRESS): Add default - definition. - -Sat Aug 30 09:47:21 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.c (DP_GARDMSB, ...): Make unsigned. - (DP_FRACHIGH, DP_FRACHIGH2, ..): Use MSMASK to avoid LL. - -Fri Aug 29 13:37:44 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.c (sim_core_map_attach): Cast attach enum to int. - (sim_core_xor_read_buffer, sim_core_xor_write_buffer): Make - nr_transfered and nr_this_transfer unsigned. - - * sim-events.c (sim_events_tickn): N is signed, as limited to - MAXINT. - - * sim-n-endian.h (offset_N): Change size to unsigned. - - * callback.c (os_poll_quit): Add prototypes for kbhit and getkey. - -Fri Aug 29 10:10:53 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-utils.c (sim_copy_argv): Delete, replaced by dupargv. - - * sim-options.c (sim_parse_args): Use dupargv. - -Thu Aug 28 10:36:34 1997 Doug Evans <dje@canuck.cygnus.com> - - * sim-options.c (standard_option_handler): Use xstrdup, not strdup. - -Thu Aug 28 12:09:15 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-base.h (STATE_ARCHITECTURE, STATE_TARGET): Add to simulator - base type. - - * sim-options.c (standard_options): Add --architecture=MACHINE and - --target=TARGET options. - (OPTION_ARCHITECTURE, OPTION_TARGET): Define. - (standard_option_handler): Handle architecture and target options. - (bfd.h): Include. - - * sim-utils.c (sim_analyze_program): Pass STATE_TARGET to - bfd_openr. - (sim_analyze_program): Set prog_bfd architecture from - STATE_ARCHITECTURE if known. - -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 18:11:30 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (enable-sim-warnings): Remove comment stating - that option does not apply to certain files. - -Wed Aug 27 15:13:04 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-bits.h (LSBIT8, LSBIT16, LSBIT32, LSBIT64, LSBIT, MSBIT8, - MSBIT16, MSBIT32, MSBIT64, MSBIT): New macros - single bit as - offset from MSB/LSB. - - * sim-endian.h (A1_8, A2_8, A4_8, A1_4, A2_4, A1_2): New macro, - access address of sub word quantity of a hosts 16, 32, 64 bit word - type. - (V1_2, V1_4, V2_4, V1_8, V2_8, V4_8): Ditto for values. - (U8_1, U8_2, U8_4, U4_1, U4_2, U2_1): Ditto for set of values. - (V2_H1, V2_L1, V4_H2, V4_L2, V8_L4, V8_H4): Given N byte argument, - return N*2 byte value with argument in Hi/Lo word. Renamed from - V1_H2, V1_L2, V2_H4, V2_L4, V4_H8, V4_L8. - - * sim-alu.h (ALU32_HAD_OVERFLOW): Use 64 bit mask not 32bit. - (ALU16_HAD_CARRY, ALU32_HAD_CARRY, ALU16_HAD_OVERFLOW): Use MSBIT - so that bit offset is explicit. - -Wed Aug 27 11:55:35 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-utils.c (sim_analyze_program): Add prog_name argument. - Update STATE_PROG_BFD when needed with a dup'd copy of the - program. - - * sim-config.c (sim_config): Delete ABFD argument, use - STATE_PROG_BFD directly. - -Tue Aug 26 12:55:26 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * run.c (main): Pass the open ABFD to sim_create_inferior. - - * nrun.c (main): Determine prog_bfd. Pass to sim_create_inferior - and sim_load. - (bfd.h): Include. - - * sim-hload.c (sim_load): New file. Implement generic sim_load for - hardware only simulator targets. - - * Make-common.in (sim-hload.o): Add rule. - -Wed Aug 27 09:51:42 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-utils.c (sim_copy_argv): Rewrite to match malloc strategy - used by copyargv and freeargv. - - * sim-options.c (sim_parse_args): Save a copy of PROG-ARGS in - STATE_PROG_ARGV, not just a pointer. - -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 12:11:06 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * aclocal.m4 (sim-endian): Add second argument to - SIM_AC_OPTION_ENDIAN. First is hardwired endian, second is - default endian when not hardwired. - - * sim-config.h (WITH_DEFAULT_TARGET_BYTE_ORDER): New macro, if all - else failes value for target byte order. - - * sim-config.c (sim_config): Add abfd arguments. Set - STATE_PROG_BFD accordingly. Determine prefered_target_byte_order - from same. - (sim_config): Return SIM_RC, don't abort. - (bfd.h): Include. - - * run.c (main): Update call to sim_open - add ABFD argument. - * nrun.c (main): Add NULL ABFD argument. - -Thu Aug 14 12:48:57 1997 Doug Evans <dje@canuck.cygnus.com> - - * callback.c (os_poll_quit): Make static. - Call sim_cb_eprintf, not p->eprintf. - (sim_cb_printf, sim_cb_eprintf): New functions. - * sim-utils.h (sim_cb_printf, sim_cb_eprintf): Declare. - - * sim-basics.h (zalloc,zfree,sim_add_commas,SIM_ELAPSED_TIME, - sim_elapsed_time_get,sim_elapsed_time_since): Move decls to - sim-utils.h. #include sim-utils.h. - * sim-utils.h: Above decls moved here. - (sim_analyze_program,sim_load_file): Use `struct _bfd', not `bfd'. - - * sim-watch.c (action_watchpoint): Fix thinkos. - -Thu Jul 24 08:48:05 1997 Stu Grossman (grossman@critters.cygnus.com) - - * sim-types.h: Fix defs of 64 bit data types for MSVC. - -Tue Jul 22 10:35:37 1997 Doug Evans <dje@canuck.cygnus.com> - - * sim-n-core.h (sim_core_write_unaligned_N): Add missing break - to FORCED_ALIGNMENT case. - -Thu Jun 5 13:48:37 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * callback.c (target_to_host_open): Handle hosts with O_BINARY. - -Thu Jun 5 08:47:10 1997 Jeffrey A Law (law@cygnus.com) - - * Make-common.in (libsim.a): Fix typo. - -Thu Jun 5 13:48:37 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * nrun.c (main): Verify the structure returned before using it. - -Wed Jun 4 11:44:06 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-config.h (WITH_ENGINE): Enable the sim-engine module by - default. - - * sim-engine.c (sim_engine_install): New function. Install the - engine init functions. - (sim_engine_init): [Re]initialize the simulator engine. - - * sim-module.c: Add sim_engine to list of modules that always - install. - -Tue Jun 3 04:52:04 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-watch.c (schedule_watchpoint): Use sim_unschedule_watchpoint - to remove the old watchpoint, not delete_watchpoint. - (watch_option_handler): Action the correct watchpoint, not just - cycles. - -Wed May 28 14:47:41 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-n-core.h (sim_core_write_aligned_N): For 8byte reads, output - both low and high word. - (sim_core_write_aligned_N): Ditto. - - * sim-trace.c (set_trace_options): Delete code explicitly setting - core->trace. - - * sim-options.c (sim_print_help): Call the list commands if not a - standalone simulator. - (sim_print_help): Advise that some options may not be applicable. - - * sim-trace.c (set_trace_options): Assume core present. - - * sim-events.c (sim_events_schedule_after_signal): Overflow signal - buffer when full not almost full. - -Tue May 27 14:32:00 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-events.c (sim_events_process): Don't blat the event queue - when processing watchpoints. - - * sim-watch.h: Make arg unsigned long - stop sign extension. - - * sim-events.c (sim_watch_valid): rewrite so debugable. - - * sim-config.h (WITH_XOR_ENDIAN): Default to zero. - - * sim-watch.c (schedule_watchpoint): Add is_within option so that - inequality test is possible. - (handle_watchpoint): Re-pass is_within arg. - (watch_option_handler): When `!' prefix to pc-watchpoint arg pass - 0 to schedule_watchpoint's is_within arg. - (sim_watchpoint_init): Re-pass is_within arg. - - * sim-options.c (sim_print_help): Add is_command argument. Don't - include -- prefix when called from the command line interpreter. - - * sim-watch.c (schedule_watchpoint): Pass true is_within argument. - - * sim-events.c (sim_events_watch_sim): Add is_within argument, - zero indicates that the test should be reversed. - (sim_events_watch_core): Ditto. - (WATCH_CORE): Compare range against is_within. - (WATCH_SIM): Ditto. - -Tue May 27 12:48:03 1997 Andrew Cagney <cagney@b2.cygnus.com> - - * sim-events.c (WATCH_CORE): Pass NULL cpu argument to - sim_core_read_buffer. Check nr-bytes transfered. - - * sim-core.h (sim_core_common): Define a new struct that contains - the common data. to sd and cpu structures. - * sim-core.c (sim_core_attach): Update. - (sim_core_init): Update. Remember to copy initialized data to each - cpu. - (sim_core_find_mapping): Ditto. - - * sim-core.c (sim_core_read_buffer): Add cpu argument. - (sim_core_write_buffer): Ditto. - - * sim-n-core.h (sim_core_read_unaligned_N): When mis-aligned - transfer use xor version of read buffer. - (sim_core_write_unaligned_N): Ditto for write. - - * sim-core.c (sim_core_xor_read_buffer): New function implement - xor-endian data read breaking transfer up into xor-endian sized - blocks. - (sim_core_xor_write_buffer): Ditto for write. - (reverse_n): Reverse order of arbitrary number of bytes in buffer - - needed for xor-endian transfers. - -Fri May 23 14:24:31 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-inline.h: Review description. - - * sim-core.h, sim-core.c: Reduce number of functions being inlined - to just those involved in data transfers and configuration. - - * sim-xcat.h (XSTRING): New macro, map macro definition onto - string. - * sim-n-core.h (sim_core_read_aligned_N): Use. - (sim_core_read_unaligned_N): Ditto. - (sim_core_read_unaligned_N): Ditto.. - (sim_core_write_unaligned_N): Ditto. - - * sim-core.h: Add xor endian bitmap to main structure. * - - sim-n-core.h (sim_core_write_aligned_N): Add suport for xor - endian. - (sim_core_read_aligned_N): Ditto. - - * sim-core.c (sim_core_set_xor_endian): New function. - (sim_core_attach): Don't overwrite the per-cpu xor map when - cloning the global core. - -Fri May 23 10:53:13 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-engine.h: Update below so that it is using an enumerated - type. - -Thu May 22 09:12:16 1997 Gavin Koch <gavin@cygnus.com> - - * sim-engine.c (sim_engine_restart): - * sim-resume.c (sim_resume): Change longjmp param/setjmp - return value used for simulator restart from 0 to 2. - -Wed May 21 08:47:30 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * cgen-scache.c (scache_option_handler): Add is_command arg. - - * sim-model.c (model_option_handler): Add is_command argument. - - * sim-profile.c (profile_option_handler): Add is_command arg. - - * sim-events.c (sim_watch_valid): Use ub64, lb64 when 64bit value - involved. - - * sim-module.c (sim_module_add_init_fn): Call init fn in the same - order that they are registered. - - * sim-options.h (OPTION_HANDLER): Add argument to differentiate - between option and command line processing. - - * sim-options.c: Include stdlib.h, ctype.h. - - * Make-common.in (sim-watch.o): Add rule. - (sim_main_headers): Assume sim-assert.h included. - (sim-*.o): Simplify make rule. - - * sim-module.c: Add sim_watch_install to module list. - -Tue May 20 14:15:23 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-base.h (STATE_LOADED_P): New predicate. Set once everything - has been loaded. - - * sim-trace.c (trace_install): Check magic. Include sim-assert.h. - * sim-events.c (sim_events_install): Ditto. - * sim-core.c (sim_core_install): Ditto. - * sim-model.c (model_install): Ditto. - * sim-options.c (standard_install): Ditto. - * sim-profile.c (profile_install): Ditto. - * sim-reason.c (sim_stop_reason): Ditto. - * sim-run.c (sim_engine_run): Ditto. - * sim-utils.c (sim_analyze_program): Ditto. - - * sim-module.c (modules): Make profile_install and trace_install - optional. - - * sim-base.h (STATE_MEM_BASE): Define for flat memory systems. - - * sim-options.c (standard_option_handler): Set the byte order. - - * sim-events.c (sim_events_process): Allow multi tick processing. - (sim_events_tickn): New function - multi cycle tick. - - * sim-events.h (sim_events_tickn, sim_events_timewarp): Add - prototypes. Under development. - (sim_events): Replace processing with nr_ticks_to_process. - -Tue May 20 09:39:22 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * nrun.c (main): Pass callbacks to sim_open instead of using - sim_set_callbacks. - - * run.c (main): Ditto. - -Mon May 19 12:07:22 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-events.c (sim_events_zalloc): Signal save memory allocator - - stop tk interrupting malloc calls. - (sim_events_zalloc): Converse. - - * Make-common.in (sim_main_headers): Add sim-events.h. - - * sim-events.c (sim_events_schedule_after_signal): Change return - type to void - signal events are strictly internal. - (sim_events_init): Allocate a finite buffer for signal events. - (sim_events_schedule_after_signal): Enter signal events into the - signal buffer. - - * sim-engine.c (sim_engine_halt): Check SIM_DESC magic. - (sim_engine_restart): Ditto. - (sim_engine_abort): Ditto. - * sim-stop.c (sim_stop): Ditto. - (control_c_simulation): Ditto. - * sim-resume.c (sim_resume): Ditto. - (has_stepped): Ditto. - * sim-abort.c (sim_engine_abort): Ditto. - - * sim-basics.h (transfer_type): New type. - - * sim-core.c (sim_core_signal): New function. Print core signal - information. - (sim_core_find_mapping): Add transfer argument. - - * sim-n-core.h (sim_core_{write,write}_unaligned_N): Call - SIM_CORE_SIGNAL if a recoverable abort. - * sim-core.c (sim_core_find_mapping): Ditto. - -Fri May 16 15:13:21 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.c (sim_core_find_mapping): Replace calls to - sim_io_error to more resiliant sim_engine_abort. - - * sim-n-core.h (sim_core_read_unaligned_N): Ditto. - (sim_core_write_unaligned_N): Ditto. - -Tue May 13 13:50:06 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-module.c: Add sim_events_install to list. - - * sim-events.c (sim_events_install, sim_events_uninstall): Clonse - from sim_core_*. - (sim_events_init): Now returns SIG_RC. - - * sim-run.c: New file. Generic sim_engine_run. - * sim-reason.c: New file. Generic sim_stop_reason. - * sim-stop.c: New file. Generic sim_stop. - * sim-resume.c: New file. Generic sim_resume. - - * Make-common.in (sim-engine.o): Add rule. - (sim-run.o, sim-reason.o, sim-stop.o, sim-resume.o): Ditto. - - * sim-engine.h, sim-engine.c: New file. Provide generic - implementation of sim_engine_halt, sim_engine_error. et.al. - - * sim-base.h (sim_state_base): Add member halt. - (sim-engine.h): Include. - - * sim-events.h (sim_event_handler): Always pass SIM_DESC to event - handlers. - * sim-events.c (sim_events_poll): Update event handler. - -Tue May 13 09:57:49 1997 Andrew Cagney <cagney@b2.cygnus.com> - - * sim-events.h, sim-events.c (sim_events_watch_clock): New - function. - (sim_events_watch_sim): New function. - (sim_events_watch_core): New function. - (sim_watch_valid): New function. - (sim_events_preprocess): New function. - (sim_events_process): Process the watchpoints as well as the timer - queue. - (sim_events_tick): Check WORK_PENDING instead of the hold queue. - (sim_events_deschedule): Check all the queues when removing an - event. - (sim_events_init): Ditto for cleaning. - -Mon May 19 12:07:22 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.c (is_ufpu_number): Comment out - currently unused. - -Mon May 19 11:23:03 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * callback.c (os_open): Type of arg flags is int. - -Fri May 16 22:26:43 1997 Michael Meissner <meissner@cygnus.com> - - * sim-fpu.c (sim_fpu_is_{eq,ne,lt,le,gt,ge}): Compare Infinities - just like normal numbers as per IEEE rules. - -Wed May 14 21:20:38 1997 Bob Manson <manson@charmed.cygnus.com> - - * callback.c (os_close): Mark the descriptor as being - available if the close succeeded. - (os_open): Pass 0644 as the mode of the file being created. - -Thu May 15 10:58:52 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-fpu.c (pack_fpu, unpack_fpu): New functions - decode a - float. - - * sim-inline.c (SIM_INLINE_C): Rename from _SIM_INLINE_C_. - * sim-lnline.h: Update. - - * sim-fpu.h, sim-fpu.c (sim_fpu_[iu]{32,64}to): New int2fp - conversion functions. - (sim_fpu_to{32,64}[iu]): New fp2int functions. - - * sim-fpu.h, sim-fpu.c (sim_fpu_is_{lt,le,eq,ne,ge,gt}): New fp - compare functions. Replacing. - (sim_fpu_cmp): This. Delete. - -Mon May 12 14:49:05 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.c (sim_core_find_mapping): Call engine_error not - sim_io_error when possible. - -Mon May 12 08:55:07 1997 Andrew Cagney <cagney@b2.cygnus.com> - - * sim-endian.h (V1_H2): Add macro's to insert a word into a - high/low double word. - - * sim-trace.h: Remove definition of attribute - defined in - sim_basics.h. - -Mon May 12 08:55:07 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-options.h (struct OPTION): Add doc_opt as the documenting - name of the option - or family of options. - - * sim-options.c (sim_args_command): Match command `a-b c' with - option `--a-b-c' from option table. - -Thu May 8 12:40:07 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-options.c (sim_print_help): For optional arguments, wrap - them in []. - - * sim-trace.c (set_trace_options): New function, handle optional - argument and multiple assignment. - (trace_option_handler): Update. - - * sim-trace.c (trace_option_handler): Trace branch and not fpu - when branch tracing selected. - -Wed May 7 15:19:58 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-trace.c (trace_one_insn): Make a va-args function. - - * sim-trace.c (trace_vprintf): New function, va-arg version of - trace_printf. - -Tue May 6 16:38:16 1997 Doug Evans <dje@canuck.cygnus.com> - - * sim-trace.c (trace_uninstall): Don't close a file twice. - * sim-profile.c (profile_uninstall): Likewise. - -Tue May 6 06:14:01 1997 Mike Meissner <meissner@cygnus.com> - - * sim-trace.c (toplevel): Include bfd.h. - (trace_options): Note that --trace-linenum also turns on - --trace-insn. Add --trace-{branch,semantics}. - (trace_option_handler): If --trace-linenum, also turn on - --trace-insn. Add --trace-branch support. If --trace-semantics, - turn on ALU, FPU, branch, and memory tracing. - (trace_one_insn): New function to trace an instruction. Support - --trace-linenum. - (OPTION_TRACE_*): Use an enum, rather than lots of defines. - - * sim-trace.h (TRACE_{SEMANTICS,BRANCH}_IDX): Add new macros. - (MAX_TRACE_VALUES): Use 32, not 12 by default. - (TRACE_branch): Add new mask. - (TRACE_*_P): Define all possible trace_p macros. - (trace_one_insn): Declare function. - -Mon May 5 14:08:34 1997 Mike Meissner <meissner@cygnus.com> - - * sim-trace.h (__attribute__): Define as nothing if not GNU C or - GNU C doesn't support __attributes__. - ({trace,debug}_printf): Add attribute's so -Wformat can check the - format strings. - -Mon May 5 11:16:12 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-config.h (FORCED_ALIGNMENT): New alignment option - - addresses are masked forcing them to be correctly aligned. - (WITH_ALIGNMENT): Make NONSTRICT_ALIGNMENT the default. - * sim-config.c (config_alignment_to_a): Update. - - * sim-core.h (sim_cpu_core): New data type contains cpu specific - core data. - * sim-base.h (CPU_CORE): Add cpu specific core data to cpu base - type. - * sim-core.c (sim_core_attach): Add CPU argument. Ready for - processor specific core maps. - (sim_core_map_attach): Copy the core map data to each of the - processor specific core data structures. - * sim-core.c (sim_core_find_mapping): Update. - - * sim-n-core.h (sim_core_read_N, sim_core_write_N): Rename. - (sim_core_write_aligned_N, sim_core_write_aligned_N): New names. - (sim_core_write_unaligned_N, sim_core_write_unaligned_N): New - alternatives that handle unaligned addresses. - (sim_core_{read,write}_{,un}aligned_N): Drop SIM_DESC arg, replace - with just CPU arg. - * cgen-utils.c (sim_disassemble_insn): Update. - -Mon May 5 13:19:16 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-trace.h (TRACE_FPU_IDX): Add Floating-point specific - tracing. - - * sim-fpu.h, sim-fpu.c: New files - prototype for generic target - fpu support. - - * sim-inline.h, sim-inline.c: Add support for SIM_FPU. - -Fri May 2 17:59:42 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-core.c (sim_core_map_to_str): New function ascii equivalent - to map type. - - * sim-n-core.h (sim_core_read_N, sim_core_write_N): Use in trace - statement. - -Fri May 2 17:28:02 1997 Andrew Cagney <cagney@b2.cygnus.com> - - * cgen-trace.c: Prepend additional trace_printf argument. - - * cgen-utils.c (sim_disassemble_insn): Add additional core - arguments. - -Fri May 2 11:40:23 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * nrun.c (main): Catch/report errorenous simulator states. - - * sim-module.c: #include "libiberty.h" so that xmalloc is defined. - * sim-trace.c: #include string.h/strings.h so that memset is - defined. - * sim-utils.c: Ditto. - * sim-profile.c: Ditto. And stdlib.h. - (print_bar): Only define when used by instruction or memory profiler. - - * sim-options.c (standard_option_handler): Make ul more local. - - * sim-load.c (sim_load_file): Make the name constant. - (sim_load_file): Passify gcc. - - * sim-utils.h: New file, pre-declare utilites in corresponding .c - file. - * sim-utils.c, sim-load.c: Include sim-utils.h. - - * sim-base.h (sim_cpu): Pre define here so available to all. - - * sim-core.h (DECLARE_SIM_CORE_WRITE_N, DECLARE_SIM_CORE_READ_N): - Restore the sim_cpu and instruction_address arguments so that full - information is available to the abort function. - * sim-core.c (sim_core_find_mapping, sim_core_write_buffer): Ditto. - * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update. - - * sim-trace.h, sim-trace.c (trace_option_handler): Add interim - tracing support for sim-events and sim-core. - (trace_option_handler): Convert #if to if where possible so always - compiled/checked by C compiler. - * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update. - - * sim-base.h: Adjust comment documenting how to define the cpu - structure. - (sim_state_base): Add sim_core and sim_events to simulator base - object. - - * sim-trace.h, sim-trace.c (trace_printf): Add SIM_DESC argument. - * sim-core.c (sim_core_init, sim_core_attach, - sim_core_find_mapping): Update. - * sim-events.c (ETRACE, sim_events_init, sim_events_time, - update_time_from_event, insert_sim_event, - sim_events_schedule_after_signal, sim_events_deschedule, - sim_events_tick): Ditto. - - * sim-basics.h (sim-module.h, sim-trace.h, sim-profile.h, - sim-model.h): Move #includes from here. - * sim-base.h: To here. - (sim-core.h, sim-events.h, sim-io.h): Include also - -Wed Apr 30 15:37:54 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * callback.c (default_callback): Missing initialisers. - -Thu May 1 10:40:47 1997 Doug Evans <dje@canuck.cygnus.com> - - * sim-utils.c (sim_add_commas): New function. - * sim-basics.h (sim_add_commas): Add prototype. - * cgen-scache.c (scache_print_profile): Print commas in numbers. - * sim-profile.c (COMMAS): New macro. - (print_*): Use it to print commas in numbers. - - * configure: Regenerated. - - * cgen-sim.h (sim_signal_type): Add SIM_SIGINT. - (cgen_state): New member run_fast_p. - (cgen_init): Add prototype. - (sim_disassemble_insn): New arg `cpu'. - * cgen-trace.c (trace_insn): Update call to sim_disassemble_insn. - * cgen-utils.c (cgen_init): New function. - (sim_disassemble_insn): New arg `cpu'. Rewrite fetching of insn. - * genmloop.sh: Call engine_halt if loop exits. - - * Makefile.in (sim-options_h): Define. - (sim-{module,options,trace,profile,utils}.o): Clean up dependencies. - (sim-model.o): Add new rule. - (cgen-{scache,trace,utils}.o): Add new rules. - * aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add. - * cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'. - Indent output by 2 spaces. - * cgen-scache.h (scache_print_profile): Update. - * cgen-trace.c (trace_insn_fini): Indent output by 2 spaces. - Use trace_printf, not fprintf. - (trace_extract): Use trace_printf, not cgen_trace_printf. - * genmloop.sh (!FAST case): Increment `insn_count'. - * sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE. - (sim_cpu_base): Rename member `sd' to `state' to be consistent with - access macro's name. - * sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it. - Change return type to SIM_RC. - (sim_core_{install,uninstall}): New functions. - * sim-core.h (sim_core_{install,uninstall}): Declare. - (sim_core_init): Use EXTERN_SIM_CORE to define it. - Change return type to SIM_RC. - * sim-model.h (models,machs,model_install): Declare. - * sim-module.c (modules): Add scache_install, model_install. - (sim_post_argv_init): Set cpu->state backlinks. - * sim-options.c (standard_options): Delete --simcache-size,--max-insns. - (standard_option_handler): Likewise. - * sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to - sim-profile.h. - (*): Assume ANSI C. - (profile_options): Delete --profile-simcache. - (profile_option_handler): Likewise. - (profile_print_insn): Change `sd' arg to `cpu'. Indent output 2 - spaces. - (profile_print_{memory,model}): Likewise. - (profile_print_simcache): Delete. - (profile_print_speed): New function. - (profile_print): Rewrite. - * sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache. - (WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P. - (PROFILE_DATA): Delete members simcache_{hits,misses}. - (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete. - (PROFILE_{CALLBACK,CPU_CALLBACK}): New types. - (profile_print): Update prototype. - -Wed Apr 30 11:34:14 1997 Doug Evans <dje@canuck.cygnus.com> - - * cgen-scache.[ch], cgen-sim.h: New files. - * cgen-trace.[ch], cgen-types.h, cgen-utils.c, genmloop.sh: New files. - * sim-model.c: New file. - - * Make-common.in (clean targets): Undo patch of Apr. 22. - -Fri Apr 25 15:28:32 1997 Mike Meissner <meissner@cygnus.com> - - * sim-n-bits.h (signed): If we have a standard compiler, undef - signed, so that signedN is defined correctly. - -Thu Apr 24 00:00:07 1997 Doug Evans <dje@canuck.cygnus.com> - - * sim-module.h, sim-model.h, sim-profile.h: New files. - * sim-module.c, sim-profile.c: New files. - * Make-common.in (SIM_PROFILE): Define - (CONFIG_CFLAGS): Add $(SIM_PROFILE). - (sim_main_headers): Add sim-module.h, sim-model.h, sim-profile.h. - (sim_module.o,sim-profile.o): Add rules for. - * aclocal.m4 (--enable-sim-trace): Allow symbolic arguments. - (--enable-sim-profile): Add. - * configure: Regenerated. - * sim-base.h (sim_state_base): New members init_list, uninstall_list, - model. Move trace and profile support to sim-{trace,profile}.h. - New members trace_data, profile_data. - * sim-basics.h: #include sim-module.h, sim-model.h, sim-profile.h. - * sim-config.h: Provide default definition of WITH_PROFILE. - (WITH_TRACE): Change default to -1. - (MAX_NR_PROCESSORS): Always define. - * sim-options.c: Move trace and profile support to - sim-{trace,profile}.h. - (sim_pre_argv_init): Moved to sim-model.c. - (standard_install): New function. - * sim-options.h (sim_pre_argv_init): Move decl to sim-model.c. - (standard_install): Declare. - * sim-trace.c: Tracing option handling moved here from sim-options.c. - (trace_install, trace_uninstall): New functions. - (trace_printf): Update reference to TRACE_FILE. - * sim-trace.h (TRACE_FOO_IDX): Moved here from sim-base.h. - (TRACE_foo): Bit masks for symbolic arguments to --enable-sim-trace. - (WITH_TRACE_FOO_P): Define. - (trace_install): Declare. - (TRACE_DATA): New struct. - -Wed Apr 23 17:23:15 1997 Doug Evans <dje@canuck.cygnus.com> - - * run.c: Undo last exec_bfd patch. - (main): Only pass -E ifdef SIM_HAVE_BIENDIAN. - -Wed Apr 23 17:54:27 1997 Mike Meissner <meissner@cygnus.com> - - * run.c (exec_bfd): Add back in. - (main): Set exec_bfd. - -Tue Apr 22 14:43:46 1997 Doug Evans <dje@canuck.cygnus.com> - - * sim-load.c (sim_load_file): #include <stdio.h> for NULL. - -Wed Apr 23 02:55:54 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-events.c (insert_sim_event): Call sim_io_error instead of - less well defined engine_error. - * sim-core.c: Ditto. - -Tue Apr 22 08:48:16 1997 Stu Grossman (grossman@critters.cygnus.com) - - * Make-common.in: Change clean targets to use :: so that other - Makefiles can have their own clean targets. - * sim-load.c (xprintf eprintf): Use ANSI_PROTOTYPES instead of - __STDC__ to control use of stdarg vs. varargs syntax. Some - systems can't use __STDC__, but require stdarg. - -Fri Apr 18 11:14:43 1997 Doug Evans <dje@canuck.cygnus.com> - - * sim-options.c (standard_options): Add --endian. - (standard_option_handler): Likewise. - - * nrun.c: #include <signal.h>. - (main, cntrl_c): Wrap calls to sim_resume in a SIGINT - handler that calls sim_stop (). - -Fri Apr 18 13:11:36 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * run.c (main, cntrl_c): Wrap calls to sim_resume in a SIGINT - handler that calls sim_stop (). Simulators may still be - establishing their own handler. - - * sim-events.c (sim_events_poll): Rename from - sim_events_at_large_int. Poll IO. - - * sim-io.c (sim_io_poll_quit): New function - pass on a polling - request. - - * callback.c (os_poll_quit): New function poll for quit signal - where needed. - (default_callback): Include magic number. - -Thu Apr 17 02:25:11 1997 Doug Evans <dje@canuck.cygnus.com> - - * aclocal.m4: Check for headers time.h, sys/time.h, sys/resource.h. - Check for functions getrusage, time. - * sim-basics.h (SIM_ELAPSED_TIME): New typedef. - (sim_elapsed_time_get, sim_elapsed_time_since): Add prototypes. - * sim-utils.c: #include time.h, sys/time.h, sys/resource.h if able. - (sim_elapsed_time_get, sim_elapsed_time_since): New functions. - - * sim-utils.c (sim_copy_argv, sim_analyze_program): New functions. - - * sim-options.c, sim-options.h: New files. - * sim-config.h (WITH_DEBUG): Provide default value of zero. - * Make-common.in (nrun.o): Add rules for. - * nrun.c: New file. - - * run.c (main): Check return value of sim_open. - - * Make-common.in (sim-options.o, sim-load.o, sim-trace.o): Add rules. - (sim_main_headers): Add sim-trace.h. - * run.c (exec_bfd, target_byte_order): Delete. - (main): Pass -E <endian> to sim_open. Delete code to load sections, - call sim_load instead. Check return code of sim_create_inferior. - * sim-base.h (CURRENT_STATE): Define. - (sim_state_base): Make typedef. New members options, prog_argv, - prog_bfd, text_{section,start,end}, start_addr, simcache_size, - mem_size, memory [+ corresponding access macros]. - (sim_cpu_base): New typedef. - * sim-trace.h: New file. - * sim-trace.c: New file. - * sim-basics.h: #include it. - * sim-load.c: New file. - -Tue Apr 15 15:10:13 1997 Ian Lance Taylor <ian@cygnus.com> - - * Make-common.in (INSTALL): Set to @INSTALL@. - (INSTALL_XFORM, INSTALL_XFORM1): Remove. - (install-common): Depend upon installdirs. Use - $(program_transform_name) directly, rather than using - $(INSTALL_XFORM). - (installdirs): New target. - * Makefile.in (INSTALL): Set to @INSTALL@. - (INSTALL_XFORM, INSTALL_XFORM1): Remove. - (install-man): Depend upon installdirs. Use - $(program_transform_name) directly, rather than using - $(INSTALL_XFORM). - (installdirs): New target. - -Tue Apr 15 15:08:12 1997 Andrew Cagney <cagney@b1.cygnus.com> - - * sim-assert.h (SIM_ASSERT, ASSERT): Allow these macros to - be overriden. - -Wed Apr 9 16:06:44 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-basics.h: Only bring in config.h and tconfig.h if - HAVE_CONFIG_H. - -Mon Apr 7 11:39:45 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-config.h (WITH_TARGET_WORD_MSB): New Macro. Define the bit - numbering convention of the target. - * sim-config.c (print_sim_config): Print WITH_TARGET_WORD_BITSIZE - and WITH_TARGET_WORD_MSB. - (sim_config): When possible, check for consistency with bitsize - and msb. - - * sim-bits.h: Allow MSB to be other than zero. - * sim-bits.c: Ditto. - * sim-n-bits.h: Ditto. - - * sim-bits.h (MSMASK*): New macros - converce to LSMASK*. - * sim-n-bits.h (MSMASKEDn): Ditto. - -Mon Apr 14 16:29:21 1997 Ian Lance Taylor <ian@cygnus.com> - - * Makefile.in (INSTALL): Change install.sh to install-sh. - -Mon Apr 7 10:46:38 1997 Doug Evans <dje@canuck.cygnus.com> - - * sim-base.h (sim_state_base): Move `magic' to end of struct. - -Mon Apr 7 15:53:21 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * run.c (main): Check that a program to run was specified. - -Mon Apr 7 15:45:02 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * aclocal.m4 (AC_TYPE_SIGNAL): Add check. - - * configure: Regenerated to track ../common/aclocal.m4 changes. - * config.in: Ditto. - -Wed Apr 2 15:06:28 1997 Doug Evans <dje@canuck.cygnus.com> - - * sim-endian.h: Move host {LITTLE,BIG}_ENDIAN support from here, - * sim-config.h: To here. - - * Make-common.in (SIM_EXTRA_DEPS): New config var. - (sim_main_headers): Define. - (sim-*.o): Depend on $(SIM_EXTRA_DEPS). - (BUILT_SRC_FROM_COMMON): Move here from ../d30v/Makefile.in. - (clean): Use it. - (sim-utils.o): Add rule for. - * sim-utils.o: New file. - * sim-basics.h: #include sim-base.h. - (zalloc): Make argument unsigned long. - * sim-base.h: New file. - * sim-inline.h (SIM_IO support): Delete. - * sim-io.h: Delete inline support. - * sim-io.c: Likewise. sim-state.h renamed to sim-main.h. - * sim-config.c: sim-state.h renamed to sim-main.h. - * sim-core.c: Likewise. - * sim-events.c: Likewise. - - * run.c (main): Pass SIM_OPEN_STANDALONE to sim_open. - - * aclocal.m4: Check for stdlib.h, string.h, strings.h, unistd.h. - (sim-debug): Allow arguments. Define WITH_DEBUG in addition to - -DDEBUG. - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Wed Apr 2 14:34:19 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * configure: Regenerated to track ../common/aclocal.m4 changes. - -Wed Apr 2 11:08:11 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-config.h (WITH_ALIGNMENT, WITH_FLOATING_POINT, - WITH_XOR_ENDIAN, WITH_SMP, WITH_RESERVED_BITS): Assume that these - are defined by the configure. - - * aclocal.m4 (sim-stdio): Add option stdio from ../ppc configure. - - * aclocal.m4 (floating-point, xor-endian, alignment, smp, - reserved-bits): Always define. - - * sim-config.h, sim-config.c (sim_config): New function - and new - file - co-ordinate the setting/checking of the common simulator - configuration options. - - * Make-common.in (sim-config.o): Add rule. - -Fri Mar 28 15:32:00 1997 Mike Meissner <meissner@cygnus.com> - - * callback.c (os_{,e}vprintf_filtered): Change stdarg type to - va_list from void *, since va_list might not be a pointer type. - -Mon Mar 24 15:27:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-n-endian.h (offset_N): Correct assertion - word and sub word - in wrong order. - (offset_N): Correct computation of LE offset. - - * sim-io.c (sim_io_error): Include a new line when reporting - errors. - - * sim-assert.h (SIM_FILTER_PATH): Out by one when locating last - `/'. - -Thu Mar 20 22:31:06 1997 Jeffrey A Law (law@cygnus.com) - - * run.c: Include alloca-conf.h. - - * callback.c (os_evprintf_filtered): Fix typo. - -Fri Mar 21 13:36:20 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * run.c (string.h, strings.h, stdlib.h): Include. - - * sim-events.c (sim_events_tick): Recent cleanup failed to return - 0 when nothing pending. - - * run.c (sim_size, sim_trace): Plicate GCC - these two functions - will soon be going away. - (getopt): Plicate GCC. - - * sim-endian.c (sim-io.h): Plicate GCC. - * sim-bits.c (sim-io.h): Ditto. - * sim-n-bits.h (ROTn): Ditto. - - * sim-io.c (sim_io_error): Correct check for NULL. - - * sim-assert.h (SIM_FILTER_PATH): Separate out the code filtering - the __FILE__. - * sim-events.c: Use SIM_FILTER_PATH to filter out the filename - path. - -Wed Mar 19 01:12:06 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * aclocal.m4 (SIM_AC_OPTION_*: Move so that they are outside of - SIM_AC_COMMON - SIM_AC_COMMON was gobling arguments. - -Tue Mar 18 20:48:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-alu.h: Include sim-xcat.h. - -Tue Mar 18 13:58:18 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * Make-common.in (sim-bits.c, sim-core.c, sim-endian.c, - sim-events.c, sim-inline.c, sim-io.c): Define rules for building - these. - - * sim-events.c (sim_events_at_large_int): New function. Just - schedules an event every large-int ticks. - (sim_events_init): Call. - (sim_events_tick, sim_events_process): Move async handing to - sim_events_process. Move timer decrement so that it occures after - events have been processed. - - * sim-basics.h (struct _engine): Remove declaration. - - * sim-events.h, sim-events.c: Rename type to sim_events. Prefix - everything with same. Rename global struct to SIM_DESC. - * sim-core.h, sim-core.c, sim-n-core.c: Ditto for sim_core. - * sim-io.h, sim-io.c: Ditto. - - * sim-assert.h: New file. Optional assertion checking macros. - * sim-io.c (sim_io_error): Make just this function tolerant to - null pointers. - - * sim-xcat.h: New file. Define concatenate macros. - * sim-basics.h (XCONCAT*): Move to sim-xcat.h. - * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Explicitly include - concat macros. - - -Tue Mar 18 12:44:55 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-bits.h (LSMASK): New macro. Create mask of LS bits. - -Mon Mar 17 18:10:05 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-inline.h: Add definitions for sim-types. - (ALL_BY_MODULE): New macro, encapsulate full inlining by the - module. - -Mon Mar 17 15:38:27 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-events.h: Remove defunct reference to callback struct. - -Mon Mar 17 15:10:07 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * configure: Re-generate. - -Mon Mar 17 15:04:47 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * Make-common.in (CSEARCH): Do not include the gdb directory in - the search path. - -Mon Mar 17 13:16:26 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE, - SIM_WARNING): Drop, requiring the simulator specific Makefile.in - to explicitly incorporate these. - - * aclocal.m4 (--enable-sim-alignment); New option. Strongly - specify the alignment restrictions of the target architecture - - without this option all alignment restrictions are accomodated. - (--enable-sim-assert): New option. Conditionally compile in - assertion statements. - (--enable-sim-float): New option. Strongly specify the target's - floating point support. - (--enable-sim-hardware): New option. Specify the hardware devices - included in the simulation. - (--enable-sim-packages): New option. Specify the hardware - packages included in the simulation. - (--enable-sim-regparm): New option. Specify that parameters be - passed in registers instead of on the stack. - (--enable-sim-reserved-bits): New option. Specify that reserved - bits within an instruction are are correctly set. - (--enable-sim-smp): New option. Specify the level of SMP support - to be included in the simulator. - (--enable-sim-stdcall): New option. Specify an alternative - function call convention. - (--enable-sim-xor-endian): New option. Configure xor-endian - support used by some targets to implement bi-endian support. - -Fri Mar 14 19:51:21 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * aclocal.m4 (--enable-sim-hostendian): New option. Allow the - host endianness to be overridden. - (--enable-sim-endian): Allow the target platform's byte order - to be overridden. - (--enable-sim-inline): Control the inlining of common components. - (--enable-sim-bswap): For compatibility, also define WITH_BSWAP. - (--enable-sim-warnings): Enable additional GCC compiler checks. - * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE, - SIM_WARNINGS): Add. - - * sim-n-core.h, sim-n-bits.h, sim-n-endian.h: Rename from - sim-*-n.h so that the names are uniq on dos machines - * sim-core.c, sim-bits.c, sim-endian.c: Update. - -Thu Mar 13 12:32:42 1997 Doug Evans <dje@canuck.cygnus.com> - - * run.c: #include "libiberty.h". - (main): New locals sd,no_args,sim_argv. - Run buildargv on -a option. Pass argv to sim_open, argv[0] - is program name. Update call to sim_set_callbacks. - Record result of sim_open, pass to other sim_foo routines. - -Thu Mar 13 10:24:05 1997 Michael Meissner <meissner@cygnus.com> - - * callback.c (os_printf_filtered): Do not call exit(1) or print a - final newline. - -Thu Mar 6 15:50:28 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * callback.c: Add os_flush_stdout and vprintf_filtered callbacks. - Route stdout through buffered IO. - - * callback.c: Add os_flush_stderr, os_write_stderr, - os_evprintf_filtered functions to route error output through - stderr. - - * sim-io.h, sim-io.c (sim_io_flush_stderr, sim_io_flush_stdout): - Correct return type - should be void. - -Fri Mar 7 20:14:37 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-basics.h: Clean up. Many macro's moved to sim-inline.h. - - * sim-config.h: Ditto. For some options - eg WITH_DEVICES - do - not provide a default value as undefined indicates disable code. - -Thu Mar 6 15:50:28 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-core.h, sim-core-n.h, sim-core.c: Borrow code from ppc - directory. - * sim-events.h, sim-events.c: Ditto. - * sim-io.h, sim-io.c: Ditto. - -Tue Mar 4 09:35:56 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-alu.h (ALU_SUB_CA, ALU*_SUB_CA): New alu operation. - - * sim-bits.h, sim-bits-n.h, sim-bits.c (LSMASKED*): New macro's - extract the tail or least signifiant bits from an integer of the - specified size. - - * sim-bits.h, sim-bits.c: Clean up conditionally compiled #if - WITH_TARGET_BITSIZE so that the compilation will fail when an - unsupported bitsize value is defined. - - (INSERTED*): Convert to functions. - (EXTRACTED*): Ditto. - - (SIGN_EXTEND, SEXT): Change to more terse name. - -Tue Mar 4 09:35:56 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-inline.h: Allow explicit control over which .c files will be - included by their header. - - * sim-inline.h: Allow explicit control over which .c files use the - alternative - REGPARM - parameter passing mechanism. - - * sim-inline.h, sim-inline.c: Don't attempt to include any of - icache.c, idecode.c, semantics.c or support.c. Those names are - not generally applicable. - -Thu Feb 27 10:17:23 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-bits.c, sim-bits-n.h (new): Split sim-bits.c into two parts - in a fashion similar to sim-endian-n. - - * sim-endian.h: (H_word, L_word, AL_*, VL_*): Extend to include - both value and address macro's. - -Tue Feb 25 18:51:57 1997 Andrew Cagney <cagney@kremvax.cygnus.com> - - * sim-alu.h (ALU16_BEGIN, ALU16_SET, ...): Fill in. - - * sim-endian.h (L_word, H_word): Replace MS2W_4, LS2W_4 with more - generic L_word, H_word macro's. - -Thu Feb 20 18:36:55 1997 Andrew Cagney <cagney@critters.cygnus.com> - - * sim-basics.h: Borrow code from ppc directory. - * sim-bits.c: Ditto. - * sim-bits.h: Ditto. - * sim-config.h: Ditto. - * sim-endian-n.h: Ditto. - * sim-endian.c: Ditto. - * sim-endian.h: Ditto. - * sim-inline.c: Ditto. - * sim-inline.h: Ditto. - * sim-types.h: Ditto. - -Wed Feb 19 12:40:50 1997 Andrew Cagney <cagney@critters.cygnus.com> - - * sim-alu.h (ALU_SET16, ALU_SET32, ALU_SET64, etc): Make available - all the ALU size alternatives and then auto-configure a default. - - * sim-alu.h: Copy ppc/idecode_expression.h. - -Mon Feb 17 10:44:18 1997 Andrew Cagney <cagney@critters.cygnus.com> - - * bits.h, bits.c (SIGN_EXTEND32, SIGN_EXTEND64): New functions, - sign extend a bit within a value. - - * sim-endian.h, sim-endian-n.h (offset_N): New functions - return - a pointer into the middle of a host word. - * sim-endian.h (MS2W_4, LS2W_4): Use this function. - -Tue Feb 11 13:46:49 1997 Michael Meissner <meissner@tiktok.cygnus.com> - - * callback.c: If HAVE_CONFIG_H is defined, include config.h from - autoconf. If HAVE_UNISTD_H is defined, include unistd.h to get - appropriate definitions of read, write, etc. Add prototype for - system. - -Tue Feb 4 13:24:44 1997 Doug Evans <dje@canuck.cygnus.com> - - * Makefile.in (libcommon.a): Delete. - (callback.o,targ-map.o): Delete, moved to Make-common.in. - (gentmap,targ-vals.h,targ-map.c): Likewise. - (run-autoconf): Delete. - * aclocal.m4 (SIM_AC_OUTPUT): Redo creation of Makefile. - (common makefile fragment): Moved back into ... - * Make-common.in: Resurrect. - * configure.in (AC_LINK_FILES): Delete, unnecessary now. - * configure: Regenerated. - -Fri Jan 31 07:16:49 1997 Doug Evans <dje@canuck.cygnus.com> - - * aclocal.m4 (SIM_AC_COMMON): Move COMMON_MAKEFILE_FRAG from here. - (SIM_AC_OUTPUT): To here. - -Fri Jan 24 10:37:17 1997 Stu Grossman (grossman@critters.cygnus.com) - - * aclocal.m4 (COMMON_MAKEFILE_FRAG): Quote a couple of $'s in - comments and single quotes. Fixes a problem found on hpux. - -Thu Jan 23 13:35:03 1997 Stu Grossman (grossman@critters.cygnus.com) - - * aclocal.m4: Remove Make-common.in from dependencies. - * (distclean): Remove targ-vals.def. - - * aclocal.m4 (SIM_AC_COMMON): Move contents of Make-common.in - into here. Makes insertion into makefiles easier. Also, change - the way that callback.o, gentmap, targ-vals.h, targ-map.c, - targ-map.o, and run are built. They are now built in the - individual simulator directories, taking sources from ../common as - necessary. This replaces the merging of libcommon.a into - linsim.a, which was problematic for the WinGDB build process. - * run.c: Include config.h from . instead of ../common. - * Make-common.in: Remove. It's no longer necessary. - -Mon Dec 16 15:02:33 1996 Ian Lance Taylor <ian@cygnus.com> - - * Make-common.in (ALL_CLAGS): Put CFLAGS at the end. - (.c.o): Put $(ALL_CFLAGS) before the file being compiled. - -Wed Dec 11 11:30:58 1996 Jim Wilson <wilson@cygnus.com> - - * run.c (main): Set target_byte_order before call to sim_open. - -Sun Dec 8 18:22:06 1996 Doug Evans <dje@canuck.cygnus.com> - - * callback.c: #include <stdlib.h> - (os_error): New function. - (default_callback): Add os_error. - -Mon Nov 25 19:44:35 1996 Doug Evans <dje@canuck.cygnus.com> - - * Make-common.in (Makefile): Set CONFIG_HEADERS="". - * aclocal.m4: Mark the fact that --enable-sim-bswap isn't host - specific. - (SIM_AC_OUTPUT): Don't build Makefile if CONFIG_FILES="". - -Wed Nov 20 01:11:04 1996 Doug Evans <dje@canuck.cygnus.com> - - * run.c: #include ../common/config.h, tconfig.h. - (myname): New static global. - (main): Recognize new options -a, -c. Also recognize -h if h8/300. - Only process -c ifdef SIM_HAVE_SIMCACHE. - Only process -p/-s ifdef SIM_HAVE_PROFILE. - Parse program name from argv[0] and use in error messages. - Pass sim_args to sim_open. Pass prog_args to sim_create_inferior. - Add support for incomplete h8/300 termination indicators. - (usage): Make more verbose. - * aclocal.m4,config.in,tconfig.in,configure.in,configure: New files. - * Makefile.in,Make-common.in,callback.c: New files. - * nltvals.def,gentmap.c,gentvals.sh: New files. - -Tue Nov 12 13:34:00 1996 Dawn Perchik <dawn@cygnus.com> - - * run.c: Include stdarg.h if __STDC__. - -Tue Oct 15 11:16:31 1996 Jeffrey A Law (law@cygnus.com) - - * run.c (main): Don't print out anything if the signal - number is zero (ie no signal). - -Tue Oct 15 11:20:44 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * run.c (main): Print out if the program raised a signal. - -Wed Sep 18 09:52:14 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * run.c (exec_bfd): Rename from sim_bfd, to use the gdb name. - (main): Ditto. - -Tue Sep 17 11:04:50 1996 James G. Smith <jsmith@cygnus.co.uk> - - * run.c (main): Explicitly cast malloc() parameter. - -Thu Sep 12 11:27:21 1996 Michael Meissner <meissner@tiktok.cygnus.com> - - * run.c (sim_bfd): New global to hold the bfd pointer for the - executable. - (main): Initialize sim_bfd. - -Fri Dec 15 16:27:49 1995 Ian Lance Taylor <ian@cygnus.com> - - * run.c (main): Use new bfd_big_endian macro. - -Wed Nov 8 15:49:49 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk> - - * run.c (main): Removed SH specific comments, so source is - generic. Also updated to only load relevant sections. Moved - sim_open() to after callback attach (to match GDB). - - * run.1: Removed SH specific comments. - -Sat Oct 21 12:31:01 1995 Jim Wilson <wilson@chestnut.cygnus.com> - - * run.c (main): Always return sigrc at end. - -Tue Oct 10 12:03:13 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * run.c (main): Print error diagnostic and exit if bfd_openr() or - bfd_check_format() fails. - -Thu Sep 28 15:40:36 1995 steve chamberlain <sac@slash.cygnus.com> - - * run.c, run.1: From sh directory. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in deleted file mode 100644 index 25a319b..0000000 --- a/sim/common/Make-common.in +++ /dev/null @@ -1,746 +0,0 @@ -# Makefile fragment for common parts of all simulators. -# Copyright 1997, 1998, 1999, 2000, 2001, 2004, 2005 -# 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. - -# This Makefile fragment consists of two separate parts. -# They are merged into the final Makefile at points denoted by -# "## COMMON_PRE_CONFIG_FRAG" and "## COMMON_POST_CONFIG_FRAG". -# -# The target Makefile should look like: -# -#># Copyright blah blah -#> -#>## COMMON_PRE_CONFIG_FRAG -#> -#># Any overrides necessary for the SIM_FOO config vars. -#>SIM_FOO = ... -#> -#>## COMMON_POST_CONFIG_FRAG -#> -#># Rules to build target specific .o's. - -## COMMON_PRE_CONFIG_FRAG - -VPATH = @srcdir@ -srcdir = @srcdir@ -srccom = $(srcdir)/../common -srcroot = $(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 = $(libdir)/$(target_alias) - -datadir = @datadir@ -mandir = @mandir@ -man1dir = $(mandir)/man1 -infodir = @infodir@ -includedir = @includedir@ - -# This can be referenced by the gettext configuration code. -top_builddir = .. - -EXEEXT = @EXEEXT@ -SHELL = @SHELL@ - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -CC = @CC@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -SIM_BSWAP = @sim_bswap@ -SIM_CFLAGS = @sim_cflags@ -SIM_DEBUG = @sim_debug@ -SIM_TRACE = @sim_trace@ -SIM_PROFILE = @sim_profile@ - -SIM_ASSERT = @sim_assert@ -SIM_ALIGNMENT = @sim_alignment@ -SIM_BITSIZE = @sim_bitsize@ -SIM_DEFAULT_MODEL = @sim_default_model@ -SIM_ENDIAN = @sim_endian@ -SIM_ENVIRONMENT = @sim_environment@ -SIM_FLOAT = @sim_float@ -SIM_HW_CFLAGS = @sim_hw_cflags@ -SIM_HW_OBJS = @sim_hw_objs@ -SIM_HW = @sim_hw@ -SIM_HOSTENDIAN = @sim_hostendian@ -SIM_INLINE = @sim_inline@ -SIM_PACKAGES = @sim_packages@ -SIM_REGPARM = @sim_regparm@ -SIM_RESERVED_BITS = @sim_reserved_bits@ -SIM_SCACHE = @sim_scache@ -SIM_SMP = @sim_smp@ -SIM_STDCALL = @sim_stdcall@ -SIM_XOR_ENDIAN = @sim_xor_endian@ -WARN_CFLAGS = @WARN_CFLAGS@ -WERROR_CFLAGS = @WERROR_CFLAGS@ -SIM_WARN_CFLAGS = $(WARN_CFLAGS) -SIM_WERROR_CFLAGS = $(WERROR_CFLAGS) - -HDEFINES = @HDEFINES@ -TDEFINES = - -AR = @AR@ -AR_FLAGS = rc -RANLIB = @RANLIB@ -MAKEINFO = makeinfo - -DEP = $(srcroot)/mkdep - -# Each simulator's Makefile.in defines one or more of these variables -# to override our settings as necessary. There is no need to define these -# in the simulator's Makefile.in if one is using the default value. In fact -# it's preferable not to. - -# List of object files, less common parts. -SIM_OBJS = -# List of extra dependencies. -# Generally this consists of simulator specific files included by sim-main.h. -SIM_EXTRA_DEPS = -# List of flags to always pass to $(CC). -SIM_EXTRA_CFLAGS = -# List of extra libraries to link with. -SIM_EXTRA_LIBS = -# List of extra program dependencies. -SIM_EXTRA_LIBDEPS = -# List of main object files for `run'. -SIM_RUN_OBJS = run.o -# Dependency of `all' to build any extra files. -SIM_EXTRA_ALL = -# Dependency of `install' to install any extra files. -SIM_EXTRA_INSTALL = -# Dependency of `clean' to clean any extra files. -SIM_EXTRA_CLEAN = -# Likewise `distclean' -SIM_EXTRA_DISTCLEAN = - -# Every time a new general purpose source file was added every target's -# Makefile.in needed to be updated to include the file in SIM_OBJS. -# This doesn't scale. -# This variable specifies all the generic stuff common to the newer simulators. -# Things like sim-reason.o can't go here as the cpu may provide its own -# (though hopefully in time that won't be so). Things like sim-bits.o can go -# here. Some files are used by all simulators (e.g. callback.o). -# Those files are specified in LIB_OBJS below. - -SIM_COMMON_HW_OBJS = \ - hw-alloc.o \ - hw-base.o \ - hw-device.o \ - hw-events.o \ - hw-handles.o \ - hw-instances.o \ - hw-ports.o \ - hw-properties.o \ - hw-tree.o \ - sim-hw.o \ - -SIM_NEW_COMMON_OBJS = \ - sim-arange.o \ - sim-bits.o \ - sim-config.o \ - sim-core.o \ - sim-endian.o \ - sim-events.o \ - sim-fpu.o \ - sim-io.o \ - sim-info.o \ - sim-load.o \ - sim-memopt.o \ - sim-module.o \ - sim-options.o \ - sim-profile.o \ - sim-signal.o \ - sim-trace.o \ - sim-utils.o \ - sim-watch.o \ - \ - $(SIM_HW_OBJS) \ - -# Add this to SIM_EXTRA_DEPS. -CGEN_INCLUDE_DEPS = \ - $(srccom)/cgen-cpu.h \ - $(srccom)/cgen-defs.h \ - $(srccom)/cgen-engine.h \ - $(srccom)/cgen-scache.h \ - $(srccom)/cgen-sim.h \ - $(srccom)/cgen-trace.h \ - $(srccom)/cgen-types.h \ - $(srcdir)/../../include/opcode/cgen.h - -## End COMMON_PRE_CONFIG_FRAG - -## COMMON_POST_CONFIG_FRAG - -CONFIG_CFLAGS = \ - @DEFS@ \ - $(SIM_CFLAGS) \ - $(SIM_DEBUG) \ - $(SIM_DEFAULT_MODEL) \ - $(SIM_TRACE) \ - $(SIM_PROFILE) \ - $(SIM_BSWAP) \ - $(SIM_ASSERT) \ - $(SIM_ALIGNMENT) \ - $(SIM_BITSIZE) \ - $(SIM_ENDIAN) \ - $(SIM_ENVIRONMENT) \ - $(SIM_FLOAT) \ - $(SIM_HW_CFLAGS) \ - $(SIM_HOSTENDIAN) \ - $(SIM_INLINE) \ - $(SIM_PACKAGES) \ - $(SIM_REGPARM) \ - $(SIM_RESERVED_BITS) \ - $(SIM_SCACHE) \ - $(SIM_SMP) \ - $(SIM_STDCALL) \ - $(SIM_WARN_CFLAGS) \ - $(SIM_WERROR_CFLAGS) \ - $(SIM_XOR_ENDIAN) \ - $(SIM_HARDWARE) \ - $(SIM_EXTRA_CFLAGS) \ - $(HDEFINES) $(TDEFINES) -CSEARCH = -I. -I$(srcdir) -I../common -I$(srccom) \ - -I../../include -I$(srcroot)/include \ - -I../../bfd -I$(srcroot)/bfd \ - -I../../opcodes -I$(srcroot)/opcodes \ - @INCINTL@ -ALL_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(CFLAGS) -BUILD_CFLAGS = -g -O $(CSEARCH) - -COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) - -LIBIBERTY_LIB = ../../libiberty/libiberty.a -BFD_LIB = ../../bfd/libbfd.a -OPCODES_LIB = ../../opcodes/libopcodes.a -LIBINTL = @LIBINTL@ -LIBINTL_DEP = @LIBINTL_DEP@ -CONFIG_LIBS = @LIBS@ -LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL_DEP) $(LIBIBERTY_LIB) \ - $(SIM_EXTRA_LIBDEPS) -EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBINTL) $(LIBIBERTY_LIB) \ - $(CONFIG_LIBS) $(SIM_EXTRA_LIBS) - -LIB_OBJS = callback.o syscall.o targ-map.o $(SIM_OBJS) - -RUNTESTFLAGS = - -callback_h = $(srcroot)/include/gdb/callback.h -remote_sim_h = $(srcroot)/include/gdb/remote-sim.h - -all: $(SIM_EXTRA_ALL) libsim.a run$(EXEEXT) .gdbinit - -libsim.a: $(LIB_OBJS) - rm -f libsim.a - $(AR) $(AR_FLAGS) libsim.a $(LIB_OBJS) - $(RANLIB) libsim.a - -run$(EXEEXT): $(SIM_RUN_OBJS) libsim.a $(LIBDEPS) - $(CC) $(ALL_CFLAGS) -o run$(EXEEXT) \ - $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS) - -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 -# both the gdb and simulator source trees (e.g. devo/remote. Not -# devo/libremote because this directory would contain more than just -# a library). - -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 $(callback_h) targ-vals.h - $(CC) -c $(srccom)/syscall.c $(ALL_CFLAGS) - -targ-map.o: targ-map.c targ-vals.h - -gentmap: Makefile $(srccom)/gentmap.c targ-vals.def - $(CC_FOR_BUILD) $(srccom)/gentmap.c -o gentmap $(BUILD_CFLAGS) $(NL_TARGET) - -targ-vals.h targ-map.c: stamp-tvals -stamp-tvals: gentmap - rm -f tmp-tvals.h tmp-tmap.c - ./gentmap -h >tmp-tvals.h - $(SHELL) $(srcroot)/move-if-change tmp-tvals.h targ-vals.h - ./gentmap -c >tmp-tmap.c - $(SHELL) $(srcroot)/move-if-change tmp-tmap.c targ-map.c - touch stamp-tvals - -# -# Rules for building sim-* components. Triggered by listing the corresponding -# .o file in the list of simulator targets. -# - -sim_main_headers = \ - sim-main.h \ - $(sim-assert_h) \ - $(sim-base_h) \ - $(sim-cpu_h) \ - $(sim-engine_h) \ - $(sim-events_h) \ - $(sim-memopt_h) \ - $(sim-model_h) \ - $(sim-module_h) \ - $(sim-profile_h) \ - $(sim-trace_h) \ - $(sim-watch_h) \ - $(sim-basics_h) \ - $(SIM_EXTRA_DEPS) - -# Exported version of sim_main_headers. -SIM_MAIN_DEPS = \ - $(sim_main_headers) - -sim-alu_h = $(srccom)/sim-alu.h -sim-arange_h = $(srccom)/sim-arange.h \ - $(srccom)/sim-arange.c -sim-assert_h = $(srccom)/sim-assert.h -sim-base_h = $(srccom)/sim-base.h \ - $(sim-module_h) \ - $(sim-trace_h) \ - $(sim-core_h) \ - $(sim-events_h) \ - $(sim-profile_h) \ - $(sim-model_h) \ - $(sim-io_h) \ - $(sim-engine_h) \ - $(sim-watch_h) \ - $(sim-memopt_h) \ - $(sim-cpu_h) -sim-basics_h = $(srccom)/sim-basics.h \ - ../common/cconfig.h \ - tconfig.h \ - $(sim-config_h) \ - $(callback_h) \ - $(sim-inline_h) \ - $(sim-types_h) \ - $(sim-bits_h) \ - $(sim-endian_h) \ - $(sim-signal_h) \ - $(sim-arange_h) \ - $(sim-utils_h) -sim-bits_h = $(srccom)/sim-bits.h \ - $(srccom)/sim-bits.c -sim-config_h = $(srccom)/sim-config.h -sim-core_h = $(srccom)/sim-core.h -sim-cpu_h = $(srccom)/sim-cpu.h -sim-endian_h = $(srccom)/sim-endian.h \ - $(srccom)/sim-endian.c -sim-engine_h = $(srccom)/sim-engine.h -sim-events_h = $(srccom)/sim-events.h -sim-fpu_h = $(srccom)/sim-fpu.h -sim-hw_h = $(srccom)/sim-hw.h -sim-inline_h = $(srccom)/sim-inline.h -sim-io_h = $(srccom)/sim-io.h -sim-memopt_h = $(srccom)/sim-memopt.h -sim-model_h = $(srccom)/sim-model.h -sim-module_h = $(srccom)/sim-module.h -sim-n-bits_h = $(srccom)/sim-n-bits.h -sim-n-core_h = $(srccom)/sim-n-core.h -sim-n-endian_h = $(srccom)/sim-n-endian.h -sim-options_h = $(srccom)/sim-options.h -sim-profile_h = $(srccom)/sim-profile.h -sim-signal_h = $(srccom)/sim-signal.h -sim-trace_h = $(srccom)/sim-trace.h -sim-types_h = $(srccom)/sim-types.h -sim-utils_h = $(srccom)/sim-utils.h -sim-watch_h = $(srccom)/sim-watch.h - -hw-alloc_h = $(srccom)/hw-alloc.h -hw-base_h = $(srccom)/hw-base.h -hw-device_h = $(srccom)/hw-device.h -hw-events_h = $(srccom)/hw-events.h -hw-handles_h = $(srccom)/hw-handles.h -hw-instances_h = $(srccom)/hw-instances.h -hw-ports_h = $(srccom)/hw-ports.h -hw-properties_h = $(srccom)/hw-properties.h -hw-tree_h = $(srccom)/hw-tree.h - -hw_main_headers = \ - $(srccom)/hw-main.h \ - $(hw-alloc_h) \ - $(hw-base_h) \ - $(hw-device_h) \ - $(hw-events_h) \ - $(hw-instances_h) \ - $(hw-handles_h) \ - $(hw-ports_h) \ - $(hw-properties_h) \ - -# FIXME: If this complicated way of building .o files from ../common is -# necessary, the reason should be documented here. - -BUILT_SRC_FROM_COMMON= \ - sim-inline.c - -sim-abort.o: $(srccom)/sim-abort.c \ - $(SIM_EXTRA_DEPS) - $(CC) -c $(srccom)/sim-abort.c $(ALL_CFLAGS) - -sim-arange.o: $(srccom)/sim-arange.c $(sim-arange_h) $(SIM_EXTRA_DEPS) - $(CC) -c $(srccom)/sim-arange.c $(ALL_CFLAGS) - -sim-bits.o: $(srccom)/sim-bits.c $(sim-bits_h) $(sim-n-bits_h) \ - $(SIM_EXTRA_DEPS) - $(CC) -c $(srccom)/sim-bits.c $(ALL_CFLAGS) - -sim-config.o: $(srccom)/sim-config.c $(sim-config_h) sim-main.h \ - $(SIM_EXTRA_DEPS) - $(CC) -c $(srccom)/sim-config.c $(ALL_CFLAGS) - -sim-core.o: $(srccom)/sim-core.c $(sim_main_headers) \ - $(sim-core_h) $(sim-n-core_h) - $(CC) -c $(srccom)/sim-core.c $(ALL_CFLAGS) - -sim-cpu.o: $(srccom)/sim-cpu.c $(sim_main_headers) - $(CC) -c $(srccom)/sim-cpu.c $(ALL_CFLAGS) - -sim-endian.o: $(srccom)/sim-endian.c $(sim-endian_h) $(sim-n-endian_h) - $(CC) -c $(srccom)/sim-endian.c $(ALL_CFLAGS) - -sim-engine.o: $(srccom)/sim-engine.c $(sim_main_headers) $(sim-engine_h) - $(CC) -c $(srccom)/sim-engine.c $(ALL_CFLAGS) - -sim-events.o: $(srccom)/sim-events.c $(sim-events_h) sim-main.h \ - $(SIM_EXTRA_DEPS) - $(CC) -c $(srccom)/sim-events.c $(ALL_CFLAGS) - -sim-fpu.o: $(srccom)/sim-fpu.c $(sim-fpu_h) \ - $(SIM_EXTRA_DEPS) - $(CC) -c $(srccom)/sim-fpu.c $(ALL_CFLAGS) - -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) $(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) $(remote_sim_h) \ - $(SIM_EXTRA_DEPS) - $(CC) -c $(srccom)/sim-info.c $(ALL_CFLAGS) - -sim-inline.c: $(srccom)/sim-inline.c - rm -f $@ tmp-$@ - echo "# 1 \"$(srccom)/$@\"" > tmp-$@ - cat $(srccom)/$@ >> tmp-$@ - $(SHELL) $(srcdir)/../../move-if-change tmp-$@ $@ - -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) \ - $(sim-io_h) - $(CC) -c $(srccom)/sim-memopt.c $(ALL_CFLAGS) - -sim-module.o: $(srccom)/sim-module.c $(sim_main_headers) \ - $(sim-io_h) - $(CC) -c $(srccom)/sim-module.c $(ALL_CFLAGS) - -sim-options.o: $(srccom)/sim-options.c $(sim_main_headers) \ - $(sim-options_h) $(sim-io_h) - $(CC) -c $(srccom)/sim-options.c $(ALL_CFLAGS) - -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) $(remote_sim_h) - $(CC) -c $(srccom)/sim-reg.c $(ALL_CFLAGS) - -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) - $(CC) -c $(srccom)/sim-run.c $(ALL_CFLAGS) - -sim-signal.o: $(srccom)/sim-signal.c $(sim_main_headers) $(sim-signal_h) - $(CC) -c $(srccom)/sim-signal.c $(ALL_CFLAGS) - -sim-stop.o: $(srccom)/sim-stop.c $(sim_main_headers) - $(CC) -c $(srccom)/sim-stop.c $(ALL_CFLAGS) - -sim-trace.o: $(srccom)/sim-trace.c $(sim_main_headers) \ - $(sim-options_h) $(sim-io_h) - $(CC) -c $(srccom)/sim-trace.c $(ALL_CFLAGS) - -sim-profile.o: $(srccom)/sim-profile.c $(sim_main_headers) \ - $(sim-options_h) $(sim-io_h) - $(CC) -c $(srccom)/sim-profile.c $(ALL_CFLAGS) - -sim-model.o: $(srccom)/sim-model.c $(sim_main_headers) \ - $(sim-io_h) - $(CC) -c $(srccom)/sim-model.c $(ALL_CFLAGS) - -sim-utils.o: $(srccom)/sim-utils.c $(sim_main_headers) - $(CC) -c $(srccom)/sim-utils.c $(ALL_CFLAGS) - -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 $(callback_h) $(sim-basics_h) $(remote_sim_h) - $(CC) -c $(srccom)/sim-load.c $(ALL_CFLAGS) - - -# FIXME This is one very simple-minded way of generating the file hw-config.h -hw-config.h: Makefile.in $(srccom)/Make-common.in config.status Makefile - rm -f tmp-hw.h - echo "/* generated by Makefile */" > tmp-hw.h - for hw in $(SIM_HW) ; do \ - echo "extern const struct hw_descriptor dv_$${hw}_descriptor[];" ; \ - done >> tmp-hw.h - echo "const struct hw_descriptor *hw_descriptors[] = {" >> tmp-hw.h - for hw in $(SIM_HW) ; do \ - echo " dv_$${hw}_descriptor," ; \ - done >> tmp-hw.h - echo " NULL," >> tmp-hw.h - echo "};" >> tmp-hw.h - mv tmp-hw.h hw-config.h - -hw-alloc.o: $(srccom)/hw-alloc.c $(hw_main_headers) - $(CC) -c $(srccom)/hw-alloc.c $(ALL_CFLAGS) - -hw-base.o: $(srccom)/hw-base.c $(hw_main_headers) hw-config.h - $(CC) -c $(srccom)/hw-base.c $(ALL_CFLAGS) - -hw-device.o: $(srccom)/hw-device.c $(hw_main_headers) - $(CC) -c $(srccom)/hw-device.c $(ALL_CFLAGS) - -hw-events.o: $(srccom)/hw-events.c $(hw_main_headers) $(sim_main_headers) - $(CC) -c $(srccom)/hw-events.c $(ALL_CFLAGS) - -test-hw-events: $(srccom)/hw-events.c libsim.a - $(CC) $(ALL_CFLAGS) -DMAIN -o test-hw-events$(EXEEXT) \ - $(srccom)/hw-events.c libsim.a $(EXTRA_LIBS) - -hw-instances.o: $(srccom)/hw-instances.c $(hw_main_headers) - $(CC) -c $(srccom)/hw-instances.c $(ALL_CFLAGS) - -hw-handles.o: $(srccom)/hw-handles.c $(hw_main_headers) - $(CC) -c $(srccom)/hw-handles.c $(ALL_CFLAGS) - -hw-ports.o: $(srccom)/hw-ports.c $(hw_main_headers) - $(CC) -c $(srccom)/hw-ports.c $(ALL_CFLAGS) - -hw-properties.o: $(srccom)/hw-properties.c $(hw_main_headers) - $(CC) -c $(srccom)/hw-properties.c $(ALL_CFLAGS) - -hw-tree.o: $(srccom)/hw-tree.c $(hw_main_headers) $(hw-tree_h) - $(CC) -c $(srccom)/hw-tree.c $(ALL_CFLAGS) - -# Devices. - -dv-core.o: $(srccom)/dv-core.c $(hw_main_headers) $(sim_main_headers) - $(CC) -c $(srccom)/dv-core.c $(ALL_CFLAGS) - -dv-glue.o: $(srccom)/dv-glue.c $(hw_main_headers) $(sim_main_headers) - $(CC) -c $(srccom)/dv-glue.c $(ALL_CFLAGS) - -dv-pal.o: $(srccom)/dv-pal.c $(hw_main_headers) $(sim_main_headers) - $(CC) -c $(srccom)/dv-pal.c $(ALL_CFLAGS) - -dv-sockser.o: $(srccom)/dv-sockser.h $(sim_main_headers) - $(CC) -c $(srccom)/dv-sockser.c $(ALL_CFLAGS) - - -nrun.o: $(srccom)/nrun.c config.h tconfig.h $(remote_sim_h) $(callback_h) \ - $(sim_main_headers) - $(CC) -c $(srccom)/nrun.c $(ALL_CFLAGS) - -# CGEN support. - -# For use in Makefile.in for cpu-specific files. -CGEN_MAIN_CPU_DEPS = \ - $(SIM_MAIN_DEPS) \ - $(CGEN_INCLUDE_DEPS) \ - $(srccom)/cgen-ops.h \ - $(srccom)/cgen-mem.h \ - $(srccom)/cgen-par.h \ - $(srccom)/cgen-fpu.h - -cgen-run.o: $(srccom)/cgen-run.c $(sim_main_headers) - $(CC) -c $(srccom)/cgen-run.c $(ALL_CFLAGS) - -cgen-scache.o: $(srccom)/cgen-scache.c $(sim_main_headers) - $(CC) -c $(srccom)/cgen-scache.c $(ALL_CFLAGS) - -cgen-trace.o: $(srccom)/cgen-trace.c $(sim_main_headers) - $(CC) -c $(srccom)/cgen-trace.c $(ALL_CFLAGS) - -cgen-fpu.o: $(srccom)/cgen-fpu.c $(sim_main_headers) $(sim-fpu_h) - $(CC) -c $(srccom)/cgen-fpu.c $(ALL_CFLAGS) - -cgen-accfp.o: $(srccom)/cgen-accfp.c $(sim_main_headers) $(sim-fpu_h) - $(CC) -c $(srccom)/cgen-accfp.c $(ALL_CFLAGS) - -cgen-utils.o: $(srccom)/cgen-utils.c $(sim_main_headers) \ - $(srccom)/cgen-mem.h $(srccom)/cgen-ops.h $(srccom)/cgen-engine.h - $(CC) -c $(srccom)/cgen-utils.c $(ALL_CFLAGS) - -cgen-par.o: $(srccom)/cgen-par.c $(sim_main_headers) \ - $(srccom)/cgen-mem.h $(srccom)/cgen-par.h - $(CC) -c $(srccom)/cgen-par.c $(ALL_CFLAGS) - -# Support targets. - -install: install-common $(SIM_EXTRA_INSTALL) - -install-common: installdirs - n=`echo run | sed '$(program_transform_name)'`; \ - $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT) - n=`echo libsim.a | sed s/libsim.a/lib$(target_alias)-sim.a/`; \ - $(INSTALL_DATA) libsim.a $(DESTDIR)$(libdir)/$$n ; \ - ( cd $(DESTDIR)$(libdir) ; $(RANLIB) $$n ) - -installdirs: - $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir) - $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir) - -check: - cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)" - -info: -clean-info: -install-info: - -.NOEXPORT: -MAKEOVERRIDES= - -tags etags: TAGS - -# Macros like EXTERN_SIM_CORE confuse tags. -# And the sim-n-foo.h files create functions that can't be found either. -TAGS: force - cd $(srcdir) && \ - etags --regex '/^\([a-z_]+\) (/\1/' --regex '/^\/[*] TAGS: .*/' \ - *.[ch] ../common/*.[ch] - -clean: $(SIM_EXTRA_CLEAN) - rm -f *.[oa] *~ core - rm -f run$(EXEEXT) libsim.a - rm -f gentmap targ-map.c targ-vals.h stamp-tvals - if [ ! -f Make-common.in ] ; then \ - rm -f $(BUILT_SRC_FROM_COMMON) ; \ - fi - rm -f tmp-mloop.hin tmp-mloop.h tmp-mloop.cin tmp-mloop.c - -distclean mostlyclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN) - rm -f TAGS - rm -f Makefile config.cache config.log config.status .gdbinit - rm -f tconfig.h config.h stamp-h - rm -f targ-vals.def - -.c.o: - $(CC) -c $(ALL_CFLAGS) $< - -# Dummy target to force execution of dependent targets. -force: - -Makefile: Makefile.in $(srccom)/Make-common.in config.status - CONFIG_HEADERS= $(SHELL) ./config.status - -config.status: configure - $(SHELL) ./config.status --recheck - -config.h: stamp-h ; @true -stamp-h: config.in config.status - CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status - -.gdbinit: # config.status $(srccom)/gdbinit.in - CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status - - -# CGEN support - -CGENDIR = @cgendir@ -CGEN = "`if [ -f ../../guile/libguile/guile ]; then echo ../../guile/libguile/guile; else echo guile ; fi` -l $(CGENDIR)/guile.scm -s" -CGENFLAGS = -v -CGEN_CPU_DIR = $(CGENDIR)/cpu - -CGEN_READ_SCM = $(CGENDIR)/sim.scm -CGEN_ARCH_SCM = $(CGENDIR)/sim-arch.scm -CGEN_CPU_SCM = $(CGENDIR)/sim-cpu.scm $(CGENDIR)/sim-model.scm -CGEN_DECODE_SCM = $(CGENDIR)/sim-decode.scm -CGEN_DESC_SCM = $(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm - -# Various choices for which cpu specific files to generate. -CGEN_CPU_EXTR = -E tmp-ext.c1 -CGEN_CPU_READ = -R tmp-read.c1 -CGEN_CPU_WRITE = -W tmp-write.c1 -CGEN_CPU_SEM = -S tmp-sem.c1 -CGEN_CPU_SEMSW = -X tmp-semsw.c1 - -CGEN_FLAGS_TO_PASS = \ - CGEN='$(CGEN)' \ - CGENFLAGS="$(CGENFLAGS)" - -# We store the generated files in the source directory until we decide to -# ship a Scheme interpreter with gdb/binutils. Maybe we never will. - -cgen-arch: force - $(SHELL) $(srccom)/cgen.sh arch $(srcdir) \ - $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \ - $(arch) "$(FLAGS)" ignored "$(isa)" $(mach) ignored \ - $(archfile) ignored - -cgen-cpu: force - $(SHELL) $(srccom)/cgen.sh cpu $(srcdir) \ - $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \ - $(arch) "$(FLAGS)" $(cpu) "$(isa)" $(mach) "$(SUFFIX)" \ - $(archfile) "$(EXTRAFILES)" - -cgen-defs: force - $(SHELL) $(srccom)/cgen.sh defs $(srcdir) \ - $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \ - $(arch) "$(FLAGS)" $(cpu) "$(isa)" $(mach) "$(SUFFIX)" \ - $(archfile) ignored - -cgen-decode: force - $(SHELL) $(srccom)/cgen.sh decode $(srcdir) \ - $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \ - $(arch) "$(FLAGS)" $(cpu) "$(isa)" $(mach) "$(SUFFIX)" \ - $(archfile) "$(EXTRAFILES)" - -cgen-cpu-decode: force - $(SHELL) $(srccom)/cgen.sh cpu-decode $(srcdir) \ - $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \ - $(arch) "$(FLAGS)" $(cpu) "$(isa)" $(mach) "$(SUFFIX)" \ - $(archfile) "$(EXTRAFILES)" - -cgen-desc: force - $(SHELL) $(srccom)/cgen.sh desc $(srcdir) \ - $(CGEN) $(CGENDIR) "$(CGENFLAGS)" \ - $(arch) "$(FLAGS)" $(cpu) "$(isa)" $(mach) "$(SUFFIX)" \ - $(archfile) ignored $(opcfile) - -## End COMMON_POST_CONFIG_FRAG diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in deleted file mode 100644 index 37c1850..0000000 --- a/sim/common/Makefile.in +++ /dev/null @@ -1,135 +0,0 @@ -# Makefile template for Configure for simulator common directory -# Copyright (C) 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. - -default: all - -VPATH = @srcdir@ -srcdir = @srcdir@ -srcroot = $(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 = $(libdir)/$(target_alias) - -datadir = @datadir@ -mandir = @mandir@ -man1dir = $(mandir)/man1 -infodir = @infodir@ -includedir = @includedir@ - -SHELL = /bin/sh - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ - -CC = @CC@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -SIM_CFLAGS = @sim_cflags@ - -# These are used to rebuild nltvals.def. -CPP_FOR_TARGET = @CPP_FOR_TARGET@ -TARGET_SUBDIR = @TARGET_SUBDIR@ - -HDEFINES = @HDEFINES@ -TDEFINES = - -CONFIG_CFLAGS = @DEFS@ $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) -CSEARCH = -I. -I$(srcdir) -I$(srcroot)/include -ALL_CFLAGS = $(CFLAGS) $(CONFIG_CFLAGS) $(CSEARCH) -BUILD_CFLAGS = -g -O $(CSEARCH) - -AR = @AR@ -AR_FLAGS = rc -RANLIB = @RANLIB@ -MAKEINFO = makeinfo - -.NOEXPORT: -MAKEOVERRIDES= - -all: - -# Generate nltvals.def for newlib/libgloss using devo and build tree. -# This file is shipped with distributions so we build in the source dir. -# Use `make headers' to rebuild. -# Note: If gdb releases begin to contain target header files (not a good idea, -# but if they did ...), targ-vals.def coud be generated at build time. -# An alternative is to slurp in the tables at runtime. -.PHONY: headers -headers: - rootme=`pwd` ; \ - cd $(srcdir) ; \ - rm -f nltvals.new ; \ - $(SHELL) $(srcdir)/gennltvals.sh $(SHELL) $(srcroot) "$(CPP_FOR_TARGET)" > nltvals.new ; \ - $(SHELL) $(srcroot)/move-if-change nltvals.new nltvals.def - -.c.o: - $(CC) -c $< $(ALL_CFLAGS) - -check: - -info: -clean-info: -install-info: - -tags etags: TAGS - -# Macros like EXTERN_SIM_CORE confuse tags. -# And the sim-n-foo.h files create functions that can't be found either. -TAGS: force - cd $(srcdir) && \ - etags --regex '/^\([a-z_]+\) (/\1/' --regex '/^.*\/[*] TAGS: .*/' \ - *.c *.h - -clean: - rm -f *.[oa] *~ core - -distclean mostlyclean maintainer-clean realclean: clean - rm -f TAGS - rm -f Makefile config.cache config.log config.status - rm -f cconfig.h config.h stamp-h - -# Dummy target to force execution of dependent targets. -force: - -# Copy the files into directories where they will be run. -install: install-man - -install-man: installdirs - n=`echo run | sed '$(program_transform_name)'`; \ - $(INSTALL_DATA) $(srcdir)/run.1 $(DESTDIR)$(man1dir)/$$n.1 - -installdirs: - $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(man1dir) - -Makefile: Makefile.in config.status - $(SHELL) ./config.status - -config.status: configure - $(SHELL) ./config.status --recheck - -config.h: stamp-h ; @true -stamp-h: config.in config.status - CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status diff --git a/sim/common/acconfig.h b/sim/common/acconfig.h deleted file mode 100644 index f9b87a1..0000000 --- a/sim/common/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/common/aclocal.m4 b/sim/common/aclocal.m4 deleted file mode 100644 index 615f330..0000000 --- a/sim/common/aclocal.m4 +++ /dev/null @@ -1,999 +0,0 @@ -# This file contains common code used by all simulators. -# -# SIM_AC_COMMON invokes AC macros used by all simulators and by the common -# directory. It is intended to be invoked before any target specific stuff. -# SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate the Makefile. -# It is intended to be invoked last. -# -# The simulator's configure.in should look like: -# -# 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 -# -# ... target specific stuff ... -# -# SIM_AC_OUTPUT - -AC_DEFUN(SIM_AC_COMMON, -[ -# autoconf.info says this should be called right after AC_INIT. -AC_CONFIG_HEADER(ifelse([$1],,config.h,[$1]):config.in) -AC_CANONICAL_SYSTEM -AC_ARG_PROGRAM -AC_PROG_CC -AC_PROG_INSTALL - -# 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) - -AC_SUBST(CFLAGS) -AC_SUBST(HDEFINES) -AR=${AR-ar} -AC_SUBST(AR) -AC_PROG_RANLIB - -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= -ZW_GNU_GETTEXT_SISTER_DIR(../../intl) - -# 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*. -AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h) -AC_CHECK_HEADERS(sys/time.h sys/resource.h) -AC_CHECK_HEADERS(fcntl.h fpu_control.h) -AC_CHECK_HEADERS(dlfcn.h errno.h sys/stat.h) -AC_CHECK_FUNCS(getrusage time sigaction __setfpucw) - -# Check for socket libraries -AC_CHECK_LIB(socket, bind) -AC_CHECK_LIB(nsl, gethostbyname) - -. ${srcdir}/../../bfd/configure.host - -dnl Standard (and optional) simulator options. -dnl Eventually all simulators will support these. -dnl Do not add any here that cannot be supported by all simulators. -dnl Do not add similar but different options to a particular simulator, -dnl all shall eventually behave the same way. - - -dnl We don't use automake, but we still want to support -dnl --enable-maintainer-mode. -USE_MAINTAINER_MODE=no -AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode Enable developer functionality.], -[case "${enableval}" in - yes) MAINT="" USE_MAINTAINER_MODE=yes ;; - no) MAINT="#" ;; - *) AC_MSG_ERROR("--enable-maintainer-mode does not take a value"); MAINT="#" ;; -esac -if test x"$silent" != x"yes" && test x"$MAINT" = x""; then - echo "Setting maintainer mode" 6>&1 -fi],[MAINT="#"])dnl -AC_SUBST(MAINT) - - -dnl This is a generic option to enable special byte swapping -dnl insns on *any* cpu. -AC_ARG_ENABLE(sim-bswap, -[ --enable-sim-bswap Use Host specific BSWAP instruction.], -[case "${enableval}" in - yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";; - no) sim_bswap="-DWITH_BSWAP=0";; - *) AC_MSG_ERROR("--enable-sim-bswap does not take a value"); sim_bswap="";; -esac -if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then - echo "Setting bswap flags = $sim_bswap" 6>&1 -fi],[sim_bswap=""])dnl -AC_SUBST(sim_bswap) - - -AC_ARG_ENABLE(sim-cflags, -[ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator], -[case "${enableval}" in - yes) sim_cflags="-O2 -fomit-frame-pointer";; - trace) AC_MSG_ERROR("Please use --enable-sim-debug instead."); 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],[sim_cflags=""])dnl -AC_SUBST(sim_cflags) - - -dnl --enable-sim-debug is for developers of the simulator -dnl the allowable values are work-in-progress -AC_ARG_ENABLE(sim-debug, -[ --enable-sim-debug=opts Enable debugging flags], -[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],[sim_debug=""])dnl -AC_SUBST(sim_debug) - - -dnl --enable-sim-stdio is for users of the simulator -dnl It determines if IO from the program is routed through STDIO (buffered) -AC_ARG_ENABLE(sim-stdio, -[ --enable-sim-stdio Specify whether to use stdio for console input/output.], -[case "${enableval}" in - yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; - no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-stdio"); sim_stdio="";; -esac -if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then - echo "Setting stdio flags = $sim_stdio" 6>&1 -fi],[sim_stdio=""])dnl -AC_SUBST(sim_stdio) - - -dnl --enable-sim-trace is for users of the simulator -dnl The argument is either a bitmask of things to enable [exactly what is -dnl up to the simulator], or is a comma separated list of names of tracing -dnl elements to enable. The latter is only supported on simulators that -dnl use WITH_TRACE. -AC_ARG_ENABLE(sim-trace, -[ --enable-sim-trace=opts Enable tracing flags], -[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],[sim_trace=""])dnl -AC_SUBST(sim_trace) - - -dnl --enable-sim-profile -dnl The argument is either a bitmask of things to enable [exactly what is -dnl up to the simulator], or is a comma separated list of names of profiling -dnl elements to enable. The latter is only supported on simulators that -dnl use WITH_PROFILE. -AC_ARG_ENABLE(sim-profile, -[ --enable-sim-profile=opts Enable profiling flags], -[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],[sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"])dnl -AC_SUBST(sim_profile) - - -dnl Types used by common code -AC_TYPE_SIGNAL - -dnl Detect exe extension -AC_EXEEXT - -dnl These are available to append to as desired. -sim_link_files= -sim_link_links= - -dnl Create tconfig.h either from simulator's tconfig.in or default one -dnl in common. -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" - -]) dnl End of SIM_AC_COMMON - - -dnl Additional SIM options that can (optionally) be configured -dnl For optional simulator options, a macro SIM_AC_OPTION_* is defined. -dnl Simulators that wish to use the relevant option specify the macro -dnl in the simulator specific configure.in file between the SIM_AC_COMMON -dnl and SIM_AC_OUTPUT lines. - - -dnl Specify the running environment. -dnl If the simulator invokes this in its configure.in then without this option -dnl the default is the user environment and all are runtime selectable. -dnl If the simulator doesn't invoke this, only the user environment is -dnl supported. -dnl ??? Until there is demonstrable value in doing something more complicated, -dnl let's not. -AC_DEFUN(SIM_AC_OPTION_ENVIRONMENT, -[ -AC_ARG_ENABLE(sim-environment, -[ --enable-sim-environment=environment Specify mixed, user, virtual or operating 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";; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-environment"); - sim_environment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_environment" != x""; then - echo "Setting sim environment = $sim_environment" 6>&1 -fi], -[sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT"])dnl -]) -AC_SUBST(sim_environment) - - -dnl Specify the alignment restrictions of the target architecture. -dnl Without this option all possible alignment restrictions are accommodated. -dnl arg[1] is hardwired target alignment -dnl arg[2] is default target alignment -AC_DEFUN(SIM_AC_OPTION_ALIGNMENT, -wire_alignment="[$1]" -default_alignment="[$2]" -[ -AC_ARG_ENABLE(sim-alignment, -[ --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses.], -[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;; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";; -esac -if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then - echo "Setting alignment flags = $sim_alignment" 6>&1 -fi], -[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])dnl -])dnl -AC_SUBST(sim_alignment) - - -dnl Conditionally compile in assertion statements. -AC_DEFUN(SIM_AC_OPTION_ASSERT, -[ -AC_ARG_ENABLE(sim-assert, -[ --enable-sim-assert Specify whether to perform random assertions.], -[case "${enableval}" in - yes) sim_assert="-DWITH_ASSERT=1";; - no) sim_assert="-DWITH_ASSERT=0";; - *) AC_MSG_ERROR("--enable-sim-assert does not take a value"); sim_assert="";; -esac -if test x"$silent" != x"yes" && test x"$sim_assert" != x""; then - echo "Setting assert flags = $sim_assert" 6>&1 -fi],[sim_assert=""])dnl -]) -AC_SUBST(sim_assert) - - - -dnl --enable-sim-bitsize is for developers of the simulator -dnl It specifies the number of BITS in the target. -dnl arg[1] is the number of bits in a word -dnl arg[2] is the number assigned to the most significant bit -dnl arg[3] is the number of bits in an address -dnl arg[4] is the number of bits in an OpenFirmware cell. -dnl FIXME: this information should be obtained from bfd/archure -AC_DEFUN(SIM_AC_OPTION_BITSIZE, -wire_word_bitsize="[$1]" -wire_word_msb="[$2]" -wire_address_bitsize="[$3]" -wire_cell_bitsize="[$4]" -[AC_ARG_ENABLE(sim-bitsize, -[ --enable-sim-bitsize=N Specify target bitsize (32 or 64).], -[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 ;; - *) AC_MSG_ERROR("--enable-sim-bitsize was given $enableval. Expected 32 or 64") ;; -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" ;; - * ) AC_MSG_ERROR("--enable-sim-bitsize was given address size $enableval. Expected 32 or 64") ;; -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" ;; - * ) AC_MSG_ERROR("--enable-sim-bitsize was given cell size $enableval. Expected 32 or 64") ;; -esac -if test x"$silent" != x"yes" && test x"$sim_bitsize" != x""; then - echo "Setting bitsize flags = $sim_bitsize" 6>&1 -fi], -[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])dnl -]) -AC_SUBST(sim_bitsize) - - - -dnl --enable-sim-endian={yes,no,big,little} is for simulators -dnl that support both big and little endian targets. -dnl arg[1] is hardwired target endianness. -dnl arg[2] is default target endianness. -AC_DEFUN(SIM_AC_OPTION_ENDIAN, -[ -wire_endian="[$1]" -default_endian="[$2]" -AC_ARG_ENABLE(sim-endian, -[ --enable-sim-endian=endian Specify target byte endian orientation.], -[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;; - *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-endian"); sim_endian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then - echo "Setting endian flags = $sim_endian" 6>&1 -fi], -[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])dnl -]) -AC_SUBST(sim_endian) - - -dnl --enable-sim-hostendian is for users of the simulator when -dnl they find that AC_C_BIGENDIAN does not function correctly -dnl (for instance in a canadian cross) -AC_DEFUN(SIM_AC_OPTION_HOSTENDIAN, -[ -AC_ARG_ENABLE(sim-hostendian, -[ --enable-sim-hostendian=end Specify host byte endian orientation.], -[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";; - *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-hostendian"); sim_hostendian="";; -esac -if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then - echo "Setting hostendian flags = $sim_hostendian" 6>&1 -fi],[ -if test "x$cross_compiling" = "xno"; then - AC_C_BIGENDIAN - 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])dnl -]) -AC_SUBST(sim_hostendian) - - -dnl --enable-sim-float is for developers of the simulator -dnl It specifies the presence of hardware floating point -dnl And optionally the bitsize of the floating point register. -dnl arg[1] specifies the presence (or absence) of floating point hardware -dnl arg[2] specifies the number of bits in a floating point register -AC_DEFUN(SIM_AC_OPTION_FLOAT, -[ -default_sim_float="[$1]" -default_sim_float_bitsize="[$2]" -AC_ARG_ENABLE(sim-float, -[ --enable-sim-float Specify that the target processor has floating point hardware.], -[case "${enableval}" in - yes | hard) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";; - no | soft) sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";; - 32) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=32";; - 64) sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64";; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";; -esac -if test x"$silent" != x"yes" && test x"$sim_float" != x""; then - echo "Setting float flags = $sim_float" 6>&1 -fi],[ -sim_float= -if test x"${default_sim_float}" != x""; then - sim_float="-DWITH_FLOATING_POINT=${default_sim_float}" -fi -if test x"${default_sim_float_bitsize}" != x""; then - sim_float="$sim_float -DWITH_TARGET_FLOATING_POINT_BITSIZE=${default_sim_float_bitsize}" -fi -])dnl -]) -AC_SUBST(sim_float) - - -dnl The argument is the default cache size if none is specified. -AC_DEFUN(SIM_AC_OPTION_SCACHE, -[ -default_sim_scache="ifelse([$1],,0,[$1])" -AC_ARG_ENABLE(sim-scache, -[ --enable-sim-scache=size Specify simulator execution cache size.], -[case "${enableval}" in - yes) sim_scache="-DWITH_SCACHE=${default_sim_scache}";; - no) sim_scache="-DWITH_SCACHE=0" ;; - [[0-9]]*) sim_scache="-DWITH_SCACHE=${enableval}";; - *) AC_MSG_ERROR("Bad value $enableval passed to --enable-sim-scache"); - sim_scache="";; -esac -if test x"$silent" != x"yes" && test x"$sim_scache" != x""; then - echo "Setting scache size = $sim_scache" 6>&1 -fi],[sim_scache="-DWITH_SCACHE=${default_sim_scache}"]) -]) -AC_SUBST(sim_scache) - - -dnl The argument is the default model if none is specified. -AC_DEFUN(SIM_AC_OPTION_DEFAULT_MODEL, -[ -default_sim_default_model="ifelse([$1],,0,[$1])" -AC_ARG_ENABLE(sim-default-model, -[ --enable-sim-default-model=model Specify default model to simulate.], -[case "${enableval}" in - yes|no) AC_MSG_ERROR("Missing argument to --enable-sim-default-model");; - *) 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],[sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"]) -]) -AC_SUBST(sim_default_model) - - -dnl --enable-sim-hardware is for users of the simulator -dnl arg[1] Enable sim-hw by default? ("yes" or "no") -dnl arg[2] is a space separated list of devices that override the defaults -dnl arg[3] is a space separated list of extra target specific devices. -AC_DEFUN(SIM_AC_OPTION_HARDWARE, -[ -if test x"[$1]" = x"yes"; then - sim_hw_p=yes -else - sim_hw_p=no -fi -if test "[$2]"; then - hardware="core pal glue" -else - hardware="core pal glue [$3]" -fi -sim_hw_cflags="-DWITH_HW=1" -sim_hw="$hardware" -sim_hw_objs="\$(SIM_COMMON_HW_OBJS) `echo $sim_hw | sed -e 's/\([[^ ]][[^ ]]*\)/dv-\1.o/g'`" -AC_ARG_ENABLE(sim-hardware, -[ --enable-sim-hardware=LIST Specify the hardware to be included in the build.], -[ -case "${enableval}" in - yes) sim_hw_p=yes;; - no) sim_hw_p=no;; - ,*) sim_hw_p=yes; hardware="${hardware} `echo ${enableval} | sed -e 's/,/ /'`";; - *,) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'` ${hardware}";; - *) sim_hw_p=yes; hardware="`echo ${enableval} | sed -e 's/,/ /'`"'';; -esac -if test "$sim_hw_p" != yes; then - sim_hw_objs= - sim_hw_cflags="-DWITH_HW=0" - sim_hw= -else - sim_hw_cflags="-DWITH_HW=1" - # remove duplicates - sim_hw="" - sim_hw_objs="\$(SIM_COMMON_HW_OBJS)" - for i in $hardware ; do - case " $sim_hw " in - *" $i "*) ;; - *) sim_hw="$sim_hw $i" ; sim_hw_objs="$sim_hw_objs dv-$i.o";; - esac - done -fi -if test x"$silent" != x"yes" && test "$sim_hw_p" = "yes"; then - echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" -fi],[ -if test "$sim_hw_p" != yes; then - sim_hw_objs= - sim_hw_cflags="-DWITH_HW=0" - sim_hw= -fi -if test x"$silent" != x"yes"; then - echo "Setting hardware to $sim_hw_cflags, $sim_hw, $sim_hw_objs" -fi])dnl -]) -AC_SUBST(sim_hw_cflags) -AC_SUBST(sim_hw_objs) -AC_SUBST(sim_hw) - - -dnl --enable-sim-inline is for users that wish to ramp up the simulator's -dnl performance by inlining functions. -dnl Guarantee that unconfigured simulators do not do any inlining -sim_inline="-DDEFAULT_INLINE=0" -AC_DEFUN(SIM_AC_OPTION_INLINE, -[ -default_sim_inline="ifelse([$1],,,-DDEFAULT_INLINE=[$1])" -AC_ARG_ENABLE(sim-inline, -[ --enable-sim-inline=inlines Specify which functions should be inlined.], -[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],[ -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])dnl -]) -AC_SUBST(sim_inline) - - -AC_DEFUN(SIM_AC_OPTION_PACKAGES, -[ -AC_ARG_ENABLE(sim-packages, -[ --enable-sim-packages=list Specify the packages to be included in the build.], -[packages=disklabel -case "${enableval}" in - yes) ;; - no) AC_MSG_ERROR("List of packages must be specified for --enable-sim-packages"); packages="";; - ,*) packages="${packages}${enableval}";; - *,) packages="${enableval}${packages}";; - *) packages="${enableval}"'';; -esac -sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'` -sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'` -if test x"$silent" != x"yes" && test x"$packages" != x""; then - echo "Setting packages to $sim_pk_src, $sim_pk_obj" -fi],[packages=disklabel -sim_pk_src=`echo $packages | sed -e 's/,/.c pk_/g' -e 's/^/pk_/' -e 's/$/.c/'` -sim_pk_obj=`echo $sim_pk_src | sed -e 's/\.c/.o/g'` -if test x"$silent" != x"yes"; then - echo "Setting packages to $sim_pk_src, $sim_pk_obj" -fi])dnl -]) -AC_SUBST(sim_packages) - - -AC_DEFUN(SIM_AC_OPTION_REGPARM, -[ -AC_ARG_ENABLE(sim-regparm, -[ --enable-sim-regparm=nr-parm Pass parameters in registers instead of on the stack - x86/GCC specific.], -[case "${enableval}" in - 0*|1*|2*|3*|4*|5*|6*|7*|8*|9*) sim_regparm="-DWITH_REGPARM=${enableval}";; - no) sim_regparm="" ;; - yes) sim_regparm="-DWITH_REGPARM=3";; - *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-regparm"); sim_regparm="";; -esac -if test x"$silent" != x"yes" && test x"$sim_regparm" != x""; then - echo "Setting regparm flags = $sim_regparm" 6>&1 -fi],[sim_regparm=""])dnl -]) -AC_SUBST(sim_regparm) - - -AC_DEFUN(SIM_AC_OPTION_RESERVED_BITS, -[ -default_sim_reserved_bits="ifelse([$1],,1,[$1])" -AC_ARG_ENABLE(sim-reserved-bits, -[ --enable-sim-reserved-bits Specify whether to check reserved bits in instruction.], -[case "${enableval}" in - yes) sim_reserved_bits="-DWITH_RESERVED_BITS=1";; - no) sim_reserved_bits="-DWITH_RESERVED_BITS=0";; - *) AC_MSG_ERROR("--enable-sim-reserved-bits does not take a value"); 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],[sim_reserved_bits="-DWITH_RESERVED_BITS=${default_sim_reserved_bits}"])dnl -]) -AC_SUBST(sim_reserved_bits) - - -AC_DEFUN(SIM_AC_OPTION_SMP, -[ -default_sim_smp="ifelse([$1],,5,[$1])" -AC_ARG_ENABLE(sim-smp, -[ --enable-sim-smp=n Specify number of processors to configure for (default ${default_sim_smp}).], -[case "${enableval}" in - yes) sim_smp="-DWITH_SMP=5" ; sim_igen_smp="-N 5";; - no) sim_smp="-DWITH_SMP=0" ; sim_igen_smp="-N 0";; - *) sim_smp="-DWITH_SMP=$enableval" ; sim_igen_smp="-N $enableval";; -esac -if test x"$silent" != x"yes" && test x"$sim_smp" != x""; then - echo "Setting smp flags = $sim_smp" 6>&1 -fi],[sim_smp="-DWITH_SMP=${default_sim_smp}" ; sim_igen_smp="-N ${default_sim_smp}" -if test x"$silent" != x"yes"; then - echo "Setting smp flags = $sim_smp" 6>&1 -fi])dnl -]) -AC_SUBST(sim_smp) - - -AC_DEFUN(SIM_AC_OPTION_STDCALL, -[ -AC_ARG_ENABLE(sim-stdcall, -[ --enable-sim-stdcall=type Use an alternative function call/return mechanism - x86/GCC specific.], -[case "${enableval}" in - no) sim_stdcall="" ;; - std*) sim_stdcall="-DWITH_STDCALL=1";; - yes) sim_stdcall="-DWITH_STDCALL=1";; - *) AC_MSG_ERROR("Unknown value $enableval for --enable-sim-stdcall"); sim_stdcall="";; -esac -if test x"$silent" != x"yes" && test x"$sim_stdcall" != x""; then - echo "Setting function call flags = $sim_stdcall" 6>&1 -fi],[sim_stdcall=""])dnl -]) -AC_SUBST(sim_stdcall) - - -AC_DEFUN(SIM_AC_OPTION_XOR_ENDIAN, -[ -default_sim_xor_endian="ifelse([$1],,8,[$1])" -AC_ARG_ENABLE(sim-xor-endian, -[ --enable-sim-xor-endian=n Specify number bytes involved in XOR bi-endian mode (default ${default_sim_xor_endian}).], -[case "${enableval}" in - yes) sim_xor_endian="-DWITH_XOR_ENDIAN=8";; - no) sim_xor_endian="-DWITH_XOR_ENDIAN=0";; - *) sim_xor_endian="-DWITH_XOR_ENDIAN=$enableval";; -esac -if test x"$silent" != x"yes" && test x"$sim_xor_endian" != x""; then - echo "Setting xor-endian flag = $sim_xor_endian" 6>&1 -fi],[sim_xor_endian="-DWITH_XOR_ENDIAN=${default_sim_xor_endian}"])dnl -]) -AC_SUBST(sim_xor_endian) - - -dnl --enable-build-warnings is for developers of the simulator. -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" -# GCC supports -Wuninitialized only with -O or -On, n != 0. -if test x${CFLAGS+set} = xset; then - case "${CFLAGS}" in - *"-O0"* ) ;; - *"-O"* ) - build_warnings="${build_warnings} -Wuninitialized" - ;; - esac -else - build_warnings="${build_warnings} -Wuninitialized" -fi -# 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 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}";; - *,) 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 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 - 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) - - -dnl Generate the Makefile in a target specific directory. -dnl Substitutions aren't performed on the file in AC_SUBST_FILE, -dnl so this is a cover macro to tuck the details away of how we cope. -dnl We cope by having autoconf generate two files and then merge them into -dnl one afterwards. The two pieces of the common fragment are inserted into -dnl the target's fragment at the appropriate points. - -AC_DEFUN(SIM_AC_OUTPUT, -[ -AC_LINK_FILES($sim_link_files, $sim_link_links) -dnl Make @cgen_breaks@ non-null only if the sim uses CGEN. -cgen_breaks="" -if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then -cgen_breaks="break cgen_rtx_error"; -fi -AC_SUBST(cgen_breaks) -AC_CONFIG_FILES(Makefile.sim:Makefile.in) -AC_CONFIG_FILES(Make-common.sim:../common/Make-common.in) -AC_CONFIG_FILES(.gdbinit:../common/gdbinit.in) -AC_CONFIG_COMMANDS([Makefile], -[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 -]) -AC_CONFIG_COMMANDS([stamp-h], [echo > stamp-h]) -AC_OUTPUT -]) - -sinclude(../../config/gettext-sister.m4) - -dnl --enable-cgen-maint support -AC_DEFUN(SIM_AC_OPTION_CGEN_MAINT, -[ -cgen_maint=no -dnl Default is to use one in build tree. -cgen=guile -cgendir='$(srcdir)/../../cgen' -dnl Having --enable-maintainer-mode take arguments is another way to go. -dnl ??? One can argue --with is more appropriate if one wants to specify -dnl a directory name, but what we're doing here is an enable/disable kind -dnl of thing and specifying both --enable and --with is klunky. -dnl If you reeely want this to be --with, go ahead and change it. -AC_ARG_ENABLE(cgen-maint, -[ --enable-cgen-maint[=DIR] build cgen generated files], -[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])dnl -dnl AM_CONDITIONAL(CGEN_MAINT, test x${cgen_maint} != xno) -if test x${cgen_maint} != xno ; then - CGEN_MAINT='' -else - CGEN_MAINT='#' -fi -AC_SUBST(CGEN_MAINT) -AC_SUBST(cgendir) -AC_SUBST(cgen) -]) -dnl FIXME: When upgrading to modern autoconf, remove -dnl SIM_CHECK_MEMBER and SIM_CHECK_MEMBERS et al and use -dnl AC_CHECK_MEMBERS from autoconf. -dnl -dnl Translated from a FC2 autoconf-2.59-3 installation. -dnl AC_CHECK_MEMBER(AGGREGATE.MEMBER, -dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], -dnl [INCLUDES]) -dnl -dnl --------------------------------------------------------- -dnl AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell -dnl variables are not a valid argument. -AC_DEFUN([SIM_CHECK_MEMBER], -dnl Extract the aggregate name, and the member name -[AC_CACHE_CHECK([for $1], [ac_]patsubst([$1], [[\. ]], [_]), -[ac_]patsubst([$1], [[\. ]], [_])[=no;] -AC_TRY_COMPILE([$4],[ -dnl AGGREGATE ac_aggr; -static ]patsubst([$1], [\..*])[ ac_aggr; -dnl ac_aggr.MEMBER; -if (ac_aggr.]patsubst([$1], [^[^.]*\.])[) -return 0;],[ac_]patsubst([$1], [[\. ]], [_])[=yes;], -AC_TRY_COMPILE([$4],[ -dnl AGGREGATE ac_aggr; -static ]patsubst([$1], [\..*])[ ac_aggr; -dnl ac_aggr.MEMBER; -if (sizeof ac_aggr.]patsubst([$1], [^[^.]*\.])[) -return 0;], -[ac_]patsubst([$1], [[\. ]], [_])[=yes;], -[ac_]patsubst([$1], [[\. ]], [_])[=no;])) -[if test [$]ac_]patsubst([$1], [[\. ]], [_])[ = yes; then :; [$2] -else :; [$3] -fi]) -])dnl SIM_CHECK_MEMBER -dnl -dnl Translated from a FC2 autoconf-2.59-3 installation. -dnl SIM_CHECK_MEMBERS([AGGREGATE.MEMBER, ...]) -dnl except we just work with a limited set of fixed includes. -dnl -AC_DEFUN([SIM_CHECK_MEMBERS_1], -[ifelse($#, 1, -[SIM_CHECK_MEMBER([$1], -AC_DEFINE_UNQUOTED([HAVE_]translit([$1], [a-z .], [A-Z__]), 1, -[Define to 1 if ]patsubst([$1], -[^[^.]*\.])[ is a member of ]patsubst([$1], [\..*])[. ]),, -[#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif])], -[SIM_CHECK_MEMBER([$1], -AC_DEFINE_UNQUOTED([HAVE_]translit([$1], [a-z .], [A-Z__]), 1, -[Define to 1 if ]patsubst([$1], -[^[^.]*\.])[ is a member of ]patsubst([$1], [\..*])[. ]),, -[#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif]) -SIM_CHECK_MEMBERS_1(builtin(shift,$@))])])dnl SIM_CHECK_MEMBERS -dnl -AC_DEFUN([SIM_CHECK_MEMBERS], -[ifelse($#, 1, [SIM_CHECK_MEMBERS_1($1)], -[errprint(__file__:__line__: -[This SIM_CHECK_MEMBERS only supports one argument,] -[the list of struct tests])])])dnl SIM_CHECK_MEMBERS diff --git a/sim/common/callback.c b/sim/common/callback.c deleted file mode 100644 index 570e294..0000000 --- a/sim/common/callback.c +++ /dev/null @@ -1,1139 +0,0 @@ -/* Remote target callback routines. - Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2004 - 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 GAS; see the file COPYING. If not, write to the Free Software - Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* This file provides a standard way for targets to talk to the host OS - level. */ - -#ifdef HAVE_CONFIG_H -#include "cconfig.h" -#endif -#include "ansidecl.h" -#include <stdarg.h> -#include <stdio.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 -#ifdef HAVE_LIMITS_H -/* For PIPE_BUF. */ -#include <limits.h> -#endif -#include <errno.h> -#include <fcntl.h> -#include <time.h> -#include <sys/types.h> -#include <sys/stat.h> -#include "gdb/callback.h" -#include "targ-vals.h" -/* For xmalloc. */ -#include "libiberty.h" - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#ifndef PIPE_BUF -#define PIPE_BUF 512 -#endif - -/* ??? sim_cb_printf should be cb_printf, but until the callback support is - broken out of the simulator directory, these are here to not require - sim-utils.h. */ -void sim_cb_printf PARAMS ((host_callback *, const char *, ...)); -void sim_cb_eprintf PARAMS ((host_callback *, const char *, ...)); - -extern CB_TARGET_DEFS_MAP cb_init_syscall_map[]; -extern CB_TARGET_DEFS_MAP cb_init_errno_map[]; -extern CB_TARGET_DEFS_MAP cb_init_open_map[]; - -extern int system PARAMS ((const char *)); - -static int os_init PARAMS ((host_callback *)); -static int os_shutdown PARAMS ((host_callback *)); -static int os_unlink PARAMS ((host_callback *, const char *)); -static long os_time PARAMS ((host_callback *, long *)); -static int os_system PARAMS ((host_callback *, const char *)); -static int os_rename PARAMS ((host_callback *, const char *, const char *)); -static int os_write_stdout PARAMS ((host_callback *, const char *, int)); -static void os_flush_stdout PARAMS ((host_callback *)); -static int os_write_stderr PARAMS ((host_callback *, const char *, int)); -static void os_flush_stderr PARAMS ((host_callback *)); -static int os_write PARAMS ((host_callback *, int, const char *, int)); -static int os_read_stdin PARAMS ((host_callback *, char *, int)); -static int os_read PARAMS ((host_callback *, int, char *, int)); -static int os_open PARAMS ((host_callback *, const char *, int)); -static int os_lseek PARAMS ((host_callback *, int, long, int)); -static int os_isatty PARAMS ((host_callback *, int)); -static int os_get_errno PARAMS ((host_callback *)); -static int os_close PARAMS ((host_callback *, int)); -static void os_vprintf_filtered PARAMS ((host_callback *, const char *, va_list)); -static void os_evprintf_filtered PARAMS ((host_callback *, const char *, va_list)); -static void os_error PARAMS ((host_callback *, const char *, ...)); -static int fdmap PARAMS ((host_callback *, int)); -static int fdbad PARAMS ((host_callback *, int)); -static int wrap PARAMS ((host_callback *, int)); - -/* Set the callback copy of errno from what we see now. */ - -static int -wrap (p, val) - host_callback *p; - int val; -{ - p->last_errno = errno; - return val; -} - -/* Make sure the FD provided is ok. If not, return non-zero - and set errno. */ - -static int -fdbad (p, fd) - host_callback *p; - int fd; -{ - if (fd < 0 || fd > MAX_CALLBACK_FDS || p->fd_buddy[fd] < 0) - { - p->last_errno = EINVAL; - return -1; - } - return 0; -} - -static int -fdmap (p, fd) - host_callback *p; - int fd; -{ - return p->fdmap[fd]; -} - -static int -os_close (p, fd) - host_callback *p; - int fd; -{ - int result; - int i, next; - - result = fdbad (p, fd); - if (result) - return result; - /* If this file descripter has one or more buddies (originals / - duplicates from a dup), just remove it from the circular list. */ - for (i = fd; (next = p->fd_buddy[i]) != fd; ) - i = next; - if (fd != i) - p->fd_buddy[i] = p->fd_buddy[fd]; - else - { - if (p->ispipe[fd]) - { - int other = p->ispipe[fd]; - int reader, writer; - - if (other > 0) - { - /* Closing the read side. */ - reader = fd; - writer = other; - } - else - { - /* Closing the write side. */ - writer = fd; - reader = -other; - } - - /* If there was data in the buffer, make a last "now empty" - call, then deallocate data. */ - if (p->pipe_buffer[writer].buffer != NULL) - { - (*p->pipe_empty) (p, reader, writer); - free (p->pipe_buffer[writer].buffer); - p->pipe_buffer[writer].buffer = NULL; - } - - /* Clear pipe data for this side. */ - p->pipe_buffer[fd].size = 0; - p->ispipe[fd] = 0; - - /* If this was the first close, mark the other side as the - only remaining side. */ - if (fd != abs (other)) - p->ispipe[abs (other)] = -other; - p->fd_buddy[fd] = -1; - return 0; - } - - result = wrap (p, close (fdmap (p, fd))); - } - p->fd_buddy[fd] = -1; - - return result; -} - - -/* taken from gdb/util.c:notice_quit() - should be in a library */ - - -#if defined(__GO32__) || defined (_MSC_VER) -static int -os_poll_quit (p) - host_callback *p; -{ -#if defined(__GO32__) - int kbhit (); - int getkey (); - if (kbhit ()) - { - int k = getkey (); - if (k == 1) - { - return 1; - } - else if (k == 2) - { - return 1; - } - else - { - sim_cb_eprintf (p, "CTRL-A to quit, CTRL-B to quit harder\n"); - } - } -#endif -#if defined (_MSC_VER) - /* NB - this will not compile! */ - int k = win32pollquit(); - if (k == 1) - return 1; - else if (k == 2) - return 1; -#endif - return 0; -} -#else -#define os_poll_quit 0 -#endif /* defined(__GO32__) || defined(_MSC_VER) */ - -static int -os_get_errno (p) - host_callback *p; -{ - return cb_host_to_target_errno (p, p->last_errno); -} - - -static int -os_isatty (p, fd) - host_callback *p; - int fd; -{ - int result; - - result = fdbad (p, fd); - if (result) - return result; - result = wrap (p, isatty (fdmap (p, fd))); - - return result; -} - -static int -os_lseek (p, fd, off, way) - host_callback *p; - int fd; - long off; - int way; -{ - int result; - - result = fdbad (p, fd); - if (result) - return result; - result = lseek (fdmap (p, fd), off, way); - return result; -} - -static int -os_open (p, name, flags) - host_callback *p; - const char *name; - int flags; -{ - int i; - for (i = 0; i < MAX_CALLBACK_FDS; i++) - { - if (p->fd_buddy[i] < 0) - { - int f = open (name, cb_target_to_host_open (p, flags), 0644); - if (f < 0) - { - p->last_errno = errno; - return f; - } - p->fd_buddy[i] = i; - p->fdmap[i] = f; - return i; - } - } - p->last_errno = EMFILE; - return -1; -} - -static int -os_read (p, fd, buf, len) - host_callback *p; - int fd; - char *buf; - int len; -{ - int result; - - result = fdbad (p, fd); - if (result) - return result; - if (p->ispipe[fd]) - { - int writer = p->ispipe[fd]; - - /* Can't read from the write-end. */ - if (writer < 0) - { - p->last_errno = EBADF; - return -1; - } - - /* Nothing to read if nothing is written. */ - if (p->pipe_buffer[writer].size == 0) - return 0; - - /* Truncate read request size to buffer size minus what's already - read. */ - if (len > p->pipe_buffer[writer].size - p->pipe_buffer[fd].size) - len = p->pipe_buffer[writer].size - p->pipe_buffer[fd].size; - - memcpy (buf, p->pipe_buffer[writer].buffer + p->pipe_buffer[fd].size, - len); - - /* Account for what we just read. */ - p->pipe_buffer[fd].size += len; - - /* If we've read everything, empty and deallocate the buffer and - signal buffer-empty to client. (This isn't expected to be a - hot path in the simulator, so we don't hold on to the buffer.) */ - if (p->pipe_buffer[fd].size == p->pipe_buffer[writer].size) - { - free (p->pipe_buffer[writer].buffer); - p->pipe_buffer[writer].buffer = NULL; - p->pipe_buffer[fd].size = 0; - p->pipe_buffer[writer].size = 0; - (*p->pipe_empty) (p, fd, writer); - } - - return len; - } - - result = wrap (p, read (fdmap (p, fd), buf, len)); - return result; -} - -static int -os_read_stdin (p, buf, len) - host_callback *p; - char *buf; - int len; -{ - return wrap (p, read (0, buf, len)); -} - -static int -os_write (p, fd, buf, len) - host_callback *p; - int fd; - const char *buf; - int len; -{ - int result; - int real_fd; - - result = fdbad (p, fd); - if (result) - return result; - - if (p->ispipe[fd]) - { - int reader = -p->ispipe[fd]; - - /* Can't write to the read-end. */ - if (reader < 0) - { - p->last_errno = EBADF; - return -1; - } - - /* Can't write to pipe with closed read end. - FIXME: We should send a SIGPIPE. */ - if (reader == fd) - { - p->last_errno = EPIPE; - return -1; - } - - /* As a sanity-check, we bail out it the buffered contents is much - larger than the size of the buffer on the host. We don't want - to run out of memory in the simulator due to a target program - bug if we can help it. Unfortunately, regarding the value that - reaches the simulated program, it's no use returning *less* - than the requested amount, because cb_syscall loops calling - this function until the whole amount is done. */ - if (p->pipe_buffer[fd].size + len > 10 * PIPE_BUF) - { - p->last_errno = EFBIG; - return -1; - } - - p->pipe_buffer[fd].buffer - = xrealloc (p->pipe_buffer[fd].buffer, p->pipe_buffer[fd].size + len); - memcpy (p->pipe_buffer[fd].buffer + p->pipe_buffer[fd].size, - buf, len); - p->pipe_buffer[fd].size += len; - - (*p->pipe_nonempty) (p, reader, fd); - return len; - } - - real_fd = fdmap (p, fd); - switch (real_fd) - { - default: - result = wrap (p, write (real_fd, buf, len)); - break; - case 1: - result = p->write_stdout (p, buf, len); - break; - case 2: - result = p->write_stderr (p, buf, len); - break; - } - return result; -} - -static int -os_write_stdout (p, buf, len) - host_callback *p ATTRIBUTE_UNUSED; - const char *buf; - int len; -{ - return fwrite (buf, 1, len, stdout); -} - -static void -os_flush_stdout (p) - host_callback *p ATTRIBUTE_UNUSED; -{ - fflush (stdout); -} - -static int -os_write_stderr (p, buf, len) - host_callback *p ATTRIBUTE_UNUSED; - const char *buf; - int len; -{ - return fwrite (buf, 1, len, stderr); -} - -static void -os_flush_stderr (p) - host_callback *p ATTRIBUTE_UNUSED; -{ - fflush (stderr); -} - -static int -os_rename (p, f1, f2) - host_callback *p; - const char *f1; - const char *f2; -{ - return wrap (p, rename (f1, f2)); -} - - -static int -os_system (p, s) - host_callback *p; - const char *s; -{ - return wrap (p, system (s)); -} - -static long -os_time (p, t) - host_callback *p; - long *t; -{ - return wrap (p, time (t)); -} - - -static int -os_unlink (p, f1) - host_callback *p; - const char *f1; -{ - return wrap (p, unlink (f1)); -} - -static int -os_stat (p, file, buf) - host_callback *p; - const char *file; - struct stat *buf; -{ - /* ??? There is an issue of when to translate to the target layout. - One could do that inside this function, or one could have the - caller do it. It's more flexible to let the caller do it, though - I'm not sure the flexibility will ever be useful. */ - return wrap (p, stat (file, buf)); -} - -static int -os_fstat (p, fd, buf) - host_callback *p; - int fd; - struct stat *buf; -{ - if (fdbad (p, fd)) - return -1; - - if (p->ispipe[fd]) - { -#if defined (HAVE_STRUCT_STAT_ST_ATIME) || defined (HAVE_STRUCT_STAT_ST_CTIME) || defined (HAVE_STRUCT_STAT_ST_MTIME) - time_t t = (*p->time) (p, NULL); -#endif - - /* We have to fake the struct stat contents, since the pipe is - made up in the simulator. */ - memset (buf, 0, sizeof (*buf)); - -#ifdef HAVE_STRUCT_STAT_ST_MODE - buf->st_mode = S_IFIFO; -#endif - - /* If more accurate tracking than current-time is needed (for - example, on GNU/Linux we get accurate numbers), the p->time - callback (which may be something other than os_time) should - happen for each read and write, and we'd need to keep track of - atime, ctime and mtime. */ -#ifdef HAVE_STRUCT_STAT_ST_ATIME - buf->st_atime = t; -#endif -#ifdef HAVE_STRUCT_STAT_ST_CTIME - buf->st_ctime = t; -#endif -#ifdef HAVE_STRUCT_STAT_ST_MTIME - buf->st_mtime = t; -#endif - return 0; - } - - /* ??? There is an issue of when to translate to the target layout. - One could do that inside this function, or one could have the - caller do it. It's more flexible to let the caller do it, though - I'm not sure the flexibility will ever be useful. */ - return wrap (p, fstat (fdmap (p, fd), buf)); -} - -static int -os_lstat (p, file, buf) - host_callback *p; - const char *file; - struct stat *buf; -{ - /* NOTE: hpn/2004-12-12: Same issue here as with os_fstat. */ -#ifdef HAVE_LSTAT - return wrap (p, lstat (file, buf)); -#else - return wrap (p, stat (file, buf)); -#endif -} - -static int -os_ftruncate (p, fd, len) - host_callback *p; - int fd; - long len; -{ - int result; - - result = fdbad (p, fd); - if (p->ispipe[fd]) - { - p->last_errno = EINVAL; - return -1; - } - if (result) - return result; -#ifdef HAVE_FTRUNCATE - result = wrap (p, ftruncate (fdmap (p, fd), len)); -#else - p->last_errno = EINVAL; - result = -1; -#endif - return result; -} - -static int -os_truncate (p, file, len) - host_callback *p; - const char *file; - long len; -{ -#ifdef HAVE_TRUNCATE - return wrap (p, truncate (file, len)); -#else - p->last_errno = EINVAL; - return -1; -#endif -} - -static int -os_pipe (p, filedes) - host_callback *p; - int *filedes; -{ - int i; - - /* We deliberately don't use fd 0. It's probably stdin anyway. */ - for (i = 1; i < MAX_CALLBACK_FDS; i++) - { - int j; - - if (p->fd_buddy[i] < 0) - for (j = i + 1; j < MAX_CALLBACK_FDS; j++) - if (p->fd_buddy[j] < 0) - { - /* Found two free fd:s. Set stat to allocated and mark - pipeness. */ - p->fd_buddy[i] = i; - p->fd_buddy[j] = j; - p->ispipe[i] = j; - p->ispipe[j] = -i; - filedes[0] = i; - filedes[1] = j; - - /* Poison the FD map to make bugs apparent. */ - p->fdmap[i] = -1; - p->fdmap[j] = -1; - return 0; - } - } - - p->last_errno = EMFILE; - return -1; -} - -/* Stub functions for pipe support. They should always be overridden in - targets using the pipe support, but that's up to the target. */ - -/* Called when the simulator says that the pipe at (reader, writer) is - now empty (so the writer should leave its waiting state). */ - -static void -os_pipe_empty (p, reader, writer) - host_callback *p; - int reader; - int writer; -{ -} - -/* Called when the simulator says the pipe at (reader, writer) is now - non-empty (so the writer should wait). */ - -static void -os_pipe_nonempty (p, reader, writer) - host_callback *p; - int reader; - int writer; -{ -} - -static int -os_shutdown (p) - host_callback *p; -{ - int i, next, j; - for (i = 0; i < MAX_CALLBACK_FDS; i++) - { - int do_close = 1; - - /* Zero out all pipe state. Don't call callbacks for non-empty - pipes; the target program has likely terminated at this point - or we're called at initialization time. */ - p->ispipe[i] = 0; - p->pipe_buffer[i].size = 0; - p->pipe_buffer[i].buffer = NULL; - - next = p->fd_buddy[i]; - if (next < 0) - continue; - do - { - j = next; - if (j == MAX_CALLBACK_FDS) - do_close = 0; - next = p->fd_buddy[j]; - p->fd_buddy[j] = -1; - /* At the initial call of os_init, we got -1, 0, 0, 0, ... */ - if (next < 0) - { - p->fd_buddy[i] = -1; - do_close = 0; - break; - } - } - while (j != i); - if (do_close) - close (p->fdmap[i]); - } - return 1; -} - -static int -os_init (p) - host_callback *p; -{ - int i; - - os_shutdown (p); - for (i = 0; i < 3; i++) - { - p->fdmap[i] = i; - p->fd_buddy[i] = i - 1; - } - p->fd_buddy[0] = MAX_CALLBACK_FDS; - p->fd_buddy[MAX_CALLBACK_FDS] = 2; - - p->syscall_map = cb_init_syscall_map; - p->errno_map = cb_init_errno_map; - p->open_map = cb_init_open_map; - - return 1; -} - -/* DEPRECATED */ - -/* VARARGS */ -static void -os_printf_filtered (host_callback *p ATTRIBUTE_UNUSED, const char *format, ...) -{ - va_list args; - va_start (args, format); - - vfprintf (stdout, format, args); - va_end (args); -} - -/* VARARGS */ -static void -os_vprintf_filtered (host_callback *p ATTRIBUTE_UNUSED, const char *format, va_list args) -{ - vprintf (format, args); -} - -/* VARARGS */ -static void -os_evprintf_filtered (host_callback *p ATTRIBUTE_UNUSED, const char *format, va_list args) -{ - vfprintf (stderr, format, args); -} - -/* VARARGS */ -static void -os_error (host_callback *p ATTRIBUTE_UNUSED, const char *format, ...) -{ - va_list args; - va_start (args, format); - - vfprintf (stderr, format, args); - fprintf (stderr, "\n"); - - va_end (args); - exit (1); -} - -host_callback default_callback = -{ - os_close, - os_get_errno, - os_isatty, - os_lseek, - os_open, - os_read, - os_read_stdin, - os_rename, - os_system, - os_time, - os_unlink, - os_write, - os_write_stdout, - os_flush_stdout, - os_write_stderr, - os_flush_stderr, - - os_stat, - os_fstat, - os_lstat, - - os_ftruncate, - os_truncate, - - os_pipe, - os_pipe_empty, - os_pipe_nonempty, - - os_poll_quit, - - os_shutdown, - os_init, - - os_printf_filtered, /* deprecated */ - - os_vprintf_filtered, - os_evprintf_filtered, - os_error, - - 0, /* last errno */ - - { 0, }, /* fdmap */ - { -1, }, /* fd_buddy */ - { 0, }, /* ispipe */ - { { 0, 0 }, }, /* pipe_buffer */ - - 0, /* syscall_map */ - 0, /* errno_map */ - 0, /* open_map */ - 0, /* signal_map */ - 0, /* stat_map */ - - /* Defaults expected to be overridden at initialization, where needed. */ - BFD_ENDIAN_UNKNOWN, /* target_endian */ - 4, /* target_sizeof_int */ - - HOST_CALLBACK_MAGIC, -}; - -/* Read in a file describing the target's system call values. - E.g. maybe someone will want to use something other than newlib. - This assumes that the basic system call recognition and value passing/ - returning is supported. So maybe some coding/recompilation will be - necessary, but not as much. - - If an error occurs, the existing mapping is not changed. */ - -CB_RC -cb_read_target_syscall_maps (cb, file) - host_callback *cb; - const char *file; -{ - CB_TARGET_DEFS_MAP *syscall_map, *errno_map, *open_map, *signal_map; - const char *stat_map; - FILE *f; - - if ((f = fopen (file, "r")) == NULL) - return CB_RC_ACCESS; - - /* ... read in and parse file ... */ - - fclose (f); - return CB_RC_NO_MEM; /* FIXME:wip */ - - /* Free storage allocated for any existing maps. */ - if (cb->syscall_map) - free (cb->syscall_map); - if (cb->errno_map) - free (cb->errno_map); - if (cb->open_map) - free (cb->open_map); - if (cb->signal_map) - free (cb->signal_map); - if (cb->stat_map) - free ((PTR) cb->stat_map); - - cb->syscall_map = syscall_map; - cb->errno_map = errno_map; - cb->open_map = open_map; - cb->signal_map = signal_map; - cb->stat_map = stat_map; - - return CB_RC_OK; -} - -/* Translate the target's version of a syscall number to the host's. - This isn't actually the host's version, rather a canonical form. - ??? Perhaps this should be renamed to ..._canon_syscall. */ - -int -cb_target_to_host_syscall (cb, target_val) - host_callback *cb; - int target_val; -{ - CB_TARGET_DEFS_MAP *m; - - for (m = &cb->syscall_map[0]; m->target_val != -1; ++m) - if (m->target_val == target_val) - return m->host_val; - - return -1; -} - -/* FIXME: sort tables if large. - Alternatively, an obvious improvement for errno conversion is - to machine generate a function with a large switch(). */ - -/* Translate the host's version of errno to the target's. */ - -int -cb_host_to_target_errno (cb, host_val) - host_callback *cb; - int host_val; -{ - CB_TARGET_DEFS_MAP *m; - - for (m = &cb->errno_map[0]; m->host_val; ++m) - if (m->host_val == host_val) - return m->target_val; - - /* ??? Which error to return in this case is up for grabs. - Note that some missing values may have standard alternatives. - For now return 0 and require caller to deal with it. */ - return 0; -} - -/* Given a set of target bitmasks for the open system call, - return the host equivalent. - Mapping open flag values is best done by looping so there's no need - to machine generate this function. */ - -int -cb_target_to_host_open (cb, target_val) - host_callback *cb; - int target_val; -{ - int host_val = 0; - CB_TARGET_DEFS_MAP *m; - - for (m = &cb->open_map[0]; m->host_val != -1; ++m) - { - switch (m->target_val) - { - /* O_RDONLY can be (and usually is) 0 which needs to be treated - specially. */ - case TARGET_O_RDONLY : - case TARGET_O_WRONLY : - case TARGET_O_RDWR : - if ((target_val & (TARGET_O_RDONLY | TARGET_O_WRONLY | TARGET_O_RDWR)) - == m->target_val) - host_val |= m->host_val; - /* Handle the host/target differentiating between binary and - text mode. Only one case is of importance */ -#if ! defined (TARGET_O_BINARY) && defined (O_BINARY) - host_val |= O_BINARY; -#endif - break; - default : - if ((m->target_val & target_val) == m->target_val) - host_val |= m->host_val; - break; - } - } - - return host_val; -} - -/* Utility for e.g. cb_host_to_target_stat to store values in the target's - stat struct. */ - -void -cb_store_target_endian (cb, p, size, val) - host_callback *cb; - char *p; - int size; - long val; /* ??? must be as big as target word size */ -{ - if (cb->target_endian == BFD_ENDIAN_BIG) - { - p += size; - while (size-- > 0) - { - *--p = val; - val >>= 8; - } - } - else - { - while (size-- > 0) - { - *p++ = val; - val >>= 8; - } - } -} - -/* Translate a host's stat struct into a target's. - If HS is NULL, just compute the length of the buffer required, - TS is ignored. - - The result is the size of the target's stat struct, - or zero if an error occurred during the translation. */ - -int -cb_host_to_target_stat (cb, hs, ts) - host_callback *cb; - const struct stat *hs; - PTR ts; -{ - const char *m = cb->stat_map; - char *p; - - if (hs == NULL) - ts = NULL; - p = ts; - - while (m) - { - char *q = strchr (m, ','); - int size; - - /* FIXME: Use sscanf? */ - if (q == NULL) - { - /* FIXME: print error message */ - return 0; - } - size = atoi (q + 1); - if (size == 0) - { - /* FIXME: print error message */ - return 0; - } - - if (hs != NULL) - { - if (0) - ; - /* Defined here to avoid emacs indigestion on a lone "else". */ -#undef ST_x -#define ST_x(FLD) \ - else if (strncmp (m, #FLD, q - m) == 0) \ - cb_store_target_endian (cb, p, size, hs->FLD) - -#ifdef HAVE_STRUCT_STAT_ST_DEV - ST_x (st_dev); -#endif -#ifdef HAVE_STRUCT_STAT_ST_INO - ST_x (st_ino); -#endif -#ifdef HAVE_STRUCT_STAT_ST_MODE - ST_x (st_mode); -#endif -#ifdef HAVE_STRUCT_STAT_ST_NLINK - ST_x (st_nlink); -#endif -#ifdef HAVE_STRUCT_STAT_ST_UID - ST_x (st_uid); -#endif -#ifdef HAVE_STRUCT_STAT_ST_GID - ST_x (st_gid); -#endif -#ifdef HAVE_STRUCT_STAT_ST_RDEV - ST_x (st_rdev); -#endif -#ifdef HAVE_STRUCT_STAT_ST_SIZE - ST_x (st_size); -#endif -#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE - ST_x (st_blksize); -#endif -#ifdef HAVE_STRUCT_STAT_ST_BLOCKS - ST_x (st_blocks); -#endif -#ifdef HAVE_STRUCT_STAT_ST_ATIME - ST_x (st_atime); -#endif -#ifdef HAVE_STRUCT_STAT_ST_MTIME - ST_x (st_mtime); -#endif -#ifdef HAVE_STRUCT_STAT_ST_CTIME - ST_x (st_ctime); -#endif -#undef ST_x - /* FIXME:wip */ - else - /* Unsupported field, store 0. */ - cb_store_target_endian (cb, p, size, 0); - } - - p += size; - m = strchr (q, ':'); - if (m) - ++m; - } - - return p - (char *) ts; -} - -/* Cover functions to the vfprintf callbacks. - - ??? If one thinks of the callbacks as a subsystem onto itself [or part of - a larger "remote target subsystem"] with a well defined interface, then - one would think that the subsystem would provide these. However, until - one is allowed to create such a subsystem (with its own source tree - independent of any particular user), such a critter can't exist. Thus - these functions are here for the time being. */ - -void -sim_cb_printf (host_callback *p, const char *fmt, ...) -{ - va_list ap; - - va_start (ap, fmt); - p->vprintf_filtered (p, fmt, ap); - va_end (ap); -} - -void -sim_cb_eprintf (host_callback *p, const char *fmt, ...) -{ - va_list ap; - - va_start (ap, fmt); - p->evprintf_filtered (p, fmt, ap); - va_end (ap); -} diff --git a/sim/common/cgen-accfp.c b/sim/common/cgen-accfp.c deleted file mode 100644 index 929dd22..0000000 --- a/sim/common/cgen-accfp.c +++ /dev/null @@ -1,706 +0,0 @@ -/* Accurate fp support for CGEN-based simulators. - Copyright (C) 1999 Cygnus Solutions. - - This implemention assumes: - typedef USI SF; - typedef UDI DF; - - TODO: - - lazy encoding/decoding - - checking return code (say by callback) - - proper rounding -*/ - -#include "sim-main.h" -#include "sim-fpu.h" - -/* SF mode support */ - -static SF -addsf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned32 res; - sim_fpu_status status; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - status = sim_fpu_add (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to32 (&res, &ans); - - return res; -} - -static SF -subsf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned32 res; - sim_fpu_status status; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - status = sim_fpu_sub (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to32 (&res, &ans); - - return res; -} - -static SF -mulsf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned32 res; - sim_fpu_status status; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - status = sim_fpu_mul (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to32 (&res, &ans); - - return res; -} - -static SF -divsf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned32 res; - sim_fpu_status status; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - status = sim_fpu_div (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to32 (&res, &ans); - - return res; -} - -static SF -negsf (CGEN_FPU* fpu, SF x) -{ - sim_fpu op1; - sim_fpu ans; - unsigned32 res; - sim_fpu_status status; - - sim_fpu_32to (&op1, x); - status = sim_fpu_neg (&ans, &op1); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to32 (&res, &ans); - - return res; -} - -static SF -abssf (CGEN_FPU* fpu, SF x) -{ - sim_fpu op1; - sim_fpu ans; - unsigned32 res; - sim_fpu_status status; - - sim_fpu_32to (&op1, x); - status = sim_fpu_abs (&ans, &op1); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to32 (&res, &ans); - - return res; -} - -static SF -sqrtsf (CGEN_FPU* fpu, SF x) -{ - sim_fpu op1; - sim_fpu ans; - unsigned32 res; - sim_fpu_status status; - - sim_fpu_32to (&op1, x); - status = sim_fpu_sqrt (&ans, &op1); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to32 (&res, &ans); - - return res; -} - -static SF -invsf (CGEN_FPU* fpu, SF x) -{ - sim_fpu op1; - sim_fpu ans; - unsigned32 res; - sim_fpu_status status; - - sim_fpu_32to (&op1, x); - status = sim_fpu_inv (&ans, &op1); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to32 (&res, &ans); - - return res; -} - -static SF -minsf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned32 res; - sim_fpu_status status; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - status = sim_fpu_min (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to32 (&res, &ans); - - return res; -} - -static SF -maxsf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned32 res; - sim_fpu_status status; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - status = sim_fpu_max (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to32 (&res, &ans); - - return res; -} - -static CGEN_FP_CMP -cmpsf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - - if (sim_fpu_is_nan (&op1) - || sim_fpu_is_nan (&op2)) - return FP_CMP_NAN; - - if (x < y) - return FP_CMP_LT; - if (x > y) - return FP_CMP_GT; - return FP_CMP_EQ; -} - -static int -eqsf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - return sim_fpu_is_eq (&op1, &op2); -} - -static int -nesf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - return sim_fpu_is_ne (&op1, &op2); -} - -static int -ltsf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - return sim_fpu_is_lt (&op1, &op2); -} - -static int -lesf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - return sim_fpu_is_le (&op1, &op2); -} - -static int -gtsf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - return sim_fpu_is_gt (&op1, &op2); -} - -static int -gesf (CGEN_FPU* fpu, SF x, SF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_32to (&op1, x); - sim_fpu_32to (&op2, y); - return sim_fpu_is_ge (&op1, &op2); -} - -static DF -fextsfdf (CGEN_FPU* fpu, SF x) -{ - sim_fpu op1; - unsigned64 res; - - sim_fpu_32to (&op1, x); - sim_fpu_to64 (&res, &op1); - - return res; -} - -static SF -ftruncdfsf (CGEN_FPU* fpu, DF x) -{ - sim_fpu op1; - unsigned32 res; - - sim_fpu_64to (&op1, x); - sim_fpu_to32 (&res, &op1); - - return res; -} - -static SF -floatsisf (CGEN_FPU* fpu, SI x) -{ - sim_fpu ans; - unsigned32 res; - - sim_fpu_i32to (&ans, x, sim_fpu_round_near); - sim_fpu_to32 (&res, &ans); - return res; -} - -static DF -floatsidf (CGEN_FPU* fpu, SI x) -{ - sim_fpu ans; - unsigned64 res; - - sim_fpu_i32to (&ans, x, sim_fpu_round_near); - sim_fpu_to64 (&res, &ans); - return res; -} - -static SF -ufloatsisf (CGEN_FPU* fpu, USI x) -{ - sim_fpu ans; - unsigned32 res; - - sim_fpu_u32to (&ans, x, sim_fpu_round_near); - sim_fpu_to32 (&res, &ans); - return res; -} - -static SI -fixsfsi (CGEN_FPU* fpu, SF x) -{ - sim_fpu op1; - unsigned32 res; - - sim_fpu_32to (&op1, x); - sim_fpu_to32i (&res, &op1, sim_fpu_round_near); - return res; -} - -static SI -fixdfsi (CGEN_FPU* fpu, DF x) -{ - sim_fpu op1; - unsigned32 res; - - sim_fpu_64to (&op1, x); - sim_fpu_to32i (&res, &op1, sim_fpu_round_near); - return res; -} - -static USI -ufixsfsi (CGEN_FPU* fpu, SF x) -{ - sim_fpu op1; - unsigned32 res; - - sim_fpu_32to (&op1, x); - sim_fpu_to32u (&res, &op1, sim_fpu_round_near); - return res; -} - -/* DF mode support */ - -static DF -adddf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned64 res; - sim_fpu_status status; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - status = sim_fpu_add (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to64 (&res, &ans); - - return res; -} - -static DF -subdf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned64 res; - sim_fpu_status status; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - status = sim_fpu_sub (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to64 (&res, &ans); - - return res; -} - -static DF -muldf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned64 res; - sim_fpu_status status; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - status = sim_fpu_mul (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to64 (&res, &ans); - - return res; -} - -static DF -divdf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned64 res; - sim_fpu_status status; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - status = sim_fpu_div (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to64 (&res, &ans); - - return res; -} - -static DF -negdf (CGEN_FPU* fpu, DF x) -{ - sim_fpu op1; - sim_fpu ans; - unsigned64 res; - sim_fpu_status status; - - sim_fpu_64to (&op1, x); - status = sim_fpu_neg (&ans, &op1); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to64 (&res, &ans); - - return res; -} - -static DF -absdf (CGEN_FPU* fpu, DF x) -{ - sim_fpu op1; - sim_fpu ans; - unsigned64 res; - sim_fpu_status status; - - sim_fpu_64to (&op1, x); - status = sim_fpu_abs (&ans, &op1); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to64 (&res, &ans); - - return res; -} - -static DF -sqrtdf (CGEN_FPU* fpu, DF x) -{ - sim_fpu op1; - sim_fpu ans; - unsigned64 res; - sim_fpu_status status; - - sim_fpu_64to (&op1, x); - status = sim_fpu_sqrt (&ans, &op1); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to64 (&res, &ans); - - return res; -} - -static DF -invdf (CGEN_FPU* fpu, DF x) -{ - sim_fpu op1; - sim_fpu ans; - unsigned64 res; - sim_fpu_status status; - - sim_fpu_64to (&op1, x); - status = sim_fpu_inv (&ans, &op1); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to64 (&res, &ans); - - return res; -} - -static DF -mindf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned64 res; - sim_fpu_status status; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - status = sim_fpu_min (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to64 (&res, &ans); - - return res; -} - -static DF -maxdf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - sim_fpu ans; - unsigned64 res; - sim_fpu_status status; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - status = sim_fpu_max (&ans, &op1, &op2); - if (status != 0) - (*fpu->ops->error) (fpu, status); - sim_fpu_to64 (&res, &ans); - - return res; -} - -static CGEN_FP_CMP -cmpdf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - - if (sim_fpu_is_nan (&op1) - || sim_fpu_is_nan (&op2)) - return FP_CMP_NAN; - - if (x < y) - return FP_CMP_LT; - if (x > y) - return FP_CMP_GT; - return FP_CMP_EQ; -} - -static int -eqdf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - return sim_fpu_is_eq (&op1, &op2); -} - -static int -nedf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - return sim_fpu_is_ne (&op1, &op2); -} - -static int -ltdf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - return sim_fpu_is_lt (&op1, &op2); -} - -static int -ledf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - return sim_fpu_is_le (&op1, &op2); -} - -static int -gtdf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - return sim_fpu_is_gt (&op1, &op2); -} - -static int -gedf (CGEN_FPU* fpu, DF x, DF y) -{ - sim_fpu op1; - sim_fpu op2; - - sim_fpu_64to (&op1, x); - sim_fpu_64to (&op2, y); - return sim_fpu_is_ge (&op1, &op2); -} - -/* Initialize FP_OPS to use accurate library. */ - -void -cgen_init_accurate_fpu (SIM_CPU* cpu, CGEN_FPU* fpu, CGEN_FPU_ERROR_FN* error) -{ - CGEN_FP_OPS* o; - - fpu->owner = cpu; - /* ??? small memory leak, not freed by sim_close */ - fpu->ops = (CGEN_FP_OPS*) xmalloc (sizeof (CGEN_FP_OPS)); - - o = fpu->ops; - memset (o, 0, sizeof (*o)); - - o->error = error; - - o->addsf = addsf; - o->subsf = subsf; - o->mulsf = mulsf; - o->divsf = divsf; - o->negsf = negsf; - o->abssf = abssf; - o->sqrtsf = sqrtsf; - o->invsf = invsf; - o->minsf = minsf; - o->maxsf = maxsf; - o->cmpsf = cmpsf; - o->eqsf = eqsf; - o->nesf = nesf; - o->ltsf = ltsf; - o->lesf = lesf; - o->gtsf = gtsf; - o->gesf = gesf; - - o->adddf = adddf; - o->subdf = subdf; - o->muldf = muldf; - o->divdf = divdf; - o->negdf = negdf; - o->absdf = absdf; - o->sqrtdf = sqrtdf; - o->invdf = invdf; - o->mindf = mindf; - o->maxdf = maxdf; - o->cmpdf = cmpdf; - o->eqdf = eqdf; - o->nedf = nedf; - o->ltdf = ltdf; - o->ledf = ledf; - o->gtdf = gtdf; - o->gedf = gedf; - o->fextsfdf = fextsfdf; - o->ftruncdfsf = ftruncdfsf; - o->floatsisf = floatsisf; - o->floatsidf = floatsidf; - o->ufloatsisf = ufloatsisf; - o->fixsfsi = fixsfsi; - o->fixdfsi = fixdfsi; - o->ufixsfsi = ufixsfsi; -} diff --git a/sim/common/cgen-cpu.h b/sim/common/cgen-cpu.h deleted file mode 100644 index d79e98f..0000000 --- a/sim/common/cgen-cpu.h +++ /dev/null @@ -1,106 +0,0 @@ -/* Simulator header for cgen cpus. - Copyright (C) 1998, 1999 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 CGEN_CPU_H -#define CGEN_CPU_H - -/* Type of function that is ultimately called by sim_resume. */ -typedef void (ENGINE_FN) (SIM_CPU *); - -/* Type of function to do disassembly. */ -typedef void (CGEN_DISASSEMBLER) (SIM_CPU *, const CGEN_INSN *, - const ARGBUF *, IADDR pc_, char *buf_); - -/* Additional non-machine generated per-cpu data to go in SIM_CPU. - The member's name must be `cgen_cpu'. */ - -typedef struct { - /* Non-zero while cpu simulation is running. */ - int running_p; -#define CPU_RUNNING_P(cpu) ((cpu)->cgen_cpu.running_p) - - /* Instruction count. This is maintained even in fast mode to keep track - of simulator speed. */ - unsigned long insn_count; -#define CPU_INSN_COUNT(cpu) ((cpu)->cgen_cpu.insn_count) - - /* sim_resume handlers */ - ENGINE_FN *fast_engine_fn; -#define CPU_FAST_ENGINE_FN(cpu) ((cpu)->cgen_cpu.fast_engine_fn) - ENGINE_FN *full_engine_fn; -#define CPU_FULL_ENGINE_FN(cpu) ((cpu)->cgen_cpu.full_engine_fn) - - /* Maximum number of instructions per time slice. - When single stepping this is 1. If using the pbb model, this can be - more than 1. 0 means "as long as you want". */ - unsigned int max_slice_insns; -#define CPU_MAX_SLICE_INSNS(cpu) ((cpu)->cgen_cpu.max_slice_insns) - - /* Simulator's execution cache. - Allocate space for this even if not used as some simulators may have - one machine variant that uses the scache and another that doesn't and - we don't want members in this struct to move about. */ - CPU_SCACHE scache; - - /* Instruction descriptor table. */ - IDESC *idesc; -#define CPU_IDESC(cpu) ((cpu)->cgen_cpu.idesc) - - /* Whether the read,write,semantic entries (function pointers or computed - goto labels) have been initialized or not. */ - int idesc_read_init_p; -#define CPU_IDESC_READ_INIT_P(cpu) ((cpu)->cgen_cpu.idesc_read_init_p) - int idesc_write_init_p; -#define CPU_IDESC_WRITE_INIT_P(cpu) ((cpu)->cgen_cpu.idesc_write_init_p) - int idesc_sem_init_p; -#define CPU_IDESC_SEM_INIT_P(cpu) ((cpu)->cgen_cpu.idesc_sem_init_p) - - /* Cpu descriptor table. - This is a CGEN created entity that contains the description file - turned into C code and tables for our use. */ - CGEN_CPU_DESC cpu_desc; -#define CPU_CPU_DESC(cpu) ((cpu)->cgen_cpu.cpu_desc) - - /* Function to fetch the insn data entry in the IDESC. */ - const CGEN_INSN * (*get_idata) (SIM_CPU *, int); -#define CPU_GET_IDATA(cpu) ((cpu)->cgen_cpu.get_idata) - - /* Floating point support. */ - CGEN_FPU fpu; -#define CGEN_CPU_FPU(cpu) (& (cpu)->cgen_cpu.fpu) - - /* Disassembler. */ - CGEN_DISASSEMBLER *disassembler; -#define CPU_DISASSEMBLER(cpu) ((cpu)->cgen_cpu.disassembler) - - /* Queued writes for parallel write-after support. */ - CGEN_WRITE_QUEUE write_queue; -#define CPU_WRITE_QUEUE(cpu) (& (cpu)->cgen_cpu.write_queue) - - /* Allow slop in size calcs for case where multiple cpu types are supported - and space for the specified cpu is malloc'd at run time. */ - double slop; -} CGEN_CPU; - -/* Shorthand macro for fetching registers. - CPU_CGEN_HW is defined in cpu.h. */ -#define CPU(x) (CPU_CGEN_HW (current_cpu)->x) - -#endif /* CGEN_CPU_H */ diff --git a/sim/common/cgen-defs.h b/sim/common/cgen-defs.h deleted file mode 100644 index cf9c028..0000000 --- a/sim/common/cgen-defs.h +++ /dev/null @@ -1,183 +0,0 @@ -/* General Cpu tools GENerated simulator support. - Copyright (C) 1996, 1997, 1998, 1999 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 CGEN_DEFS_H -#define CGEN_DEFS_H - -/* Compute number of longs required to hold N bits. */ -#define HOST_LONGS_FOR_BITS(n) \ - (((n) + sizeof (long) * 8 - 1) / sizeof (long) * 8) - -/* Forward decls. Defined in the machine generated files. */ - -/* This holds the contents of the extracted insn. - There are a few common entries (e.g. pc address), and then one big - union with an entry for each of the instruction formats. */ -typedef struct argbuf ARGBUF; - -/* ARGBUF accessors. */ -#define ARGBUF_ADDR(abuf) ((abuf)->addr) -#define ARGBUF_IDESC(abuf) ((abuf)->idesc) -#define ARGBUF_TRACE_P(abuf) ((abuf)->trace_p) -#define ARGBUF_PROFILE_P(abuf) ((abuf)->profile_p) - -/* This is one ARGBUF plus whatever else is needed for WITH_SCACHE support. - At present there is nothing else, but it also provides a level of - abstraction. */ -typedef struct scache SCACHE; - -/* This is a union with one entry for each instruction format. - Each entry contains all of the non-constant inputs of the instruction - in the case of read-before-exec support, or all outputs of the instruction - in the case of write-after-exec support. */ -typedef struct parexec PAREXEC; - -/* An "Instruction DESCriptor". - This is the main handle on an instruction for the simulator. */ -typedef struct idesc IDESC; - -/* Engine support. - ??? This is here because it's needed before eng.h (built by genmloop.sh) - which is needed before cgen-engine.h and cpu.h. - ??? This depends on a cpu family specific type, IADDR, but no machine - generated headers will have been included yet. sim/common currently - requires the typedef of sim_cia in sim-main.h between the inclusion of - sim-basics.h and sim-base.h so this is no different. */ - -/* SEM_ARG is intended to hide whether or not the scache is in use from the - semantic routines. In reality for the with-extraction case it is always - an SCACHE * even when not using the SCACHE since there's no current win to - making it something else ("not using the SCACHE" is like having a cache - size of 1). - The without-extraction case still uses an ARGBUF: - - consistency with scache version - - still need to record which operands are written - This wouldn't be needed if modeling was done in the semantic routines - but this isn't as general as handling it outside of the semantic routines. - For example Shade allows calling user-supplied code before/after each - instruction and this is something that is being planned. - ??? There is still some clumsiness in how much of ARGBUF to use. */ -typedef SCACHE *SEM_ARG; - -/* instruction address - ??? This was intended to be a struct of two elements in the WITH_SCACHE_PBB - case. The first element is the IADDR, the second element is the SCACHE *. - Haven't found the time yet to make this work, but it seemed a nicer approach - than the current br_cache stuff. */ -typedef IADDR PCADDR; - -/* Current instruction address, used by common. */ -typedef IADDR CIA; - -/* Semantic routines' version of the PC. */ -#if WITH_SCACHE_PBB -typedef SCACHE *SEM_PC; -#else -typedef IADDR SEM_PC; -#endif - -/* Kinds of branches. */ -typedef enum { - SEM_BRANCH_UNTAKEN, - /* Branch to an uncacheable address (e.g. j reg). */ - SEM_BRANCH_UNCACHEABLE, - /* Branch to a cacheable (fixed) address. */ - SEM_BRANCH_CACHEABLE -} SEM_BRANCH_TYPE; - -/* Virtual insn support. */ - -/* Opcode table for virtual insns (only used by the simulator). */ -extern const CGEN_INSN cgen_virtual_insn_table[]; - -/* -ve of indices of virtual insns in cgen_virtual_insn_table. */ -typedef enum { - VIRTUAL_INSN_X_INVALID = 0, - VIRTUAL_INSN_X_BEFORE = -1, VIRTUAL_INSN_X_AFTER = -2, - VIRTUAL_INSN_X_BEGIN = -3, - VIRTUAL_INSN_X_CHAIN= -4, VIRTUAL_INSN_X_CTI_CHAIN = -5 -} CGEN_INSN_VIRTUAL_TYPE; - -/* Return non-zero if CGEN_INSN* INSN is a virtual insn. */ -#define CGEN_INSN_VIRTUAL_P(insn) \ - CGEN_INSN_ATTR_VALUE ((insn), CGEN_INSN_VIRTUAL) - -/* GNU C's "computed goto" facility is used to speed things up where - possible. These macros provide a portable way to use them. - Nesting of these switch statements is done by providing an extra argument - that distinguishes them. `N' can be a number or symbol. - Variable `labels_##N' must be initialized with the labels of each case. */ - -#ifdef __GNUC__ -#define SWITCH(N, X) goto *X; -#define CASE(N, X) case_##N##_##X -#define BREAK(N) goto end_switch_##N -#define DEFAULT(N) default_##N -#define ENDSWITCH(N) end_switch_##N:; -#else -#define SWITCH(N, X) switch (X) -#define CASE(N, X) case X /* FIXME: old sem-switch had (@arch@_,X) here */ -#define BREAK(N) break -#define DEFAULT(N) default -#define ENDSWITCH(N) -#endif - -/* Simulator state. */ - -/* Records simulator descriptor so utilities like @cpu@_dump_regs can be - called from gdb. */ -extern SIM_DESC current_state; - -/* Simulator state. */ - -/* CGEN_STATE contains additional state information not present in - sim_state_base. */ - -typedef struct cgen_state { - /* FIXME: Moved to sim_state_base. */ - /* argv, env */ - char **argv; -#define STATE_ARGV(s) ((s) -> cgen_state.argv) - /* FIXME: Move to sim_state_base. */ - char **envp; -#define STATE_ENVP(s) ((s) -> cgen_state.envp) - - /* Non-zero if no tracing or profiling is selected. */ - int run_fast_p; -#define STATE_RUN_FAST_P(sd) ((sd) -> cgen_state.run_fast_p) -} CGEN_STATE; - -/* Various utilities. */ - -/* Called after sim_post_argv_init to do any cgen initialization. */ -extern void cgen_init (SIM_DESC); - -/* Return the name of an insn. */ -extern CPU_INSN_NAME_FN cgen_insn_name; - -/* Return the maximum number of extra bytes required for a sim_cpu struct. */ -/* ??? Ok, yes, this is less pretty than it should be. Give me a better - language [or suggest a better way]. */ -extern int cgen_cpu_max_extra_bytes (void); - -/* Target supplied routine to process an invalid instruction. */ -extern SEM_PC sim_engine_invalid_insn (SIM_CPU *, IADDR, SEM_PC); - -#endif /* CGEN_DEFS_H */ diff --git a/sim/common/cgen-engine.h b/sim/common/cgen-engine.h deleted file mode 100644 index a0daf80..0000000 --- a/sim/common/cgen-engine.h +++ /dev/null @@ -1,431 +0,0 @@ -/* Engine header for Cpu tools GENerated simulators. - Copyright (C) 1998, 1999 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. */ - -/* This file must be included after eng.h and before ${cpu}.h. - ??? A lot of this could be moved to genmloop.sh to be put in eng.h - and thus remove some conditional compilation. Worth it? */ - -/* Semantic functions come in six versions on two axes: - fast/full-featured, and using one of the simple/scache/compilation engines. - A full featured simulator is always provided. --enable-sim-fast includes - support for fast execution by duplicating the semantic code but leaving - out all features like tracing and profiling. - Using the scache is selected with --enable-sim-scache. */ -/* FIXME: --enable-sim-fast not implemented yet. */ -/* FIXME: undecided how to handle WITH_SCACHE_PBB. */ - -/* There are several styles of engines, all generally supported by the - same code: - - WITH_SCACHE && WITH_SCACHE_PBB - pseudo-basic-block scaching - WITH_SCACHE && !WITH_SCACHE_PBB - scaching on an insn by insn basis - !WITH_SCACHE - simple engine: fetch an insn, execute an insn - - The !WITH_SCACHE case can also be broken up into two flavours: - extract the fields of the insn into an ARGBUF struct, or defer the - extraction to the semantic handler. The former can be viewed as the - WITH_SCACHE case with a cache size of 1 (thus there's no need for a - WITH_EXTRACTION macro). The WITH_SCACHE case always extracts the fields - into an ARGBUF struct. */ - -#ifndef CGEN_ENGINE_H -#define CGEN_ENGINE_H - -/* Instruction field support macros. */ - -#define EXTRACT_MSB0_INT(val, total, start, length) \ -(((INT) (val) << ((sizeof (INT) * 8) - (total) + (start))) \ - >> ((sizeof (INT) * 8) - (length))) -#define EXTRACT_MSB0_UINT(val, total, start, length) \ -(((UINT) (val) << ((sizeof (UINT) * 8) - (total) + (start))) \ - >> ((sizeof (UINT) * 8) - (length))) - -#define EXTRACT_LSB0_INT(val, total, start, length) \ -(((INT) (val) << ((sizeof (INT) * 8) - (start) - 1)) \ - >> ((sizeof (INT) * 8) - (length))) -#define EXTRACT_LSB0_UINT(val, total, start, length) \ -(((UINT) (val) << ((sizeof (UINT) * 8) - (start) - 1)) \ - >> ((sizeof (UINT) * 8) - (length))) - -/* Semantic routines. */ - -/* Type of the machine generated extraction fns. */ -/* ??? No longer used. */ -typedef void (EXTRACT_FN) (SIM_CPU *, IADDR, CGEN_INSN_INT, ARGBUF *); - -/* Type of the machine generated semantic fns. */ - -#if WITH_SCACHE - -/* Instruction fields are extracted into ARGBUF before calling the - semantic routine. */ -#if HAVE_PARALLEL_INSNS && ! WITH_PARALLEL_GENWRITE -typedef SEM_PC (SEMANTIC_FN) (SIM_CPU *, SEM_ARG, PAREXEC *); -#else -typedef SEM_PC (SEMANTIC_FN) (SIM_CPU *, SEM_ARG); -#endif - -#else - -/* Result of semantic routines is a status indicator (wip). */ -typedef unsigned int SEM_STATUS; - -/* Instruction fields are extracted by the semantic routine. - ??? TODO: multi word insns. */ -#if HAVE_PARALLEL_INSNS && ! WITH_PARALLEL_GENWRITE -typedef SEM_STATUS (SEMANTIC_FN) (SIM_CPU *, SEM_ARG, PAREXEC *, CGEN_INSN_INT); -#else -typedef SEM_STATUS (SEMANTIC_FN) (SIM_CPU *, SEM_ARG, CGEN_INSN_INT); -#endif - -#endif - -/* In the ARGBUF struct, a pointer to the semantic routine for the insn. */ - -union sem { -#if ! WITH_SEM_SWITCH_FULL - SEMANTIC_FN *sem_full; -#endif -#if ! WITH_SEM_SWITCH_FAST - SEMANTIC_FN *sem_fast; -#endif -#if WITH_SEM_SWITCH_FULL || WITH_SEM_SWITCH_FAST -#ifdef __GNUC__ - void *sem_case; -#else - int sem_case; -#endif -#endif -}; - -/* Set the appropriate semantic handler in ABUF. */ - -#if WITH_SEM_SWITCH_FULL -#ifdef __GNUC__ -#define SEM_SET_FULL_CODE(abuf, idesc) \ - do { (abuf)->semantic.sem_case = (idesc)->sem_full_lab; } while (0) -#else -#define SEM_SET_FULL_CODE(abuf, idesc) \ - do { (abuf)->semantic.sem_case = (idesc)->num; } while (0) -#endif -#else -#define SEM_SET_FULL_CODE(abuf, idesc) \ - do { (abuf)->semantic.sem_full = (idesc)->sem_full; } while (0) -#endif - -#if WITH_SEM_SWITCH_FAST -#ifdef __GNUC__ -#define SEM_SET_FAST_CODE(abuf, idesc) \ - do { (abuf)->semantic.sem_case = (idesc)->sem_fast_lab; } while (0) -#else -#define SEM_SET_FAST_CODE(abuf, idesc) \ - do { (abuf)->semantic.sem_case = (idesc)->num; } while (0) -#endif -#else -#define SEM_SET_FAST_CODE(abuf, idesc) \ - do { (abuf)->semantic.sem_fast = (idesc)->sem_fast; } while (0) -#endif - -#define SEM_SET_CODE(abuf, idesc, fast_p) \ -do { \ - if (fast_p) \ - SEM_SET_FAST_CODE ((abuf), (idesc)); \ - else \ - SEM_SET_FULL_CODE ((abuf), (idesc)); \ -} while (0) - -/* Return non-zero if IDESC is a conditional or unconditional CTI. */ - -#define IDESC_CTI_P(idesc) \ - ((CGEN_ATTR_BOOLS (CGEN_INSN_ATTRS ((idesc)->idata)) \ - & (CGEN_ATTR_MASK (CGEN_INSN_COND_CTI) \ - | CGEN_ATTR_MASK (CGEN_INSN_UNCOND_CTI))) \ - != 0) - -/* Return non-zero if IDESC is a skip insn. */ - -#define IDESC_SKIP_P(idesc) \ - ((CGEN_ATTR_BOOLS (CGEN_INSN_ATTRS ((idesc)->idata)) \ - & CGEN_ATTR_MASK (CGEN_INSN_SKIP_CTI)) \ - != 0) - -/* Return pointer to ARGBUF given ptr to SCACHE. */ -#define SEM_ARGBUF(sem_arg) (& (sem_arg) -> argbuf) - -/* There are several styles of engines, all generally supported by the - same code: - - WITH_SCACHE && WITH_SCACHE_PBB - pseudo-basic-block scaching - WITH_SCACHE && !WITH_SCACHE_PBB - scaching on an insn by insn basis - !WITH_SCACHE - simple engine: fetch an insn, execute an insn - - ??? The !WITH_SCACHE case can also be broken up into two flavours: - extract the fields of the insn into an ARGBUF struct, or defer the - extraction to the semantic handler. The WITH_SCACHE case always - extracts the fields into an ARGBUF struct. */ - -#if WITH_SCACHE - -#define CIA_ADDR(cia) (cia) - -#if WITH_SCACHE_PBB - -/* Return the scache pointer of the current insn. */ -#define SEM_SEM_ARG(vpc, sc) (vpc) - -/* Return the virtual pc of the next insn to execute - (assuming this isn't a cti or the branch isn't taken). */ -#define SEM_NEXT_VPC(sem_arg, pc, len) ((sem_arg) + 1) - -/* Update the instruction counter. */ -#define PBB_UPDATE_INSN_COUNT(cpu,sc) \ - (CPU_INSN_COUNT (cpu) += SEM_ARGBUF (sc) -> fields.chain.insn_count) - -/* Do not append a `;' to invocations of this. - npc,br_type are for communication between the cti insn and cti-chain. */ -#define SEM_BRANCH_INIT \ - IADDR npc = 0; /* assign a value for -Wall */ \ - SEM_BRANCH_TYPE br_type = SEM_BRANCH_UNTAKEN; - -/* SEM_IN_SWITCH is defined at the top of the mainloop.c files - generated by genmloop.sh. It exists so generated semantic code needn't - care whether it's being put in a switch or in a function. */ -#ifdef SEM_IN_SWITCH -#define SEM_BRANCH_FINI(pcvar) \ -do { \ - pbb_br_npc = npc; \ - pbb_br_type = br_type; \ -} while (0) -#else /* 1 semantic function per instruction */ -#define SEM_BRANCH_FINI(pcvar) \ -do { \ - CPU_PBB_BR_NPC (current_cpu) = npc; \ - CPU_PBB_BR_TYPE (current_cpu) = br_type; \ -} while (0) -#endif - -#define SEM_BRANCH_VIA_CACHE(cpu, sc, newval, pcvar) \ -do { \ - npc = (newval); \ - br_type = SEM_BRANCH_CACHEABLE; \ -} while (0) - -#define SEM_BRANCH_VIA_ADDR(cpu, sc, newval, pcvar) \ -do { \ - npc = (newval); \ - br_type = SEM_BRANCH_UNCACHEABLE; \ -} while (0) - -#define SEM_SKIP_COMPILE(cpu, sc, skip) \ -do { \ - SEM_ARGBUF (sc) -> skip_count = (skip); \ -} while (0) - -#define SEM_SKIP_INSN(cpu, sc, vpcvar) \ -do { \ - (vpcvar) += SEM_ARGBUF (sc) -> skip_count; \ -} while (0) - -#else /* ! WITH_SCACHE_PBB */ - -#define SEM_SEM_ARG(vpc, sc) (sc) - -#define SEM_NEXT_VPC(sem_arg, pc, len) ((pc) + (len)) - -/* ??? May wish to move taken_p out of here and make it explicit. */ -#define SEM_BRANCH_INIT \ - int taken_p = 0; - -#ifndef TARGET_SEM_BRANCH_FINI -#define TARGET_SEM_BRANCH_FINI(pcvar, taken_p) -#endif -#define SEM_BRANCH_FINI(pcvar) \ - do { TARGET_SEM_BRANCH_FINI (pcvar, taken_p); } while (0) - -#define SEM_BRANCH_VIA_CACHE(cpu, sc, newval, pcvar) \ -do { \ - (pcvar) = (newval); \ - taken_p = 1; \ -} while (0) - -#define SEM_BRANCH_VIA_ADDR(cpu, sc, newval, pcvar) \ -do { \ - (pcvar) = (newval); \ - taken_p = 1; \ -} while (0) - -#endif /* ! WITH_SCACHE_PBB */ - -#else /* ! WITH_SCACHE */ - -/* This is the "simple" engine case. */ - -#define CIA_ADDR(cia) (cia) - -#define SEM_SEM_ARG(vpc, sc) (sc) - -#define SEM_NEXT_VPC(sem_arg, pc, len) ((pc) + (len)) - -#define SEM_BRANCH_INIT \ - int taken_p = 0; - -#define SEM_BRANCH_VIA_CACHE(cpu, abuf, newval, pcvar) \ -do { \ - (pcvar) = (newval); \ - taken_p = 1; \ -} while (0) - -#define SEM_BRANCH_VIA_ADDR(cpu, abuf, newval, pcvar) \ -do { \ - (pcvar) = (newval); \ - taken_p = 1; \ -} while (0) - -/* Finish off branch insns. - The target must define TARGET_SEM_BRANCH_FINI. - ??? This can probably go away when define-execute is finished. */ -#define SEM_BRANCH_FINI(pcvar, bool_attrs) \ - do { TARGET_SEM_BRANCH_FINI ((pcvar), (bool_attrs), taken_p); } while (0) - -/* Finish off non-branch insns. - The target must define TARGET_SEM_NBRANCH_FINI. - ??? This can probably go away when define-execute is finished. */ -#define SEM_NBRANCH_FINI(pcvar, bool_attrs) \ - do { TARGET_SEM_NBRANCH_FINI ((pcvar), (bool_attrs)); } while (0) - -#endif /* ! WITH_SCACHE */ - -/* Instruction information. */ - -/* Sanity check, at most one of these may be true. */ -#if WITH_PARALLEL_READ + WITH_PARALLEL_WRITE + WITH_PARALLEL_GENWRITE > 1 -#error "At most one of WITH_PARALLEL_{READ,WRITE,GENWRITE} can be true." -#endif - -/* Compile time computable instruction data. */ - -struct insn_sem { - /* The instruction type (a number that identifies each insn over the - entire architecture). */ - CGEN_INSN_TYPE type; - - /* Index in IDESC table. */ - int index; - - /* Semantic format number. */ - int sfmt; - -#if HAVE_PARALLEL_INSNS && ! WITH_PARALLEL_ONLY - /* Index in IDESC table of parallel handler. */ - int par_index; -#endif - -#if WITH_PARALLEL_READ - /* Index in IDESC table of read handler. */ - int read_index; -#endif - -#if WITH_PARALLEL_WRITE - /* Index in IDESC table of writeback handler. */ - int write_index; -#endif -}; - -/* Entry in semantic function table. - This information is copied to the insn descriptor table at run-time. */ - -struct sem_fn_desc { - /* Index in IDESC table. */ - int index; - - /* Function to perform the semantics of the insn. */ - SEMANTIC_FN *fn; -}; - -/* Run-time computed instruction descriptor. */ - -struct idesc { -#if WITH_SEM_SWITCH_FAST -#ifdef __GNUC__ - void *sem_fast_lab; -#else - /* nothing needed, switch's on `num' member */ -#endif -#else - SEMANTIC_FN *sem_fast; -#endif - -#if WITH_SEM_SWITCH_FULL -#ifdef __GNUC__ - void *sem_full_lab; -#else - /* nothing needed, switch's on `num' member */ -#endif -#else - SEMANTIC_FN *sem_full; -#endif - - /* Parallel support. */ -#if HAVE_PARALLEL_INSNS && (! WITH_PARALLEL_ONLY || (WITH_PARALLEL_ONLY && ! WITH_PARALLEL_GENWRITE)) - /* Pointer to parallel handler if serial insn. - Pointer to readahead/writeback handler if parallel insn. */ - struct idesc *par_idesc; -#endif - - /* Instruction number (index in IDESC table, profile table). - Also used to switch on in non-gcc semantic switches. */ - int num; - - /* Semantic format id. */ - int sfmt; - - /* instruction data (name, attributes, size, etc.) */ - const CGEN_INSN *idata; - - /* instruction attributes, copied from `idata' for speed */ - const CGEN_INSN_ATTR_TYPE *attrs; - - /* instruction length in bytes, copied from `idata' for speed */ - int length; - - /* profiling/modelling support */ - const INSN_TIMING *timing; -}; - -/* Tracing/profiling. */ - -/* Return non-zero if a before/after handler is needed. - When tracing/profiling a selected range there's no need to slow - down simulation of the other insns (except to get more accurate data!). - - ??? May wish to profile all insns if doing insn tracing, or to - get more accurate cycle data. - - First test ANY_P so we avoid a potentially expensive HIT_P call - [if there are lots of address ranges]. */ - -#define PC_IN_TRACE_RANGE_P(cpu, pc) \ - (TRACE_ANY_P (cpu) \ - && ADDR_RANGE_HIT_P (TRACE_RANGE (CPU_TRACE_DATA (cpu)), (pc))) -#define PC_IN_PROFILE_RANGE_P(cpu, pc) \ - (PROFILE_ANY_P (cpu) \ - && ADDR_RANGE_HIT_P (PROFILE_RANGE (CPU_PROFILE_DATA (cpu)), (pc))) - -#endif /* CGEN_ENGINE_H */ diff --git a/sim/common/cgen-fpu.c b/sim/common/cgen-fpu.c deleted file mode 100644 index 3a8d519..0000000 --- a/sim/common/cgen-fpu.c +++ /dev/null @@ -1,32 +0,0 @@ -/* CGEN fpu support - Copyright (C) 1999 Cygnus Solutions. */ - -#include "sim-main.h" -#include "sim-fpu.h" - -/* Return boolean indicating if X is an snan. */ - -BI -cgen_sf_snan_p (CGEN_FPU* fpu, SF x) -{ - sim_fpu op1; - - sim_fpu_32to (&op1, x); - return sim_fpu_is_nan (&op1); -} - -BI -cgen_df_snan_p (CGEN_FPU* fpu, DF x) -{ - sim_fpu op1; - - sim_fpu_64to (&op1, x); - return sim_fpu_is_nan (&op1); -} - -/* No-op fpu error handler. */ - -void -cgen_fpu_ignore_errors (CGEN_FPU* fpu, int status) -{ -} diff --git a/sim/common/cgen-fpu.h b/sim/common/cgen-fpu.h deleted file mode 100644 index bc3364e..0000000 --- a/sim/common/cgen-fpu.h +++ /dev/null @@ -1,212 +0,0 @@ -/* CGEN fpu support - Copyright (C) 1999 Cygnus Solutions. */ - -#ifndef CGEN_FPU_H -#define CGEN_FPU_H - -/* Floating point support is a little more complicated. - We want to support using either host fp insns or an accurate fp library. - We also want to support easily added variants (e.g. modified ieee). - This is done by vectoring all calls through a table. */ - -typedef USI SF; -typedef UDI DF; -typedef struct { SI parts[3]; } XF; -typedef struct { SI parts[4]; } TF; - -#ifndef TARGET_EXT_FP_WORDS -#define TARGET_EXT_FP_WORDS 4 -#endif - -/* forward decl */ -typedef struct cgen_fp_ops CGEN_FP_OPS; - -/* Instance of an fpu. */ - -typedef struct { - /* Usually a pointer back to the SIM_CPU struct. */ - void* owner; - /* Pointer to ops struct, rather than copy of it, to avoid bloating - SIM_CPU struct. */ - CGEN_FP_OPS* ops; -} CGEN_FPU; - -/* result of cmp */ - -typedef enum { - /* ??? May wish to distinguish qnan/snan here. */ - FP_CMP_EQ, FP_CMP_LT, FP_CMP_GT, FP_CMP_NAN -} CGEN_FP_CMP; - -/* error handler */ - -typedef void (CGEN_FPU_ERROR_FN) (CGEN_FPU*, int); - -/* fpu operation table */ - -struct cgen_fp_ops { - - /* error (e.g. signalling nan) handler, supplied by owner */ - - CGEN_FPU_ERROR_FN *error; - - /* basic SF ops */ - - SF (*addsf) (CGEN_FPU*, SF, SF); - SF (*subsf) (CGEN_FPU*, SF, SF); - SF (*mulsf) (CGEN_FPU*, SF, SF); - SF (*divsf) (CGEN_FPU*, SF, SF); - SF (*negsf) (CGEN_FPU*, SF); - SF (*abssf) (CGEN_FPU*, SF); - SF (*sqrtsf) (CGEN_FPU*, SF); - SF (*invsf) (CGEN_FPU*, SF); - SF (*cossf) (CGEN_FPU*, SF); - SF (*sinsf) (CGEN_FPU*, SF); - SF (*minsf) (CGEN_FPU*, SF, SF); - SF (*maxsf) (CGEN_FPU*, SF, SF); - - /* ??? to be revisited */ - CGEN_FP_CMP (*cmpsf) (CGEN_FPU*, SF, SF); - int (*eqsf) (CGEN_FPU*, SF, SF); - int (*nesf) (CGEN_FPU*, SF, SF); - int (*ltsf) (CGEN_FPU*, SF, SF); - int (*lesf) (CGEN_FPU*, SF, SF); - int (*gtsf) (CGEN_FPU*, SF, SF); - int (*gesf) (CGEN_FPU*, SF, SF); - - /* basic DF ops */ - - DF (*adddf) (CGEN_FPU*, DF, DF); - DF (*subdf) (CGEN_FPU*, DF, DF); - DF (*muldf) (CGEN_FPU*, DF, DF); - DF (*divdf) (CGEN_FPU*, DF, DF); - DF (*negdf) (CGEN_FPU*, DF); - DF (*absdf) (CGEN_FPU*, DF); - DF (*sqrtdf) (CGEN_FPU*, DF); - DF (*invdf) (CGEN_FPU*, DF); - DF (*cosdf) (CGEN_FPU*, DF); - DF (*sindf) (CGEN_FPU*, DF); - DF (*mindf) (CGEN_FPU*, DF, DF); - DF (*maxdf) (CGEN_FPU*, DF, DF); - - /* ??? to be revisited */ - CGEN_FP_CMP (*cmpdf) (CGEN_FPU*, DF, DF); - int (*eqdf) (CGEN_FPU*, DF, DF); - int (*nedf) (CGEN_FPU*, DF, DF); - int (*ltdf) (CGEN_FPU*, DF, DF); - int (*ledf) (CGEN_FPU*, DF, DF); - int (*gtdf) (CGEN_FPU*, DF, DF); - int (*gedf) (CGEN_FPU*, DF, DF); - - /* SF/DF conversion ops */ - - DF (*fextsfdf) (CGEN_FPU*, SF); - SF (*ftruncdfsf) (CGEN_FPU*, DF); - - SF (*floatsisf) (CGEN_FPU*, SI); - SF (*floatdisf) (CGEN_FPU*, DI); - SF (*ufloatsisf) (CGEN_FPU*, USI); - SF (*ufloatdisf) (CGEN_FPU*, UDI); - - SI (*fixsfsi) (CGEN_FPU*, SF); - DI (*fixsfdi) (CGEN_FPU*, SF); - USI (*ufixsfsi) (CGEN_FPU*, SF); - UDI (*ufixsfdi) (CGEN_FPU*, SF); - - DF (*floatsidf) (CGEN_FPU*, SI); - DF (*floatdidf) (CGEN_FPU*, DI); - DF (*ufloatsidf) (CGEN_FPU*, USI); - DF (*ufloatdidf) (CGEN_FPU*, UDI); - - SI (*fixdfsi) (CGEN_FPU*, DF); - DI (*fixdfdi) (CGEN_FPU*, DF); - USI (*ufixdfsi) (CGEN_FPU*, DF); - UDI (*ufixdfdi) (CGEN_FPU*, DF); - - /* XF mode support (kept separate 'cus not always present) */ - - XF (*addxf) (CGEN_FPU*, XF, XF); - XF (*subxf) (CGEN_FPU*, XF, XF); - XF (*mulxf) (CGEN_FPU*, XF, XF); - XF (*divxf) (CGEN_FPU*, XF, XF); - XF (*negxf) (CGEN_FPU*, XF); - XF (*absxf) (CGEN_FPU*, XF); - XF (*sqrtxf) (CGEN_FPU*, XF); - XF (*invxf) (CGEN_FPU*, XF); - XF (*cosxf) (CGEN_FPU*, XF); - XF (*sinxf) (CGEN_FPU*, XF); - XF (*minxf) (CGEN_FPU*, XF, XF); - XF (*maxxf) (CGEN_FPU*, XF, XF); - - CGEN_FP_CMP (*cmpxf) (CGEN_FPU*, XF, XF); - int (*eqxf) (CGEN_FPU*, XF, XF); - int (*nexf) (CGEN_FPU*, XF, XF); - int (*ltxf) (CGEN_FPU*, XF, XF); - int (*lexf) (CGEN_FPU*, XF, XF); - int (*gtxf) (CGEN_FPU*, XF, XF); - int (*gexf) (CGEN_FPU*, XF, XF); - - XF (*extsfxf) (CGEN_FPU*, SF); - XF (*extdfxf) (CGEN_FPU*, DF); - SF (*truncxfsf) (CGEN_FPU*, XF); - DF (*truncxfdf) (CGEN_FPU*, XF); - - XF (*floatsixf) (CGEN_FPU*, SI); - XF (*floatdixf) (CGEN_FPU*, DI); - XF (*ufloatsixf) (CGEN_FPU*, USI); - XF (*ufloatdixf) (CGEN_FPU*, UDI); - - SI (*fixxfsi) (CGEN_FPU*, XF); - DI (*fixxfdi) (CGEN_FPU*, XF); - USI (*ufixxfsi) (CGEN_FPU*, XF); - UDI (*ufixxfdi) (CGEN_FPU*, XF); - - /* TF mode support (kept separate 'cus not always present) */ - - TF (*addtf) (CGEN_FPU*, TF, TF); - TF (*subtf) (CGEN_FPU*, TF, TF); - TF (*multf) (CGEN_FPU*, TF, TF); - TF (*divtf) (CGEN_FPU*, TF, TF); - TF (*negtf) (CGEN_FPU*, TF); - TF (*abstf) (CGEN_FPU*, TF); - TF (*sqrttf) (CGEN_FPU*, TF); - TF (*invtf) (CGEN_FPU*, TF); - TF (*costf) (CGEN_FPU*, TF); - TF (*sintf) (CGEN_FPU*, TF); - TF (*mintf) (CGEN_FPU*, TF, TF); - TF (*maxtf) (CGEN_FPU*, TF, TF); - - CGEN_FP_CMP (*cmptf) (CGEN_FPU*, TF, TF); - int (*eqtf) (CGEN_FPU*, TF, TF); - int (*netf) (CGEN_FPU*, TF, TF); - int (*lttf) (CGEN_FPU*, TF, TF); - int (*letf) (CGEN_FPU*, TF, TF); - int (*gttf) (CGEN_FPU*, TF, TF); - int (*getf) (CGEN_FPU*, TF, TF); - - TF (*extsftf) (CGEN_FPU*, SF); - TF (*extdftf) (CGEN_FPU*, DF); - SF (*trunctfsf) (CGEN_FPU*, TF); - DF (*trunctfdf) (CGEN_FPU*, TF); - - TF (*floatsitf) (CGEN_FPU*, SI); - TF (*floatditf) (CGEN_FPU*, DI); - TF (*ufloatsitf) (CGEN_FPU*, USI); - TF (*ufloatditf) (CGEN_FPU*, UDI); - - SI (*fixtfsi) (CGEN_FPU*, TF); - DI (*fixtfdi) (CGEN_FPU*, TF); - USI (*ufixtfsi) (CGEN_FPU*, TF); - UDI (*ufixtfdi) (CGEN_FPU*, TF); - -}; - -extern void cgen_init_accurate_fpu (SIM_CPU*, CGEN_FPU*, CGEN_FPU_ERROR_FN*); - -BI cgen_sf_snan_p (CGEN_FPU*, SF); -BI cgen_df_snan_p (CGEN_FPU*, DF); - -/* no-op fp error handler */ -extern CGEN_FPU_ERROR_FN cgen_fpu_ignore_errors; - -#endif /* CGEN_FPU_H */ diff --git a/sim/common/cgen-mem.h b/sim/common/cgen-mem.h deleted file mode 100644 index 186adc6..0000000 --- a/sim/common/cgen-mem.h +++ /dev/null @@ -1,229 +0,0 @@ -/* Memory ops header for CGEN-based simulators. - Copyright (C) 1996, 1997, 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 CGEN_MEM_H -#define CGEN_MEM_H - -#ifdef MEMOPS_DEFINE_INLINE -#define MEMOPS_INLINE -#else -#define MEMOPS_INLINE extern inline -#endif - -/* Integer memory read support. - - There is no floating point support. In this context there are no - floating point modes, only floating point operations (whose arguments - and results are arrays of bits that we treat as integer modes). */ - -#if defined (__GNUC__) || defined (MEMOPS_DEFINE_INLINE) -#define DECLARE_GETMEM(mode, size) \ -MEMOPS_INLINE mode \ -XCONCAT2 (GETMEM,mode) (SIM_CPU *cpu, IADDR pc, ADDR a) \ -{ \ - PROFILE_COUNT_READ (cpu, a, XCONCAT2 (MODE_,mode)); \ - /* Don't read anything into "unaligned" here. Bad name choice. */\ - return XCONCAT2 (sim_core_read_unaligned_,size) (cpu, pc, read_map, a); \ -} -#else -#define DECLARE_GETMEM(mode, size) \ -extern mode XCONCAT2 (GETMEM,mode) (SIM_CPU *, IADDR, ADDR); -#endif - -DECLARE_GETMEM (QI, 1) /* TAGS: GETMEMQI */ -DECLARE_GETMEM (UQI, 1) /* TAGS: GETMEMUQI */ -DECLARE_GETMEM (HI, 2) /* TAGS: GETMEMHI */ -DECLARE_GETMEM (UHI, 2) /* TAGS: GETMEMUHI */ -DECLARE_GETMEM (SI, 4) /* TAGS: GETMEMSI */ -DECLARE_GETMEM (USI, 4) /* TAGS: GETMEMUSI */ -DECLARE_GETMEM (DI, 8) /* TAGS: GETMEMDI */ -DECLARE_GETMEM (UDI, 8) /* TAGS: GETMEMUDI */ - -#undef DECLARE_GETMEM - -/* Integer memory write support. */ - -#if defined (__GNUC__) || defined (MEMOPS_DEFINE_INLINE) -#define DECLARE_SETMEM(mode, size) \ -MEMOPS_INLINE void \ -XCONCAT2 (SETMEM,mode) (SIM_CPU *cpu, IADDR pc, ADDR a, mode val) \ -{ \ - PROFILE_COUNT_WRITE (cpu, a, XCONCAT2 (MODE_,mode)); \ - /* Don't read anything into "unaligned" here. Bad name choice. */ \ - XCONCAT2 (sim_core_write_unaligned_,size) (cpu, pc, write_map, a, val); \ -} -#else -#define DECLARE_SETMEM(mode, size) \ -extern void XCONCAT2 (SETMEM,mode) (SIM_CPU *, IADDR, ADDR, mode); -#endif - -DECLARE_SETMEM (QI, 1) /* TAGS: SETMEMQI */ -DECLARE_SETMEM (UQI, 1) /* TAGS: SETMEMUQI */ -DECLARE_SETMEM (HI, 2) /* TAGS: SETMEMHI */ -DECLARE_SETMEM (UHI, 2) /* TAGS: SETMEMUHI */ -DECLARE_SETMEM (SI, 4) /* TAGS: SETMEMSI */ -DECLARE_SETMEM (USI, 4) /* TAGS: SETMEMUSI */ -DECLARE_SETMEM (DI, 8) /* TAGS: SETMEMDI */ -DECLARE_SETMEM (UDI, 8) /* TAGS: SETMEMUDI */ - -#undef DECLARE_SETMEM - -/* Instruction read support. */ - -#if defined (__GNUC__) || defined (MEMOPS_DEFINE_INLINE) -#define DECLARE_GETIMEM(mode, size) \ -MEMOPS_INLINE mode \ -XCONCAT2 (GETIMEM,mode) (SIM_CPU *cpu, IADDR a) \ -{ \ - /*PROFILE_COUNT_READ (cpu, a, XCONCAT2 (MODE_,mode));*/ \ - /* Don't read anything into "unaligned" here. Bad name choice. */\ - return XCONCAT2 (sim_core_read_unaligned_,size) (cpu, a, exec_map, a); \ -} -#else -#define DECLARE_GETIMEM(mode, size) \ -extern mode XCONCAT2 (GETIMEM,mode) (SIM_CPU *, ADDR); -#endif - -DECLARE_GETIMEM (UQI, 1) /* TAGS: GETIMEMUQI */ -DECLARE_GETIMEM (UHI, 2) /* TAGS: GETIMEMUHI */ -DECLARE_GETIMEM (USI, 4) /* TAGS: GETIMEMUSI */ -DECLARE_GETIMEM (UDI, 8) /* TAGS: GETIMEMUDI */ - -#undef DECLARE_GETIMEM - -/* Floating point support. - - ??? One can specify that the integer memory ops should be used instead, - and treat fp values as just a series of bits. One might even bubble - that notion up into the description language. However, that departs from - gcc. One could cross over from gcc's notion and a "series of bits" notion - between there and here, and thus still not require these routines. However, - that's a complication of its own (not that having these fns isn't). - But for now, we do things this way. */ - -#if defined (__GNUC__) || defined (MEMOPS_DEFINE_INLINE) -#define DECLARE_GETMEM(mode, size) \ -MEMOPS_INLINE mode \ -XCONCAT2 (GETMEM,mode) (SIM_CPU *cpu, IADDR pc, ADDR a) \ -{ \ - PROFILE_COUNT_READ (cpu, a, XCONCAT2 (MODE_,mode)); \ - /* Don't read anything into "unaligned" here. Bad name choice. */\ - return XCONCAT2 (sim_core_read_unaligned_,size) (cpu, pc, read_map, a); \ -} -#else -#define DECLARE_GETMEM(mode, size) \ -extern mode XCONCAT2 (GETMEM,mode) (SIM_CPU *, IADDR, ADDR); -#endif - -DECLARE_GETMEM (SF, 4) /* TAGS: GETMEMSF */ -DECLARE_GETMEM (DF, 8) /* TAGS: GETMEMDF */ - -#undef DECLARE_GETMEM - -#if defined (__GNUC__) || defined (MEMOPS_DEFINE_INLINE) -#define DECLARE_SETMEM(mode, size) \ -MEMOPS_INLINE void \ -XCONCAT2 (SETMEM,mode) (SIM_CPU *cpu, IADDR pc, ADDR a, mode val) \ -{ \ - PROFILE_COUNT_WRITE (cpu, a, XCONCAT2 (MODE_,mode)); \ - /* Don't read anything into "unaligned" here. Bad name choice. */ \ - XCONCAT2 (sim_core_write_unaligned_,size) (cpu, pc, write_map, a, val); \ -} -#else -#define DECLARE_SETMEM(mode, size) \ -extern void XCONCAT2 (SETMEM,mode) (SIM_CPU *, IADDR, ADDR, mode); -#endif - -DECLARE_SETMEM (SF, 4) /* TAGS: SETMEMSF */ -DECLARE_SETMEM (DF, 8) /* TAGS: SETMEMDF */ - -#undef DECLARE_SETMEM - -/* GETT<mode>: translate target value at P to host value. - This needn't be very efficient (i.e. can call memcpy) as this is - only used when interfacing with the outside world (e.g. gdb). */ - -#if defined (__GNUC__) || defined (MEMOPS_DEFINE_INLINE) -#define DECLARE_GETT(mode, size) \ -MEMOPS_INLINE mode \ -XCONCAT2 (GETT,mode) (unsigned char *p) \ -{ \ - mode tmp; \ - memcpy (&tmp, p, sizeof (mode)); \ - return XCONCAT2 (T2H_,size) (tmp); \ -} -#else -#define DECLARE_GETT(mode, size) \ -extern mode XCONCAT2 (GETT,mode) (unsigned char *); -#endif - -DECLARE_GETT (QI, 1) /* TAGS: GETTQI */ -DECLARE_GETT (UQI, 1) /* TAGS: GETTUQI */ -DECLARE_GETT (HI, 2) /* TAGS: GETTHI */ -DECLARE_GETT (UHI, 2) /* TAGS: GETTUHI */ -DECLARE_GETT (SI, 4) /* TAGS: GETTSI */ -DECLARE_GETT (USI, 4) /* TAGS: GETTUSI */ -DECLARE_GETT (DI, 8) /* TAGS: GETTDI */ -DECLARE_GETT (UDI, 8) /* TAGS: GETTUDI */ - -#if 0 /* ??? defered until necessary */ -DECLARE_GETT (SF, 4) /* TAGS: GETTSF */ -DECLARE_GETT (DF, 8) /* TAGS: GETTDF */ -DECLARE_GETT (TF, 16) /* TAGS: GETTTF */ -#endif - -#undef DECLARE_GETT - -/* SETT<mode>: translate host value to target value and store at P. - This needn't be very efficient (i.e. can call memcpy) as this is - only used when interfacing with the outside world (e.g. gdb). */ - -#if defined (__GNUC__) || defined (MEMOPS_DEFINE_INLINE) -#define DECLARE_SETT(mode, size) \ -MEMOPS_INLINE void \ -XCONCAT2 (SETT,mode) (unsigned char *buf, mode val) \ -{ \ - mode tmp; \ - tmp = XCONCAT2 (H2T_,size) (val); \ - memcpy (buf, &tmp, sizeof (mode)); \ -} -#else -#define DECLARE_SETT(mode, size) \ -extern mode XCONCAT2 (GETT,mode) (unsigned char *, mode); -#endif - -DECLARE_SETT (QI, 1) /* TAGS: SETTQI */ -DECLARE_SETT (UQI, 1) /* TAGS: SETTUQI */ -DECLARE_SETT (HI, 2) /* TAGS: SETTHI */ -DECLARE_SETT (UHI, 2) /* TAGS: SETTUHI */ -DECLARE_SETT (SI, 4) /* TAGS: SETTSI */ -DECLARE_SETT (USI, 4) /* TAGS: SETTUSI */ -DECLARE_SETT (DI, 8) /* TAGS: SETTDI */ -DECLARE_SETT (UDI, 8) /* TAGS: SETTUDI */ - -#if 0 /* ??? defered until necessary */ -DECLARE_SETT (SF, 4) /* TAGS: SETTSF */ -DECLARE_SETT (DF, 8) /* TAGS: SETTDF */ -DECLARE_SETT (TF, 16) /* TAGS: SETTTF */ -#endif - -#undef DECLARE_SETT - -#endif /* CGEN_MEM_H */ diff --git a/sim/common/cgen-ops.h b/sim/common/cgen-ops.h deleted file mode 100644 index 9a8c909..0000000 --- a/sim/common/cgen-ops.h +++ /dev/null @@ -1,654 +0,0 @@ -/* Semantics ops support for CGEN-based simulators. - Copyright (C) 1996, 1997, 1998, 1999, 2002 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 CGEN_SEM_OPS_H -#define CGEN_SEM_OPS_H - -#include <assert.h> - -#if defined (__GNUC__) && ! defined (SEMOPS_DEFINE_INLINE) -#define SEMOPS_DEFINE_INLINE -#define SEMOPS_INLINE extern inline -#else -#define SEMOPS_INLINE -#endif - -/* Semantic operations. - At one point this file was machine generated. Maybe it will be again. */ - -/* TODO: Lazy encoding/decoding of fp values. */ - -/* These don't really have a mode. */ -#define ANDIF(x, y) ((x) && (y)) -#define ORIF(x, y) ((x) || (y)) - -#define SUBBI(x, y) ((x) - (y)) -#define ANDBI(x, y) ((x) & (y)) -#define ORBI(x, y) ((x) | (y)) -#define XORBI(x, y) ((x) ^ (y)) -#define NEGBI(x) (- (x)) -#define NOTBI(x) (! (BI) (x)) -#define INVBI(x) (~ (x)) -#define EQBI(x, y) ((BI) (x) == (BI) (y)) -#define NEBI(x, y) ((BI) (x) != (BI) (y)) -#define LTBI(x, y) ((BI) (x) < (BI) (y)) -#define LEBI(x, y) ((BI) (x) <= (BI) (y)) -#define GTBI(x, y) ((BI) (x) > (BI) (y)) -#define GEBI(x, y) ((BI) (x) >= (BI) (y)) -#define LTUBI(x, y) ((BI) (x) < (BI) (y)) -#define LEUBI(x, y) ((BI) (x) <= (BI) (y)) -#define GTUBI(x, y) ((BI) (x) > (BI) (y)) -#define GEUBI(x, y) ((BI) (x) >= (BI) (y)) - -#define ADDQI(x, y) ((x) + (y)) -#define SUBQI(x, y) ((x) - (y)) -#define MULQI(x, y) ((x) * (y)) -#define DIVQI(x, y) ((QI) (x) / (QI) (y)) -#define UDIVQI(x, y) ((UQI) (x) / (UQI) (y)) -#define MODQI(x, y) ((QI) (x) % (QI) (y)) -#define UMODQI(x, y) ((UQI) (x) % (UQI) (y)) -#define SRAQI(x, y) ((QI) (x) >> (y)) -#define SRLQI(x, y) ((UQI) (x) >> (y)) -#define SLLQI(x, y) ((UQI) (x) << (y)) -extern QI RORQI (QI, int); -extern QI ROLQI (QI, int); -#define ANDQI(x, y) ((x) & (y)) -#define ORQI(x, y) ((x) | (y)) -#define XORQI(x, y) ((x) ^ (y)) -#define NEGQI(x) (- (x)) -#define NOTQI(x) (! (QI) (x)) -#define INVQI(x) (~ (x)) -#define ABSQI(x) ((x) < 0 ? -(x) : (x)) -#define EQQI(x, y) ((QI) (x) == (QI) (y)) -#define NEQI(x, y) ((QI) (x) != (QI) (y)) -#define LTQI(x, y) ((QI) (x) < (QI) (y)) -#define LEQI(x, y) ((QI) (x) <= (QI) (y)) -#define GTQI(x, y) ((QI) (x) > (QI) (y)) -#define GEQI(x, y) ((QI) (x) >= (QI) (y)) -#define LTUQI(x, y) ((UQI) (x) < (UQI) (y)) -#define LEUQI(x, y) ((UQI) (x) <= (UQI) (y)) -#define GTUQI(x, y) ((UQI) (x) > (UQI) (y)) -#define GEUQI(x, y) ((UQI) (x) >= (UQI) (y)) - -#define ADDHI(x, y) ((x) + (y)) -#define SUBHI(x, y) ((x) - (y)) -#define MULHI(x, y) ((x) * (y)) -#define DIVHI(x, y) ((HI) (x) / (HI) (y)) -#define UDIVHI(x, y) ((UHI) (x) / (UHI) (y)) -#define MODHI(x, y) ((HI) (x) % (HI) (y)) -#define UMODHI(x, y) ((UHI) (x) % (UHI) (y)) -#define SRAHI(x, y) ((HI) (x) >> (y)) -#define SRLHI(x, y) ((UHI) (x) >> (y)) -#define SLLHI(x, y) ((UHI) (x) << (y)) -extern HI RORHI (HI, int); -extern HI ROLHI (HI, int); -#define ANDHI(x, y) ((x) & (y)) -#define ORHI(x, y) ((x) | (y)) -#define XORHI(x, y) ((x) ^ (y)) -#define NEGHI(x) (- (x)) -#define NOTHI(x) (! (HI) (x)) -#define INVHI(x) (~ (x)) -#define ABSHI(x) ((x) < 0 ? -(x) : (x)) -#define EQHI(x, y) ((HI) (x) == (HI) (y)) -#define NEHI(x, y) ((HI) (x) != (HI) (y)) -#define LTHI(x, y) ((HI) (x) < (HI) (y)) -#define LEHI(x, y) ((HI) (x) <= (HI) (y)) -#define GTHI(x, y) ((HI) (x) > (HI) (y)) -#define GEHI(x, y) ((HI) (x) >= (HI) (y)) -#define LTUHI(x, y) ((UHI) (x) < (UHI) (y)) -#define LEUHI(x, y) ((UHI) (x) <= (UHI) (y)) -#define GTUHI(x, y) ((UHI) (x) > (UHI) (y)) -#define GEUHI(x, y) ((UHI) (x) >= (UHI) (y)) - -#define ADDSI(x, y) ((x) + (y)) -#define SUBSI(x, y) ((x) - (y)) -#define MULSI(x, y) ((x) * (y)) -#define DIVSI(x, y) ((SI) (x) / (SI) (y)) -#define UDIVSI(x, y) ((USI) (x) / (USI) (y)) -#define MODSI(x, y) ((SI) (x) % (SI) (y)) -#define UMODSI(x, y) ((USI) (x) % (USI) (y)) -#define SRASI(x, y) ((SI) (x) >> (y)) -#define SRLSI(x, y) ((USI) (x) >> (y)) -#define SLLSI(x, y) ((USI) (x) << (y)) -extern SI RORSI (SI, int); -extern SI ROLSI (SI, int); -#define ANDSI(x, y) ((x) & (y)) -#define ORSI(x, y) ((x) | (y)) -#define XORSI(x, y) ((x) ^ (y)) -#define NEGSI(x) (- (x)) -#define NOTSI(x) (! (SI) (x)) -#define INVSI(x) (~ (x)) -#define ABSSI(x) ((x) < 0 ? -(x) : (x)) -#define EQSI(x, y) ((SI) (x) == (SI) (y)) -#define NESI(x, y) ((SI) (x) != (SI) (y)) -#define LTSI(x, y) ((SI) (x) < (SI) (y)) -#define LESI(x, y) ((SI) (x) <= (SI) (y)) -#define GTSI(x, y) ((SI) (x) > (SI) (y)) -#define GESI(x, y) ((SI) (x) >= (SI) (y)) -#define LTUSI(x, y) ((USI) (x) < (USI) (y)) -#define LEUSI(x, y) ((USI) (x) <= (USI) (y)) -#define GTUSI(x, y) ((USI) (x) > (USI) (y)) -#define GEUSI(x, y) ((USI) (x) >= (USI) (y)) - -#ifdef DI_FN_SUPPORT -extern DI ADDDI (DI, DI); -extern DI SUBDI (DI, DI); -extern DI MULDI (DI, DI); -extern DI DIVDI (DI, DI); -extern DI UDIVDI (DI, DI); -extern DI MODDI (DI, DI); -extern DI UMODDI (DI, DI); -extern DI SRADI (DI, int); -extern UDI SRLDI (UDI, int); -extern UDI SLLDI (UDI, int); -extern DI RORDI (DI, int); -extern DI ROLDI (DI, int); -extern DI ANDDI (DI, DI); -extern DI ORDI (DI, DI); -extern DI XORDI (DI, DI); -extern DI NEGDI (DI); -extern int NOTDI (DI); -extern DI INVDI (DI); -extern int EQDI (DI, DI); -extern int NEDI (DI, DI); -extern int LTDI (DI, DI); -extern int LEDI (DI, DI); -extern int GTDI (DI, DI); -extern int GEDI (DI, DI); -extern int LTUDI (UDI, UDI); -extern int LEUDI (UDI, UDI); -extern int GTUDI (UDI, UDI); -extern int GEUDI (UDI, UDI); -#else /* ! DI_FN_SUPPORT */ -#define ADDDI(x, y) ((x) + (y)) -#define SUBDI(x, y) ((x) - (y)) -#define MULDI(x, y) ((x) * (y)) -#define DIVDI(x, y) ((DI) (x) / (DI) (y)) -#define UDIVDI(x, y) ((UDI) (x) / (UDI) (y)) -#define MODDI(x, y) ((DI) (x) % (DI) (y)) -#define UMODDI(x, y) ((UDI) (x) % (UDI) (y)) -#define SRADI(x, y) ((DI) (x) >> (y)) -#define SRLDI(x, y) ((UDI) (x) >> (y)) -#define SLLDI(x, y) ((UDI) (x) << (y)) -extern DI RORDI (DI, int); -extern DI ROLDI (DI, int); -#define ANDDI(x, y) ((x) & (y)) -#define ORDI(x, y) ((x) | (y)) -#define XORDI(x, y) ((x) ^ (y)) -#define NEGDI(x) (- (x)) -#define NOTDI(x) (! (DI) (x)) -#define INVDI(x) (~ (x)) -#define ABSDI(x) ((x) < 0 ? -(x) : (x)) -#define EQDI(x, y) ((DI) (x) == (DI) (y)) -#define NEDI(x, y) ((DI) (x) != (DI) (y)) -#define LTDI(x, y) ((DI) (x) < (DI) (y)) -#define LEDI(x, y) ((DI) (x) <= (DI) (y)) -#define GTDI(x, y) ((DI) (x) > (DI) (y)) -#define GEDI(x, y) ((DI) (x) >= (DI) (y)) -#define LTUDI(x, y) ((UDI) (x) < (UDI) (y)) -#define LEUDI(x, y) ((UDI) (x) <= (UDI) (y)) -#define GTUDI(x, y) ((UDI) (x) > (UDI) (y)) -#define GEUDI(x, y) ((UDI) (x) >= (UDI) (y)) -#endif /* DI_FN_SUPPORT */ - -#define EXTBIQI(x) ((QI) (BI) (x)) -#define EXTBIHI(x) ((HI) (BI) (x)) -#define EXTBISI(x) ((SI) (BI) (x)) -#if defined (DI_FN_SUPPORT) -extern DI EXTBIDI (BI); -#else -#define EXTBIDI(x) ((DI) (BI) (x)) -#endif -#define EXTQIHI(x) ((HI) (QI) (x)) -#define EXTQISI(x) ((SI) (QI) (x)) -#if defined (DI_FN_SUPPORT) -extern DI EXTQIDI (QI); -#else -#define EXTQIDI(x) ((DI) (QI) (x)) -#endif -#define EXTHIHI(x) ((HI) (HI) (x)) -#define EXTHISI(x) ((SI) (HI) (x)) -#define EXTSISI(x) ((SI) (SI) (x)) -#if defined (DI_FN_SUPPORT) -extern DI EXTHIDI (HI); -#else -#define EXTHIDI(x) ((DI) (HI) (x)) -#endif -#if defined (DI_FN_SUPPORT) -extern DI EXTSIDI (SI); -#else -#define EXTSIDI(x) ((DI) (SI) (x)) -#endif - -#define ZEXTBIQI(x) ((QI) (BI) (x)) -#define ZEXTBIHI(x) ((HI) (BI) (x)) -#define ZEXTBISI(x) ((SI) (BI) (x)) -#if defined (DI_FN_SUPPORT) -extern DI ZEXTBIDI (BI); -#else -#define ZEXTBIDI(x) ((DI) (BI) (x)) -#endif -#define ZEXTQIHI(x) ((HI) (UQI) (x)) -#define ZEXTQISI(x) ((SI) (UQI) (x)) -#if defined (DI_FN_SUPPORT) -extern DI ZEXTQIDI (QI); -#else -#define ZEXTQIDI(x) ((DI) (UQI) (x)) -#endif -#define ZEXTHISI(x) ((SI) (UHI) (x)) -#define ZEXTHIHI(x) ((HI) (UHI) (x)) -#define ZEXTSISI(x) ((SI) (USI) (x)) -#if defined (DI_FN_SUPPORT) -extern DI ZEXTHIDI (HI); -#else -#define ZEXTHIDI(x) ((DI) (UHI) (x)) -#endif -#if defined (DI_FN_SUPPORT) -extern DI ZEXTSIDI (SI); -#else -#define ZEXTSIDI(x) ((DI) (USI) (x)) -#endif - -#define TRUNCQIBI(x) ((BI) (QI) (x)) -#define TRUNCHIBI(x) ((BI) (HI) (x)) -#define TRUNCHIQI(x) ((QI) (HI) (x)) -#define TRUNCSIBI(x) ((BI) (SI) (x)) -#define TRUNCSIQI(x) ((QI) (SI) (x)) -#define TRUNCSIHI(x) ((HI) (SI) (x)) -#define TRUNCSISI(x) ((SI) (SI) (x)) -#if defined (DI_FN_SUPPORT) -extern BI TRUNCDIBI (DI); -#else -#define TRUNCDIBI(x) ((BI) (DI) (x)) -#endif -#if defined (DI_FN_SUPPORT) -extern QI TRUNCDIQI (DI); -#else -#define TRUNCDIQI(x) ((QI) (DI) (x)) -#endif -#if defined (DI_FN_SUPPORT) -extern HI TRUNCDIHI (DI); -#else -#define TRUNCDIHI(x) ((HI) (DI) (x)) -#endif -#if defined (DI_FN_SUPPORT) -extern SI TRUNCDISI (DI); -#else -#define TRUNCDISI(x) ((SI) (DI) (x)) -#endif - -/* Composing/decomposing the various types. - Word ordering is endian-independent. Words are specified most to least - significant and word number 0 is the most significant word. - ??? May also wish an endian-dependent version. Later. */ - -#ifdef SEMOPS_DEFINE_INLINE - -SEMOPS_INLINE SF -SUBWORDSISF (SI in) -{ - union { SI in; SF out; } x; - x.in = in; - return x.out; -} - -SEMOPS_INLINE DF -SUBWORDDIDF (DI in) -{ - union { DI in; DF out; } x; - x.in = in; - return x.out; -} - -SEMOPS_INLINE QI -SUBWORDSIQI (SI in, int byte) -{ - assert (byte >= 0 && byte <= 3); - return (UQI) (in >> (8 * (3 - byte))) & 0xFF; -} - -SEMOPS_INLINE UQI -SUBWORDSIUQI (SI in, int byte) -{ - assert (byte >= 0 && byte <= 3); - return (UQI) (in >> (8 * (3 - byte))) & 0xFF; -} - -SEMOPS_INLINE QI -SUBWORDDIQI (DI in, int byte) -{ - assert (byte >= 0 && byte <= 7); - return (UQI) (in >> (8 * (7 - byte))) & 0xFF; -} - -SEMOPS_INLINE HI -SUBWORDDIHI (DI in, int word) -{ - assert (word >= 0 && word <= 3); - return (UHI) (in >> (16 * (3 - word))) & 0xFFFF; -} - -SEMOPS_INLINE HI -SUBWORDSIHI (SI in, int word) -{ - if (word == 0) - return (USI) in >> 16; - else - return in; -} - -SEMOPS_INLINE SI -SUBWORDSFSI (SF in) -{ - union { SF in; SI out; } x; - x.in = in; - return x.out; -} - -SEMOPS_INLINE DI -SUBWORDDFDI (DF in) -{ - union { DF in; DI out; } x; - x.in = in; - return x.out; -} - -SEMOPS_INLINE UQI -SUBWORDDIUQI (DI in, int byte) -{ - assert (byte >= 0 && byte <= 7); - return (UQI) (in >> (8 * (7 - byte))); -} - -SEMOPS_INLINE SI -SUBWORDDISI (DI in, int word) -{ - if (word == 0) - return (UDI) in >> 32; - else - return in; -} - -SEMOPS_INLINE SI -SUBWORDDFSI (DF in, int word) -{ - /* Note: typedef UDI DF; */ - if (word == 0) - return (UDI) in >> 32; - else - return in; -} - -SEMOPS_INLINE SI -SUBWORDXFSI (XF in, int word) -{ - /* Note: typedef struct { SI parts[3]; } XF; */ - union { XF in; SI out[3]; } x; - x.in = in; - return x.out[word]; -} - -SEMOPS_INLINE SI -SUBWORDTFSI (TF in, int word) -{ - /* Note: typedef struct { SI parts[4]; } TF; */ - union { TF in; SI out[4]; } x; - x.in = in; - return x.out[word]; -} - -SEMOPS_INLINE DI -JOINSIDI (SI x0, SI x1) -{ - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) - return MAKEDI (x0, x1); - else - return MAKEDI (x1, x0); -} - -SEMOPS_INLINE DF -JOINSIDF (SI x0, SI x1) -{ - union { SI in[2]; DF out; } x; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) - x.in[0] = x0, x.in[1] = x1; - else - x.in[1] = x0, x.in[0] = x1; - return x.out; -} - -SEMOPS_INLINE XF -JOINSIXF (SI x0, SI x1, SI x2) -{ - union { SI in[3]; XF out; } x; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) - x.in[0] = x0, x.in[1] = x1, x.in[2] = x2; - else - x.in[2] = x0, x.in[1] = x1, x.in[0] = x2; - return x.out; -} - -SEMOPS_INLINE TF -JOINSITF (SI x0, SI x1, SI x2, SI x3) -{ - union { SI in[4]; TF out; } x; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) - x.in[0] = x0, x.in[1] = x1, x.in[2] = x2, x.in[3] = x3; - else - x.in[3] = x0, x.in[2] = x1, x.in[1] = x2, x.in[0] = x3; - return x.out; -} - -#else - -QI SUBWORDSIQI (SI); -HI SUBWORDSIHI (HI); -SI SUBWORDSFSI (SF); -SF SUBWORDSISF (SI); -DI SUBWORDDFDI (DF); -DF SUBWORDDIDF (DI); -QI SUBWORDDIQI (DI, int); -HI SUBWORDDIHI (DI, int); -SI SUBWORDDISI (DI, int); -SI SUBWORDDFSI (DF, int); -SI SUBWORDXFSI (XF, int); -SI SUBWORDTFSI (TF, int); - -UQI SUBWORDSIUQI (SI); -UQI SUBWORDDIUQI (DI); - -DI JOINSIDI (SI, SI); -DF JOINSIDF (SI, SI); -XF JOINSIXF (SI, SI, SI); -TF JOINSITF (SI, SI, SI, SI); - -#endif /* SUBWORD,JOIN */ - -/* Semantic support utilities. */ - -#ifdef SEMOPS_DEFINE_INLINE - -SEMOPS_INLINE SI -ADDCSI (SI a, SI b, BI c) -{ - SI res = ADDSI (a, ADDSI (b, c)); - return res; -} - -SEMOPS_INLINE BI -ADDCFSI (SI a, SI b, BI c) -{ - SI tmp = ADDSI (a, ADDSI (b, c)); - BI res = ((USI) tmp < (USI) a) || (c && tmp == a); - return res; -} - -SEMOPS_INLINE BI -ADDOFSI (SI a, SI b, BI c) -{ - SI tmp = ADDSI (a, ADDSI (b, c)); - BI res = (((a < 0) == (b < 0)) - && ((a < 0) != (tmp < 0))); - return res; -} - -SEMOPS_INLINE SI -SUBCSI (SI a, SI b, BI c) -{ - SI res = SUBSI (a, ADDSI (b, c)); - return res; -} - -SEMOPS_INLINE BI -SUBCFSI (SI a, SI b, BI c) -{ - BI res = ((USI) a < (USI) b) || (c && a == b); - return res; -} - -SEMOPS_INLINE BI -SUBOFSI (SI a, SI b, BI c) -{ - SI tmp = SUBSI (a, ADDSI (b, c)); - BI res = (((a < 0) != (b < 0)) - && ((a < 0) != (tmp < 0))); - return res; -} - -SEMOPS_INLINE HI -ADDCHI (HI a, HI b, BI c) -{ - HI res = ADDHI (a, ADDHI (b, c)); - return res; -} - -SEMOPS_INLINE BI -ADDCFHI (HI a, HI b, BI c) -{ - HI tmp = ADDHI (a, ADDHI (b, c)); - BI res = ((UHI) tmp < (UHI) a) || (c && tmp == a); - return res; -} - -SEMOPS_INLINE BI -ADDOFHI (HI a, HI b, BI c) -{ - HI tmp = ADDHI (a, ADDHI (b, c)); - BI res = (((a < 0) == (b < 0)) - && ((a < 0) != (tmp < 0))); - return res; -} - -SEMOPS_INLINE HI -SUBCHI (HI a, HI b, BI c) -{ - HI res = SUBHI (a, ADDHI (b, c)); - return res; -} - -SEMOPS_INLINE BI -SUBCFHI (HI a, HI b, BI c) -{ - BI res = ((UHI) a < (UHI) b) || (c && a == b); - return res; -} - -SEMOPS_INLINE BI -SUBOFHI (HI a, HI b, BI c) -{ - HI tmp = SUBHI (a, ADDHI (b, c)); - BI res = (((a < 0) != (b < 0)) - && ((a < 0) != (tmp < 0))); - return res; -} - -SEMOPS_INLINE QI -ADDCQI (QI a, QI b, BI c) -{ - QI res = ADDQI (a, ADDQI (b, c)); - return res; -} - -SEMOPS_INLINE BI -ADDCFQI (QI a, QI b, BI c) -{ - QI tmp = ADDQI (a, ADDQI (b, c)); - BI res = ((UQI) tmp < (UQI) a) || (c && tmp == a); - return res; -} - -SEMOPS_INLINE BI -ADDOFQI (QI a, QI b, BI c) -{ - QI tmp = ADDQI (a, ADDQI (b, c)); - BI res = (((a < 0) == (b < 0)) - && ((a < 0) != (tmp < 0))); - return res; -} - -SEMOPS_INLINE QI -SUBCQI (QI a, QI b, BI c) -{ - QI res = SUBQI (a, ADDQI (b, c)); - return res; -} - -SEMOPS_INLINE BI -SUBCFQI (QI a, QI b, BI c) -{ - BI res = ((UQI) a < (UQI) b) || (c && a == b); - return res; -} - -SEMOPS_INLINE BI -SUBOFQI (QI a, QI b, BI c) -{ - QI tmp = SUBQI (a, ADDQI (b, c)); - BI res = (((a < 0) != (b < 0)) - && ((a < 0) != (tmp < 0))); - return res; -} - -#else - -SI ADDCSI (SI, SI, BI); -UBI ADDCFSI (SI, SI, BI); -UBI ADDOFSI (SI, SI, BI); -SI SUBCSI (SI, SI, BI); -UBI SUBCFSI (SI, SI, BI); -UBI SUBOFSI (SI, SI, BI); -HI ADDCHI (HI, HI, BI); -UBI ADDCFHI (HI, HI, BI); -UBI ADDOFHI (HI, HI, BI); -HI SUBCHI (HI, HI, BI); -UBI SUBCFHI (HI, HI, BI); -UBI SUBOFHI (HI, HI, BI); -QI ADDCQI (QI, QI, BI); -UBI ADDCFQI (QI, QI, BI); -UBI ADDOFQI (QI, QI, BI); -QI SUBCQI (QI, QI, BI); -UBI SUBCFQI (QI, QI, BI); -UBI SUBOFQI (QI, QI, BI); - -#endif - -#endif /* CGEN_SEM_OPS_H */ diff --git a/sim/common/cgen-par.c b/sim/common/cgen-par.c deleted file mode 100644 index a47d26c..0000000 --- a/sim/common/cgen-par.c +++ /dev/null @@ -1,490 +0,0 @@ -/* Simulator parallel routines for CGEN simulators (and maybe others). - Copyright (C) 1999, 2000 Free Software Foundation, Inc. - Contributed by Cygnus Solutions. - -This file is part of the GNU instruction set simulator. - -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 "cgen-mem.h" -#include "cgen-par.h" - -/* Functions required by the cgen interface. These functions add various - kinds of writes to the write queue. */ -void sim_queue_bi_write (SIM_CPU *cpu, BI *target, BI value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_BI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.bi_write.target = target; - element->kinds.bi_write.value = value; -} - -void sim_queue_qi_write (SIM_CPU *cpu, UQI *target, UQI value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_QI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.qi_write.target = target; - element->kinds.qi_write.value = value; -} - -void sim_queue_si_write (SIM_CPU *cpu, SI *target, SI value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_SI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.si_write.target = target; - element->kinds.si_write.value = value; -} - -void sim_queue_sf_write (SIM_CPU *cpu, SI *target, SF value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_SF_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.sf_write.target = target; - element->kinds.sf_write.value = value; -} - -void sim_queue_pc_write (SIM_CPU *cpu, USI value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_PC_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.pc_write.value = value; -} - -void sim_queue_fn_hi_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, UINT, UHI), - UINT regno, - UHI value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_HI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_hi_write.function = write_function; - element->kinds.fn_hi_write.regno = regno; - element->kinds.fn_hi_write.value = value; -} - -void sim_queue_fn_si_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, UINT, USI), - UINT regno, - USI value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_SI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_si_write.function = write_function; - element->kinds.fn_si_write.regno = regno; - element->kinds.fn_si_write.value = value; -} - -void sim_queue_fn_sf_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, UINT, SF), - UINT regno, - SF value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_SF_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_sf_write.function = write_function; - element->kinds.fn_sf_write.regno = regno; - element->kinds.fn_sf_write.value = value; -} - -void sim_queue_fn_di_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, UINT, DI), - UINT regno, - DI value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_DI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_di_write.function = write_function; - element->kinds.fn_di_write.regno = regno; - element->kinds.fn_di_write.value = value; -} - -void sim_queue_fn_xi_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, UINT, SI *), - UINT regno, - SI *value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_XI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_xi_write.function = write_function; - element->kinds.fn_xi_write.regno = regno; - element->kinds.fn_xi_write.value[0] = value[0]; - element->kinds.fn_xi_write.value[1] = value[1]; - element->kinds.fn_xi_write.value[2] = value[2]; - element->kinds.fn_xi_write.value[3] = value[3]; -} - -void sim_queue_fn_df_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, UINT, DF), - UINT regno, - DF value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_DF_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_df_write.function = write_function; - element->kinds.fn_df_write.regno = regno; - element->kinds.fn_df_write.value = value; -} - -void sim_queue_fn_pc_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, USI), - USI value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_PC_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_pc_write.function = write_function; - element->kinds.fn_pc_write.value = value; -} - -void sim_queue_mem_qi_write (SIM_CPU *cpu, SI address, QI value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_MEM_QI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.mem_qi_write.address = address; - element->kinds.mem_qi_write.value = value; -} - -void sim_queue_mem_hi_write (SIM_CPU *cpu, SI address, HI value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_MEM_HI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.mem_hi_write.address = address; - element->kinds.mem_hi_write.value = value; -} - -void sim_queue_mem_si_write (SIM_CPU *cpu, SI address, SI value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_MEM_SI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.mem_si_write.address = address; - element->kinds.mem_si_write.value = value; -} - -void sim_queue_mem_di_write (SIM_CPU *cpu, SI address, DI value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_MEM_DI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.mem_di_write.address = address; - element->kinds.mem_di_write.value = value; -} - -void sim_queue_mem_df_write (SIM_CPU *cpu, SI address, DF value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_MEM_DF_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.mem_df_write.address = address; - element->kinds.mem_df_write.value = value; -} - -void sim_queue_mem_xi_write (SIM_CPU *cpu, SI address, SI *value) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_MEM_XI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.mem_xi_write.address = address; - element->kinds.mem_xi_write.value[0] = value[0]; - element->kinds.mem_xi_write.value[1] = value[1]; - element->kinds.mem_xi_write.value[2] = value[2]; - element->kinds.mem_xi_write.value[3] = value[3]; -} - -void sim_queue_fn_mem_qi_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, IADDR, SI, QI), - SI address, - QI value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_MEM_QI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_mem_qi_write.function = write_function; - element->kinds.fn_mem_qi_write.address = address; - element->kinds.fn_mem_qi_write.value = value; -} - -void sim_queue_fn_mem_hi_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, IADDR, SI, HI), - SI address, - HI value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_MEM_HI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_mem_hi_write.function = write_function; - element->kinds.fn_mem_hi_write.address = address; - element->kinds.fn_mem_hi_write.value = value; -} - -void sim_queue_fn_mem_si_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, IADDR, SI, SI), - SI address, - SI value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_MEM_SI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_mem_si_write.function = write_function; - element->kinds.fn_mem_si_write.address = address; - element->kinds.fn_mem_si_write.value = value; -} - -void sim_queue_fn_mem_di_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, IADDR, SI, DI), - SI address, - DI value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_MEM_DI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_mem_di_write.function = write_function; - element->kinds.fn_mem_di_write.address = address; - element->kinds.fn_mem_di_write.value = value; -} - -void sim_queue_fn_mem_df_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, IADDR, SI, DF), - SI address, - DF value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_MEM_DF_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_mem_df_write.function = write_function; - element->kinds.fn_mem_df_write.address = address; - element->kinds.fn_mem_df_write.value = value; -} - -void sim_queue_fn_mem_xi_write ( - SIM_CPU *cpu, - void (*write_function)(SIM_CPU *cpu, IADDR, SI, SI *), - SI address, - SI *value -) -{ - CGEN_WRITE_QUEUE *q = CPU_WRITE_QUEUE (cpu); - CGEN_WRITE_QUEUE_ELEMENT *element = CGEN_WRITE_QUEUE_NEXT (q); - element->kind = CGEN_FN_MEM_XI_WRITE; - element->insn_address = CPU_PC_GET (cpu); - element->kinds.fn_mem_xi_write.function = write_function; - element->kinds.fn_mem_xi_write.address = address; - element->kinds.fn_mem_xi_write.value[0] = value[0]; - element->kinds.fn_mem_xi_write.value[1] = value[1]; - element->kinds.fn_mem_xi_write.value[2] = value[2]; - element->kinds.fn_mem_xi_write.value[3] = value[3]; -} - -/* Execute a write stored on the write queue. */ -void -cgen_write_queue_element_execute (SIM_CPU *cpu, CGEN_WRITE_QUEUE_ELEMENT *item) -{ - IADDR pc; - switch (CGEN_WRITE_QUEUE_ELEMENT_KIND (item)) - { - case CGEN_BI_WRITE: - *item->kinds.bi_write.target = item->kinds.bi_write.value; - break; - case CGEN_QI_WRITE: - *item->kinds.qi_write.target = item->kinds.qi_write.value; - break; - case CGEN_SI_WRITE: - *item->kinds.si_write.target = item->kinds.si_write.value; - break; - case CGEN_SF_WRITE: - *item->kinds.sf_write.target = item->kinds.sf_write.value; - break; - case CGEN_PC_WRITE: - CPU_PC_SET (cpu, item->kinds.pc_write.value); - break; - case CGEN_FN_HI_WRITE: - item->kinds.fn_hi_write.function (cpu, - item->kinds.fn_hi_write.regno, - item->kinds.fn_hi_write.value); - break; - case CGEN_FN_SI_WRITE: - item->kinds.fn_si_write.function (cpu, - item->kinds.fn_si_write.regno, - item->kinds.fn_si_write.value); - break; - case CGEN_FN_SF_WRITE: - item->kinds.fn_sf_write.function (cpu, - item->kinds.fn_sf_write.regno, - item->kinds.fn_sf_write.value); - break; - case CGEN_FN_DI_WRITE: - item->kinds.fn_di_write.function (cpu, - item->kinds.fn_di_write.regno, - item->kinds.fn_di_write.value); - break; - case CGEN_FN_DF_WRITE: - item->kinds.fn_df_write.function (cpu, - item->kinds.fn_df_write.regno, - item->kinds.fn_df_write.value); - break; - case CGEN_FN_XI_WRITE: - item->kinds.fn_xi_write.function (cpu, - item->kinds.fn_xi_write.regno, - item->kinds.fn_xi_write.value); - break; - case CGEN_FN_PC_WRITE: - item->kinds.fn_pc_write.function (cpu, item->kinds.fn_pc_write.value); - break; - case CGEN_MEM_QI_WRITE: - pc = item->insn_address; - SETMEMQI (cpu, pc, item->kinds.mem_qi_write.address, - item->kinds.mem_qi_write.value); - break; - case CGEN_MEM_HI_WRITE: - pc = item->insn_address; - SETMEMHI (cpu, pc, item->kinds.mem_hi_write.address, - item->kinds.mem_hi_write.value); - break; - case CGEN_MEM_SI_WRITE: - pc = item->insn_address; - SETMEMSI (cpu, pc, item->kinds.mem_si_write.address, - item->kinds.mem_si_write.value); - break; - case CGEN_MEM_DI_WRITE: - pc = item->insn_address; - SETMEMDI (cpu, pc, item->kinds.mem_di_write.address, - item->kinds.mem_di_write.value); - break; - case CGEN_MEM_DF_WRITE: - pc = item->insn_address; - SETMEMDF (cpu, pc, item->kinds.mem_df_write.address, - item->kinds.mem_df_write.value); - break; - case CGEN_MEM_XI_WRITE: - pc = item->insn_address; - SETMEMSI (cpu, pc, item->kinds.mem_xi_write.address, - item->kinds.mem_xi_write.value[0]); - SETMEMSI (cpu, pc, item->kinds.mem_xi_write.address + 4, - item->kinds.mem_xi_write.value[1]); - SETMEMSI (cpu, pc, item->kinds.mem_xi_write.address + 8, - item->kinds.mem_xi_write.value[2]); - SETMEMSI (cpu, pc, item->kinds.mem_xi_write.address + 12, - item->kinds.mem_xi_write.value[3]); - break; - case CGEN_FN_MEM_QI_WRITE: - pc = item->insn_address; - item->kinds.fn_mem_qi_write.function (cpu, pc, - item->kinds.fn_mem_qi_write.address, - item->kinds.fn_mem_qi_write.value); - break; - case CGEN_FN_MEM_HI_WRITE: - pc = item->insn_address; - item->kinds.fn_mem_hi_write.function (cpu, pc, - item->kinds.fn_mem_hi_write.address, - item->kinds.fn_mem_hi_write.value); - break; - case CGEN_FN_MEM_SI_WRITE: - pc = item->insn_address; - item->kinds.fn_mem_si_write.function (cpu, pc, - item->kinds.fn_mem_si_write.address, - item->kinds.fn_mem_si_write.value); - break; - case CGEN_FN_MEM_DI_WRITE: - pc = item->insn_address; - item->kinds.fn_mem_di_write.function (cpu, pc, - item->kinds.fn_mem_di_write.address, - item->kinds.fn_mem_di_write.value); - break; - case CGEN_FN_MEM_DF_WRITE: - pc = item->insn_address; - item->kinds.fn_mem_df_write.function (cpu, pc, - item->kinds.fn_mem_df_write.address, - item->kinds.fn_mem_df_write.value); - break; - case CGEN_FN_MEM_XI_WRITE: - pc = item->insn_address; - item->kinds.fn_mem_xi_write.function (cpu, pc, - item->kinds.fn_mem_xi_write.address, - item->kinds.fn_mem_xi_write.value); - break; - default: - abort (); - break; /* FIXME: for now....print message later. */ - } -} - -/* Utilities for the write queue. */ -CGEN_WRITE_QUEUE_ELEMENT * -cgen_write_queue_overflow (CGEN_WRITE_QUEUE *q) -{ - abort (); /* FIXME: for now....print message later. */ - return 0; -} diff --git a/sim/common/cgen-par.h b/sim/common/cgen-par.h deleted file mode 100644 index fad04b9..0000000 --- a/sim/common/cgen-par.h +++ /dev/null @@ -1,215 +0,0 @@ -/* Simulator header for cgen parallel support. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. - Contributed by Cygnus Solutions. - -This file is part of the GNU instruction set simulator. - -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 CGEN_PAR_H -#define CGEN_PAR_H - -/* Kinds of writes stored on the write queue. */ -enum cgen_write_queue_kind { - CGEN_BI_WRITE, CGEN_QI_WRITE, CGEN_SI_WRITE, CGEN_SF_WRITE, - CGEN_PC_WRITE, - CGEN_FN_HI_WRITE, CGEN_FN_SI_WRITE, CGEN_FN_SF_WRITE, - CGEN_FN_DI_WRITE, CGEN_FN_DF_WRITE, - CGEN_FN_XI_WRITE, CGEN_FN_PC_WRITE, - CGEN_MEM_QI_WRITE, CGEN_MEM_HI_WRITE, CGEN_MEM_SI_WRITE, CGEN_MEM_DI_WRITE, - CGEN_MEM_DF_WRITE, CGEN_MEM_XI_WRITE, - CGEN_FN_MEM_QI_WRITE, CGEN_FN_MEM_HI_WRITE, CGEN_FN_MEM_SI_WRITE, - CGEN_FN_MEM_DI_WRITE, CGEN_FN_MEM_DF_WRITE, CGEN_FN_MEM_XI_WRITE, - CGEN_NUM_WRITE_KINDS -}; - -/* Element of the write queue. */ -typedef struct { - enum cgen_write_queue_kind kind; /* Used to select union member below. */ - IADDR insn_address; /* Address of the insn performing the write. */ - unsigned32 flags; /* Target specific flags. */ - long word1; /* Target specific field. */ - union { - struct { - BI *target; - BI value; - } bi_write; - struct { - UQI *target; - QI value; - } qi_write; - struct { - SI *target; - SI value; - } si_write; - struct { - SI *target; - SF value; - } sf_write; - struct { - USI value; - } pc_write; - struct { - UINT regno; - UHI value; - void (*function)(SIM_CPU *, UINT, UHI); - } fn_hi_write; - struct { - UINT regno; - SI value; - void (*function)(SIM_CPU *, UINT, USI); - } fn_si_write; - struct { - UINT regno; - SF value; - void (*function)(SIM_CPU *, UINT, SF); - } fn_sf_write; - struct { - UINT regno; - DI value; - void (*function)(SIM_CPU *, UINT, DI); - } fn_di_write; - struct { - UINT regno; - DF value; - void (*function)(SIM_CPU *, UINT, DF); - } fn_df_write; - struct { - UINT regno; - SI value[4]; - void (*function)(SIM_CPU *, UINT, SI *); - } fn_xi_write; - struct { - USI value; - void (*function)(SIM_CPU *, USI); - } fn_pc_write; - struct { - SI address; - QI value; - } mem_qi_write; - struct { - SI address; - HI value; - } mem_hi_write; - struct { - SI address; - SI value; - } mem_si_write; - struct { - SI address; - DI value; - } mem_di_write; - struct { - SI address; - DF value; - } mem_df_write; - struct { - SI address; - SI value[4]; - } mem_xi_write; - struct { - SI address; - QI value; - void (*function)(SIM_CPU *, IADDR, SI, QI); - } fn_mem_qi_write; - struct { - SI address; - HI value; - void (*function)(SIM_CPU *, IADDR, SI, HI); - } fn_mem_hi_write; - struct { - SI address; - SI value; - void (*function)(SIM_CPU *, IADDR, SI, SI); - } fn_mem_si_write; - struct { - SI address; - DI value; - void (*function)(SIM_CPU *, IADDR, SI, DI); - } fn_mem_di_write; - struct { - SI address; - DF value; - void (*function)(SIM_CPU *, IADDR, SI, DF); - } fn_mem_df_write; - struct { - SI address; - SI value[4]; - void (*function)(SIM_CPU *, IADDR, SI, SI *); - } fn_mem_xi_write; - } kinds; -} CGEN_WRITE_QUEUE_ELEMENT; - -#define CGEN_WRITE_QUEUE_ELEMENT_KIND(element) ((element)->kind) -#define CGEN_WRITE_QUEUE_ELEMENT_IADDR(element) ((element)->insn_address) -#define CGEN_WRITE_QUEUE_ELEMENT_FLAGS(element) ((element)->flags) -#define CGEN_WRITE_QUEUE_ELEMENT_WORD1(element) ((element)->word1) - -extern void cgen_write_queue_element_execute ( - SIM_CPU *, CGEN_WRITE_QUEUE_ELEMENT * -); - -/* Instance of the queue for parallel write-after support. */ -/* FIXME: Should be dynamic? */ -#define CGEN_WRITE_QUEUE_SIZE (64 * 4) /* 64 writes x 4 insns -- for now. */ - -typedef struct { - int index; - CGEN_WRITE_QUEUE_ELEMENT q[CGEN_WRITE_QUEUE_SIZE]; -} CGEN_WRITE_QUEUE; - -#define CGEN_WRITE_QUEUE_CLEAR(queue) ((queue)->index = 0) -#define CGEN_WRITE_QUEUE_INDEX(queue) ((queue)->index) -#define CGEN_WRITE_QUEUE_ELEMENT(queue, ix) (&(queue)->q[(ix)]) - -#define CGEN_WRITE_QUEUE_NEXT(queue) ( \ - (queue)->index < CGEN_WRITE_QUEUE_SIZE \ - ? &(queue)->q[(queue)->index++] \ - : cgen_write_queue_overflow (queue) \ -) - -extern CGEN_WRITE_QUEUE_ELEMENT *cgen_write_queue_overflow (CGEN_WRITE_QUEUE *); - -/* Functions for queuing writes. Used by semantic code. */ -extern void sim_queue_bi_write (SIM_CPU *, BI *, BI); -extern void sim_queue_qi_write (SIM_CPU *, UQI *, UQI); -extern void sim_queue_si_write (SIM_CPU *, SI *, SI); -extern void sim_queue_sf_write (SIM_CPU *, SI *, SF); - -extern void sim_queue_pc_write (SIM_CPU *, USI); - -extern void sim_queue_fn_hi_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, UHI), UINT, UHI); -extern void sim_queue_fn_si_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, USI), UINT, USI); -extern void sim_queue_fn_sf_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, SF), UINT, SF); -extern void sim_queue_fn_di_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, DI), UINT, DI); -extern void sim_queue_fn_df_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, DF), UINT, DF); -extern void sim_queue_fn_xi_write (SIM_CPU *, void (*)(SIM_CPU *, UINT, SI *), UINT, SI *); -extern void sim_queue_fn_pc_write (SIM_CPU *, void (*)(SIM_CPU *, USI), USI); - -extern void sim_queue_mem_qi_write (SIM_CPU *, SI, QI); -extern void sim_queue_mem_hi_write (SIM_CPU *, SI, HI); -extern void sim_queue_mem_si_write (SIM_CPU *, SI, SI); -extern void sim_queue_mem_di_write (SIM_CPU *, SI, DI); -extern void sim_queue_mem_df_write (SIM_CPU *, SI, DF); -extern void sim_queue_mem_xi_write (SIM_CPU *, SI, SI *); - -extern void sim_queue_fn_mem_qi_write (SIM_CPU *, void (*)(SIM_CPU *, IADDR, SI, QI), SI, QI); -extern void sim_queue_fn_mem_hi_write (SIM_CPU *, void (*)(SIM_CPU *, IADDR, SI, HI), SI, HI); -extern void sim_queue_fn_mem_si_write (SIM_CPU *, void (*)(SIM_CPU *, IADDR, SI, SI), SI, SI); -extern void sim_queue_fn_mem_di_write (SIM_CPU *, void (*)(SIM_CPU *, IADDR, SI, DI), SI, DI); -extern void sim_queue_fn_mem_df_write (SIM_CPU *, void (*)(SIM_CPU *, IADDR, SI, DF), SI, DF); -extern void sim_queue_fn_mem_xi_write (SIM_CPU *, void (*)(SIM_CPU *, IADDR, SI, SI *), SI, SI *); - -#endif /* CGEN_PAR_H */ diff --git a/sim/common/cgen-run.c b/sim/common/cgen-run.c deleted file mode 100644 index 031bc1c..0000000 --- a/sim/common/cgen-run.c +++ /dev/null @@ -1,237 +0,0 @@ -/* Main simulator loop for CGEN-based simulators. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Cygnus Solutions. - -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. */ - -/* ??? These are old notes, kept around for now. - Collecting profile data and tracing slow us down so we don't do them in - "fast mode". - There are 6 possibilities on 2 axes: - - no-scaching, insn-scaching, basic-block-scaching - - run with full features or run fast - Supporting all six possibilities in one executable is a bit much but - supporting full/fast seems reasonable. - If the scache is configured in it is always used. - If pbb-scaching is configured in it is always used. - ??? Sometimes supporting more than one set of semantic functions will make - the simulator too large - this should be configurable. Blah blah blah. - ??? Supporting full/fast can be more modular, blah blah blah. - When the framework is more modular, this can be. -*/ - -#include "sim-main.h" -#include "sim-assert.h" - -#ifndef SIM_ENGINE_PREFIX_HOOK -#define SIM_ENGINE_PREFIX_HOOK(sd) -#endif -#ifndef SIM_ENGINE_POSTFIX_HOOK -#define SIM_ENGINE_POSTFIX_HOOK(sd) -#endif - -static sim_event_handler has_stepped; -static void prime_cpu (SIM_CPU *, int); -static void engine_run_1 (SIM_DESC, int, int); -static void engine_run_n (SIM_DESC, int, int, int, int); - -/* sim_resume for cgen */ - -void -sim_resume (SIM_DESC sd, int step, int siggnal) -{ - sim_engine *engine = STATE_ENGINE (sd); - jmp_buf buf; - int jmpval; - - ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - - /* we only want to be single stepping the simulator once */ - if (engine->stepper != NULL) - { - sim_events_deschedule (sd, engine->stepper); - engine->stepper = NULL; - } - if (step) - engine->stepper = sim_events_schedule (sd, 1, has_stepped, sd); - - sim_module_resume (sd); - -#if WITH_SCACHE - if (USING_SCACHE_P (sd)) - scache_flush (sd); -#endif - - /* run/resume the simulator */ - - sim_engine_set_run_state (sd, sim_running, 0); - - engine->jmpbuf = &buf; - jmpval = setjmp (buf); - if (jmpval == sim_engine_start_jmpval - || jmpval == sim_engine_restart_jmpval) - { - 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); - /* ??? Setting max_insns to 0 allows pbb/jit code to run wild and is - useful if all one wants to do is run a benchmark. Need some better - way to identify this case. */ - int max_insns = (step - ? 1 - : (nr_cpus == 1 - /*&& wip:no-events*/ - /* Don't do this if running under gdb, need to - poll ui for events. */ - && STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE) - ? 0 - : 8); /*FIXME: magic number*/ - int fast_p = STATE_RUN_FAST_P (sd); - - sim_events_preprocess (sd, last_cpu_nr >= nr_cpus, next_cpu_nr >= nr_cpus); - if (next_cpu_nr >= nr_cpus) - next_cpu_nr = 0; - if (nr_cpus == 1) - engine_run_1 (sd, max_insns, fast_p); - else - engine_run_n (sd, next_cpu_nr, nr_cpus, max_insns, fast_p); - } -#if 1 /*wip*/ - else - { - /* Account for the last insn executed. */ - SIM_CPU *cpu = STATE_CPU (sd, sim_engine_last_cpu_nr (sd)); - ++ CPU_INSN_COUNT (cpu); - TRACE_INSN_FINI (cpu, NULL, 1); - } -#endif - - engine->jmpbuf = NULL; - - { - int i; - int nr_cpus = sim_engine_nr_cpus (sd); - -#if 0 /*wip,ignore*/ - /* If the loop exits, either we single-stepped or @cpu@_engine_stop - was called. */ - if (step) - sim_engine_set_run_state (sd, sim_stopped, SIM_SIGTRAP); - else - sim_engine_set_run_state (sd, pending_reason, pending_sigrc); -#endif - - for (i = 0; i < nr_cpus; ++i) - { - SIM_CPU *cpu = STATE_CPU (sd, i); - - PROFILE_TOTAL_INSN_COUNT (CPU_PROFILE_DATA (cpu)) += CPU_INSN_COUNT (cpu); - } - } - - sim_module_suspend (sd); -} - -/* Halt the simulator after just one instruction. */ - -static void -has_stepped (SIM_DESC sd, void *data) -{ - ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - sim_engine_halt (sd, NULL, NULL, NULL_CIA, sim_stopped, SIM_SIGTRAP); -} - -/* Prepare a cpu for running. - MAX_INSNS is the number of insns to execute per time slice. - If 0 it means the cpu can run as long as it wants (e.g. until the - program completes). - ??? Perhaps this should be an argument to the engine_fn. */ - -static void -prime_cpu (SIM_CPU *cpu, int max_insns) -{ - CPU_MAX_SLICE_INSNS (cpu) = max_insns; - CPU_INSN_COUNT (cpu) = 0; - - /* Initialize the insn descriptor table. - This has to be done after all initialization so we just defer it to - here. */ - - if (MACH_PREPARE_RUN (CPU_MACH (cpu))) - (* MACH_PREPARE_RUN (CPU_MACH (cpu))) (cpu); -} - -/* Main loop, for 1 cpu. */ - -static void -engine_run_1 (SIM_DESC sd, int max_insns, int fast_p) -{ - sim_cpu *cpu = STATE_CPU (sd, 0); - ENGINE_FN *fn = fast_p ? CPU_FAST_ENGINE_FN (cpu) : CPU_FULL_ENGINE_FN (cpu); - - prime_cpu (cpu, max_insns); - - while (1) - { - SIM_ENGINE_PREFIX_HOOK (sd); - - (*fn) (cpu); - - SIM_ENGINE_POSTFIX_HOOK (sd); - - /* process any events */ - if (sim_events_tick (sd)) - sim_events_process (sd); - } -} - -/* Main loop, for multiple cpus. */ - -static void -engine_run_n (SIM_DESC sd, int next_cpu_nr, int nr_cpus, int max_insns, int fast_p) -{ - int i; - ENGINE_FN *engine_fns[MAX_NR_PROCESSORS]; - - for (i = 0; i < nr_cpus; ++i) - { - SIM_CPU *cpu = STATE_CPU (sd, i); - - engine_fns[i] = fast_p ? CPU_FAST_ENGINE_FN (cpu) : CPU_FULL_ENGINE_FN (cpu); - prime_cpu (cpu, max_insns); - } - - while (1) - { - SIM_ENGINE_PREFIX_HOOK (sd); - - /* FIXME: proper cycling of all of them, blah blah blah. */ - while (next_cpu_nr != nr_cpus) - { - SIM_CPU *cpu = STATE_CPU (sd, next_cpu_nr); - - (* engine_fns[next_cpu_nr]) (cpu); - ++next_cpu_nr; - } - - SIM_ENGINE_POSTFIX_HOOK (sd); - - /* process any events */ - if (sim_events_tick (sd)) - sim_events_process (sd); - } -} diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c deleted file mode 100644 index 282497c..0000000 --- a/sim/common/cgen-scache.c +++ /dev/null @@ -1,476 +0,0 @@ -/* Simulator cache routines for CGEN simulators (and maybe others). - Copyright (C) 1996, 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. */ - -#define SCACHE_DEFINE_INLINE - -#include "sim-main.h" -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#include "libiberty.h" -#include "sim-options.h" -#include "sim-io.h" - -#define MAX(a,b) ((a) > (b) ? (a) : (b)) - -/* Unused address. */ -#define UNUSED_ADDR 0xffffffff - -/* Scache configuration parameters. - ??? Experiments to determine reasonable values is wip. - These are just guesses. */ - -/* Default number of scache elements. - The size of an element is typically 32-64 bytes, so the size of the - default scache will be between 512K and 1M bytes. */ -#ifdef CONFIG_SIM_CACHE_SIZE -#define SCACHE_DEFAULT_CACHE_SIZE CONFIG_SIM_CACHE_SIZE -#else -#define SCACHE_DEFAULT_CACHE_SIZE 16384 -#endif - -/* Minimum cache size. - The m32r port assumes a cache size of at least 2 so it can decode both 16 - bit insns. When compiling we need an extra for the chain entry. And this - must be a multiple of 2. Hence 4 is the minimum (though, for those with - featuritis or itchy pedantic bits, we could make this conditional on - WITH_SCACHE_PBB). */ -#define MIN_SCACHE_SIZE 4 - -/* Ratio of size of text section to size of scache. - When compiling, we don't want to flush the scache more than we have to - but we also don't want it to be exorbitantly(sp?) large. So we pick a high - default value, then reduce it by the size of the program being simulated, - but we don't override any value specified on the command line. - If not specified on the command line, the size to use is computed as - max (MIN_SCACHE_SIZE, - min (DEFAULT_SCACHE_SIZE, - text_size / (base_insn_size * INSN_SCACHE_RATIO))). */ -/* ??? Interesting idea but not currently used. */ -#define INSN_SCACHE_RATIO 4 - -/* Default maximum insn chain length. - The only reason for a maximum is so we can place a maximum size on the - profiling table. Chain lengths are determined by cti's. - 32 is a more reasonable number, but when profiling, the before/after - handlers take up that much more space. The scache is filled from front to - back so all this determines is when the scache needs to be flushed. */ -#define MAX_CHAIN_LENGTH 64 - -/* Default maximum hash list length. */ -#define MAX_HASH_CHAIN_LENGTH 4 - -/* Minimum hash table size. */ -#define MIN_HASH_CHAINS 32 - -/* Ratio of number of scache elements to number of hash lists. - Since the user can only specify the size of the scache, we compute the - size of the hash table as - max (MIN_HASH_CHAINS, scache_size / SCACHE_HASH_RATIO). */ -#define SCACHE_HASH_RATIO 8 - -/* Hash a PC value. - FIXME: May wish to make the hashing architecture specific. - FIXME: revisit */ -#define HASH_PC(pc) (((pc) >> 2) + ((pc) >> 5)) - -static MODULE_INIT_FN scache_init; -static MODULE_UNINSTALL_FN scache_uninstall; - -static DECLARE_OPTION_HANDLER (scache_option_handler); - -#define OPTION_PROFILE_SCACHE (OPTION_START + 0) - -static const OPTION scache_options[] = { - { {"scache-size", optional_argument, NULL, 'c'}, - 'c', "[SIZE]", "Specify size of simulator execution cache", - scache_option_handler }, -#if WITH_SCACHE_PBB - /* ??? It might be nice to allow the user to specify the size of the hash - table, the maximum hash list length, and the maximum chain length, but - for now that might be more akin to featuritis. */ -#endif - { {"profile-scache", optional_argument, NULL, OPTION_PROFILE_SCACHE}, - '\0', "on|off", "Perform simulator execution cache profiling", - scache_option_handler }, - { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } -}; - -static SIM_RC -scache_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, - char *arg, int is_command) -{ - switch (opt) - { - case 'c' : - if (WITH_SCACHE) - { - if (arg != NULL) - { - int n = strtol (arg, NULL, 0); - if (n < MIN_SCACHE_SIZE) - { - sim_io_eprintf (sd, "invalid scache size `%d', must be at least 4", n); - return SIM_RC_FAIL; - } - /* Ensure it's a multiple of 2. */ - if ((n & (n - 1)) != 0) - { - sim_io_eprintf (sd, "scache size `%d' not a multiple of 2\n", n); - { - /* round up to nearest multiple of 2 */ - int i; - for (i = 1; i < n; i <<= 1) - continue; - n = i; - } - sim_io_eprintf (sd, "rounding scache size up to %d\n", n); - } - if (cpu == NULL) - STATE_SCACHE_SIZE (sd) = n; - else - CPU_SCACHE_SIZE (cpu) = n; - } - else - { - if (cpu == NULL) - STATE_SCACHE_SIZE (sd) = SCACHE_DEFAULT_CACHE_SIZE; - else - CPU_SCACHE_SIZE (cpu) = SCACHE_DEFAULT_CACHE_SIZE; - } - } - else - sim_io_eprintf (sd, "Simulator execution cache not enabled, `--scache-size' ignored\n"); - break; - - case OPTION_PROFILE_SCACHE : - if (WITH_SCACHE && WITH_PROFILE_SCACHE_P) - { - /* FIXME: handle cpu != NULL. */ - return sim_profile_set_option (sd, "-scache", PROFILE_SCACHE_IDX, - arg); - } - else - sim_io_eprintf (sd, "Simulator cache profiling not compiled in, `--profile-scache' ignored\n"); - break; - } - - return SIM_RC_OK; -} - -SIM_RC -scache_install (SIM_DESC sd) -{ - sim_add_option_table (sd, NULL, scache_options); - sim_module_add_init_fn (sd, scache_init); - sim_module_add_uninstall_fn (sd, scache_uninstall); - - /* This is the default, it may be overridden on the command line. */ - STATE_SCACHE_SIZE (sd) = WITH_SCACHE; - - return SIM_RC_OK; -} - -static SIM_RC -scache_init (SIM_DESC sd) -{ - int c; - - for (c = 0; c < MAX_NR_PROCESSORS; ++c) - { - SIM_CPU *cpu = STATE_CPU (sd, c); - int elm_size = IMP_PROPS_SCACHE_ELM_SIZE (MACH_IMP_PROPS (CPU_MACH (cpu))); - - /* elm_size is 0 if the cpu doesn't not have scache support */ - if (elm_size == 0) - { - CPU_SCACHE_SIZE (cpu) = 0; - CPU_SCACHE_CACHE (cpu) = NULL; - } - else - { - if (CPU_SCACHE_SIZE (cpu) == 0) - CPU_SCACHE_SIZE (cpu) = STATE_SCACHE_SIZE (sd); - CPU_SCACHE_CACHE (cpu) = - (SCACHE *) xmalloc (CPU_SCACHE_SIZE (cpu) * elm_size); -#if WITH_SCACHE_PBB - CPU_SCACHE_MAX_CHAIN_LENGTH (cpu) = MAX_CHAIN_LENGTH; - CPU_SCACHE_NUM_HASH_CHAIN_ENTRIES (cpu) = MAX_HASH_CHAIN_LENGTH; - CPU_SCACHE_NUM_HASH_CHAINS (cpu) = MAX (MIN_HASH_CHAINS, - CPU_SCACHE_SIZE (cpu) - / SCACHE_HASH_RATIO); - CPU_SCACHE_HASH_TABLE (cpu) = - (SCACHE_MAP *) xmalloc (CPU_SCACHE_NUM_HASH_CHAINS (cpu) - * CPU_SCACHE_NUM_HASH_CHAIN_ENTRIES (cpu) - * sizeof (SCACHE_MAP)); - CPU_SCACHE_PBB_BEGIN (cpu) = (SCACHE *) zalloc (elm_size); - CPU_SCACHE_CHAIN_LENGTHS (cpu) = - (unsigned long *) zalloc ((CPU_SCACHE_MAX_CHAIN_LENGTH (cpu) + 1) - * sizeof (long)); -#endif - } - } - - scache_flush (sd); - - return SIM_RC_OK; -} - -static void -scache_uninstall (SIM_DESC sd) -{ - int c; - - for (c = 0; c < MAX_NR_PROCESSORS; ++c) - { - SIM_CPU *cpu = STATE_CPU (sd, c); - - if (CPU_SCACHE_CACHE (cpu) != NULL) - free (CPU_SCACHE_CACHE (cpu)); -#if WITH_SCACHE_PBB - if (CPU_SCACHE_HASH_TABLE (cpu) != NULL) - free (CPU_SCACHE_HASH_TABLE (cpu)); - if (CPU_SCACHE_PBB_BEGIN (cpu) != NULL) - free (CPU_SCACHE_PBB_BEGIN (cpu)); - if (CPU_SCACHE_CHAIN_LENGTHS (cpu) != NULL) - free (CPU_SCACHE_CHAIN_LENGTHS (cpu)); -#endif - } -} - -void -scache_flush (SIM_DESC sd) -{ - int c; - - for (c = 0; c < MAX_NR_PROCESSORS; ++c) - { - SIM_CPU *cpu = STATE_CPU (sd, c); - scache_flush_cpu (cpu); - } -} - -void -scache_flush_cpu (SIM_CPU *cpu) -{ - int i,n; - - /* Don't bother if cache not in use. */ - if (CPU_SCACHE_SIZE (cpu) == 0) - return; - -#if WITH_SCACHE_PBB - /* It's important that this be reasonably fast as this can be done when - the simulation is running. */ - CPU_SCACHE_NEXT_FREE (cpu) = CPU_SCACHE_CACHE (cpu); - n = CPU_SCACHE_NUM_HASH_CHAINS (cpu) * CPU_SCACHE_NUM_HASH_CHAIN_ENTRIES (cpu); - /* ??? Might be faster to just set the first entry, then update the - "last entry" marker during allocation. */ - for (i = 0; i < n; ++i) - CPU_SCACHE_HASH_TABLE (cpu) [i] . pc = UNUSED_ADDR; -#else - { - int elm_size = IMP_PROPS_SCACHE_ELM_SIZE (MACH_IMP_PROPS (CPU_MACH (cpu))); - SCACHE *sc; - - /* Technically, this may not be necessary, but it helps debugging. */ - memset (CPU_SCACHE_CACHE (cpu), 0, - CPU_SCACHE_SIZE (cpu) * elm_size); - - for (i = 0, sc = CPU_SCACHE_CACHE (cpu); i < CPU_SCACHE_SIZE (cpu); - ++i, sc = (SCACHE *) ((char *) sc + elm_size)) - { - sc->argbuf.addr = UNUSED_ADDR; - } - } -#endif -} - -#if WITH_SCACHE_PBB - -/* Look up PC in the hash table of scache entry points. - Returns the entry or NULL if not found. */ - -SCACHE * -scache_lookup (SIM_CPU *cpu, IADDR pc) -{ - /* FIXME: hash computation is wrong, doesn't take into account - NUM_HASH_CHAIN_ENTRIES. A lot of the hash table will be unused! */ - unsigned int slot = HASH_PC (pc) & (CPU_SCACHE_NUM_HASH_CHAINS (cpu) - 1); - int i, max_i = CPU_SCACHE_NUM_HASH_CHAIN_ENTRIES (cpu); - SCACHE_MAP *scm; - - /* We don't update hit/miss statistics as this is only used when recording - branch target addresses. */ - - scm = & CPU_SCACHE_HASH_TABLE (cpu) [slot]; - for (i = 0; i < max_i && scm->pc != UNUSED_ADDR; ++i, ++scm) - { - if (scm->pc == pc) - return scm->sc; - } - return 0; -} - -/* Look up PC and if not found create an entry for it. - If found the result is a pointer to the SCACHE entry. - If not found the result is NULL, and the address of a buffer of at least - N entries is stored in BUFP. - It's done this way so the caller can still distinguish found/not-found. - If the table is full, it is emptied to make room. - If the maximum length of a hash list is reached a random entry is thrown out - to make room. - ??? One might want to try to make this smarter, but let's see some - measurable benefit first. */ - -SCACHE * -scache_lookup_or_alloc (SIM_CPU *cpu, IADDR pc, int n, SCACHE **bufp) -{ - /* FIXME: hash computation is wrong, doesn't take into account - NUM_HASH_CHAIN_ENTRIES. A lot of the hash table will be unused! */ - unsigned int slot = HASH_PC (pc) & (CPU_SCACHE_NUM_HASH_CHAINS (cpu) - 1); - int i, max_i = CPU_SCACHE_NUM_HASH_CHAIN_ENTRIES (cpu); - SCACHE_MAP *scm; - SCACHE *sc; - - scm = & CPU_SCACHE_HASH_TABLE (cpu) [slot]; - for (i = 0; i < max_i && scm->pc != UNUSED_ADDR; ++i, ++scm) - { - if (scm->pc == pc) - { - PROFILE_COUNT_SCACHE_HIT (cpu); - return scm->sc; - } - } - PROFILE_COUNT_SCACHE_MISS (cpu); - - /* The address we want isn't cached. Bummer. - If the hash chain we have for this address is full, throw out an entry - to make room. */ - - if (i == max_i) - { - /* Rather than do something sophisticated like LRU, we just throw out - a semi-random entry. Let someone else have the joy of saying how - wrong this is. NEXT_FREE is the entry to throw out and cycles - through all possibilities. */ - static int next_free = 0; - - scm = & CPU_SCACHE_HASH_TABLE (cpu) [slot]; - /* FIXME: This seems rather clumsy. */ - for (i = 0; i < next_free; ++i, ++scm) - continue; - ++next_free; - if (next_free == CPU_SCACHE_NUM_HASH_CHAIN_ENTRIES (cpu)) - next_free = 0; - } - - /* At this point SCM points to the hash table entry to use. - Now make sure there's room in the cache. */ - /* FIXME: Kinda weird to use a next_free adjusted scm when cache is - flushed. */ - - { - int elm_size = IMP_PROPS_SCACHE_ELM_SIZE (MACH_IMP_PROPS (CPU_MACH (cpu))); - int elms_used = (((char *) CPU_SCACHE_NEXT_FREE (cpu) - - (char *) CPU_SCACHE_CACHE (cpu)) - / elm_size); - int elms_left = CPU_SCACHE_SIZE (cpu) - elms_used; - - if (elms_left < n) - { - PROFILE_COUNT_SCACHE_FULL_FLUSH (cpu); - scache_flush_cpu (cpu); - } - } - - sc = CPU_SCACHE_NEXT_FREE (cpu); - scm->pc = pc; - scm->sc = sc; - - *bufp = sc; - return NULL; -} - -#endif /* WITH_SCACHE_PBB */ - -/* Print cache access statics for CPU. */ - -void -scache_print_profile (SIM_CPU *cpu, int verbose) -{ - SIM_DESC sd = CPU_STATE (cpu); - unsigned long hits = CPU_SCACHE_HITS (cpu); - unsigned long misses = CPU_SCACHE_MISSES (cpu); - char buf[20]; - unsigned long max_val; - unsigned long *lengths; - int i; - - if (CPU_SCACHE_SIZE (cpu) == 0) - return; - - sim_io_printf (sd, "Simulator Cache Statistics\n\n"); - - /* One could use PROFILE_LABEL_WIDTH here. I chose not to. */ - sim_io_printf (sd, " Cache size: %s\n", - sim_add_commas (buf, sizeof (buf), CPU_SCACHE_SIZE (cpu))); - sim_io_printf (sd, " Hits: %s\n", - sim_add_commas (buf, sizeof (buf), hits)); - sim_io_printf (sd, " Misses: %s\n", - sim_add_commas (buf, sizeof (buf), misses)); - if (hits + misses != 0) - sim_io_printf (sd, " Hit rate: %.2f%%\n", - ((double) hits / ((double) hits + (double) misses)) * 100); - -#if WITH_SCACHE_PBB - sim_io_printf (sd, "\n"); - sim_io_printf (sd, " Hash table size: %s\n", - sim_add_commas (buf, sizeof (buf), CPU_SCACHE_NUM_HASH_CHAINS (cpu))); - sim_io_printf (sd, " Max hash list length: %s\n", - sim_add_commas (buf, sizeof (buf), CPU_SCACHE_NUM_HASH_CHAIN_ENTRIES (cpu))); - sim_io_printf (sd, " Max insn chain length: %s\n", - sim_add_commas (buf, sizeof (buf), CPU_SCACHE_MAX_CHAIN_LENGTH (cpu))); - sim_io_printf (sd, " Cache full flushes: %s\n", - sim_add_commas (buf, sizeof (buf), CPU_SCACHE_FULL_FLUSHES (cpu))); - sim_io_printf (sd, "\n"); - - if (verbose) - { - sim_io_printf (sd, " Insn chain lengths:\n\n"); - max_val = 0; - lengths = CPU_SCACHE_CHAIN_LENGTHS (cpu); - for (i = 1; i < CPU_SCACHE_MAX_CHAIN_LENGTH (cpu); ++i) - if (lengths[i] > max_val) - max_val = lengths[i]; - for (i = 1; i < CPU_SCACHE_MAX_CHAIN_LENGTH (cpu); ++i) - { - sim_io_printf (sd, " %2d: %*s: ", - i, - max_val < 10000 ? 5 : 10, - sim_add_commas (buf, sizeof (buf), lengths[i])); - sim_profile_print_bar (sd, PROFILE_HISTOGRAM_WIDTH, - lengths[i], max_val); - sim_io_printf (sd, "\n"); - } - sim_io_printf (sd, "\n"); - } -#endif /* WITH_SCACHE_PBB */ -} diff --git a/sim/common/cgen-scache.h b/sim/common/cgen-scache.h deleted file mode 100644 index b7a20de..0000000 --- a/sim/common/cgen-scache.h +++ /dev/null @@ -1,162 +0,0 @@ -/* Simulator header for cgen scache support. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Cygnus Solutions. - -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 CGEN_SCACHE_H -#define CGEN_SCACHE_H - -#ifndef WITH_SCACHE -#define WITH_SCACHE 0 -#endif - -/* When caching bb's, instructions are extracted into "chains". - SCACHE_MAP is a hash table into these chains. */ - -typedef struct { - IADDR pc; - SCACHE *sc; -} SCACHE_MAP; - -typedef struct cpu_scache { - /* Simulator cache size. Must be a power of 2. - This is the number of elements in the `cache' member. */ - unsigned int size; -#define CPU_SCACHE_SIZE(cpu) ((cpu) -> cgen_cpu.scache.size) - /* The cache. */ - SCACHE *cache; -#define CPU_SCACHE_CACHE(cpu) ((cpu) -> cgen_cpu.scache.cache) - -#if WITH_SCACHE_PBB - /* Number of hash chains. Must be a power of 2. */ - unsigned int num_hash_chains; -#define CPU_SCACHE_NUM_HASH_CHAINS(cpu) ((cpu) -> cgen_cpu.scache.num_hash_chains) - /* Number of entries in each hash chain. - The hash table is a statically allocated NxM array where - N = num_hash_chains - M = num_hash_chain_entries. */ - unsigned int num_hash_chain_entries; -#define CPU_SCACHE_NUM_HASH_CHAIN_ENTRIES(cpu) ((cpu) -> cgen_cpu.scache.num_hash_chain_entries) - /* Maximum number of instructions in a chain. - ??? This just let's us set a static size of chain_lengths table. - In a simulation that handles more than just the cpu, this might also be - used to keep too many instructions from being executed before checking - for events (or some such). */ - unsigned int max_chain_length; -#define CPU_SCACHE_MAX_CHAIN_LENGTH(cpu) ((cpu) -> cgen_cpu.scache.max_chain_length) - /* Special scache entry for (re)starting bb extraction. */ - SCACHE *pbb_begin; -#define CPU_SCACHE_PBB_BEGIN(cpu) ((cpu) -> cgen_cpu.scache.pbb_begin) - /* Hash table into cached chains. */ - SCACHE_MAP *hash_table; -#define CPU_SCACHE_HASH_TABLE(cpu) ((cpu) -> cgen_cpu.scache.hash_table) - /* Next free entry in cache. */ - SCACHE *next_free; -#define CPU_SCACHE_NEXT_FREE(cpu) ((cpu) -> cgen_cpu.scache.next_free) - - /* Kind of branch being taken. - Only used by functional semantics, not switch form. */ - SEM_BRANCH_TYPE pbb_br_type; -#define CPU_PBB_BR_TYPE(cpu) ((cpu) -> cgen_cpu.scache.pbb_br_type) - /* Target's branch address. */ - IADDR pbb_br_npc; -#define CPU_PBB_BR_NPC(cpu) ((cpu) -> cgen_cpu.scache.pbb_br_npc) -#endif /* WITH_SCACHE_PBB */ - -#if WITH_PROFILE_SCACHE_P - /* Cache hits, misses. */ - unsigned long hits, misses; -#define CPU_SCACHE_HITS(cpu) ((cpu) -> cgen_cpu.scache.hits) -#define CPU_SCACHE_MISSES(cpu) ((cpu) -> cgen_cpu.scache.misses) - -#if WITH_SCACHE_PBB - /* Chain length counts. - Each element is a count of the number of chains created with that - length. */ - unsigned long *chain_lengths; -#define CPU_SCACHE_CHAIN_LENGTHS(cpu) ((cpu) -> cgen_cpu.scache.chain_lengths) - /* Number of times cache was flushed due to its being full. */ - unsigned long full_flushes; -#define CPU_SCACHE_FULL_FLUSHES(cpu) ((cpu) -> cgen_cpu.scache.full_flushes) -#endif -#endif -} CPU_SCACHE; - -/* Hash a PC value. - This is split into two parts to help with moving as much of the - computation out of the main loop. */ -#define CPU_SCACHE_HASH_MASK(cpu) (CPU_SCACHE_SIZE (cpu) - 1) -#define SCACHE_HASH_PC(pc, mask) \ -((CGEN_MIN_INSN_SIZE == 2 ? ((pc) >> 1) \ - : CGEN_MIN_INSN_SIZE == 4 ? ((pc) >> 2) \ - : (pc)) \ - & (mask)) - -/* Non-zero if cache is in use. */ -#define USING_SCACHE_P(sd) (STATE_SCACHE_SIZE (sd) > 0) - -/* Install the simulator cache into the simulator. */ -MODULE_INSTALL_FN scache_install; - -/* Lookup a PC value in the scache [compilation only]. */ -extern SCACHE * scache_lookup (SIM_CPU *, IADDR); -/* Return a pointer to at least N buffers. */ -extern SCACHE *scache_lookup_or_alloc (SIM_CPU *, IADDR, int, SCACHE **); -/* Flush all cpu's scaches. */ -extern void scache_flush (SIM_DESC); -/* Flush a cpu's scache. */ -extern void scache_flush_cpu (SIM_CPU *); - -/* Scache profiling support. */ - -/* Print summary scache usage information. */ -extern void scache_print_profile (SIM_CPU *cpu, int verbose); - -#if WITH_PROFILE_SCACHE_P - -#define PROFILE_COUNT_SCACHE_HIT(cpu) \ -do { \ - if (CPU_PROFILE_FLAGS (cpu) [PROFILE_SCACHE_IDX]) \ - ++ CPU_SCACHE_HITS (cpu); \ -} while (0) -#define PROFILE_COUNT_SCACHE_MISS(cpu) \ -do { \ - if (CPU_PROFILE_FLAGS (cpu) [PROFILE_SCACHE_IDX]) \ - ++ CPU_SCACHE_MISSES (cpu); \ -} while (0) -#define PROFILE_COUNT_SCACHE_CHAIN_LENGTH(cpu,length) \ -do { \ - if (CPU_PROFILE_FLAGS (cpu) [PROFILE_SCACHE_IDX]) \ - ++ CPU_SCACHE_CHAIN_LENGTHS (cpu) [length]; \ -} while (0) -#define PROFILE_COUNT_SCACHE_FULL_FLUSH(cpu) \ -do { \ - if (CPU_PROFILE_FLAGS (cpu) [PROFILE_SCACHE_IDX]) \ - ++ CPU_SCACHE_FULL_FLUSHES (cpu); \ -} while (0) - -#else - -#define PROFILE_COUNT_SCACHE_HIT(cpu) -#define PROFILE_COUNT_SCACHE_MISS(cpu) -#define PROFILE_COUNT_SCACHE_CHAIN_LENGTH(cpu,length) -#define PROFILE_COUNT_SCACHE_FULL_FLUSH(cpu) - -#endif - -#endif /* CGEN_SCACHE_H */ diff --git a/sim/common/cgen-sim.h b/sim/common/cgen-sim.h deleted file mode 100644 index bcb8e5a..0000000 --- a/sim/common/cgen-sim.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Main header file for Cpu tools GENerated simulators. - Copyright (C) 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. */ - -/* This file must be included after sim-base.h. */ - -#ifndef CGEN_SIM_H -#define CGEN_SIM_H - -#include "cgen-defs.h" -#include "cgen-scache.h" -#include "cgen-fpu.h" -#include "cgen-par.h" -#include "cgen-cpu.h" -#include "cgen-trace.h" - -/* This is a machine generated file. */ -#include "cpuall.h" - -#endif /* CGEN_SIM_H */ diff --git a/sim/common/cgen-trace.c b/sim/common/cgen-trace.c deleted file mode 100644 index d978d3e..0000000 --- a/sim/common/cgen-trace.c +++ /dev/null @@ -1,436 +0,0 @@ -/* Tracing support for CGEN-based simulators. - Copyright (C) 1996, 1997, 1998, 1999 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 <errno.h> -#include "dis-asm.h" -#include "bfd.h" -#include "sim-main.h" -#include "sim-fpu.h" - -#undef min -#define min(a,b) ((a) < (b) ? (a) : (b)) - -#ifndef SIZE_INSTRUCTION -#define SIZE_INSTRUCTION 16 -#endif - -#ifndef SIZE_LOCATION -#define SIZE_LOCATION 20 -#endif - -#ifndef SIZE_PC -#define SIZE_PC 6 -#endif - -#ifndef SIZE_LINE_NUMBER -#define SIZE_LINE_NUMBER 4 -#endif - -#ifndef SIZE_CYCLE_COUNT -#define SIZE_CYCLE_COUNT 2 -#endif - -#ifndef SIZE_TOTAL_CYCLE_COUNT -#define SIZE_TOTAL_CYCLE_COUNT 9 -#endif - -#ifndef SIZE_TRACE_BUF -#define SIZE_TRACE_BUF 1024 -#endif - -/* Text is queued in TRACE_BUF because we want to output the insn's cycle - count first but that isn't known until after the insn has executed. - This also handles the queueing of trace results, TRACE_RESULT may be - called multiple times for one insn. */ -static char trace_buf[SIZE_TRACE_BUF]; -/* If NULL, output to stdout directly. */ -static char *bufptr; - -/* Non-zero if this is the first insn in a set of parallel insns. */ -static int first_insn_p; - -/* For communication between trace_insn and trace_result. */ -static int printed_result_p; - -/* Insn and its extracted fields. - Set by trace_insn, used by trace_insn_fini. - ??? Move to SIM_CPU to support heterogeneous multi-cpu case. */ -static const struct cgen_insn *current_insn; -static const struct argbuf *current_abuf; - -void -trace_insn_init (SIM_CPU *cpu, int first_p) -{ - bufptr = trace_buf; - *bufptr = 0; - first_insn_p = first_p; - - /* Set to NULL so trace_insn_fini can know if trace_insn was called. */ - current_insn = NULL; - current_abuf = NULL; -} - -void -trace_insn_fini (SIM_CPU *cpu, const struct argbuf *abuf, int last_p) -{ - SIM_DESC sd = CPU_STATE (cpu); - - /* Was insn traced? It might not be if trace ranges are in effect. */ - if (current_insn == NULL) - return; - - /* The first thing printed is current and total cycle counts. */ - - if (PROFILE_MODEL_P (cpu) - && ARGBUF_PROFILE_P (current_abuf)) - { - unsigned long total = PROFILE_MODEL_TOTAL_CYCLES (CPU_PROFILE_DATA (cpu)); - unsigned long this_insn = PROFILE_MODEL_CUR_INSN_CYCLES (CPU_PROFILE_DATA (cpu)); - - if (last_p) - { - trace_printf (sd, cpu, "%-*ld %-*ld ", - SIZE_CYCLE_COUNT, this_insn, - SIZE_TOTAL_CYCLE_COUNT, total); - } - else - { - trace_printf (sd, cpu, "%-*ld %-*s ", - SIZE_CYCLE_COUNT, this_insn, - SIZE_TOTAL_CYCLE_COUNT, "---"); - } - } - - /* Print the disassembled insn. */ - - trace_printf (sd, cpu, "%s", TRACE_PREFIX (CPU_TRACE_DATA (cpu))); - -#if 0 - /* Print insn results. */ - { - const CGEN_OPINST *opinst = CGEN_INSN_OPERANDS (current_insn); - - if (opinst) - { - int i; - int indices[MAX_OPERAND_INSTANCES]; - - /* Fetch the operands used by the insn. */ - /* FIXME: Add fn ptr to CGEN_CPU_DESC. */ - CGEN_SYM (get_insn_operands) (CPU_CPU_DESC (cpu), current_insn, - 0, CGEN_FIELDS_BITSIZE (&insn_fields), - indices); - - for (i = 0; - CGEN_OPINST_TYPE (opinst) != CGEN_OPINST_END; - ++i, ++opinst) - { - if (CGEN_OPINST_TYPE (opinst) == CGEN_OPINST_OUTPUT) - trace_result (cpu, current_insn, opinst, indices[i]); - } - } - } -#endif - - /* Print anything else requested. */ - - if (*trace_buf) - trace_printf (sd, cpu, " %s\n", trace_buf); - else - trace_printf (sd, cpu, "\n"); -} - -void -trace_insn (SIM_CPU *cpu, const struct cgen_insn *opcode, - const struct argbuf *abuf, IADDR pc) -{ - char disasm_buf[50]; - - printed_result_p = 0; - current_insn = opcode; - current_abuf = abuf; - - if (CGEN_INSN_VIRTUAL_P (opcode)) - { - trace_prefix (CPU_STATE (cpu), cpu, NULL_CIA, pc, 0, - NULL, 0, CGEN_INSN_NAME (opcode)); - return; - } - - CPU_DISASSEMBLER (cpu) (cpu, opcode, abuf, pc, disasm_buf); - trace_prefix (CPU_STATE (cpu), cpu, NULL_CIA, pc, TRACE_LINENUM_P (cpu), - NULL, 0, - "%s%-*s", - first_insn_p ? " " : "|", - SIZE_INSTRUCTION, disasm_buf); -} - -void -trace_extract (SIM_CPU *cpu, IADDR pc, char *name, ...) -{ - va_list args; - int printed_one_p = 0; - char *fmt; - - va_start (args, name); - - trace_printf (CPU_STATE (cpu), cpu, "Extract: 0x%.*lx: %s ", - SIZE_PC, pc, name); - - do { - int type,ival; - - fmt = va_arg (args, char *); - - if (fmt) - { - if (printed_one_p) - trace_printf (CPU_STATE (cpu), cpu, ", "); - printed_one_p = 1; - type = va_arg (args, int); - switch (type) - { - case 'x' : - ival = va_arg (args, int); - trace_printf (CPU_STATE (cpu), cpu, fmt, ival); - break; - default : - abort (); - } - } - } while (fmt); - - va_end (args); - trace_printf (CPU_STATE (cpu), cpu, "\n"); -} - -void -trace_result (SIM_CPU *cpu, char *name, int type, ...) -{ - va_list args; - - va_start (args, type); - if (printed_result_p) - cgen_trace_printf (cpu, ", "); - - switch (type) - { - case 'x' : - default : - cgen_trace_printf (cpu, "%s <- 0x%x", name, va_arg (args, int)); - break; - case 'f': - { - DI di; - sim_fpu f; - - /* this is separated from previous line for sunos cc */ - di = va_arg (args, DI); - sim_fpu_64to (&f, di); - - cgen_trace_printf (cpu, "%s <- ", name); - sim_fpu_printn_fpu (&f, (sim_fpu_print_func *) cgen_trace_printf, 4, cpu); - break; - } - case 'D' : - { - DI di; - /* this is separated from previous line for sunos cc */ - di = va_arg (args, DI); - cgen_trace_printf (cpu, "%s <- 0x%x%08x", name, - GETHIDI(di), GETLODI (di)); - break; - } - } - - printed_result_p = 1; - va_end (args); -} - -/* Print trace output to BUFPTR if active, otherwise print normally. - This is only for tracing semantic code. */ - -void -cgen_trace_printf (SIM_CPU *cpu, char *fmt, ...) -{ - va_list args; - - va_start (args, fmt); - - if (bufptr == NULL) - { - if (TRACE_FILE (CPU_TRACE_DATA (cpu)) == NULL) - (* STATE_CALLBACK (CPU_STATE (cpu))->evprintf_filtered) - (STATE_CALLBACK (CPU_STATE (cpu)), fmt, args); - else - vfprintf (TRACE_FILE (CPU_TRACE_DATA (cpu)), fmt, args); - } - else - { - vsprintf (bufptr, fmt, args); - bufptr += strlen (bufptr); - /* ??? Need version of SIM_ASSERT that is always enabled. */ - if (bufptr - trace_buf > SIZE_TRACE_BUF) - abort (); - } - - va_end (args); -} - -/* Disassembly support. */ - -/* sprintf to a "stream" */ - -int -sim_disasm_sprintf VPARAMS ((SFILE *f, const char *format, ...)) -{ -#ifndef __STDC__ - SFILE *f; - const char *format; -#endif - int n; - va_list args; - - VA_START (args, format); -#ifndef __STDC__ - f = va_arg (args, SFILE *); - format = va_arg (args, char *); -#endif - vsprintf (f->current, format, args); - f->current += n = strlen (f->current); - va_end (args); - return n; -} - -/* Memory read support for an opcodes disassembler. */ - -int -sim_disasm_read_memory (bfd_vma memaddr, bfd_byte *myaddr, unsigned int length, - struct disassemble_info *info) -{ - SIM_CPU *cpu = (SIM_CPU *) info->application_data; - SIM_DESC sd = CPU_STATE (cpu); - unsigned length_read; - - length_read = sim_core_read_buffer (sd, cpu, read_map, myaddr, memaddr, - length); - if (length_read != length) - return EIO; - return 0; -} - -/* Memory error support for an opcodes disassembler. */ - -void -sim_disasm_perror_memory (int status, bfd_vma memaddr, - struct disassemble_info *info) -{ - if (status != EIO) - /* Can't happen. */ - info->fprintf_func (info->stream, "Unknown error %d.", status); - else - /* Actually, address between memaddr and memaddr + len was - out of bounds. */ - info->fprintf_func (info->stream, - "Address 0x%x is out of bounds.", - (int) memaddr); -} - -/* Disassemble using the CGEN opcode table. - ??? While executing an instruction, the insn has been decoded and all its - fields have been extracted. It is certainly possible to do the disassembly - with that data. This seems simpler, but maybe in the future the already - extracted fields will be used. */ - -void -sim_cgen_disassemble_insn (SIM_CPU *cpu, const CGEN_INSN *insn, - const ARGBUF *abuf, IADDR pc, char *buf) -{ - unsigned int length; - unsigned int base_length; - unsigned long insn_value; - struct disassemble_info disasm_info; - SFILE sfile; - union { - unsigned8 bytes[CGEN_MAX_INSN_SIZE]; - unsigned16 shorts[8]; - unsigned32 words[4]; - } insn_buf; - SIM_DESC sd = CPU_STATE (cpu); - CGEN_CPU_DESC cd = CPU_CPU_DESC (cpu); - CGEN_EXTRACT_INFO ex_info; - CGEN_FIELDS *fields = alloca (CGEN_CPU_SIZEOF_FIELDS (cd)); - int insn_bit_length = CGEN_INSN_BITSIZE (insn); - int insn_length = insn_bit_length / 8; - - sfile.buffer = sfile.current = buf; - INIT_DISASSEMBLE_INFO (disasm_info, (FILE *) &sfile, - (fprintf_ftype) sim_disasm_sprintf); - disasm_info.endian = - (bfd_big_endian (STATE_PROG_BFD (sd)) ? BFD_ENDIAN_BIG - : bfd_little_endian (STATE_PROG_BFD (sd)) ? BFD_ENDIAN_LITTLE - : BFD_ENDIAN_UNKNOWN); - - length = sim_core_read_buffer (sd, cpu, read_map, &insn_buf, pc, - insn_length); - - if (length != insn_length) - { - sim_io_error (sd, "unable to read address %x", pc); - } - - /* If the entire insn will fit into an integer, then do it. Otherwise, just - use the bits of the base_insn. */ - if (insn_bit_length <= 32) - base_length = insn_bit_length; - else - base_length = min (cd->base_insn_bitsize, insn_bit_length); - switch (base_length) - { - case 0 : return; /* fake insn, typically "compile" (aka "invalid") */ - case 8 : insn_value = insn_buf.bytes[0]; break; - case 16 : insn_value = T2H_2 (insn_buf.shorts[0]); break; - case 32 : insn_value = T2H_4 (insn_buf.words[0]); break; - default: abort (); - } - - disasm_info.buffer_vma = pc; - disasm_info.buffer = insn_buf.bytes; - disasm_info.buffer_length = length; - - ex_info.dis_info = (PTR) &disasm_info; - ex_info.valid = (1 << length) - 1; - ex_info.insn_bytes = insn_buf.bytes; - - length = (*CGEN_EXTRACT_FN (cd, insn)) (cd, insn, &ex_info, insn_value, fields, pc); - /* Result of extract fn is in bits. */ - /* ??? This assumes that each instruction has a fixed length (and thus - for insns with multiple versions of variable lengths they would each - have their own table entry). */ - if (length == insn_bit_length) - { - (*CGEN_PRINT_FN (cd, insn)) (cd, &disasm_info, insn, fields, pc, length); - } - else - { - /* This shouldn't happen, but aborting is too drastic. */ - strcpy (buf, "***unknown***"); - } -} diff --git a/sim/common/cgen-trace.h b/sim/common/cgen-trace.h deleted file mode 100644 index 623fc1e..0000000 --- a/sim/common/cgen-trace.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Simulator tracing support for Cpu tools GENerated simulators. - Copyright (C) 1996, 1997, 1998, 1999 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 CGEN_TRACE_H -#define CGEN_TRACE_H - -void trace_insn_init (SIM_CPU *, int); -void trace_insn_fini (SIM_CPU *, const struct argbuf *, int); -void trace_insn (SIM_CPU *, const struct cgen_insn *, - const struct argbuf *, IADDR); -void trace_extract (SIM_CPU *, IADDR, char *, ...); -void trace_result (SIM_CPU *, char *, int, ...); -void cgen_trace_printf (SIM_CPU *, char *fmt, ...); - -/* Trace instruction results. */ -#define TRACE_RESULT_P(cpu, abuf) (TRACE_INSN_P (cpu) && ARGBUF_TRACE_P (abuf)) - -#define TRACE_INSN_INIT(cpu, abuf, first_p) \ -do { \ - if (TRACE_INSN_P (cpu)) \ - trace_insn_init ((cpu), (first_p)); \ -} while (0) -#define TRACE_INSN_FINI(cpu, abuf, last_p) \ -do { \ - if (TRACE_INSN_P (cpu)) \ - trace_insn_fini ((cpu), (abuf), (last_p)); \ -} while (0) -#define TRACE_PRINTF(cpu, what, args) \ -do { \ - if (TRACE_P ((cpu), (what))) \ - cgen_trace_printf args ; \ -} while (0) -#define TRACE_INSN(cpu, insn, abuf, pc) \ -do { \ - if (TRACE_INSN_P (cpu) && ARGBUF_TRACE_P (abuf)) \ - trace_insn ((cpu), (insn), (abuf), (pc)) ; \ -} while (0) -#define TRACE_EXTRACT(cpu, abuf, args) \ -do { \ - if (TRACE_EXTRACT_P (cpu)) \ - trace_extract args ; \ -} while (0) -#define TRACE_RESULT(cpu, abuf, name, type, val) \ -do { \ - if (TRACE_RESULT_P ((cpu), (abuf))) \ - trace_result ((cpu), (name), (type), (val)) ; \ -} while (0) - -/* Disassembly support. */ - -/* Function to use for cgen-based disassemblers. */ -extern CGEN_DISASSEMBLER sim_cgen_disassemble_insn; - -/* Pseudo FILE object for strings. */ -typedef struct { - char *buffer; - char *current; -} SFILE; - -/* String printer for the disassembler. */ -extern int sim_disasm_sprintf (SFILE *, const char *, ...); - -/* For opcodes based disassemblers. */ -#ifdef __BFD_H_SEEN__ -struct disassemble_info; -extern int -sim_disasm_read_memory (bfd_vma memaddr_, bfd_byte *myaddr_, unsigned int length_, - struct disassemble_info *info_); -extern void -sim_disasm_perror_memory (int status_, bfd_vma memaddr_, - struct disassemble_info *info_); -#endif - -#endif /* CGEN_TRACE_H */ diff --git a/sim/common/cgen-types.h b/sim/common/cgen-types.h deleted file mode 100644 index dd85d4c..0000000 --- a/sim/common/cgen-types.h +++ /dev/null @@ -1,112 +0,0 @@ -/* Types for Cpu tools GENerated simulators. - Copyright (C) 1996, 1997, 1998, 1999 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. */ - -/* This file is not included with cgen-sim.h as it defines types - needed by sim-base.h. */ - -#ifndef CGEN_TYPES_H -#define CGEN_TYPES_H - -/* Miscellaneous cgen configury defined here as this file gets - included soon enough. */ - -/* Indicate we support --profile-model. */ -#undef SIM_HAVE_MODEL -#define SIM_HAVE_MODEL - -/* Indicate we support --{profile,trace}-{range,function}. */ -#undef SIM_HAVE_ADDR_RANGE -#define SIM_HAVE_ADDR_RANGE - -#ifdef __GNUC__ -#define HAVE_LONGLONG -#undef DI_FN_SUPPORT -#else -#undef HAVE_LONGLONG -#define DI_FN_SUPPORT -#endif - -/* Mode support. */ - -/* Common mode types. */ -/* ??? Target specific modes. */ -typedef enum mode_type { - MODE_VOID, MODE_BI, - MODE_QI, MODE_HI, MODE_SI, MODE_DI, - MODE_UQI, MODE_UHI, MODE_USI, MODE_UDI, - MODE_SF, MODE_DF, MODE_XF, MODE_TF, - MODE_TARGET_MAX /* = MODE_TF? */, - /* These are host modes. */ - MODE_INT, MODE_UINT, MODE_PTR, /*??? MODE_ADDR, MODE_IADDR,*/ - MODE_MAX -} MODE_TYPE; - -#define MAX_TARGET_MODES ((int) MODE_TARGET_MAX) -#define MAX_MODES ((int) MODE_MAX) - -extern const char *mode_names[]; -#define MODE_NAME(m) (mode_names[m]) - -typedef void VOID; -typedef unsigned char BI; -typedef signed8 QI; -typedef signed16 HI; -typedef signed32 SI; -typedef unsigned8 UQI; -typedef unsigned16 UHI; -typedef unsigned32 USI; - -#ifdef HAVE_LONGLONG -typedef signed64 DI; -typedef unsigned64 UDI; -#define GETLODI(di) ((SI) (di)) -#define GETHIDI(di) ((SI) ((UDI) (di) >> 32)) -#define SETLODI(di, val) ((di) = (((di) & 0xffffffff00000000LL) | (val))) -#define SETHIDI(di, val) ((di) = (((di) & 0xffffffffLL) | (((DI) (val)) << 32))) -#define SETDI(di, hi, lo) ((di) = MAKEDI (hi, lo)) -#define MAKEDI(hi, lo) ((((DI) (SI) (hi)) << 32) | ((UDI) (USI) (lo))) -#else -/* DI mode support if "long long" doesn't exist. - At one point CGEN supported K&R C compilers, and ANSI C compilers without - "long long". One can argue the various merits of keeping this in or - throwing it out. I went to the trouble of adding it so for the time being - I'm leaving it in. */ -typedef struct { SI hi,lo; } DI; -typedef DI UDI; -#define GETLODI(di) ((di).lo) -#define GETHIDI(di) ((di).hi) -#define SETLODI(di, val) ((di).lo = (val)) -#define SETHIDI(di, val) ((di).hi = (val)) -#define SETDI(di, hi, lo) ((di) = MAKEDI (hi, lo)) -extern DI make_struct_di (SI, SI); -#define MAKEDI(hi, lo) (make_struct_di ((hi), (lo))) -#endif - -/* These are used to record extracted raw data from an instruction, among other - things. It must be a host data type, and not a target one. */ -typedef int INT; -typedef unsigned int UINT; - -typedef unsigned_address ADDR; /* FIXME: wip*/ -typedef unsigned_address IADDR; /* FIXME: wip*/ - -/* fp types are in cgen-fpu.h */ - -#endif /* CGEN_TYPES_H */ diff --git a/sim/common/cgen-utils.c b/sim/common/cgen-utils.c deleted file mode 100644 index 8383196..0000000 --- a/sim/common/cgen-utils.c +++ /dev/null @@ -1,438 +0,0 @@ -/* Support code for various pieces of CGEN simulators. - Copyright (C) 1996, 1997, 1998, 1999 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 "bfd.h" -#include "sim-main.h" -#include "dis-asm.h" - -#define MEMOPS_DEFINE_INLINE -#include "cgen-mem.h" - -#define SEMOPS_DEFINE_INLINE -#include "cgen-ops.h" - -#undef min -#define min(a,b) ((a) < (b) ? (a) : (b)) - -const char *mode_names[] = { - "VOID", - "BI", - "QI", - "HI", - "SI", - "DI", - "UQI", - "UHI", - "USI", - "UDI", - "SF", - "DF", - "XF", - "TF", - 0, /* MODE_TARGET_MAX */ - "INT", - "UINT", - "PTR" -}; - -/* Opcode table for virtual insns used by the simulator. */ - -#define V CGEN_ATTR_MASK (CGEN_INSN_VIRTUAL) - -static const CGEN_IBASE virtual_insn_entries[] = -{ - { - VIRTUAL_INSN_X_INVALID, "--invalid--", NULL, 0, { V, { 0 } } - }, - { - VIRTUAL_INSN_X_BEFORE, "--before--", NULL, 0, { V, { 0 } } - }, - { - VIRTUAL_INSN_X_AFTER, "--after--", NULL, 0, { V, { 0 } } - }, - { - VIRTUAL_INSN_X_BEGIN, "--begin--", NULL, 0, { V, { 0 } } - }, - { - VIRTUAL_INSN_X_CHAIN, "--chain--", NULL, 0, { V, { 0 } } - }, - { - VIRTUAL_INSN_X_CTI_CHAIN, "--cti-chain--", NULL, 0, { V, { 0 } } - } -}; - -#undef V - -const CGEN_INSN cgen_virtual_insn_table[] = -{ - { & virtual_insn_entries[0] }, - { & virtual_insn_entries[1] }, - { & virtual_insn_entries[2] }, - { & virtual_insn_entries[3] }, - { & virtual_insn_entries[4] }, - { & virtual_insn_entries[5] } -}; - -/* Initialize cgen things. - This is called after sim_post_argv_init. */ - -void -cgen_init (SIM_DESC sd) -{ - int i, c; - - /* If no profiling or tracing has been enabled, run in fast mode. */ - { - int run_fast_p = 1; - - for (c = 0; c < MAX_NR_PROCESSORS; ++c) - { - SIM_CPU *cpu = STATE_CPU (sd, c); - - for (i = 0; i < MAX_PROFILE_VALUES; ++i) - if (CPU_PROFILE_FLAGS (cpu) [i]) - { - run_fast_p = 0; - break; - } - for (i = 0; i < MAX_TRACE_VALUES; ++i) - if (CPU_TRACE_FLAGS (cpu) [i]) - { - run_fast_p = 0; - break; - } - if (! run_fast_p) - break; - } - STATE_RUN_FAST_P (sd) = run_fast_p; - } -} - -/* Return the name of insn number I. */ - -const char * -cgen_insn_name (SIM_CPU *cpu, int i) -{ - return CGEN_INSN_NAME ((* CPU_GET_IDATA (cpu)) ((cpu), (i))); -} - -/* Return the maximum number of extra bytes required for a SIM_CPU struct. */ - -int -cgen_cpu_max_extra_bytes (void) -{ - int i; - int extra = 0; - - for (i = 0; sim_machs[i] != 0; ++i) - { - int size = IMP_PROPS_SIM_CPU_SIZE (MACH_IMP_PROPS (sim_machs[i])); - if (size > extra) - extra = size; - } - return extra; -} - -#ifdef DI_FN_SUPPORT - -DI -make_struct_di (hi, lo) - SI hi, lo; -{ - DI result; - - result.hi = hi; - result.lo = lo; - return result; -} - -DI -ANDDI (a, b) - DI a, b; -{ - SI ahi = GETHIDI (a); - SI alo = GETLODI (a); - SI bhi = GETHIDI (b); - SI blo = GETLODI (b); - return MAKEDI (ahi & bhi, alo & blo); -} - -DI -ORDI (a, b) - DI a, b; -{ - SI ahi = GETHIDI (a); - SI alo = GETLODI (a); - SI bhi = GETHIDI (b); - SI blo = GETLODI (b); - return MAKEDI (ahi | bhi, alo | blo); -} - -DI -ADDDI (a, b) - DI a, b; -{ - USI ahi = GETHIDI (a); - USI alo = GETLODI (a); - USI bhi = GETHIDI (b); - USI blo = GETLODI (b); - USI x = alo + blo; - return MAKEDI (ahi + bhi + (x < alo), x); -} - -DI -MULDI (a, b) - DI a, b; -{ - USI ahi = GETHIDI (a); - USI alo = GETLODI (a); - USI bhi = GETHIDI (b); - USI blo = GETLODI (b); - USI rhi,rlo; - USI x0, x1, x2, x3; - - x0 = alo * blo; - x1 = alo * bhi; - x2 = ahi * blo; - x3 = ahi * bhi; - -#define SI_TYPE_SIZE 32 -#define BITS4 (SI_TYPE_SIZE / 4) -#define ll_B (1L << (SI_TYPE_SIZE / 2)) -#define ll_lowpart(t) ((USI) (t) % ll_B) -#define ll_highpart(t) ((USI) (t) / ll_B) - x1 += ll_highpart (x0); /* this can't give carry */ - x1 += x2; /* but this indeed can */ - if (x1 < x2) /* did we get it? */ - x3 += ll_B; /* yes, add it in the proper pos. */ - - rhi = x3 + ll_highpart (x1); - rlo = ll_lowpart (x1) * ll_B + ll_lowpart (x0); - return MAKEDI (rhi + (alo * bhi) + (ahi * blo), rlo); -} - -DI -SHLDI (val, shift) - DI val; - SI shift; -{ - USI hi = GETHIDI (val); - USI lo = GETLODI (val); - /* FIXME: Need to worry about shift < 0 || shift >= 32. */ - return MAKEDI ((hi << shift) | (lo >> (32 - shift)), lo << shift); -} - -DI -SLADI (val, shift) - DI val; - SI shift; -{ - SI hi = GETHIDI (val); - USI lo = GETLODI (val); - /* FIXME: Need to worry about shift < 0 || shift >= 32. */ - return MAKEDI ((hi << shift) | (lo >> (32 - shift)), lo << shift); -} - -DI -SRADI (val, shift) - DI val; - SI shift; -{ - SI hi = GETHIDI (val); - USI lo = GETLODI (val); - /* We use SRASI because the result is implementation defined if hi < 0. */ - /* FIXME: Need to worry about shift < 0 || shift >= 32. */ - return MAKEDI (SRASI (hi, shift), (hi << (32 - shift)) | (lo >> shift)); -} - -int -GEDI (a, b) - DI a, b; -{ - SI ahi = GETHIDI (a); - USI alo = GETLODI (a); - SI bhi = GETHIDI (b); - USI blo = GETLODI (b); - if (ahi > bhi) - return 1; - if (ahi == bhi) - return alo >= blo; - return 0; -} - -int -LEDI (a, b) - DI a, b; -{ - SI ahi = GETHIDI (a); - USI alo = GETLODI (a); - SI bhi = GETHIDI (b); - USI blo = GETLODI (b); - if (ahi < bhi) - return 1; - if (ahi == bhi) - return alo <= blo; - return 0; -} - -DI -CONVHIDI (val) - HI val; -{ - if (val < 0) - return MAKEDI (-1, val); - else - return MAKEDI (0, val); -} - -DI -CONVSIDI (val) - SI val; -{ - if (val < 0) - return MAKEDI (-1, val); - else - return MAKEDI (0, val); -} - -SI -CONVDISI (val) - DI val; -{ - return GETLODI (val); -} - -#endif /* DI_FN_SUPPORT */ - -QI -RORQI (val, shift) - QI val; - int shift; -{ - if (shift != 0) - { - int remain = 8 - shift; - int mask = (1 << shift) - 1; - QI result = (val & mask) << remain; - mask = (1 << remain) - 1; - result |= (val >> shift) & mask; - return result; - } - return val; -} - -QI -ROLQI (val, shift) - QI val; - int shift; -{ - if (shift != 0) - { - int remain = 8 - shift; - int mask = (1 << remain) - 1; - QI result = (val & mask) << shift; - mask = (1 << shift) - 1; - result |= (val >> remain) & mask; - return result; - } - return val; -} - -HI -RORHI (val, shift) - HI val; - int shift; -{ - if (shift != 0) - { - int remain = 16 - shift; - int mask = (1 << shift) - 1; - HI result = (val & mask) << remain; - mask = (1 << remain) - 1; - result |= (val >> shift) & mask; - return result; - } - return val; -} - -HI -ROLHI (val, shift) - HI val; - int shift; -{ - if (shift != 0) - { - int remain = 16 - shift; - int mask = (1 << remain) - 1; - HI result = (val & mask) << shift; - mask = (1 << shift) - 1; - result |= (val >> remain) & mask; - return result; - } - return val; -} - -SI -RORSI (val, shift) - SI val; - int shift; -{ - if (shift != 0) - { - int remain = 32 - shift; - int mask = (1 << shift) - 1; - SI result = (val & mask) << remain; - mask = (1 << remain) - 1; - result |= (val >> shift) & mask; - return result; - } - return val; -} - -SI -ROLSI (val, shift) - SI val; - int shift; -{ - if (shift != 0) - { - int remain = 32 - shift; - int mask = (1 << remain) - 1; - SI result = (val & mask) << shift; - mask = (1 << shift) - 1; - result |= (val >> remain) & mask; - return result; - } - - return val; -} - -/* Emit an error message from CGEN RTL. */ - -void -cgen_rtx_error (SIM_CPU *cpu, const char * msg) -{ - SIM_DESC sd = CPU_STATE (cpu); - - sim_io_printf (sd, msg); - sim_io_printf (sd, "\n"); - - sim_engine_halt (sd, cpu, NULL, CIA_GET (cpu), sim_stopped, SIM_SIGTRAP); -} diff --git a/sim/common/cgen.sh b/sim/common/cgen.sh deleted file mode 100644 index b1ed32a..0000000 --- a/sim/common/cgen.sh +++ /dev/null @@ -1,227 +0,0 @@ -#! /bin/sh -# Generate CGEN simulator files. -# -# Usage: /bin/sh cgen.sh {"arch"|"cpu"|"decode"|"defs"|"cpu-decode"} \ -# srcdir cgen cgendir cgenflags \ -# arch archflags cpu mach suffix archfile extrafiles opcfile -# -# We store the generated files in the source directory until we decide to -# ship a Scheme interpreter (or other implementation) with gdb/binutils. -# Maybe we never will. - -# We want to behave like make, any error forces us to stop. -set -e - -action=$1 -srcdir=$2 -cgen="$3" -cgendir=$4 -cgenflags=$5 -arch=$6 -archflags=$7 -cpu=$8 -isa=$9 -# portably bring parameters beyond $9 into view -shift ; mach=$9 -shift ; suffix=$9 -shift ; archfile=$9 -shift ; extrafiles=$9 -shift ; opcfile=$9 - -rootdir=${srcdir}/../.. - -test -z "${opcfile}" && opcfile=/dev/null - -if test -z "$isa" ; then - isa=all - prefix=$cpu -else - prefix=${cpu}_$isa -fi - -lowercase='abcdefghijklmnopqrstuvwxyz' -uppercase='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -ARCH=`echo ${arch} | tr "${lowercase}" "${uppercase}"` -CPU=`echo ${cpu} | tr "${lowercase}" "${uppercase}"` -PREFIX=`echo ${prefix} | tr "${lowercase}" "${uppercase}"` - -sedscript="\ --e s/@ARCH@/${ARCH}/g -e s/@arch@/${arch}/g \ --e s/@CPU@/${CPU}/g -e s/@cpu@/${cpu}/g \ --e s/@PREFIX@/${PREFIX}/g -e s/@prefix@/${prefix}/g" - -case $action in -arch) - rm -f tmp-arch.h1 tmp-arch.h - rm -f tmp-arch.c1 tmp-arch.c - rm -f tmp-all.h1 tmp-all.h - - ${cgen} ${cgendir}/cgen-sim.scm \ - -s ${cgendir} \ - ${cgenflags} \ - -f "${archflags}" \ - -m ${mach} \ - -a ${archfile} \ - -i ${isa} \ - -A tmp-arch.h1 \ - -B tmp-arch.c1 \ - -N tmp-all.h1 - sed $sedscript < tmp-arch.h1 > tmp-arch.h - ${rootdir}/move-if-change tmp-arch.h ${srcdir}/arch.h - sed $sedscript < tmp-arch.c1 > tmp-arch.c - ${rootdir}/move-if-change tmp-arch.c ${srcdir}/arch.c - sed $sedscript < tmp-all.h1 > tmp-all.h - ${rootdir}/move-if-change tmp-all.h ${srcdir}/cpuall.h - - rm -f tmp-arch.h1 tmp-arch.c1 tmp-all.h1 - ;; - -cpu | decode | cpu-decode) - - fileopts="" - case $action in - *cpu*) - rm -f tmp-cpu.h1 tmp-cpu.c1 - rm -f tmp-ext.c1 tmp-read.c1 tmp-write.c1 - rm -f tmp-sem.c1 tmp-semsw.c1 - rm -f tmp-mod.c1 - rm -f tmp-cpu.h tmp-cpu.c - rm -f tmp-ext.c tmp-read.c tmp-write.c - rm -f tmp-sem.c tmp-semsw.c tmp-mod.c - fileopts="$fileopts \ - -C tmp-cpu.h1 \ - -U tmp-cpu.c1 \ - -M tmp-mod.c1 \ - ${extrafiles}" - ;; - esac - case $action in - *decode*) - rm -f tmp-dec.h1 tmp-dec.h tmp-dec.c1 tmp-dec.c - fileopts="$fileopts \ - -T tmp-dec.h1 \ - -D tmp-dec.c1" - case "$extrafiles" in - ignored) # Do nothing. - ;; - *) fileopts="$fileopts $extrafiles" - ;; - esac - ;; - esac - - ${cgen} ${cgendir}/cgen-sim.scm \ - -s ${cgendir} \ - ${cgenflags} \ - -f "${archflags}" \ - -m ${mach} \ - -a ${archfile} \ - -i ${isa} \ - ${fileopts} - - case $action in - *cpu*) - sed $sedscript < tmp-cpu.h1 > tmp-cpu.h - ${rootdir}/move-if-change tmp-cpu.h ${srcdir}/cpu${suffix}.h - sed $sedscript < tmp-cpu.c1 > tmp-cpu.c - ${rootdir}/move-if-change tmp-cpu.c ${srcdir}/cpu${suffix}.c - sed $sedscript < tmp-mod.c1 > tmp-mod.c - ${rootdir}/move-if-change tmp-mod.c ${srcdir}/model${suffix}.c - if test -f tmp-ext.c1 ; then \ - sed $sedscript < tmp-ext.c1 > tmp-ext.c ; \ - ${rootdir}/move-if-change tmp-ext.c ${srcdir}/extract${suffix}.c ; \ - fi - if test -f tmp-read.c1 ; then \ - sed $sedscript < tmp-read.c1 > tmp-read.c ; \ - ${rootdir}/move-if-change tmp-read.c ${srcdir}/read${suffix}.c ; \ - fi - if test -f tmp-write.c1 ; then \ - sed $sedscript < tmp-write.c1 > tmp-write.c ; \ - ${rootdir}/move-if-change tmp-write.c ${srcdir}/write${suffix}.c ; \ - fi - if test -f tmp-sem.c1 ; then \ - sed $sedscript < tmp-sem.c1 > tmp-sem.c ; \ - ${rootdir}/move-if-change tmp-sem.c ${srcdir}/sem${suffix}.c ; \ - fi - if test -f tmp-semsw.c1 ; then \ - sed $sedscript < tmp-semsw.c1 > tmp-semsw.c ; \ - ${rootdir}/move-if-change tmp-semsw.c ${srcdir}/sem${suffix}-switch.c ; \ - fi - - rm -f tmp-cpu.h1 tmp-cpu.c1 - rm -f tmp-ext.c1 tmp-read.c1 tmp-write.c1 - rm -f tmp-sem.c1 tmp-semsw.c1 tmp-mod.c1 - ;; - esac - - case $action in - *decode*) - sed $sedscript < tmp-dec.h1 > tmp-dec.h - ${rootdir}/move-if-change tmp-dec.h ${srcdir}/decode${suffix}.h - sed $sedscript < tmp-dec.c1 > tmp-dec.c - ${rootdir}/move-if-change tmp-dec.c ${srcdir}/decode${suffix}.c - - if test -f tmp-sem.c1 ; then \ - sed $sedscript < tmp-sem.c1 > tmp-sem.c ; \ - ${rootdir}/move-if-change tmp-sem.c ${srcdir}/sem${suffix}.c ; \ - fi - if test -f tmp-semsw.c1 ; then \ - sed $sedscript < tmp-semsw.c1 > tmp-semsw.c ; \ - ${rootdir}/move-if-change tmp-semsw.c ${srcdir}/sem${suffix}-switch.c ; \ - fi - - rm -f tmp-dec.h1 tmp-dec.c1 - ;; - esac - - ;; - -defs) - rm -f tmp-defs.h1 tmp-defs.h - - ${cgen} ${cgendir}/cgen-sim.scm \ - -s ${cgendir} \ - ${cgenflags} \ - -f "${archflags}" \ - -m ${mach} \ - -a ${archfile} \ - -i ${isa} \ - -G tmp-defs.h1 - sed $sedscript < tmp-defs.h1 > tmp-defs.h - ${rootdir}/move-if-change tmp-defs.h ${srcdir}/defs${suffix}.h - ;; - -desc) - rm -f tmp-desc.h1 tmp-desc.h - rm -f tmp-desc.c1 tmp-desc.c - rm -f tmp-opc.h1 tmp-opc.h - - ${cgen} ${cgendir}/cgen-opc.scm \ - -s ${cgendir} \ - ${cgenflags} \ - -OPC ${opcfile} \ - -f "${archflags}" \ - -m ${mach} \ - -a ${archfile} \ - -i ${isa} \ - -H tmp-desc.h1 \ - -C tmp-desc.c1 \ - -O tmp-opc.h1 - sed $sedscript < tmp-desc.h1 > tmp-desc.h - ${rootdir}/move-if-change tmp-desc.h ${srcdir}/${arch}-desc.h - sed $sedscript < tmp-desc.c1 > tmp-desc.c - ${rootdir}/move-if-change tmp-desc.c ${srcdir}/${arch}-desc.c - sed $sedscript < tmp-opc.h1 > tmp-opc.h - ${rootdir}/move-if-change tmp-opc.h ${srcdir}/${arch}-opc.h - - rm -f tmp-desc.h1 tmp-desc.c1 tmp-opc.h1 - ;; - -*) - echo "`basename $0`: unknown action: ${action}" >&2 - exit 1 - ;; - -esac - -exit 0 diff --git a/sim/common/common.m4 b/sim/common/common.m4 deleted file mode 100644 index 8daf08e..0000000 --- a/sim/common/common.m4 +++ /dev/null @@ -1,224 +0,0 @@ -# This file contains common code used by all simulators. -# -# common.m4 invokes AC macros used by all simulators and by the common -# directory. It is intended to be included before any target specific -# stuff. SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate -# the Makefile. It is intended to be invoked last. -# -# The simulator's configure.in should look like: -# -# dnl Process this file with autoconf to produce a configure script. -# AC_PREREQ(2.5)dnl -# AC_INIT(Makefile.in) -# AC_CONFIG_HEADER(config.h:config.in) -# -# sinclude(../common/aclocal.m4) -# sinclude(../common/common.m4) -# -# ... target specific stuff ... - -AC_CANONICAL_SYSTEM -AC_ARG_PROGRAM -AC_PROG_CC -AC_PROG_INSTALL - -# 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) - -AC_SUBST(CFLAGS) -AC_SUBST(HDEFINES) -AR=${AR-ar} -AC_SUBST(AR) -AC_PROG_RANLIB - -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= -ZW_GNU_GETTEXT_SISTER_DIR(../../intl) - -# 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*. -AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h) -AC_CHECK_HEADERS(sys/time.h sys/resource.h) -AC_CHECK_HEADERS(fcntl.h fpu_control.h) -AC_CHECK_HEADERS(dlfcn.h errno.h sys/stat.h) -AC_CHECK_FUNCS(getrusage time sigaction __setfpucw) - -# Check for socket libraries -AC_CHECK_LIB(socket, bind) -AC_CHECK_LIB(nsl, gethostbyname) - -. ${srcdir}/../../bfd/configure.host - -dnl Standard (and optional) simulator options. -dnl Eventually all simulators will support these. -dnl Do not add any here that cannot be supported by all simulators. -dnl Do not add similar but different options to a particular simulator, -dnl all shall eventually behave the same way. - - -dnl We don't use automake, but we still want to support -dnl --enable-maintainer-mode. -USE_MAINTAINER_MODE=no -AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode Enable developer functionality.], -[case "${enableval}" in - yes) MAINT="" USE_MAINTAINER_MODE=yes ;; - no) MAINT="#" ;; - *) AC_MSG_ERROR("--enable-maintainer-mode does not take a value"); MAINT="#" ;; -esac -if test x"$silent" != x"yes" && test x"$MAINT" = x""; then - echo "Setting maintainer mode" 6>&1 -fi],[MAINT="#"])dnl -AC_SUBST(MAINT) - - -dnl This is a generic option to enable special byte swapping -dnl insns on *any* cpu. -AC_ARG_ENABLE(sim-bswap, -[ --enable-sim-bswap Use Host specific BSWAP instruction.], -[case "${enableval}" in - yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";; - no) sim_bswap="-DWITH_BSWAP=0";; - *) AC_MSG_ERROR("--enable-sim-bswap does not take a value"); sim_bswap="";; -esac -if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then - echo "Setting bswap flags = $sim_bswap" 6>&1 -fi],[sim_bswap=""])dnl -AC_SUBST(sim_bswap) - - -AC_ARG_ENABLE(sim-cflags, -[ --enable-sim-cflags=opts Extra CFLAGS for use in building simulator], -[case "${enableval}" in - yes) sim_cflags="-O2 -fomit-frame-pointer";; - trace) AC_MSG_ERROR("Please use --enable-sim-debug instead."); 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],[sim_cflags=""])dnl -AC_SUBST(sim_cflags) - - -dnl --enable-sim-debug is for developers of the simulator -dnl the allowable values are work-in-progress -AC_ARG_ENABLE(sim-debug, -[ --enable-sim-debug=opts Enable debugging flags], -[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],[sim_debug=""])dnl -AC_SUBST(sim_debug) - - -dnl --enable-sim-stdio is for users of the simulator -dnl It determines if IO from the program is routed through STDIO (buffered) -AC_ARG_ENABLE(sim-stdio, -[ --enable-sim-stdio Specify whether to use stdio for console input/output.], -[case "${enableval}" in - yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";; - no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";; - *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-stdio"); sim_stdio="";; -esac -if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then - echo "Setting stdio flags = $sim_stdio" 6>&1 -fi],[sim_stdio=""])dnl -AC_SUBST(sim_stdio) - - -dnl --enable-sim-trace is for users of the simulator -dnl The argument is either a bitmask of things to enable [exactly what is -dnl up to the simulator], or is a comma separated list of names of tracing -dnl elements to enable. The latter is only supported on simulators that -dnl use WITH_TRACE. -AC_ARG_ENABLE(sim-trace, -[ --enable-sim-trace=opts Enable tracing flags], -[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],[sim_trace=""])dnl -AC_SUBST(sim_trace) - - -dnl --enable-sim-profile -dnl The argument is either a bitmask of things to enable [exactly what is -dnl up to the simulator], or is a comma separated list of names of profiling -dnl elements to enable. The latter is only supported on simulators that -dnl use WITH_PROFILE. -AC_ARG_ENABLE(sim-profile, -[ --enable-sim-profile=opts Enable profiling flags], -[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],[sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1"])dnl -AC_SUBST(sim_profile) - - -dnl Types used by common code -AC_TYPE_SIGNAL - -dnl Detect exe extension -AC_EXEEXT - -dnl These are available to append to as desired. -sim_link_files= -sim_link_links= - -dnl Create tconfig.h either from simulator's tconfig.in or default one -dnl in common. -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" diff --git a/sim/common/config.in b/sim/common/config.in deleted file mode 100644 index 4652248..0000000 --- a/sim/common/config.in +++ /dev/null @@ -1,267 +0,0 @@ -/* config.in. Generated from configure.ac by autoheader. */ - -/* 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 - -/* 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 to 1 if using `alloca.c'. */ -#undef C_ALLOCA - -/* Define to 1 if NLS is requested */ -#undef ENABLE_NLS - -/* Define to 1 if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define to 1 if you have the <argz.h> header file. */ -#undef HAVE_ARGZ_H - -/* Define to 1 if you have the `dcgettext' function. */ -#undef HAVE_DCGETTEXT - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - -/* Define to 1 if you have the <fcntl.h> header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the <fpu_control.h> header file. */ -#undef HAVE_FPU_CONTROL_H - -/* Define to 1 if you have the `ftruncate' function. */ -#undef HAVE_FTRUNCATE - -/* Define to 1 if you have the `getcwd' function. */ -#undef HAVE_GETCWD - -/* Define to 1 if you have the `getpagesize' function. */ -#undef HAVE_GETPAGESIZE - -/* Define to 1 if you have the `getrusage' function. */ -#undef HAVE_GETRUSAGE - -/* Define as 1 if you have gettext and don't want to use GNU gettext. */ -#undef HAVE_GETTEXT - -/* Define to 1 if you have the <inttypes.h> header file. */ -#undef HAVE_INTTYPES_H - -/* Define if your locale.h file contains LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define to 1 if you have the `socket' library (-lsocket). */ -#undef HAVE_LIBSOCKET - -/* Define to 1 if you have the <limits.h> header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the <locale.h> header file. */ -#undef HAVE_LOCALE_H - -/* Define to 1 if you have the `lstat' function. */ -#undef HAVE_LSTAT - -/* Define to 1 if you have the <malloc.h> header file. */ -#undef HAVE_MALLOC_H - -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `mmap' function. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the `munmap' function. */ -#undef HAVE_MUNMAP - -/* Define to 1 if you have the <nl_types.h> header file. */ -#undef HAVE_NL_TYPES_H - -/* Define to 1 if you have the `putenv' function. */ -#undef HAVE_PUTENV - -/* Define to 1 if you have the `setenv' function. */ -#undef HAVE_SETENV - -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if you have the `sigaction' function. */ -#undef HAVE_SIGACTION - -/* Define to 1 if you have the <stdint.h> header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the <stdlib.h> header file. */ -#undef HAVE_STDLIB_H - -/* Define if you have the stpcpy function */ -#undef HAVE_STPCPY - -/* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - -/* Define to 1 if you have the `strchr' function. */ -#undef HAVE_STRCHR - -/* Define to 1 if you have the <strings.h> header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the <string.h> header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if st_atime is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_ATIME - -/* Define to 1 if st_blksize is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_BLKSIZE - -/* Define to 1 if st_blocks is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_BLOCKS - -/* Define to 1 if st_ctime is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_CTIME - -/* Define to 1 if st_dev is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_DEV - -/* Define to 1 if st_gid is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_GID - -/* Define to 1 if st_ino is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_INO - -/* Define to 1 if st_mode is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_MODE - -/* Define to 1 if st_mtime is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_MTIME - -/* Define to 1 if st_nlink is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_NLINK - -/* Define to 1 if st_rdev is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_RDEV - -/* Define to 1 if st_size is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_SIZE - -/* Define to 1 if st_uid is a member of struct stat. */ -#undef HAVE_STRUCT_STAT_ST_UID - -/* Define to 1 if you have the <sys/mman.h> header file. */ -#undef HAVE_SYS_MMAN_H - -/* Define to 1 if you have the <sys/param.h> header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the <sys/resource.h> header file. */ -#undef HAVE_SYS_RESOURCE_H - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the <sys/times.h> header file. */ -#undef HAVE_SYS_TIMES_H - -/* Define to 1 if you have the <sys/time.h> header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the <sys/types.h> header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the `time' function. */ -#undef HAVE_TIME - -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - -/* Define to 1 if you have the `truncate' function. */ -#undef HAVE_TRUNCATE - -/* Define to 1 if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the <values.h> header file. */ -#undef HAVE_VALUES_H - -/* Define to 1 if you have the `__argz_count' function. */ -#undef HAVE___ARGZ_COUNT - -/* Define to 1 if you have the `__argz_next' function. */ -#undef HAVE___ARGZ_NEXT - -/* Define to 1 if you have the `__argz_stringify' function. */ -#undef HAVE___ARGZ_STRINGIFY - -/* Define to 1 if you have the `__setfpucw' function. */ -#undef HAVE___SETFPUCW - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - -/* 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 to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to `long' if <sys/types.h> does not define. */ -#undef off_t - -/* Define to `unsigned' if <sys/types.h> does not define. */ -#undef size_t diff --git a/sim/common/configure b/sim/common/configure deleted file mode 100755 index d4bd3f8..0000000 --- a/sim/common/configure +++ /dev/null @@ -1,7400 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. -# -# Copyright (C) 2003 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="Makefile.in" -# Factoring default headers for most tests. -ac_includes_default="\ -#include <stdio.h> -#if HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif -#if HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif -#if STDC_HEADERS -# include <stdlib.h> -# include <stddef.h> -#else -# if HAVE_STDLIB_H -# include <stdlib.h> -# endif -#endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include <memory.h> -# endif -# include <string.h> -#endif -#if HAVE_STRINGS_H -# include <strings.h> -#endif -#if HAVE_INTTYPES_H -# include <inttypes.h> -#else -# if HAVE_STDINT_H -# include <stdint.h> -# endif -#endif -#if HAVE_UNISTD_H -# include <unistd.h> -#endif" - -ac_subst_vars='sim_environment sim_alignment sim_assert sim_bitsize sim_endian sim_hostendian sim_float sim_scache sim_default_model sim_hw_cflags sim_hw_objs sim_hw sim_inline sim_packages sim_regparm sim_reserved_bits sim_smp sim_stdcall sim_xor_endian WARN_CFLAGS WERROR_CFLAGS SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC_FOR_BUILD HDEFINES AR RANLIB ac_ct_RANLIB USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CPP EGREP MAINT sim_bswap sim_cflags sim_debug sim_stdio sim_trace sim_profile CPP_FOR_TARGET TARGET_SUBDIR LIBOBJS LTLIBOBJS' -ac_subst_files='' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -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' - -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 - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # 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_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$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 ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) 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 | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$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 | -n) - 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_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - 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 "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -# 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_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - 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 "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # 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 <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -_ACEOF - - cat <<_ACEOF -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_ACEOF - - cat <<\_ACEOF - -Program names: - --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 - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode Enable developer functionality. - --enable-sim-bswap Use Host specific BSWAP instruction. - --enable-sim-cflags=opts Extra CFLAGS for use in building simulator - --enable-sim-debug=opts Enable debugging flags - --enable-sim-stdio Specify whether to use stdio for console input/output. - --enable-sim-trace=opts Enable tracing flags - --enable-sim-profile=opts Enable profiling flags - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a - nonstandard directory <lib dir> - CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have - headers in a nonstandard directory <include dir> - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright (C) 2003 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit 0 -fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# 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 - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# 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 "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - - - - - ac_config_headers="$ac_config_headers cconfig.h:config.in" - - -# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around -# it by inlining the macro's contents. -# This file contains common code used by all simulators. -# -# common.m4 invokes AC macros used by all simulators and by the common -# directory. It is intended to be included before any target specific -# stuff. SIM_AC_OUTPUT is a cover function to AC_OUTPUT to generate -# the Makefile. It is intended to be invoked last. -# -# The simulator's configure.in should look like: -# -# dnl Process this file with autoconf to produce a configure script. -# AC_PREREQ(2.5)dnl -# AC_INIT(Makefile.in) -# AC_CONFIG_HEADER(config.h:config.in) -# -# sinclude(../common/aclocal.m4) -# sinclude(../common/common.m4) -# -# ... target specific stuff ... - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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 - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6 -if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_target_alias=$target_alias -test "x$ac_cv_target_alias" = "x" && - ac_cv_target_alias=$ac_cv_host_alias -ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6 -target=$ac_cv_target -target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- -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" -# Double any \ or $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm conftest.sed - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -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 "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -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 $# != 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 - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 - (eval $ac_compiler --version </dev/null >&5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 - (eval $ac_compiler -v </dev/null >&5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 - (eval $ac_compiler -V </dev/null >&5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; - * ) - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 - -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&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 -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#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; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -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; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# 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 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include <stdlib.h> -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -# 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 -# AmigaOS /C/install, which installs bootblocks on floppy discs -# 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" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /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 - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -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 "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&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}' - -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} - -if test -n "$ac_tool_prefix"; then - # 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 "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - RANLIB=$ac_ct_RANLIB -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - -ALL_LINGUAS= -# If we haven't got the data from the intl directory, -# assume NLS is disabled. -USE_NLS=no -LIBINTL= -LIBINTL_DEP= -INCINTL= -XGETTEXT= -GMSGFMT= -POSUB= - -if test -f ../../intl/config.intl; then - . ../../intl/config.intl -fi -echo "$as_me:$LINENO: checking whether NLS is requested" >&5 -echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 -if test x"$USE_NLS" != xyes; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define ENABLE_NLS 1 -_ACEOF - - - echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 -echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 - # Look for .po and .gmo files in the source directory. - CATALOGS= - XLINGUAS= - for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do - # If there aren't any .gmo files the shell will give us the - # literal string "../path/to/srcdir/po/*.gmo" which has to be - # weeded out. - case "$cat" in *\**) - continue;; - esac - # The quadruple backslash is collapsed to a double backslash - # by the backticks, then collapsed again by the double quotes, - # leaving us with one backslash in the sed expression (right - # before the dot that mustn't act as a wildcard). - cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` - lang=`echo $cat | sed -e "s!\\\\.gmo!!"` - # The user is allowed to set LINGUAS to a list of languages to - # install catalogs for. If it's empty that means "all of them." - if test "x$LINGUAS" = x; then - CATALOGS="$CATALOGS $cat" - XLINGUAS="$XLINGUAS $lang" - else - case "$LINGUAS" in *$lang*) - CATALOGS="$CATALOGS $cat" - XLINGUAS="$XLINGUAS $lang" - ;; - esac - fi - done - LINGUAS="$XLINGUAS" - echo "$as_me:$LINENO: result: $LINGUAS" >&5 -echo "${ECHO_T}$LINGUAS" >&6 - - - DATADIRNAME=share - - INSTOBJEXT=.mo - - GENCAT=gencat - - CATOBJEXT=.gmo - -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*. - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep - - -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_stdc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - 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 <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - 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 <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <ctype.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#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); -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - -for ac_header in stdlib.h string.h strings.h unistd.h time.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in sys/time.h sys/resource.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_header in fcntl.h fpu_control.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - -for ac_header in dlfcn.h errno.h sys/stat.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - -for ac_func in getrusage time sigaction __setfpucw -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* 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 (); -/* 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 -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -# Check for socket libraries - -echo "$as_me:$LINENO: checking for bind in -lsocket" >&5 -echo $ECHO_N "checking for bind in -lsocket... $ECHO_C" >&6 -if test "${ac_cv_lib_socket_bind+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* 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; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_socket_bind=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_socket_bind=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_bind" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_bind" >&6 -if test $ac_cv_lib_socket_bind = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSOCKET 1 -_ACEOF - - LIBS="-lsocket $LIBS" - -fi - - -echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* 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; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_nsl_gethostbyname=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_nsl_gethostbyname=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 -if test $ac_cv_lib_nsl_gethostbyname = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNSL 1 -_ACEOF - - LIBS="-lnsl $LIBS" - -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 "$as_me:$LINENO: error: \"--enable-maintainer-mode does not take a value\"" >&5 -echo "$as_me: error: \"--enable-maintainer-mode does not take a value\"" >&2;} - { (exit 1); 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 "$as_me:$LINENO: error: \"--enable-sim-bswap does not take a value\"" >&5 -echo "$as_me: error: \"--enable-sim-bswap does not take a value\"" >&2;} - { (exit 1); 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 "$as_me:$LINENO: error: \"Please use --enable-sim-debug instead.\"" >&5 -echo "$as_me: error: \"Please use --enable-sim-debug instead.\"" >&2;} - { (exit 1); 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 "$as_me:$LINENO: error: \"Unknown value $enableval passed to --enable-sim-stdio\"" >&5 -echo "$as_me: error: \"Unknown value $enableval passed to --enable-sim-stdio\"" >&2;} - { (exit 1); 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 "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 -if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end 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; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_signal=void -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_signal=int -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6 - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - - - - -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" - - -# Put a useful copy of CPP_FOR_TARGET in Makefile. -# This is only used to build the target values header files. These files are -# shipped with distributions so CPP_FOR_TARGET only needs to work in -# developer's trees. This value is borrowed from ../../Makefile.in. -CPP_FOR_TARGET="\` \ - if test -f \$\${rootme}/../../gcc/Makefile ; then \ - if test -f \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/Makefile ; then \ - echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/ -idirafter \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/targ-include -idirafter \$(srcroot)/newlib/libc/include -nostdinc; \ - else \ - echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/; \ - fi; \ - else \ - if test '\$(host_canonical)' = '\$(target_canonical)' ; then \ - echo \$(CC); \ - else \ - t='\$(program_transform_name)'; echo gcc | sed -e 's/x/x/' \$\$t; \ - fi; \ - fi\` -E" - - -# Set TARGET_SUBDIR, needed by CPP_FOR_TARGET. -if test x"${host}" = x"${target}" ; then - TARGET_SUBDIR="." -else - TARGET_SUBDIR=${target_alias} -fi - - -# These aren't all needed yet, but will be eventually. - - - - - - - -for ac_header in stdlib.h string.h strings.h time.h sys/times.h sys/stat.h sys/mman.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - -for ac_func in mmap munmap lstat truncate ftruncate -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* 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 (); -/* 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 -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -echo "$as_me:$LINENO: checking for struct stat.st_dev" >&5 -echo $ECHO_N "checking for struct stat.st_dev... $ECHO_C" >&6 -if test "${ac_struct_stat_st_dev+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_dev=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_dev) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_dev=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_dev) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_dev=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_dev=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_dev = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_DEV 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_dev" >&5 -echo "${ECHO_T}$ac_struct_stat_st_dev" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_ino" >&5 -echo $ECHO_N "checking for struct stat.st_ino... $ECHO_C" >&6 -if test "${ac_struct_stat_st_ino+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_ino=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_ino) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_ino=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_ino) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_ino=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_ino=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_ino = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_INO 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_ino" >&5 -echo "${ECHO_T}$ac_struct_stat_st_ino" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_mode" >&5 -echo $ECHO_N "checking for struct stat.st_mode... $ECHO_C" >&6 -if test "${ac_struct_stat_st_mode+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_mode=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_mode) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_mode=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_mode) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_mode=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_mode=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_mode = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_MODE 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_mode" >&5 -echo "${ECHO_T}$ac_struct_stat_st_mode" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_nlink" >&5 -echo $ECHO_N "checking for struct stat.st_nlink... $ECHO_C" >&6 -if test "${ac_struct_stat_st_nlink+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_nlink=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_nlink) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_nlink=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_nlink) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_nlink=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_nlink=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_nlink = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_NLINK 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_nlink" >&5 -echo "${ECHO_T}$ac_struct_stat_st_nlink" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_uid" >&5 -echo $ECHO_N "checking for struct stat.st_uid... $ECHO_C" >&6 -if test "${ac_struct_stat_st_uid+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_uid=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_uid) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_uid=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_uid) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_uid=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_uid=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_uid = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_UID 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_uid" >&5 -echo "${ECHO_T}$ac_struct_stat_st_uid" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_gid" >&5 -echo $ECHO_N "checking for struct stat.st_gid... $ECHO_C" >&6 -if test "${ac_struct_stat_st_gid+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_gid=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_gid) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_gid=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_gid) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_gid=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_gid=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_gid = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_GID 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_gid" >&5 -echo "${ECHO_T}$ac_struct_stat_st_gid" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6 -if test "${ac_struct_stat_st_rdev+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_rdev=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_rdev) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_rdev=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_rdev) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_rdev=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_rdev=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_rdev = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_RDEV 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_rdev" >&5 -echo "${ECHO_T}$ac_struct_stat_st_rdev" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_size" >&5 -echo $ECHO_N "checking for struct stat.st_size... $ECHO_C" >&6 -if test "${ac_struct_stat_st_size+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_size=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_size) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_size=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_size) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_size=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_size=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_size = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_SIZE 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_size" >&5 -echo "${ECHO_T}$ac_struct_stat_st_size" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 -if test "${ac_struct_stat_st_blksize+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_blksize=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_blksize) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_blksize=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_blksize) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_blksize=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_blksize=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_blksize = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_struct_stat_st_blksize" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6 -if test "${ac_struct_stat_st_blocks+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_blocks=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_blocks) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_blocks=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_blocks) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_blocks=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_blocks=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_blocks = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_blocks" >&5 -echo "${ECHO_T}$ac_struct_stat_st_blocks" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_atime" >&5 -echo $ECHO_N "checking for struct stat.st_atime... $ECHO_C" >&6 -if test "${ac_struct_stat_st_atime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_atime=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_atime) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_atime=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_atime) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_atime=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_atime=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_atime = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIME 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_atime" >&5 -echo "${ECHO_T}$ac_struct_stat_st_atime" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_mtime" >&5 -echo $ECHO_N "checking for struct stat.st_mtime... $ECHO_C" >&6 -if test "${ac_struct_stat_st_mtime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_mtime=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_mtime) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_mtime=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_mtime) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_mtime=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_mtime=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_mtime = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_MTIME 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_mtime" >&5 -echo "${ECHO_T}$ac_struct_stat_st_mtime" >&6 - -echo "$as_me:$LINENO: checking for struct stat.st_ctime" >&5 -echo $ECHO_N "checking for struct stat.st_ctime... $ECHO_C" >&6 -if test "${ac_struct_stat_st_ctime+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_struct_stat_st_ctime=no; -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (ac_aggr.st_ctime) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_ctime=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif -int -main () -{ - -static struct stat ac_aggr; -if (sizeof ac_aggr.st_ctime) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_struct_stat_st_ctime=yes; -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_struct_stat_st_ctime=no; -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_struct_stat_st_ctime = yes; then :; -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_CTIME 1 -_ACEOF - -else :; -fi -fi -echo "$as_me:$LINENO: result: $ac_struct_stat_st_ctime" >&5 -echo "${ECHO_T}$ac_struct_stat_st_ctime" >&6 - - ac_config_files="$ac_config_files Makefile" - ac_config_commands="$ac_config_commands default" -cat >confcache <<\_ACEOF -# 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, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# 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 \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to <bug-autoconf@gnu.org>." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2003 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - "cconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS cconfig.h:config.in" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@sim_environment@,$sim_environment,;t t -s,@sim_alignment@,$sim_alignment,;t t -s,@sim_assert@,$sim_assert,;t t -s,@sim_bitsize@,$sim_bitsize,;t t -s,@sim_endian@,$sim_endian,;t t -s,@sim_hostendian@,$sim_hostendian,;t t -s,@sim_float@,$sim_float,;t t -s,@sim_scache@,$sim_scache,;t t -s,@sim_default_model@,$sim_default_model,;t t -s,@sim_hw_cflags@,$sim_hw_cflags,;t t -s,@sim_hw_objs@,$sim_hw_objs,;t t -s,@sim_hw@,$sim_hw,;t t -s,@sim_inline@,$sim_inline,;t t -s,@sim_packages@,$sim_packages,;t t -s,@sim_regparm@,$sim_regparm,;t t -s,@sim_reserved_bits@,$sim_reserved_bits,;t t -s,@sim_smp@,$sim_smp,;t t -s,@sim_stdcall@,$sim_stdcall,;t t -s,@sim_xor_endian@,$sim_xor_endian,;t t -s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t -s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@target@,$target,;t t -s,@target_cpu@,$target_cpu,;t t -s,@target_vendor@,$target_vendor,;t t -s,@target_os@,$target_os,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t -s,@HDEFINES@,$HDEFINES,;t t -s,@AR@,$AR,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@USE_NLS@,$USE_NLS,;t t -s,@LIBINTL@,$LIBINTL,;t t -s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t -s,@INCINTL@,$INCINTL,;t t -s,@XGETTEXT@,$XGETTEXT,;t t -s,@GMSGFMT@,$GMSGFMT,;t t -s,@POSUB@,$POSUB,;t t -s,@CATALOGS@,$CATALOGS,;t t -s,@DATADIRNAME@,$DATADIRNAME,;t t -s,@INSTOBJEXT@,$INSTOBJEXT,;t t -s,@GENCAT@,$GENCAT,;t t -s,@CATOBJEXT@,$CATOBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@MAINT@,$MAINT,;t t -s,@sim_bswap@,$sim_bswap,;t t -s,@sim_cflags@,$sim_cflags,;t t -s,@sim_debug@,$sim_debug,;t t -s,@sim_stdio@,$sim_stdio,;t t -s,@sim_trace@,$sim_trace,;t t -s,@sim_profile@,$sim_profile,;t t -s,@CPP_FOR_TARGET@,$CPP_FOR_TARGET,;t t -s,@TARGET_SUBDIR@,$TARGET_SUBDIR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # 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_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_HEADER section. -# - -# 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=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# 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.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# 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.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in - if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} - else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file - fi - else - cat $tmp/config.h - rm -f $tmp/config.h - fi -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - default ) case x$CONFIG_HEADERS in xcconfig.h:config.in) echo > stamp-h ;; esac ;; - esac -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - diff --git a/sim/common/configure.ac b/sim/common/configure.ac deleted file mode 100644 index 5516d9e..0000000 --- a/sim/common/configure.ac +++ /dev/null @@ -1,47 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.59)dnl -AC_INIT(Makefile.in) -AC_CONFIG_HEADER(cconfig.h:config.in) - -# Bugs in autoconf 2.59 break the call to SIM_AC_COMMON, hack around -# it by inlining the macro's contents. -sinclude(../common/common.m4) - -# Put a useful copy of CPP_FOR_TARGET in Makefile. -# This is only used to build the target values header files. These files are -# shipped with distributions so CPP_FOR_TARGET only needs to work in -# developer's trees. This value is borrowed from ../../Makefile.in. -CPP_FOR_TARGET="\` \ - if test -f \$\${rootme}/../../gcc/Makefile ; then \ - if test -f \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/Makefile ; then \ - echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/ -idirafter \$\${rootme}/../../\$(TARGET_SUBDIR)/newlib/targ-include -idirafter \$(srcroot)/newlib/libc/include -nostdinc; \ - else \ - echo \$\${rootme}/../../gcc/xgcc -B\$\${rootme}/../../gcc/; \ - fi; \ - else \ - if test '\$(host_canonical)' = '\$(target_canonical)' ; then \ - echo \$(CC); \ - else \ - t='\$(program_transform_name)'; echo gcc | sed -e 's/x/x/' \$\$t; \ - fi; \ - fi\` -E" -AC_SUBST(CPP_FOR_TARGET) - -# Set TARGET_SUBDIR, needed by CPP_FOR_TARGET. -if test x"${host}" = x"${target}" ; then - TARGET_SUBDIR="." -else - TARGET_SUBDIR=${target_alias} -fi -AC_SUBST(TARGET_SUBDIR) - -# These aren't all needed yet, but will be eventually. -AC_CHECK_HEADERS(stdlib.h string.h strings.h time.h sys/times.h sys/stat.h sys/mman.h) -AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate) -SIM_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino], -[struct stat.st_mode], [struct stat.st_nlink], [struct stat.st_uid], -[struct stat.st_gid], [struct stat.st_rdev], [struct stat.st_size], -[struct stat.st_blksize], [struct stat.st_blocks], [struct stat.st_atime], -[struct stat.st_mtime], [struct stat.st_ctime]]) -AC_OUTPUT(Makefile, -[case x$CONFIG_HEADERS in xcconfig.h:config.in) echo > stamp-h ;; esac]) diff --git a/sim/common/dv-core.c b/sim/common/dv-core.c deleted file mode 100644 index 94e4a21..0000000 --- a/sim/common/dv-core.c +++ /dev/null @@ -1,119 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "sim-main.h" -#include "hw-main.h" - -/* DEVICE - - core - root of the device tree - - DESCRIPTION - - The core device, positioned at the root of the device tree appears - to its child devices as a normal device just like every other - device in the tree. - - Internally it is implemented using a core object. Requests to - attach (or detach) address spaces are passed to that core object. - Requests to transfer (DMA) data are reflected back down the device - tree using the core_map data transfer methods. - - PROPERTIES - - None. - - */ - - -static void -dv_core_attach_address_callback (struct hw *me, - int level, - int space, - address_word addr, - address_word nr_bytes, - struct hw *client) -{ - HW_TRACE ((me, "attach - level=%d, space=%d, addr=0x%lx, nr_bytes=%ld, client=%s", - level, space, (unsigned long) addr, (unsigned long) nr_bytes, hw_path (client))); - /* NOTE: At preset the space is assumed to be zero. Perhaphs the - space should be mapped onto something for instance: space0 - - unified memory; space1 - IO memory; ... */ - sim_core_attach (hw_system (me), - NULL, /*cpu*/ - level, - access_read_write_exec, - space, addr, - nr_bytes, - 0, /* modulo */ - client, - NULL); -} - - -static unsigned -dv_core_dma_read_buffer_callback (struct hw *me, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - return sim_core_read_buffer (hw_system (me), - NULL, /*CPU*/ - space, /*???*/ - dest, - addr, - nr_bytes); -} - - -static unsigned -dv_core_dma_write_buffer_callback (struct hw *me, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes, - int violate_read_only_section) -{ - return sim_core_write_buffer (hw_system (me), - NULL, /*cpu*/ - space, /*???*/ - source, - addr, - nr_bytes); -} - - -static void -dv_core_finish (struct hw *me) -{ - set_hw_attach_address (me, dv_core_attach_address_callback); - set_hw_dma_write_buffer (me, dv_core_dma_write_buffer_callback); - set_hw_dma_read_buffer (me, dv_core_dma_read_buffer_callback); -} - -const struct hw_descriptor dv_core_descriptor[] = { - { "core", dv_core_finish, }, - { NULL }, -}; diff --git a/sim/common/dv-glue.c b/sim/common/dv-glue.c deleted file mode 100644 index 1a94ae6..0000000 --- a/sim/common/dv-glue.c +++ /dev/null @@ -1,376 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "hw-main.h" - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -/* DEVICE - - - glue - glue to interconnect and test hardware ports - - - DESCRIPTION - - - The glue device provides two functions. Firstly, it provides a - mechanism for inspecting and driving the port network. Secondly, - it provides a set of boolean primitives that can be used to apply - combinatorial operations to the port network. - - Glue devices have a variable number of big endian <<output>> - registers. Each register is target-word sized. The registers can - be read and written. - - Writing to an output register results in an event being driven - (level determined by the value written) on the devices - corresponding output port. - - Reading an <<output>> register returns either the last value - written or the most recently computed value (for that register) as - a result of an event ariving on that port (which ever was computed - last). - - At present the following sub device types are available: - - <<glue>>: In addition to driving its output interrupt port with any - value written to an interrupt input port is stored in the - corresponding <<output>> register. Such input interrupts, however, - are not propogated to an output interrupt port. - - <<glue-and>>: The bit-wise AND of the interrupt inputs is computed - and then both stored in <<output>> register zero and propogated to - output interrupt output port zero. - - - PROPERTIES - - - reg = <address> <size> (required) - - Specify the address (within the parent bus) that this device is to - live. The address must be 2048 * sizeof (word) (8k in a 32bit - simulation) aligned. - - - interrupt-ranges = <int-number> <range> (optional) - - If present, this specifies the number of valid interrupt inputs (up - to the maximum of 2048). By default, <<int-number>> is zero and - range is determined by the <<reg>> size. - - - PORTS - - - int[0..] (input, output) - - Both an input and an output port. - - - EXAMPLES - - - Enable tracing of the device: - - | -t glue-device \ - - - Create source, bitwize-and, and sink glue devices. Since the - device at address <<0x10000>> is of size <<8>> it will have two - output interrupt ports. - - | -o '/iobus@0xf0000000/glue@0x10000/reg 0x10000 8' \ - | -o '/iobus@0xf0000000/glue-and@0x20000/reg 0x20000 4' \ - | -o '/iobus@0xf0000000/glue-and/interrupt-ranges 0 2' \ - | -o '/iobus@0xf0000000/glue@0x30000/reg 0x30000 4' \ - - - Wire the two source interrupts to the AND device: - - | -o '/iobus@0xf0000000/glue@0x10000 > 0 0 /iobus/glue-and' \ - | -o '/iobus@0xf0000000/glue@0x10000 > 1 1 /iobus/glue-and' \ - - - Wire the AND device up to the sink so that the and's output is not - left open. - - | -o '/iobus@0xf0000000/glue-and > 0 0 /iobus/glue@0x30000' \ - - - With the above configuration. The client program is able to - compute a two bit AND. For instance the <<C>> stub below prints 1 - AND 0. - - | unsigned *input = (void*)0xf0010000; - | unsigned *output = (void*)0xf0030000; - | unsigned ans; - | input[0] = htonl(1); - | input[1] = htonl(0); - | ans = ntohl(*output); - | write_string("AND is "); - | write_int(ans); - | write_line(); - - - BUGS - - - A future implementation of this device may support multiple - interrupt ranges. - - Some of the devices listed may not yet be fully implemented. - - Additional devices such as a D flip-flop (DFF), an inverter (INV) - or a latch (LAT) may prove useful. - - */ - - -enum { - max_nr_ports = 2048, -}; - -enum hw_glue_type { - glue_undefined = 0, - glue_io, - glue_and, - glue_nand, - glue_or, - glue_xor, - glue_nor, - glue_not, -}; - -struct hw_glue { - enum hw_glue_type type; - int int_number; - int *input; - int nr_inputs; - unsigned sizeof_input; - /* our output registers */ - int space; - unsigned_word address; - unsigned sizeof_output; - int *output; - int nr_outputs; -}; - - -static hw_io_read_buffer_method hw_glue_io_read_buffer; -static hw_io_write_buffer_method hw_glue_io_write_buffer; -static hw_port_event_method hw_glue_port_event; -const static struct hw_port_descriptor hw_glue_ports[]; - -static void -hw_glue_finish (struct hw *me) -{ - struct hw_glue *glue = HW_ZALLOC (me, struct hw_glue); - - /* establish our own methods */ - set_hw_data (me, glue); - set_hw_io_read_buffer (me, hw_glue_io_read_buffer); - set_hw_io_write_buffer (me, hw_glue_io_write_buffer); - set_hw_ports (me, hw_glue_ports); - set_hw_port_event (me, hw_glue_port_event); - - /* attach to our parent bus */ - do_hw_attach_regs (me); - - /* establish the output registers */ - { - reg_property_spec unit; - int reg_nr; - /* find a relevant reg entry */ - reg_nr = 0; - while (hw_find_reg_array_property (me, "reg", reg_nr, &unit) - && !hw_unit_size_to_attach_size (hw_parent (me), - &unit.size, - &glue->sizeof_output, - me)) - reg_nr++; - /* check out the size */ - if (glue->sizeof_output == 0) - hw_abort (me, "at least one reg property size must be nonzero"); - if (glue->sizeof_output % sizeof (unsigned_word) != 0) - hw_abort (me, "reg property size must be %ld aligned", - (long) sizeof (unsigned_word)); - /* and the address */ - hw_unit_address_to_attach_address (hw_parent (me), - &unit.address, - &glue->space, - &glue->address, - me); - if (glue->address % (sizeof (unsigned_word) * max_nr_ports) != 0) - hw_abort (me, "reg property address must be %ld aligned", - (long) (sizeof (unsigned_word) * max_nr_ports)); - glue->nr_outputs = glue->sizeof_output / sizeof (unsigned_word); - glue->output = hw_zalloc (me, glue->sizeof_output); - } - - /* establish the input ports */ - { - const struct hw_property *ranges; - ranges = hw_find_property (me, "interrupt-ranges"); - if (ranges == NULL) - { - glue->int_number = 0; - glue->nr_inputs = glue->nr_outputs; - } - else if (ranges->sizeof_array != sizeof (unsigned_cell) * 2) - { - hw_abort (me, "invalid interrupt-ranges property (incorrect size)"); - } - else - { - const unsigned_cell *int_range = ranges->array; - glue->int_number = BE2H_cell (int_range[0]); - glue->nr_inputs = BE2H_cell (int_range[1]); - } - glue->sizeof_input = glue->nr_inputs * sizeof (unsigned); - glue->input = hw_zalloc (me, glue->sizeof_input); - } - - /* determine our type */ - { - const char *name = hw_name(me); - if (strcmp (name, "glue") == 0) - glue->type = glue_io; - else if (strcmp (name, "glue-and") == 0) - glue->type = glue_and; - else - hw_abort (me, "unimplemented glue type"); - } - - HW_TRACE ((me, "int-number %d, nr_inputs %d, nr_outputs %d", - glue->int_number, glue->nr_inputs, glue->nr_outputs)); -} - -static unsigned -hw_glue_io_read_buffer (struct hw *me, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - struct hw_glue *glue = (struct hw_glue *) hw_data (me); - int reg = ((addr - glue->address) / sizeof (unsigned_word)) % glue->nr_outputs; - if (nr_bytes != sizeof (unsigned_word) - || (addr % sizeof (unsigned_word)) != 0) - hw_abort (me, "missaligned read access (%d:0x%lx:%d) not supported", - space, (unsigned long)addr, nr_bytes); - *(unsigned_word*)dest = H2BE_4(glue->output[reg]); - HW_TRACE ((me, "read - port %d (0x%lx), level %d", - reg, (unsigned long) addr, glue->output[reg])); - return nr_bytes; -} - - -static unsigned -hw_glue_io_write_buffer (struct hw *me, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - struct hw_glue *glue = (struct hw_glue *) hw_data (me); - int reg = ((addr - glue->address) / sizeof (unsigned_word)) % max_nr_ports; - if (nr_bytes != sizeof (unsigned_word) - || (addr % sizeof (unsigned_word)) != 0) - hw_abort (me, "missaligned write access (%d:0x%lx:%d) not supported", - space, (unsigned long) addr, nr_bytes); - glue->output[reg] = H2BE_4 (*(unsigned_word*)source); - HW_TRACE ((me, "write - port %d (0x%lx), level %d", - reg, (unsigned long) addr, glue->output[reg])); - hw_port_event (me, reg, glue->output[reg]); - return nr_bytes; -} - -static void -hw_glue_port_event (struct hw *me, - int my_port, - struct hw *source, - int source_port, - int level) -{ - struct hw_glue *glue = (struct hw_glue *) hw_data (me); - int i; - if (my_port < glue->int_number - || my_port >= glue->int_number + glue->nr_inputs) - hw_abort (me, "port %d outside of valid range", my_port); - glue->input[my_port - glue->int_number] = level; - switch (glue->type) - { - case glue_io: - { - int port = my_port % glue->nr_outputs; - glue->output[port] = level; - HW_TRACE ((me, "input - port %d (0x%lx), level %d", - my_port, - (unsigned long) glue->address + port * sizeof (unsigned_word), - level)); - break; - } - case glue_and: - { - glue->output[0] = glue->input[0]; - for (i = 1; i < glue->nr_inputs; i++) - glue->output[0] &= glue->input[i]; - HW_TRACE ((me, "and - port %d, level %d arrived - output %d", - my_port, level, glue->output[0])); - hw_port_event (me, 0, glue->output[0]); - break; - } - default: - { - hw_abort (me, "operator not implemented"); - break; - } - } -} - - -static const struct hw_port_descriptor hw_glue_ports[] = { - { "int", 0, max_nr_ports }, - { NULL } -}; - - -const struct hw_descriptor dv_glue_descriptor[] = { - { "glue", hw_glue_finish, }, - { "glue-and", hw_glue_finish, }, - { "glue-nand", hw_glue_finish, }, - { "glue-or", hw_glue_finish, }, - { "glue-xor", hw_glue_finish, }, - { "glue-nor", hw_glue_finish, }, - { "glue-not", hw_glue_finish, }, - { NULL }, -}; diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c deleted file mode 100644 index 90147ba..0000000 --- a/sim/common/dv-pal.c +++ /dev/null @@ -1,608 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "hw-main.h" -#include "sim-io.h" - -/* NOTE: pal is naughty and grubs around looking at things outside of - its immediate domain */ -#include "hw-tree.h" - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif - -/* DEVICE - - - pal - glue logic device containing assorted junk - - - DESCRIPTION - - - Typical hardware dependant hack. This device allows the firmware - to gain access to all the things the firmware needs (but the OS - doesn't). - - The pal contains the following registers: - - |0 reset register (write, 8bit) - |4 processor id register (read, 8bit) - |8 interrupt register (8 - port, 9 - level) (write, 16bit) - |12 processor count register (read, 8bit) - - |16 tty input fifo register (read, 8bit) - |20 tty input status register (read, 8bit) - |24 tty output fifo register (write, 8bit) - |28 tty output status register (read, 8bit) - - |32 countdown register (read/write, 32bit, big-endian) - |36 countdown value register (read, 32bit, big-endian) - |40 timer register (read/write, 32bit, big-endian) - |44 timer value register (read, 32bit, big-endian) - - RESET (write): halts the simulator. The value written to the - register is used as an exit status. - - PROCESSOR ID (read): returns the processor identifier (0 .. N-1) of - the processor performing the read. - - INTERRUPT (write): This register must be written using a two byte - store. The low byte specifies a port and the upper byte specifies - the a level. LEVEL is driven on the specified port. By - convention, the pal's interrupt ports (int0, int1, ...) are wired - up to the corresponding processor's level sensative external - interrupt pin. Eg: A two byte write to address 8 of 0x0102 - (big-endian) will result in processor 2's external interrupt pin - being asserted. - - PROCESSOR COUNT (read): returns the total number of processors - active in the current simulation. - - TTY INPUT FIFO (read): if the TTY input status register indicates a - character is available by being nonzero, returns the next available - character from the pal's tty input port. - - TTY OUTPUT FIFO (write): if the TTY output status register - indicates the output fifo is not full by being nonzero, outputs the - character written to the tty's output port. - - COUNDOWN (read/write): The countdown registers provide a - non-repeating timed interrupt source. Writing a 32 bit big-endian - zero value to this register clears the countdown timer. Writing a - non-zero 32 bit big-endian value to this register sets the - countdown timer to expire in VALUE ticks (ticks is target - dependant). Reading the countdown register returns the last value - writen. - - COUNTDOWN VALUE (read): Reading this 32 bit big-endian register - returns the number of ticks remaining until the countdown timer - expires. - - TIMER (read/write): The timer registers provide a periodic timed - interrupt source. Writing a 32 bit big-endian zero value to this - register clears the periodic timer. Writing a 32 bit non-zero - value to this register sets the periodic timer to triger every - VALUE ticks (ticks is target dependant). Reading the timer - register returns the last value written. - - TIMER VALUE (read): Reading this 32 bit big-endian register returns - the number of ticks until the next periodic interrupt. - - - PROPERTIES - - - reg = <address> <size> (required) - - Specify the address (within the parent bus) that this device is to - be located. - - poll? = <boolean> - - If present and true, indicates that the device should poll its - input. - - - PORTS - - - int[0..NR_PROCESSORS] (output) - - Driven as a result of a write to the interrupt-port / - interrupt-level register pair. - - - countdown - - Driven whenever the countdown counter reaches zero. - - - timer - - Driven whenever the timer counter reaches zero. - - - BUGS - - - At present the common simulator framework does not support input - polling. - - */ - - -enum { - hw_pal_reset_register = 0x0, - hw_pal_cpu_nr_register = 0x4, - hw_pal_int_register = 0x8, - hw_pal_nr_cpu_register = 0xa, - hw_pal_read_fifo = 0x10, - hw_pal_read_status = 0x14, - hw_pal_write_fifo = 0x18, - hw_pal_write_status = 0x1a, - hw_pal_countdown = 0x20, - hw_pal_countdown_value = 0x24, - hw_pal_timer = 0x28, - hw_pal_timer_value = 0x2c, - hw_pal_address_mask = 0x3f, -}; - - -typedef struct _hw_pal_console_buffer { - char buffer; - int status; -} hw_pal_console_buffer; - -typedef struct _hw_pal_counter { - struct hw_event *handler; - signed64 start; - unsigned32 delta; - int periodic_p; -} hw_pal_counter; - - -typedef struct _hw_pal_device { - hw_pal_console_buffer input; - hw_pal_console_buffer output; - hw_pal_counter countdown; - hw_pal_counter timer; - struct hw *disk; - do_hw_poll_read_method *reader; -} hw_pal_device; - -enum { - COUNTDOWN_PORT, - TIMER_PORT, - INT_PORT, -}; - -static const struct hw_port_descriptor hw_pal_ports[] = { - { "countdown", COUNTDOWN_PORT, 0, output_port, }, - { "timer", TIMER_PORT, 0, output_port, }, - { "int", INT_PORT, MAX_NR_PROCESSORS, output_port, }, - { NULL } -}; - - -/* countdown and simple timer */ - -static void -do_counter_event (struct hw *me, - void *data) -{ - hw_pal_counter *counter = (hw_pal_counter *) data; - if (counter->periodic_p) - { - HW_TRACE ((me, "timer expired")); - counter->start = hw_event_queue_time (me); - hw_port_event (me, TIMER_PORT, 1); - hw_event_queue_schedule (me, counter->delta, do_counter_event, counter); - } - else - { - HW_TRACE ((me, "countdown expired")); - counter->delta = 0; - hw_port_event (me, COUNTDOWN_PORT, 1); - } -} - -static void -do_counter_read (struct hw *me, - hw_pal_device *pal, - const char *reg, - hw_pal_counter *counter, - unsigned32 *word, - unsigned nr_bytes) -{ - unsigned32 val; - if (nr_bytes != 4) - hw_abort (me, "%s - bad read size must be 4 bytes", reg); - val = counter->delta; - HW_TRACE ((me, "read - %s %ld", reg, (long) val)); - *word = H2BE_4 (val); -} - -static void -do_counter_value (struct hw *me, - hw_pal_device *pal, - const char *reg, - hw_pal_counter *counter, - unsigned32 *word, - unsigned nr_bytes) -{ - unsigned32 val; - if (nr_bytes != 4) - hw_abort (me, "%s - bad read size must be 4 bytes", reg); - if (counter->delta != 0) - val = (counter->start + counter->delta - - hw_event_queue_time (me)); - else - val = 0; - HW_TRACE ((me, "read - %s %ld", reg, (long) val)); - *word = H2BE_4 (val); -} - -static void -do_counter_write (struct hw *me, - hw_pal_device *pal, - const char *reg, - hw_pal_counter *counter, - const unsigned32 *word, - unsigned nr_bytes) -{ - if (nr_bytes != 4) - hw_abort (me, "%s - bad write size must be 4 bytes", reg); - if (counter->handler != NULL) - { - hw_event_queue_deschedule (me, counter->handler); - counter->handler = NULL; - } - counter->delta = BE2H_4 (*word); - counter->start = hw_event_queue_time (me); - HW_TRACE ((me, "write - %s %ld", reg, (long) counter->delta)); - if (counter->delta > 0) - hw_event_queue_schedule (me, counter->delta, do_counter_event, counter); -} - - - - -/* check the console for an available character */ -static void -scan_hw_pal (struct hw *me) -{ - hw_pal_device *hw_pal = (hw_pal_device *)hw_data (me); - char c; - int count; - count = do_hw_poll_read (me, hw_pal->reader, 0/*STDIN*/, &c, sizeof(c)); - switch (count) - { - case HW_IO_NOT_READY: - case HW_IO_EOF: - hw_pal->input.buffer = 0; - hw_pal->input.status = 0; - break; - default: - hw_pal->input.buffer = c; - hw_pal->input.status = 1; - } -} - -/* write the character to the hw_pal */ - -static void -write_hw_pal (struct hw *me, - char val) -{ - hw_pal_device *hw_pal = (hw_pal_device *) hw_data (me); - sim_io_write_stdout (hw_system (me), &val, 1); - hw_pal->output.buffer = val; - hw_pal->output.status = 1; -} - - -/* Reads/writes */ - -static unsigned -hw_pal_io_read_buffer (struct hw *me, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - hw_pal_device *hw_pal = (hw_pal_device *) hw_data (me); - unsigned_1 *byte = (unsigned_1 *) dest; - memset (dest, 0, nr_bytes); - switch (addr & hw_pal_address_mask) - { - - case hw_pal_cpu_nr_register: -#ifdef CPU_INDEX - *byte = CPU_INDEX (hw_system_cpu (me)); -#else - *byte = 0; -#endif - HW_TRACE ((me, "read - cpu-nr %d\n", *byte)); - break; - - case hw_pal_nr_cpu_register: - if (hw_tree_find_property (me, "/openprom/options/smp") == NULL) - { - *byte = 1; - HW_TRACE ((me, "read - nr-cpu %d (not defined)\n", *byte)); - } - else - { - *byte = hw_tree_find_integer_property (me, "/openprom/options/smp"); - HW_TRACE ((me, "read - nr-cpu %d\n", *byte)); - } - break; - - case hw_pal_read_fifo: - *byte = hw_pal->input.buffer; - HW_TRACE ((me, "read - input-fifo %d\n", *byte)); - break; - - case hw_pal_read_status: - scan_hw_pal (me); - *byte = hw_pal->input.status; - HW_TRACE ((me, "read - input-status %d\n", *byte)); - break; - - case hw_pal_write_fifo: - *byte = hw_pal->output.buffer; - HW_TRACE ((me, "read - output-fifo %d\n", *byte)); - break; - - case hw_pal_write_status: - *byte = hw_pal->output.status; - HW_TRACE ((me, "read - output-status %d\n", *byte)); - break; - - case hw_pal_countdown: - do_counter_read (me, hw_pal, "countdown", - &hw_pal->countdown, dest, nr_bytes); - break; - - case hw_pal_countdown_value: - do_counter_value (me, hw_pal, "countdown-value", - &hw_pal->countdown, dest, nr_bytes); - break; - - case hw_pal_timer: - do_counter_read (me, hw_pal, "timer", - &hw_pal->timer, dest, nr_bytes); - break; - - case hw_pal_timer_value: - do_counter_value (me, hw_pal, "timer-value", - &hw_pal->timer, dest, nr_bytes); - break; - - default: - HW_TRACE ((me, "read - ???\n")); - break; - - } - return nr_bytes; -} - - -static unsigned -hw_pal_io_write_buffer (struct hw *me, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - hw_pal_device *hw_pal = (hw_pal_device*) hw_data (me); - unsigned_1 *byte = (unsigned_1 *) source; - - switch (addr & hw_pal_address_mask) - { - - case hw_pal_reset_register: - hw_halt (me, sim_exited, byte[0]); - break; - - case hw_pal_int_register: - hw_port_event (me, - INT_PORT + byte[0], /*port*/ - (nr_bytes > 1 ? byte[1] : 0)); /* val */ - break; - - case hw_pal_read_fifo: - hw_pal->input.buffer = byte[0]; - HW_TRACE ((me, "write - input-fifo %d\n", byte[0])); - break; - - case hw_pal_read_status: - hw_pal->input.status = byte[0]; - HW_TRACE ((me, "write - input-status %d\n", byte[0])); - break; - - case hw_pal_write_fifo: - write_hw_pal (me, byte[0]); - HW_TRACE ((me, "write - output-fifo %d\n", byte[0])); - break; - - case hw_pal_write_status: - hw_pal->output.status = byte[0]; - HW_TRACE ((me, "write - output-status %d\n", byte[0])); - break; - - case hw_pal_countdown: - do_counter_write (me, hw_pal, "countdown", - &hw_pal->countdown, source, nr_bytes); - break; - - case hw_pal_timer: - do_counter_write (me, hw_pal, "timer", - &hw_pal->timer, source, nr_bytes); - break; - - } - return nr_bytes; -} - - -/* instances of the hw_pal struct hw */ - -#if NOT_YET -static void -hw_pal_instance_delete_callback(hw_instance *instance) -{ - /* nothing to delete, the hw_pal is attached to the struct hw */ - return; -} -#endif - -#if NOT_YET -static int -hw_pal_instance_read_callback (hw_instance *instance, - void *buf, - unsigned_word len) -{ - DITRACE (pal, ("read - %s (%ld)", (const char*) buf, (long int) len)); - return sim_io_read_stdin (buf, len); -} -#endif - -#if NOT_YET -static int -hw_pal_instance_write_callback (hw_instance *instance, - const void *buf, - unsigned_word len) -{ - int i; - const char *chp = buf; - hw_pal_device *hw_pal = hw_instance_data (instance); - DITRACE (pal, ("write - %s (%ld)", (const char*) buf, (long int) len)); - for (i = 0; i < len; i++) - write_hw_pal (hw_pal, chp[i]); - sim_io_flush_stdoutput (); - return i; -} -#endif - -#if NOT_YET -static const hw_instance_callbacks hw_pal_instance_callbacks = { - hw_pal_instance_delete_callback, - hw_pal_instance_read_callback, - hw_pal_instance_write_callback, -}; -#endif - -#if 0 -static hw_instance * -hw_pal_create_instance (struct hw *me, - const char *path, - const char *args) -{ - return hw_create_instance_from (me, NULL, - hw_data (me), - path, args, - &hw_pal_instance_callbacks); -} -#endif - - -static void -hw_pal_attach_address (struct hw *me, - int level, - int space, - address_word addr, - address_word nr_bytes, - struct hw *client) -{ - hw_pal_device *pal = (hw_pal_device*) hw_data (me); - pal->disk = client; -} - - -#if 0 -static hw_callbacks const hw_pal_callbacks = { - { generic_hw_init_address, }, - { hw_pal_attach_address, }, /* address */ - { hw_pal_io_read_buffer_callback, - hw_pal_io_write_buffer_callback, }, - { NULL, }, /* DMA */ - { NULL, NULL, hw_pal_interrupt_ports }, /* interrupt */ - { generic_hw_unit_decode, - generic_hw_unit_encode, - generic_hw_address_to_attach_address, - generic_hw_size_to_attach_size }, - hw_pal_create_instance, -}; -#endif - - -static void -hw_pal_finish (struct hw *hw) -{ - /* create the descriptor */ - hw_pal_device *hw_pal = HW_ZALLOC (hw, hw_pal_device); - hw_pal->output.status = 1; - hw_pal->output.buffer = '\0'; - hw_pal->input.status = 0; - hw_pal->input.buffer = '\0'; - set_hw_data (hw, hw_pal); - set_hw_attach_address (hw, hw_pal_attach_address); - set_hw_io_read_buffer (hw, hw_pal_io_read_buffer); - set_hw_io_write_buffer (hw, hw_pal_io_write_buffer); - set_hw_ports (hw, hw_pal_ports); - /* attach ourselves */ - do_hw_attach_regs (hw); - /* If so configured, enable polled input */ - if (hw_find_property (hw, "poll?") != NULL - && hw_find_boolean_property (hw, "poll?")) - { - hw_pal->reader = sim_io_poll_read; - } - else - { - hw_pal->reader = sim_io_read; - } - /* tag the periodic timer */ - hw_pal->timer.periodic_p = 1; -} - - -const struct hw_descriptor dv_pal_descriptor[] = { - { "pal", hw_pal_finish, }, - { NULL }, -}; diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c deleted file mode 100644 index d5e6577..0000000 --- a/sim/common/dv-sockser.c +++ /dev/null @@ -1,388 +0,0 @@ -/* Serial port emulation using sockets. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Cygnus 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, 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. */ - -/* FIXME: will obviously need to evolve. - - connectionless sockets might be more appropriate. */ - -#include "sim-main.h" - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#include <signal.h> -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#ifdef HAVE_FCNTL_H -#include <fcntl.h> -#endif -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#include <errno.h> -#include <sys/types.h> -#include <sys/time.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <netdb.h> -#include <sys/socket.h> - -#ifndef __CYGWIN32__ -#include <netinet/tcp.h> -#endif - -#include "sim-assert.h" -#include "sim-options.h" - -#include "dv-sockser.h" - -/* Get definitions for both O_NONBLOCK and O_NDELAY. */ - -#ifndef O_NDELAY -#ifdef FNDELAY -#define O_NDELAY FNDELAY -#else /* ! defined (FNDELAY) */ -#define O_NDELAY 0 -#endif /* ! defined (FNDELAY) */ -#endif /* ! defined (O_NDELAY) */ - -#ifndef O_NONBLOCK -#ifdef FNBLOCK -#define O_NONBLOCK FNBLOCK -#else /* ! defined (FNBLOCK) */ -#define O_NONBLOCK 0 -#endif /* ! defined (FNBLOCK) */ -#endif /* ! defined (O_NONBLOCK) */ - - -/* Compromise between eating cpu and properly busy-waiting. - One could have an option to set this but for now that seems - like featuritis. */ -#define DEFAULT_TIMEOUT 1000 /* microseconds */ - -/* FIXME: These should allocated at run time and kept with other simulator - state (duh...). Later. */ -const char * sockser_addr = NULL; -/* Timeout in microseconds during status flag computation. - Setting this to zero achieves proper busy wait semantics but eats cpu. */ -static unsigned int sockser_timeout = DEFAULT_TIMEOUT; -static int sockser_listen_fd = -1; -static int sockser_fd = -1; - -/* FIXME: use tree properties when they're ready. */ - -typedef enum { - OPTION_ADDR = OPTION_START -} SOCKSER_OPTIONS; - -static DECLARE_OPTION_HANDLER (sockser_option_handler); - -static const OPTION sockser_options[] = -{ - { { "sockser-addr", required_argument, NULL, OPTION_ADDR }, - '\0', "SOCKET ADDRESS", "Set serial emulation socket address", - sockser_option_handler }, - { { NULL, no_argument, NULL, 0 }, '\0', NULL, NULL, NULL } -}; - -static SIM_RC -sockser_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, - char *arg, int is_command) -{ - switch (opt) - { - case OPTION_ADDR : - sockser_addr = arg; - break; - } - - return SIM_RC_OK; -} - -static SIM_RC -dv_sockser_init (SIM_DESC sd) -{ - struct hostent *hostent; - struct sockaddr_in sockaddr; - char hostname[100]; - const char *port_str; - int tmp,port; - - if (STATE_ENVIRONMENT (sd) != OPERATING_ENVIRONMENT - || sockser_addr == NULL) - return SIM_RC_OK; - - if (*sockser_addr == '/') - { - /* support for these can come later */ - sim_io_eprintf (sd, "sockser init: unix domain sockets not supported: `%s'\n", - sockser_addr); - return SIM_RC_FAIL; - } - - port_str = strchr (sockser_addr, ':'); - if (!port_str) - { - sim_io_eprintf (sd, "sockser init: missing port number: `%s'\n", - sockser_addr); - return SIM_RC_FAIL; - } - tmp = port_str - sockser_addr; - if (tmp >= sizeof hostname) - tmp = sizeof (hostname) - 1; - strncpy (hostname, sockser_addr, tmp); - hostname[tmp] = '\000'; - port = atoi (port_str + 1); - - hostent = gethostbyname (hostname); - if (! hostent) - { - sim_io_eprintf (sd, "sockser init: unknown host: %s\n", - hostname); - return SIM_RC_FAIL; - } - - sockser_listen_fd = socket (PF_INET, SOCK_STREAM, 0); - if (sockser_listen_fd < 0) - { - sim_io_eprintf (sd, "sockser init: unable to get socket: %s\n", - strerror (errno)); - return SIM_RC_FAIL; - } - - sockaddr.sin_family = PF_INET; - sockaddr.sin_port = htons(port); - memcpy (&sockaddr.sin_addr.s_addr, hostent->h_addr, - sizeof (struct in_addr)); - - tmp = 1; - if (setsockopt (sockser_listen_fd, SOL_SOCKET, SO_REUSEADDR, (void*)& tmp, sizeof(tmp)) < 0) - { - sim_io_eprintf (sd, "sockser init: unable to set SO_REUSEADDR: %s\n", - strerror (errno)); - } - if (bind (sockser_listen_fd, (struct sockaddr *) &sockaddr, sizeof (sockaddr)) < 0) - { - sim_io_eprintf (sd, "sockser init: unable to bind socket address: %s\n", - strerror (errno)); - close (sockser_listen_fd); - sockser_listen_fd = -1; - return SIM_RC_FAIL; - } - if (listen (sockser_listen_fd, 1) < 0) - { - sim_io_eprintf (sd, "sockser init: unable to set up listener: %s\n", - strerror (errno)); - close (sockser_listen_fd); - sockser_listen_fd = -1; - return SIM_RC_OK; - } - - /* Handle writes to missing client -> SIGPIPE. - ??? Need a central signal management module. */ - { - RETSIGTYPE (*orig) (); - orig = signal (SIGPIPE, SIG_IGN); - /* If a handler is already set up, don't mess with it. */ - if (orig != SIG_DFL && orig != SIG_IGN) - signal (SIGPIPE, orig); - } - - return SIM_RC_OK; -} - -static void -dv_sockser_uninstall (SIM_DESC sd) -{ - if (sockser_listen_fd != -1) - { - close (sockser_listen_fd); - sockser_listen_fd = -1; - } - if (sockser_fd != -1) - { - close (sockser_fd); - sockser_fd = -1; - } -} - -SIM_RC -dv_sockser_install (SIM_DESC sd) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - if (sim_add_option_table (sd, NULL, sockser_options) != SIM_RC_OK) - return SIM_RC_FAIL; - sim_module_add_init_fn (sd, dv_sockser_init); - sim_module_add_uninstall_fn (sd, dv_sockser_uninstall); - return SIM_RC_OK; -} - -static int -connected_p (SIM_DESC sd) -{ - int numfds,flags; - struct timeval tv; - fd_set readfds; - struct sockaddr sockaddr; - int addrlen; - - if (sockser_listen_fd == -1) - return 0; - - if (sockser_fd >= 0) - { - /* FIXME: has client gone away? */ - return 1; - } - - /* Not connected. Connect with a client if there is one. */ - - FD_ZERO (&readfds); - FD_SET (sockser_listen_fd, &readfds); - - /* ??? One can certainly argue this should be done differently, - but for now this is sufficient. */ - tv.tv_sec = 0; - tv.tv_usec = sockser_timeout; - - numfds = select (sockser_listen_fd + 1, &readfds, 0, 0, &tv); - if (numfds <= 0) - return 0; - - addrlen = sizeof (sockaddr); - sockser_fd = accept (sockser_listen_fd, &sockaddr, &addrlen); - if (sockser_fd < 0) - return 0; - - /* Set non-blocking i/o. */ - flags = fcntl (sockser_fd, F_GETFL); - flags |= O_NONBLOCK | O_NDELAY; - if (fcntl (sockser_fd, F_SETFL, flags) == -1) - { - sim_io_eprintf (sd, "unable to set nonblocking i/o"); - close (sockser_fd); - sockser_fd = -1; - return 0; - } - return 1; -} - -int -dv_sockser_status (SIM_DESC sd) -{ - int numrfds,numwfds,status; - struct timeval tv; - fd_set readfds,writefds; - - /* status to return if the socket isn't set up, or select fails */ - status = DV_SOCKSER_INPUT_EMPTY | DV_SOCKSER_OUTPUT_EMPTY; - - if (! connected_p (sd)) - return status; - - FD_ZERO (&readfds); - FD_ZERO (&writefds); - FD_SET (sockser_fd, &readfds); - FD_SET (sockser_fd, &writefds); - - /* ??? One can certainly argue this should be done differently, - but for now this is sufficient. The read is done separately - from the write to enforce the delay which we heuristically set to - once every SOCKSER_TIMEOUT_FREQ tries. - No, this isn't great for SMP situations, blah blah blah. */ - - { - static int n; -#define SOCKSER_TIMEOUT_FREQ 42 - if (++n == SOCKSER_TIMEOUT_FREQ) - n = 0; - if (n == 0) - { - tv.tv_sec = 0; - tv.tv_usec = sockser_timeout; - numrfds = select (sockser_fd + 1, &readfds, 0, 0, &tv); - tv.tv_sec = 0; - tv.tv_usec = 0; - numwfds = select (sockser_fd + 1, 0, &writefds, 0, &tv); - } - else /* do both selects at once */ - { - tv.tv_sec = 0; - tv.tv_usec = 0; - numrfds = numwfds = select (sockser_fd + 1, &readfds, &writefds, 0, &tv); - } - } - - status = 0; - if (numrfds <= 0 || ! FD_ISSET (sockser_fd, &readfds)) - status |= DV_SOCKSER_INPUT_EMPTY; - if (numwfds <= 0 || FD_ISSET (sockser_fd, &writefds)) - status |= DV_SOCKSER_OUTPUT_EMPTY; - return status; -} - -int -dv_sockser_write (SIM_DESC sd, unsigned char c) -{ - int n; - - if (! connected_p (sd)) - return -1; - n = write (sockser_fd, &c, 1); - if (n == -1) - { - if (errno == EPIPE) - { - close (sockser_fd); - sockser_fd = -1; - } - return -1; - } - if (n != 1) - return -1; - return 1; -} - -int -dv_sockser_read (SIM_DESC sd) -{ - unsigned char c; - int n; - - if (! connected_p (sd)) - return -1; - n = read (sockser_fd, &c, 1); - /* ??? We're assuming semantics that may not be correct for all hosts. - In particular (from cvssrc/src/server.c), this assumes that we are using - BSD or POSIX nonblocking I/O. System V nonblocking I/O returns zero if - there is nothing to read. */ - if (n == 0) - { - close (sockser_fd); - sockser_fd = -1; - return -1; - } - if (n != 1) - return -1; - return c; -} diff --git a/sim/common/dv-sockser.h b/sim/common/dv-sockser.h deleted file mode 100644 index ef0a7a9..0000000 --- a/sim/common/dv-sockser.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Serial port emulation via sockets. - Copyright (C) 1998, 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 DV_SOCKSER_H -#define DV_SOCKSER_H - -/* bits in result of dev_sockser_status */ -#define DV_SOCKSER_INPUT_EMPTY 1 -#define DV_SOCKSER_OUTPUT_EMPTY 2 - -/* FIXME: later add a device ptr arg */ -extern int dv_sockser_status (SIM_DESC); -int dv_sockser_write (SIM_DESC, unsigned char); -int dv_sockser_read (SIM_DESC); - -#endif /* DV_SOCKSER_H */ diff --git a/sim/common/gdbinit.in b/sim/common/gdbinit.in deleted file mode 100644 index ab9d7b3..0000000 --- a/sim/common/gdbinit.in +++ /dev/null @@ -1,12 +0,0 @@ -break sim_io_error -break sim_core_signal -@cgen_breaks@ - -define dump -set sim_debug_dump () -end - -document dump -Dump cpu and simulator registers for debugging the simulator. -Requires the simulator to provide function sim_debug_dump. -end diff --git a/sim/common/genmloop.sh b/sim/common/genmloop.sh deleted file mode 100644 index dddd1a1..0000000 --- a/sim/common/genmloop.sh +++ /dev/null @@ -1,1334 +0,0 @@ -# Generate the main loop of the simulator. -# Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. -# Contributed by Cygnus Support. -# -# 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. -# -# This file creates two files: eng.hin and mloop.cin. -# eng.hin defines a few macros that specify what kind of engine was selected -# based on the arguments to this script. -# mloop.cin contains the engine. -# -# ??? Rename mloop.c to eng.c? -# ??? Rename mainloop.in to engine.in? -# ??? Add options to specify output file names? -# ??? Rename this file to genengine.sh? -# -# Syntax: genmloop.sh [options] -# -# Options: -# -# -mono | -multi -# - specify single cpu or multiple cpus (number specifyable at runtime), -# maximum number is a configuration parameter -# - -multi wip -# -# -fast: include support for fast execution in addition to full featured mode -# -# Full featured mode is for tracing, profiling, etc. and is always -# provided. Fast mode contains no frills, except speed. -# 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. -# ??? Later add ability to have another set of full/fast semantics -# for use in with-devices/with-smp situations (pbb can be inappropriate -# here). -# -# -full-switch: same as -fast but for full featured version of -switch -# Only needed if -fast present. -# -# -simple: simple execution engine (the default) -# -# This engine fetches and executes one instruction at a time. -# Field extraction is done in the semantic routines. -# -# ??? There are two possible flavours of -simple. One that extracts -# fields in the semantic routine (which is what is implemented here), -# and one that stores the extracted fields in ARGBUF before calling the -# semantic routine. The latter is essentially the -scache case with a -# cache size of one (and the scache lookup code removed). There are no -# current uses of this and it's not clear when doing this would be a win. -# More complicated ISA's that want to use -simple may find this a win. -# Should this ever be desirable, implement a new engine style here and -# call it -extract (or some such). It's believed that the CGEN-generated -# code for the -scache case would be usable here, so no new code -# generation option would be needed for CGEN. -# -# -scache: use the scache to speed things up (not always a win) -# -# This engine caches the extracted instruction before executing it. -# When executing instructions they are first looked up in the scache. -# -# -pbb: same as -scache but extract a (pseudo-) basic block at a time -# -# This engine is basically identical to the scache version except that -# extraction is done a pseudo-basic-block at a time and the address of -# the scache entry of a branch target is recorded as well. -# Additional speedups are then possible by defering Ctrl-C checking -# to the end of basic blocks and by threading the insns together. -# We call them pseudo-basic-block's instead of just basic-blocks because -# they're not necessarily basic-blocks, though normally are. -# -# -parallel-read: support parallel execution with read-before-exec support. -# -parallel-write: support parallel execution with write-after-exec support. -# -parallel-generic-write: support parallel execution with generic queued -# writes. -# -# One of these options is specified in addition to -simple, -scache, -# -pbb. Note that while the code can determine if the cpu supports -# parallel execution with HAVE_PARALLEL_INSNS [and thus this option is -# technically unnecessary], having this option cuts down on the clutter -# in the result. -# -# -parallel-only: semantic code only supports parallel version of insn -# -# Semantic code only supports parallel versions of each insn. -# Things can be sped up by generating both serial and parallel versions -# and is better suited to mixed parallel architectures like the m32r. -# -# -prefix: string to prepend to function names in mloop.c/eng.h. -# -# If no prefix is specified, the cpu type is used. -# -# -switch file: specify file containing semantics implemented as a switch() -# -# -cpu <cpu-family> -# -# Specify the cpu family name. -# -# -infile <input-file> -# -# Specify the mainloop.in input file. -# -# -outfile-suffix <output-file-suffix> -# -# Specify the suffix to append to output files. -# -# Only one of -scache/-pbb may be selected. -# -simple is the default. -# -#### -# -# TODO -# - build mainloop.in from .cpu file - -type=mono -#scache= -#fast= -#full_switch= -#pbb= -parallel=no -parallel_only=no -switch= -cpu="unknown" -infile="" -prefix="unknown" -outsuffix="" - -while test $# -gt 0 -do - case $1 in - -mono) type=mono ;; - -multi) type=multi ;; - -no-fast) ;; - -fast) fast=yes ;; - -full-switch) full_switch=yes ;; - -simple) ;; - -scache) scache=yes ;; - -pbb) pbb=yes ;; - -no-parallel) ;; - -outfile-suffix) shift ; outsuffix=$1 ;; - -parallel-read) parallel=read ;; - -parallel-write) parallel=write ;; - -parallel-generic-write) parallel=genwrite ;; - -parallel-only) parallel_only=yes ;; - -prefix) shift ; prefix=$1 ;; - -switch) shift ; switch=$1 ;; - -cpu) shift ; cpu=$1 ;; - -infile) shift ; infile=$1 ;; - *) echo "unknown option: $1" >&2 ; exit 1 ;; - esac - shift -done - -# Argument validation. - -if [ x$scache = xyes -a x$pbb = xyes ] ; then - echo "only one of -scache and -pbb may be selected" >&2 - exit 1 -fi - -if [ "x$cpu" = xunknown ] ; then - echo "cpu family not specified" >&2 - exit 1 -fi - -if [ "x$infile" = x ] ; then - echo "mainloop.in not specified" >&2 - exit 1 -fi - -if [ "x$prefix" = xunknown ] ; then - prefix=$cpu -fi - -lowercase='abcdefghijklmnopqrstuvwxyz' -uppercase='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -CPU=`echo ${cpu} | tr "${lowercase}" "${uppercase}"` -PREFIX=`echo ${prefix} | tr "${lowercase}" "${uppercase}"` - -########################################################################## - -rm -f eng${outsuffix}.hin -exec 1>eng${outsuffix}.hin - -echo "/* engine configuration for ${cpu} */" -echo "" - -echo "/* WITH_FAST: non-zero if a fast version of the engine is available" -echo " in addition to the full-featured version. */" -if [ x$fast = xyes ] ; then - echo "#define WITH_FAST 1" -else - echo "#define WITH_FAST 0" -fi - -echo "" -echo "/* WITH_SCACHE_PBB_${PREFIX}: non-zero if the pbb engine was selected. */" -if [ x$pbb = xyes ] ; then - echo "#define WITH_SCACHE_PBB_${PREFIX} 1" -else - echo "#define WITH_SCACHE_PBB_${PREFIX} 0" -fi - -echo "" -echo "/* HAVE_PARALLEL_INSNS: non-zero if cpu can parallelly execute > 1 insn. */" -# blah blah blah, other ways to do this, blah blah blah -case x$parallel in -xno) - echo "#define HAVE_PARALLEL_INSNS 0" - echo "#define WITH_PARALLEL_READ 0" - echo "#define WITH_PARALLEL_WRITE 0" - echo "#define WITH_PARALLEL_GENWRITE 0" - ;; -xread) - echo "#define HAVE_PARALLEL_INSNS 1" - echo "/* Parallel execution is supported by read-before-exec. */" - echo "#define WITH_PARALLEL_READ 1" - echo "#define WITH_PARALLEL_WRITE 0" - echo "#define WITH_PARALLEL_GENWRITE 0" - ;; -xwrite) - echo "#define HAVE_PARALLEL_INSNS 1" - echo "/* Parallel execution is supported by write-after-exec. */" - echo "#define WITH_PARALLEL_READ 0" - echo "#define WITH_PARALLEL_WRITE 1" - echo "#define WITH_PARALLEL_GENWRITE 0" - ;; -xgenwrite) - echo "#define HAVE_PARALLEL_INSNS 1" - echo "/* Parallel execution is supported by generic write-after-exec. */" - echo "#define WITH_PARALLEL_READ 0" - echo "#define WITH_PARALLEL_WRITE 0" - echo "#define WITH_PARALLEL_GENWRITE 1" - ;; -esac - -if [ "x$switch" != x ] ; then - echo "" - echo "/* WITH_SEM_SWITCH_FULL: non-zero if full-featured engine is" - echo " implemented as a switch(). */" - if [ x$fast != xyes -o x$full_switch = xyes ] ; then - echo "#define WITH_SEM_SWITCH_FULL 1" - else - echo "#define WITH_SEM_SWITCH_FULL 0" - fi - echo "" - echo "/* WITH_SEM_SWITCH_FAST: non-zero if fast engine is" - echo " implemented as a switch(). */" - if [ x$fast = xyes ] ; then - echo "#define WITH_SEM_SWITCH_FAST 1" - else - echo "#define WITH_SEM_SWITCH_FAST 0" - fi -fi - -# Decls of functions we define. - -echo "" -echo "/* Functions defined in the generated mainloop.c file" -echo " (which doesn't necessarily have that file name). */" -echo "" -echo "extern ENGINE_FN ${prefix}_engine_run_full;" -echo "extern ENGINE_FN ${prefix}_engine_run_fast;" - -if [ x$pbb = xyes ] ; then - echo "" - echo "extern SEM_PC ${prefix}_pbb_begin (SIM_CPU *, int);" - echo "extern SEM_PC ${prefix}_pbb_chain (SIM_CPU *, SEM_ARG);" - echo "extern SEM_PC ${prefix}_pbb_cti_chain (SIM_CPU *, SEM_ARG, SEM_BRANCH_TYPE, PCADDR);" - echo "extern void ${prefix}_pbb_before (SIM_CPU *, SCACHE *);" - echo "extern void ${prefix}_pbb_after (SIM_CPU *, SCACHE *);" -fi - -########################################################################## - -rm -f tmp-mloop-$$.cin mloop${outsuffix}.cin -exec 1>tmp-mloop-$$.cin - -# We use @cpu@ instead of ${cpu} because we still need to run sed to handle -# transformation of @cpu@ for mainloop.in, so there's no need to use ${cpu} -# here. - -cat << EOF -/* This file is generated by the genmloop script. DO NOT EDIT! */ - -/* Enable switch() support in cgen headers. */ -#define SEM_IN_SWITCH - -#define WANT_CPU @cpu@ -#define WANT_CPU_@CPU@ - -#include "sim-main.h" -#include "bfd.h" -#include "cgen-mem.h" -#include "cgen-ops.h" -#include "sim-assert.h" - -/* Fill in the administrative ARGBUF fields required by all insns, - virtual and real. */ - -static INLINE void -@prefix@_fill_argbuf (const SIM_CPU *cpu, ARGBUF *abuf, const IDESC *idesc, - PCADDR pc, int fast_p) -{ -#if WITH_SCACHE - SEM_SET_CODE (abuf, idesc, fast_p); - ARGBUF_ADDR (abuf) = pc; -#endif - ARGBUF_IDESC (abuf) = idesc; -} - -/* Fill in tracing/profiling fields of an ARGBUF. */ - -static INLINE void -@prefix@_fill_argbuf_tp (const SIM_CPU *cpu, ARGBUF *abuf, - int trace_p, int profile_p) -{ - ARGBUF_TRACE_P (abuf) = trace_p; - ARGBUF_PROFILE_P (abuf) = profile_p; -} - -#if WITH_SCACHE_PBB - -/* Emit the "x-before" handler. - x-before is emitted before each insn (serial or parallel). - This is as opposed to x-after which is only emitted at the end of a group - of parallel insns. */ - -static INLINE void -@prefix@_emit_before (SIM_CPU *current_cpu, SCACHE *sc, PCADDR pc, int first_p) -{ - ARGBUF *abuf = &sc[0].argbuf; - const IDESC *id = & CPU_IDESC (current_cpu) [@PREFIX@_INSN_X_BEFORE]; - - abuf->fields.before.first_p = first_p; - @prefix@_fill_argbuf (current_cpu, abuf, id, pc, 0); - /* no need to set trace_p,profile_p */ -} - -/* Emit the "x-after" handler. - x-after is emitted after a serial insn or at the end of a group of - parallel insns. */ - -static INLINE void -@prefix@_emit_after (SIM_CPU *current_cpu, SCACHE *sc, PCADDR pc) -{ - ARGBUF *abuf = &sc[0].argbuf; - const IDESC *id = & CPU_IDESC (current_cpu) [@PREFIX@_INSN_X_AFTER]; - - @prefix@_fill_argbuf (current_cpu, abuf, id, pc, 0); - /* no need to set trace_p,profile_p */ -} - -#endif /* WITH_SCACHE_PBB */ - -EOF - -${SHELL} $infile support - -########################################################################## - -# Simple engine: fetch an instruction, execute the instruction. -# -# Instruction fields are not extracted into ARGBUF, they are extracted in -# the semantic routines themselves. However, there is still a need to pass -# and return misc. information to the semantic routines so we still use ARGBUF. -# [One could certainly implement things differently and remove ARGBUF. -# It's not clear this is necessarily always a win.] -# ??? The use of the SCACHE struct is for consistency with the with-scache -# case though it might be a source of confusion. - -if [ x$scache != xyes -a x$pbb != xyes ] ; then - - cat << EOF - -#define FAST_P 0 - -void -@prefix@_engine_run_full (SIM_CPU *current_cpu) -{ -#define FAST_P 0 - SIM_DESC current_state = CPU_STATE (current_cpu); - /* ??? Use of SCACHE is a bit of a hack as we don't actually use the scache. - We do however use ARGBUF so for consistency with the other engine flavours - the SCACHE type is used. */ - SCACHE cache[MAX_LIW_INSNS]; - SCACHE *sc = &cache[0]; - -EOF - -case x$parallel in -xread | xwrite) - cat << EOF - PAREXEC pbufs[MAX_PARALLEL_INSNS]; - PAREXEC *par_exec; - -EOF - ;; -esac - -# Any initialization code before looping starts. -# Note that this code may declare some locals. -${SHELL} $infile init - -if [ x$parallel = xread ] ; then - cat << EOF - -#if defined (__GNUC__) - { - if (! CPU_IDESC_READ_INIT_P (current_cpu)) - { -/* ??? Later maybe paste read.c in when building mainloop.c. */ -#define DEFINE_LABELS -#include "readx.c" - CPU_IDESC_READ_INIT_P (current_cpu) = 1; - } - } -#endif - -EOF -fi - -cat << EOF - - if (! CPU_IDESC_SEM_INIT_P (current_cpu)) - { -#if WITH_SEM_SWITCH_FULL -#if defined (__GNUC__) -/* ??? Later maybe paste sem-switch.c in when building mainloop.c. */ -#define DEFINE_LABELS -#include "$switch" -#endif -#else - @prefix@_sem_init_idesc_table (current_cpu); -#endif - CPU_IDESC_SEM_INIT_P (current_cpu) = 1; - } - - do - { -/* begin full-exec-simple */ -EOF - -${SHELL} $infile full-exec-simple - -cat << EOF -/* end full-exec-simple */ - - ++ CPU_INSN_COUNT (current_cpu); - } - while (0 /*CPU_RUNNING_P (current_cpu)*/); -} - -#undef FAST_P - -EOF - -#################################### - -# Simple engine: fast version. -# ??? A somewhat dubious effort, but for completeness' sake. - -if [ x$fast = xyes ] ; then - - cat << EOF - -#define FAST_P 1 - -FIXME: "fast simple version unimplemented, delete -fast arg to genmloop.sh." - -#undef FAST_P - -EOF - -fi # -fast - -fi # simple engine - -########################################################################## - -# Non-parallel scache engine: lookup insn in scache, fetch if missing, -# then execute it. - -if [ x$scache = xyes -a x$parallel = xno ] ; then - - cat << EOF - -static INLINE SCACHE * -@prefix@_scache_lookup (SIM_CPU *current_cpu, PCADDR vpc, SCACHE *scache, - unsigned int hash_mask, int FAST_P) -{ - /* First step: look up current insn in hash table. */ - SCACHE *sc = scache + SCACHE_HASH_PC (vpc, hash_mask); - - /* If the entry isn't the one we want (cache miss), - fetch and decode the instruction. */ - if (sc->argbuf.addr != vpc) - { - if (! FAST_P) - PROFILE_COUNT_SCACHE_MISS (current_cpu); - -/* begin extract-scache */ -EOF - -${SHELL} $infile extract-scache - -cat << EOF -/* end extract-scache */ - } - else if (! FAST_P) - { - PROFILE_COUNT_SCACHE_HIT (current_cpu); - /* Make core access statistics come out right. - The size is a guess, but it's currently not used either. */ - PROFILE_COUNT_CORE (current_cpu, vpc, 2, exec_map); - } - - return sc; -} - -#define FAST_P 0 - -void -@prefix@_engine_run_full (SIM_CPU *current_cpu) -{ - SIM_DESC current_state = CPU_STATE (current_cpu); - SCACHE *scache = CPU_SCACHE_CACHE (current_cpu); - unsigned int hash_mask = CPU_SCACHE_HASH_MASK (current_cpu); - SEM_PC vpc; - -EOF - -# Any initialization code before looping starts. -# Note that this code may declare some locals. -${SHELL} $infile init - -cat << EOF - - if (! CPU_IDESC_SEM_INIT_P (current_cpu)) - { -#if ! WITH_SEM_SWITCH_FULL - @prefix@_sem_init_idesc_table (current_cpu); -#endif - CPU_IDESC_SEM_INIT_P (current_cpu) = 1; - } - - vpc = GET_H_PC (); - - do - { - SCACHE *sc; - - sc = @prefix@_scache_lookup (current_cpu, vpc, scache, hash_mask, FAST_P); - -/* begin full-exec-scache */ -EOF - -${SHELL} $infile full-exec-scache - -cat << EOF -/* end full-exec-scache */ - - SET_H_PC (vpc); - - ++ CPU_INSN_COUNT (current_cpu); - } - while (0 /*CPU_RUNNING_P (current_cpu)*/); -} - -#undef FAST_P - -EOF - -#################################### - -# Non-parallel scache engine: fast version. - -if [ x$fast = xyes ] ; then - - cat << EOF - -#define FAST_P 1 - -void -@prefix@_engine_run_fast (SIM_CPU *current_cpu) -{ - SIM_DESC current_state = CPU_STATE (current_cpu); - SCACHE *scache = CPU_SCACHE_CACHE (current_cpu); - unsigned int hash_mask = CPU_SCACHE_HASH_MASK (current_cpu); - SEM_PC vpc; - -EOF - -# Any initialization code before looping starts. -# Note that this code may declare some locals. -${SHELL} $infile init - -cat << EOF - - if (! CPU_IDESC_SEM_INIT_P (current_cpu)) - { -#if WITH_SEM_SWITCH_FAST -#if defined (__GNUC__) -/* ??? Later maybe paste sem-switch.c in when building mainloop.c. */ -#define DEFINE_LABELS -#include "$switch" -#endif -#else - @prefix@_semf_init_idesc_table (current_cpu); -#endif - CPU_IDESC_SEM_INIT_P (current_cpu) = 1; - } - - vpc = GET_H_PC (); - - do - { - SCACHE *sc; - - sc = @prefix@_scache_lookup (current_cpu, vpc, scache, hash_mask, FAST_P); - -/* begin fast-exec-scache */ -EOF - -${SHELL} $infile fast-exec-scache - -cat << EOF -/* end fast-exec-scache */ - - SET_H_PC (vpc); - - ++ CPU_INSN_COUNT (current_cpu); - } - while (0 /*CPU_RUNNING_P (current_cpu)*/); -} - -#undef FAST_P - -EOF - -fi # -fast - -fi # -scache && ! parallel - -########################################################################## - -# Parallel scache engine: lookup insn in scache, fetch if missing, -# then execute it. -# For the parallel case we give the target more flexibility. - -if [ x$scache = xyes -a x$parallel != xno ] ; then - - cat << EOF - -static INLINE SCACHE * -@prefix@_scache_lookup (SIM_CPU *current_cpu, PCADDR vpc, SCACHE *scache, - unsigned int hash_mask, int FAST_P) -{ - /* First step: look up current insn in hash table. */ - SCACHE *sc = scache + SCACHE_HASH_PC (vpc, hash_mask); - - /* If the entry isn't the one we want (cache miss), - fetch and decode the instruction. */ - if (sc->argbuf.addr != vpc) - { - if (! FAST_P) - PROFILE_COUNT_SCACHE_MISS (current_cpu); - -#define SET_LAST_INSN_P(last_p) do { sc->last_insn_p = (last_p); } while (0) -/* begin extract-scache */ -EOF - -${SHELL} $infile extract-scache - -cat << EOF -/* end extract-scache */ -#undef SET_LAST_INSN_P - } - else if (! FAST_P) - { - PROFILE_COUNT_SCACHE_HIT (current_cpu); - /* Make core access statistics come out right. - The size is a guess, but it's currently not used either. */ - PROFILE_COUNT_CORE (current_cpu, vpc, 2, exec_map); - } - - return sc; -} - -#define FAST_P 0 - -void -@prefix@_engine_run_full (SIM_CPU *current_cpu) -{ - SIM_DESC current_state = CPU_STATE (current_cpu); - SCACHE *scache = CPU_SCACHE_CACHE (current_cpu); - unsigned int hash_mask = CPU_SCACHE_HASH_MASK (current_cpu); - SEM_PC vpc; - -EOF - -# Any initialization code before looping starts. -# Note that this code may declare some locals. -${SHELL} $infile init - -if [ x$parallel = xread ] ; then -cat << EOF -#if defined (__GNUC__) - { - if (! CPU_IDESC_READ_INIT_P (current_cpu)) - { -/* ??? Later maybe paste read.c in when building mainloop.c. */ -#define DEFINE_LABELS -#include "readx.c" - CPU_IDESC_READ_INIT_P (current_cpu) = 1; - } - } -#endif - -EOF -fi - -cat << EOF - - if (! CPU_IDESC_SEM_INIT_P (current_cpu)) - { -#if ! WITH_SEM_SWITCH_FULL - @prefix@_sem_init_idesc_table (current_cpu); -#endif - CPU_IDESC_SEM_INIT_P (current_cpu) = 1; - } - - vpc = GET_H_PC (); - - do - { -/* begin full-exec-scache */ -EOF - -${SHELL} $infile full-exec-scache - -cat << EOF -/* end full-exec-scache */ - } - while (0 /*CPU_RUNNING_P (current_cpu)*/); -} - -#undef FAST_P - -EOF - -#################################### - -# Parallel scache engine: fast version. - -if [ x$fast = xyes ] ; then - - cat << EOF - -#define FAST_P 1 - -void -@prefix@_engine_run_fast (SIM_CPU *current_cpu) -{ - SIM_DESC current_state = CPU_STATE (current_cpu); - SCACHE *scache = CPU_SCACHE_CACHE (current_cpu); - unsigned int hash_mask = CPU_SCACHE_HASH_MASK (current_cpu); - SEM_PC vpc; - PAREXEC pbufs[MAX_PARALLEL_INSNS]; - PAREXEC *par_exec; - -EOF - -# Any initialization code before looping starts. -# Note that this code may declare some locals. -${SHELL} $infile init - -if [ x$parallel = xread ] ; then -cat << EOF - -#if defined (__GNUC__) - { - if (! CPU_IDESC_READ_INIT_P (current_cpu)) - { -/* ??? Later maybe paste read.c in when building mainloop.c. */ -#define DEFINE_LABELS -#include "readx.c" - CPU_IDESC_READ_INIT_P (current_cpu) = 1; - } - } -#endif - -EOF -fi - -cat << EOF - - if (! CPU_IDESC_SEM_INIT_P (current_cpu)) - { -#if WITH_SEM_SWITCH_FAST -#if defined (__GNUC__) -/* ??? Later maybe paste sem-switch.c in when building mainloop.c. */ -#define DEFINE_LABELS -#include "$switch" -#endif -#else - @prefix@_semf_init_idesc_table (current_cpu); -#endif - CPU_IDESC_SEM_INIT_P (current_cpu) = 1; - } - - vpc = GET_H_PC (); - - do - { -/* begin fast-exec-scache */ -EOF - -${SHELL} $infile fast-exec-scache - -cat << EOF -/* end fast-exec-scache */ - } - while (0 /*CPU_RUNNING_P (current_cpu)*/); -} - -#undef FAST_P - -EOF - -fi # -fast - -fi # -scache && parallel - -########################################################################## - -# Compilation engine: lookup insn in scache, extract a pbb -# (pseudo-basic-block) if missing, then execute the pbb. -# A "pbb" is a sequence of insns up to the next cti insn or until -# some prespecified maximum. -# CTI: control transfer instruction. - -if [ x$pbb = xyes ] ; then - - cat << EOF - -/* Record address of cti terminating a pbb. */ -#define SET_CTI_VPC(sc) do { _cti_sc = (sc); } while (0) -/* Record number of [real] insns in pbb. */ -#define SET_INSN_COUNT(n) do { _insn_count = (n); } while (0) - -/* Fetch and extract a pseudo-basic-block. - FAST_P is non-zero if no tracing/profiling/etc. is wanted. */ - -INLINE SEM_PC -@prefix@_pbb_begin (SIM_CPU *current_cpu, int FAST_P) -{ - SEM_PC new_vpc; - PCADDR pc; - SCACHE *sc; - int max_insns = CPU_SCACHE_MAX_CHAIN_LENGTH (current_cpu); - - pc = GET_H_PC (); - - new_vpc = scache_lookup_or_alloc (current_cpu, pc, max_insns, &sc); - if (! new_vpc) - { - /* Leading '_' to avoid collision with mainloop.in. */ - int _insn_count = 0; - SCACHE *orig_sc = sc; - SCACHE *_cti_sc = NULL; - int slice_insns = CPU_MAX_SLICE_INSNS (current_cpu); - - /* First figure out how many instructions to compile. - MAX_INSNS is the size of the allocated buffer, which includes space - for before/after handlers if they're being used. - SLICE_INSNS is the maxinum number of real insns that can be - executed. Zero means "as many as we want". */ - /* ??? max_insns is serving two incompatible roles. - 1) Number of slots available in scache buffer. - 2) Number of real insns to execute. - They're incompatible because there are virtual insns emitted too - (chain,cti-chain,before,after handlers). */ - - if (slice_insns == 1) - { - /* No need to worry about extra slots required for virtual insns - and parallel exec support because MAX_CHAIN_LENGTH is - guaranteed to be big enough to execute at least 1 insn! */ - max_insns = 1; - } - else - { - /* Allow enough slop so that while compiling insns, if max_insns > 0 - then there's guaranteed to be enough space to emit one real insn. - MAX_CHAIN_LENGTH is typically much longer than - the normal number of insns between cti's anyway. */ - max_insns -= (1 /* one for the trailing chain insn */ - + (FAST_P - ? 0 - : (1 + MAX_PARALLEL_INSNS) /* before+after */) - + (MAX_PARALLEL_INSNS > 1 - ? (MAX_PARALLEL_INSNS * 2) - : 0)); - - /* Account for before/after handlers. */ - if (! FAST_P) - slice_insns *= 3; - - if (slice_insns > 0 - && slice_insns < max_insns) - max_insns = slice_insns; - } - - new_vpc = sc; - - /* SC,PC must be updated to point passed the last entry used. - SET_CTI_VPC must be called if pbb is terminated by a cti. - SET_INSN_COUNT must be called to record number of real insns in - pbb [could be computed by us of course, extra cpu but perhaps - negligible enough]. */ - -/* begin extract-pbb */ -EOF - -${SHELL} $infile extract-pbb - -cat << EOF -/* end extract-pbb */ - - /* The last one is a pseudo-insn to link to the next chain. - It is also used to record the insn count for this chain. */ - { - const IDESC *id; - - /* Was pbb terminated by a cti? */ - if (_cti_sc) - { - id = & CPU_IDESC (current_cpu) [@PREFIX@_INSN_X_CTI_CHAIN]; - } - else - { - id = & CPU_IDESC (current_cpu) [@PREFIX@_INSN_X_CHAIN]; - } - SEM_SET_CODE (&sc->argbuf, id, FAST_P); - sc->argbuf.idesc = id; - sc->argbuf.addr = pc; - sc->argbuf.fields.chain.insn_count = _insn_count; - sc->argbuf.fields.chain.next = 0; - sc->argbuf.fields.chain.branch_target = 0; - ++sc; - } - - /* Update the pointer to the next free entry, may not have used as - many entries as was asked for. */ - CPU_SCACHE_NEXT_FREE (current_cpu) = sc; - /* Record length of chain if profiling. - This includes virtual insns since they count against - max_insns too. */ - if (! FAST_P) - PROFILE_COUNT_SCACHE_CHAIN_LENGTH (current_cpu, sc - orig_sc); - } - - return new_vpc; -} - -/* Chain to the next block from a non-cti terminated previous block. */ - -INLINE SEM_PC -@prefix@_pbb_chain (SIM_CPU *current_cpu, SEM_ARG sem_arg) -{ - ARGBUF *abuf = SEM_ARGBUF (sem_arg); - - PBB_UPDATE_INSN_COUNT (current_cpu, sem_arg); - - SET_H_PC (abuf->addr); - - /* If not running forever, exit back to main loop. */ - if (CPU_MAX_SLICE_INSNS (current_cpu) != 0 - /* Also exit back to main loop if there's an event. - Note that if CPU_MAX_SLICE_INSNS != 1, events won't get processed - at the "right" time, but then that was what was asked for. - There is no silver bullet for simulator engines. - ??? Clearly this needs a cleaner interface. - At present it's just so Ctrl-C works. */ - || STATE_EVENTS (CPU_STATE (current_cpu))->work_pending) - CPU_RUNNING_P (current_cpu) = 0; - - /* If chained to next block, go straight to it. */ - if (abuf->fields.chain.next) - return abuf->fields.chain.next; - /* See if next block has already been compiled. */ - abuf->fields.chain.next = scache_lookup (current_cpu, abuf->addr); - if (abuf->fields.chain.next) - return abuf->fields.chain.next; - /* Nope, so next insn is a virtual insn to invoke the compiler - (begin a pbb). */ - return CPU_SCACHE_PBB_BEGIN (current_cpu); -} - -/* Chain to the next block from a cti terminated previous block. - BR_TYPE indicates whether the branch was taken and whether we can cache - the vpc of the branch target. - NEW_PC is the target's branch address, and is only valid if - BR_TYPE != SEM_BRANCH_UNTAKEN. */ - -INLINE SEM_PC -@prefix@_pbb_cti_chain (SIM_CPU *current_cpu, SEM_ARG sem_arg, - SEM_BRANCH_TYPE br_type, PCADDR new_pc) -{ - SEM_PC *new_vpc_ptr; - - PBB_UPDATE_INSN_COUNT (current_cpu, sem_arg); - - /* If not running forever, exit back to main loop. */ - if (CPU_MAX_SLICE_INSNS (current_cpu) != 0 - /* Also exit back to main loop if there's an event. - Note that if CPU_MAX_SLICE_INSNS != 1, events won't get processed - at the "right" time, but then that was what was asked for. - There is no silver bullet for simulator engines. - ??? Clearly this needs a cleaner interface. - At present it's just so Ctrl-C works. */ - || STATE_EVENTS (CPU_STATE (current_cpu))->work_pending) - CPU_RUNNING_P (current_cpu) = 0; - - /* Restart compiler if we branched to an uncacheable address - (e.g. "j reg"). */ - if (br_type == SEM_BRANCH_UNCACHEABLE) - { - SET_H_PC (new_pc); - return CPU_SCACHE_PBB_BEGIN (current_cpu); - } - - /* If branch wasn't taken, update the pc and set BR_ADDR_PTR to our - next chain ptr. */ - if (br_type == SEM_BRANCH_UNTAKEN) - { - ARGBUF *abuf = SEM_ARGBUF (sem_arg); - new_pc = abuf->addr; - SET_H_PC (new_pc); - new_vpc_ptr = &abuf->fields.chain.next; - } - else - { - ARGBUF *abuf = SEM_ARGBUF (sem_arg); - SET_H_PC (new_pc); - new_vpc_ptr = &abuf->fields.chain.branch_target; - } - - /* If chained to next block, go straight to it. */ - if (*new_vpc_ptr) - return *new_vpc_ptr; - /* See if next block has already been compiled. */ - *new_vpc_ptr = scache_lookup (current_cpu, new_pc); - if (*new_vpc_ptr) - return *new_vpc_ptr; - /* Nope, so next insn is a virtual insn to invoke the compiler - (begin a pbb). */ - return CPU_SCACHE_PBB_BEGIN (current_cpu); -} - -/* x-before handler. - This is called before each insn. */ - -void -@prefix@_pbb_before (SIM_CPU *current_cpu, SCACHE *sc) -{ - SEM_ARG sem_arg = sc; - const ARGBUF *abuf = SEM_ARGBUF (sem_arg); - int first_p = abuf->fields.before.first_p; - const ARGBUF *cur_abuf = SEM_ARGBUF (sc + 1); - const IDESC *cur_idesc = cur_abuf->idesc; - PCADDR pc = cur_abuf->addr; - - if (ARGBUF_PROFILE_P (cur_abuf)) - PROFILE_COUNT_INSN (current_cpu, pc, cur_idesc->num); - - /* If this isn't the first insn, finish up the previous one. */ - - if (! first_p) - { - if (PROFILE_MODEL_P (current_cpu)) - { - const SEM_ARG prev_sem_arg = sc - 1; - const ARGBUF *prev_abuf = SEM_ARGBUF (prev_sem_arg); - const IDESC *prev_idesc = prev_abuf->idesc; - int cycles; - - /* ??? May want to measure all insns if doing insn tracing. */ - if (ARGBUF_PROFILE_P (prev_abuf)) - { - cycles = (*prev_idesc->timing->model_fn) (current_cpu, prev_sem_arg); - @prefix@_model_insn_after (current_cpu, 0 /*last_p*/, cycles); - } - } - - TRACE_INSN_FINI (current_cpu, cur_abuf, 0 /*last_p*/); - } - - /* FIXME: Later make cover macros: PROFILE_INSN_{INIT,FINI}. */ - if (PROFILE_MODEL_P (current_cpu) - && ARGBUF_PROFILE_P (cur_abuf)) - @prefix@_model_insn_before (current_cpu, first_p); - - TRACE_INSN_INIT (current_cpu, cur_abuf, first_p); - TRACE_INSN (current_cpu, cur_idesc->idata, cur_abuf, pc); -} - -/* x-after handler. - This is called after a serial insn or at the end of a group of parallel - insns. */ - -void -@prefix@_pbb_after (SIM_CPU *current_cpu, SCACHE *sc) -{ - SEM_ARG sem_arg = sc; - const ARGBUF *abuf = SEM_ARGBUF (sem_arg); - const SEM_ARG prev_sem_arg = sc - 1; - const ARGBUF *prev_abuf = SEM_ARGBUF (prev_sem_arg); - - /* ??? May want to measure all insns if doing insn tracing. */ - if (PROFILE_MODEL_P (current_cpu) - && ARGBUF_PROFILE_P (prev_abuf)) - { - const IDESC *prev_idesc = prev_abuf->idesc; - int cycles; - - cycles = (*prev_idesc->timing->model_fn) (current_cpu, prev_sem_arg); - @prefix@_model_insn_after (current_cpu, 1 /*last_p*/, cycles); - } - TRACE_INSN_FINI (current_cpu, prev_abuf, 1 /*last_p*/); -} - -#define FAST_P 0 - -void -@prefix@_engine_run_full (SIM_CPU *current_cpu) -{ - SIM_DESC current_state = CPU_STATE (current_cpu); - SCACHE *scache = CPU_SCACHE_CACHE (current_cpu); - /* virtual program counter */ - SEM_PC vpc; -#if WITH_SEM_SWITCH_FULL - /* For communication between cti's and cti-chain. */ - SEM_BRANCH_TYPE pbb_br_type; - PCADDR pbb_br_npc; -#endif - -EOF - -case x$parallel in -xread | xwrite) - cat << EOF - PAREXEC pbufs[MAX_PARALLEL_INSNS]; - PAREXEC *par_exec = &pbufs[0]; - -EOF - ;; -esac - -# Any initialization code before looping starts. -# Note that this code may declare some locals. -${SHELL} $infile init - -cat << EOF - - if (! CPU_IDESC_SEM_INIT_P (current_cpu)) - { - /* ??? 'twould be nice to move this up a level and only call it once. - On the other hand, in the "let's go fast" case the test is only done - once per pbb (since we only return to the main loop at the end of - a pbb). And in the "let's run until we're done" case we don't return - until the program exits. */ - -#if WITH_SEM_SWITCH_FULL -#if defined (__GNUC__) -/* ??? Later maybe paste sem-switch.c in when building mainloop.c. */ -#define DEFINE_LABELS -#include "$switch" -#endif -#else - @prefix@_sem_init_idesc_table (current_cpu); -#endif - - /* Initialize the "begin (compile) a pbb" virtual insn. */ - vpc = CPU_SCACHE_PBB_BEGIN (current_cpu); - SEM_SET_FULL_CODE (SEM_ARGBUF (vpc), - & CPU_IDESC (current_cpu) [@PREFIX@_INSN_X_BEGIN]); - vpc->argbuf.idesc = & CPU_IDESC (current_cpu) [@PREFIX@_INSN_X_BEGIN]; - - CPU_IDESC_SEM_INIT_P (current_cpu) = 1; - } - - CPU_RUNNING_P (current_cpu) = 1; - /* ??? In the case where we're returning to the main loop after every - pbb we don't want to call pbb_begin each time (which hashes on the pc - and does a table lookup). A way to speed this up is to save vpc - between calls. */ - vpc = @prefix@_pbb_begin (current_cpu, FAST_P); - - do - { -/* begin full-exec-pbb */ -EOF - -${SHELL} $infile full-exec-pbb - -cat << EOF -/* end full-exec-pbb */ - } - while (CPU_RUNNING_P (current_cpu)); -} - -#undef FAST_P - -EOF - -#################################### - -# Compile engine: fast version. - -if [ x$fast = xyes ] ; then - - cat << EOF - -#define FAST_P 1 - -void -@prefix@_engine_run_fast (SIM_CPU *current_cpu) -{ - SIM_DESC current_state = CPU_STATE (current_cpu); - SCACHE *scache = CPU_SCACHE_CACHE (current_cpu); - /* virtual program counter */ - SEM_PC vpc; -#if WITH_SEM_SWITCH_FAST - /* For communication between cti's and cti-chain. */ - SEM_BRANCH_TYPE pbb_br_type; - PCADDR pbb_br_npc; -#endif - -EOF - -case x$parallel in -xread | xwrite) - cat << EOF - PAREXEC pbufs[MAX_PARALLEL_INSNS]; - PAREXEC *par_exec = &pbufs[0]; - -EOF - ;; -esac - -# Any initialization code before looping starts. -# Note that this code may declare some locals. -${SHELL} $infile init - -cat << EOF - - if (! CPU_IDESC_SEM_INIT_P (current_cpu)) - { - /* ??? 'twould be nice to move this up a level and only call it once. - On the other hand, in the "let's go fast" case the test is only done - once per pbb (since we only return to the main loop at the end of - a pbb). And in the "let's run until we're done" case we don't return - until the program exits. */ - -#if WITH_SEM_SWITCH_FAST -#if defined (__GNUC__) -/* ??? Later maybe paste sem-switch.c in when building mainloop.c. */ -#define DEFINE_LABELS -#include "$switch" -#endif -#else - @prefix@_semf_init_idesc_table (current_cpu); -#endif - - /* Initialize the "begin (compile) a pbb" virtual insn. */ - vpc = CPU_SCACHE_PBB_BEGIN (current_cpu); - SEM_SET_FAST_CODE (SEM_ARGBUF (vpc), - & CPU_IDESC (current_cpu) [@PREFIX@_INSN_X_BEGIN]); - vpc->argbuf.idesc = & CPU_IDESC (current_cpu) [@PREFIX@_INSN_X_BEGIN]; - - CPU_IDESC_SEM_INIT_P (current_cpu) = 1; - } - - CPU_RUNNING_P (current_cpu) = 1; - /* ??? In the case where we're returning to the main loop after every - pbb we don't want to call pbb_begin each time (which hashes on the pc - and does a table lookup). A way to speed this up is to save vpc - between calls. */ - vpc = @prefix@_pbb_begin (current_cpu, FAST_P); - - do - { -/* begin fast-exec-pbb */ -EOF - -${SHELL} $infile fast-exec-pbb - -cat << EOF -/* end fast-exec-pbb */ - } - while (CPU_RUNNING_P (current_cpu)); -} - -#undef FAST_P - -EOF -fi # -fast - -fi # -pbb - -# Expand @..@ macros appearing in tmp-mloop-{pid}.cin. -sed \ - -e "s/@cpu@/$cpu/g" -e "s/@CPU@/$CPU/g" \ - -e "s/@prefix@/$prefix/g" -e "s/@PREFIX@/$PREFIX/g" < tmp-mloop-$$.cin > mloop${outsuffix}.cin -rc=$? -rm -f tmp-mloop-$$.cin - -exit $rc diff --git a/sim/common/gennltvals.sh b/sim/common/gennltvals.sh deleted file mode 100644 index 8e8ad54..0000000 --- a/sim/common/gennltvals.sh +++ /dev/null @@ -1,71 +0,0 @@ -#! /bin/sh -# Generate nltvals.def, a file that describes various newlib/libgloss -# target values used by the host/target interface. -# -# Syntax: /bin/sh gennltvals.sh shell srcroot cpp - -shell=$1 -srcroot=$2 -cpp=$3 - -srccom=$srcroot/sim/common - -echo '/* Newlib/libgloss macro values needed by remote target support. */' -echo '/* This file is machine generated by gennltvals.sh. */' - -$shell ${srccom}/gentvals.sh "" errno ${srcroot}/newlib/libc/include \ - "errno.h sys/errno.h" 'E[A-Z0-9]*' "${cpp}" - -$shell ${srccom}/gentvals.sh "" signal ${srcroot}/newlib/libc/include \ - "signal.h sys/signal.h" 'SIG[A-Z0-9]*' "${cpp}" - -$shell ${srccom}/gentvals.sh "" open ${srcroot}/newlib/libc/include \ - "fcntl.h sys/fcntl.h" 'O_[A-Z0-9]*' "${cpp}" - -# Unfortunately, each newlib/libgloss port has seen fit to define their own -# syscall.h file. This means that system call numbers can vary for each port. -# Support for all this crud is kept here, rather than trying to get too fancy. -# If you want to try to improve this, please do, but don't break anything. -# Note that there is a standard syscall.h file (libgloss/syscall.h) now which -# hopefully more targets can use. - -dir=newlib/libc/sys/d10v/sys target=d10v -$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 \ - "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}" - -dir=libgloss target=frv -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ - "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}" - -dir=libgloss/i960 target=i960 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ - "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}" - -dir=libgloss target=m32r -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ - "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}" - -dir=libgloss target=mn10200 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ - "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}" - -dir=libgloss target=mn10300 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ - "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}" - -dir=libgloss target=sparc -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ - "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}" - -dir=libgloss/v850/sys target=v850 -$shell ${srccom}/gentvals.sh $target sys ${srcroot}/$dir \ - "syscall.h" 'SYS_[_A-Za-z0-9]*' "${cpp}" - diff --git a/sim/common/gentmap.c b/sim/common/gentmap.c deleted file mode 100644 index 897a6f7..0000000 --- a/sim/common/gentmap.c +++ /dev/null @@ -1,125 +0,0 @@ -/* Generate targ-vals.h and targ-map.c. */ - -#include <stdio.h> - -struct tdefs { - char *symbol; - int value; -}; - -static struct tdefs sys_tdefs[] = { -#define sys_defs -#include "targ-vals.def" -#undef sys_defs - { 0, 0 } -}; - -static struct tdefs errno_tdefs[] = { -#define errno_defs -#include "targ-vals.def" -#undef errno_defs - { 0, 0 } -}; - -static struct tdefs open_tdefs[] = { -#define open_defs -#include "targ-vals.def" -#undef open_defs - { 0, 0 } -}; - -static void -gen_targ_vals_h () -{ - struct tdefs *t; - - printf ("/* Target header values needed by the simulator and gdb. */\n"); - printf ("/* This file is machine generated by gentmap.c. */\n\n"); - - printf ("#ifndef TARG_VALS_H\n"); - printf ("#define TARG_VALS_H\n\n"); - - printf ("/* syscall values */\n"); - for (t = &sys_tdefs[0]; t->symbol; ++t) - printf ("#define TARGET_%s %d\n", t->symbol, t->value); - printf ("\n"); - - printf ("/* errno values */\n"); - for (t = &errno_tdefs[0]; t->symbol; ++t) - printf ("#define TARGET_%s %d\n", t->symbol, t->value); - printf ("\n"); - - printf ("/* open flag values */\n"); - for (t = &open_tdefs[0]; t->symbol; ++t) - printf ("#define TARGET_%s 0x%x\n", t->symbol, t->value); - printf ("\n"); - - printf ("#endif /* TARG_VALS_H */\n"); -} - -static void -gen_targ_map_c () -{ - struct tdefs *t; - - printf ("/* Target value mapping utilities needed by the simulator and gdb. */\n"); - printf ("/* This file is machine generated by gentmap.c. */\n\n"); - - printf ("#include <errno.h>\n"); - printf ("#include <fcntl.h>\n"); - printf ("#include \"ansidecl.h\"\n"); - printf ("#include \"gdb/callback.h\"\n"); - printf ("#include \"targ-vals.h\"\n"); - printf ("\n"); - - printf ("/* syscall mapping table */\n"); - printf ("CB_TARGET_DEFS_MAP cb_init_syscall_map[] = {\n"); - for (t = &sys_tdefs[0]; t->symbol; ++t) - { - printf ("#ifdef CB_%s\n", t->symbol); - printf (" { CB_%s, TARGET_%s },\n", t->symbol, t->symbol); - printf ("#endif\n"); - } - printf (" { -1, -1 }\n"); - printf ("};\n\n"); - - printf ("/* errno mapping table */\n"); - printf ("CB_TARGET_DEFS_MAP cb_init_errno_map[] = {\n"); - for (t = &errno_tdefs[0]; t->symbol; ++t) - { - printf ("#ifdef %s\n", t->symbol); - printf (" { %s, TARGET_%s },\n", t->symbol, t->symbol); - printf ("#endif\n"); - } - printf (" { 0, 0 }\n"); - printf ("};\n\n"); - - printf ("/* open flags mapping table */\n"); - printf ("CB_TARGET_DEFS_MAP cb_init_open_map[] = {\n"); - for (t = &open_tdefs[0]; t->symbol; ++t) - { - printf ("#ifdef %s\n", t->symbol); - printf (" { %s, TARGET_%s },\n", t->symbol, t->symbol); - printf ("#endif\n"); - } - printf (" { -1, -1 }\n"); - printf ("};\n\n"); -} - -int -main (argc, argv) - int argc; - char *argv[]; -{ - if (argc != 2) - abort (); - - if (strcmp (argv[1], "-h") == 0) - gen_targ_vals_h (); - else if (strcmp (argv[1], "-c") == 0) - gen_targ_map_c (); - else - abort (); - - exit (0); -} diff --git a/sim/common/gentvals.sh b/sim/common/gentvals.sh deleted file mode 100644 index 6dd7315..0000000 --- a/sim/common/gentvals.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -# Usage: gentvals.sh target type dir files pattern cpp - -target=$1 -type=$2 -dir=$3 -# FIXME: Would be nice to process #include's in these files. -files=$4 -pattern=$5 -cpp=$6 - -# FIXME: need trap to remove tmp files. - -rm -f tmpvals.list tmpvals.uniq -for f in $files -do - if test -f $dir/$f ; then - grep "#define[ ]$pattern" $dir/$f | sed -e "s/^.*#define[ ]\($pattern\)[ ]*\([^ ][^ ]*\).*$/\1/" >> tmpvals.list - fi -done - -sort <tmpvals.list | uniq >tmpvals.uniq - -rm -f tmpvals.h -for f in $files -do - if test -f $dir/$f ; then - echo "#include <$f>" >>tmpvals.h - fi -done - -cat tmpvals.uniq | -while read sym -do - echo "#ifdef $sym" >>tmpvals.h - echo 'DEFVAL { "'$sym'", '$sym ' },' >>tmpvals.h - echo "#endif" >>tmpvals.h -done - -if test -z "$target" -then - echo "#ifdef ${type}_defs" -else - echo "#ifdef NL_TARGET_$target" - echo "#ifdef ${type}_defs" -fi - -for f in $files -do - if test -f $dir/$f ; then - echo "/* from $f */" - fi -done - -if test -z "$target" -then - echo "/* begin $type target macros */" -else - echo "/* begin $target $type target macros */" -fi - -$cpp -I$dir tmpvals.h | grep DEFVAL | sed -e 's/DEFVAL//' -e 's/ / /' - -if test -z "$target" -then - echo "/* end $type target macros */" - echo "#endif" -else - echo "/* end $target $type target macros */" - echo "#endif" - echo "#endif" -fi - -rm -f tmpvals.list tmpvals.uniq tmpvals.h diff --git a/sim/common/hw-alloc.c b/sim/common/hw-alloc.c deleted file mode 100644 index 5664e9b..0000000 --- a/sim/common/hw-alloc.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Hardware memory allocator. - Copyright (C) 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 "hw-main.h" -#include "hw-base.h" - - -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif - -struct hw_alloc_data { - void *alloc; - int zalloc_p; - struct hw_alloc_data *next; -}; - -void -create_hw_alloc_data (struct hw *me) -{ - /* NULL */ -} - -void -delete_hw_alloc_data (struct hw *me) -{ - while (me->alloc_of_hw != NULL) - { - hw_free (me, me->alloc_of_hw->alloc); - } -} - - - -void * -hw_zalloc (struct hw *me, unsigned long size) -{ - struct hw_alloc_data *memory = ZALLOC (struct hw_alloc_data); - memory->alloc = zalloc (size); - memory->zalloc_p = 1; - memory->next = me->alloc_of_hw; - me->alloc_of_hw = memory; - return memory->alloc; -} - -void * -hw_malloc (struct hw *me, unsigned long size) -{ - struct hw_alloc_data *memory = ZALLOC (struct hw_alloc_data); - memory->alloc = zalloc (size); - memory->zalloc_p = 0; - memory->next = me->alloc_of_hw; - me->alloc_of_hw = memory; - return memory->alloc; -} - -void -hw_free (struct hw *me, - void *alloc) -{ - struct hw_alloc_data **memory; - for (memory = &me->alloc_of_hw; - *memory != NULL; - memory = &(*memory)->next) - { - if ((*memory)->alloc == alloc) - { - struct hw_alloc_data *die = (*memory); - (*memory) = die->next; - if (die->zalloc_p) - zfree (die->alloc); - else - free (die->alloc); - zfree (die); - return; - } - } - hw_abort (me, "free of memory not belonging to a device"); -} diff --git a/sim/common/hw-alloc.h b/sim/common/hw-alloc.h deleted file mode 100644 index 48b03f2..0000000 --- a/sim/common/hw-alloc.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Hardware memory allocator. - Copyright (C) 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. */ - - -#ifndef HW_ALLOC_H -#define HW_ALLOC_H - -/* Mechanism for associating memory allocated by a device to that - device. - - When a device is deleted any remaining memory regions associated to - it are reclaimed. - - FIXME: Perhaphs this can be generalized. Perhaphs it should not - be. */ - - -#define HW_ZALLOC(me,type) (type*) hw_zalloc (me, sizeof (type)) -#define HW_MALLOC(me,type) (type*) hw_malloc (me, sizeof (type)) -#define HW_NZALLOC(ME,TYPE,N) (TYPE*) hw_zalloc (me, sizeof (TYPE) * (N)) - -extern void *hw_zalloc (struct hw *me, unsigned long size); -extern void *hw_malloc (struct hw *me, unsigned long size); - -extern void hw_free (struct hw *me, void *); - - -/* Duplicate a string allocating memory using the per-device heap */ - -extern char *hw_strdup (struct hw *me, const char *str); - -#endif diff --git a/sim/common/hw-base.c b/sim/common/hw-base.c deleted file mode 100644 index 7fbe61e..0000000 --- a/sim/common/hw-base.c +++ /dev/null @@ -1,579 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "hw-main.h" -#include "hw-base.h" - - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#if HAVE_STDLIB_H -#include <stdlib.h> -#endif - -#include <ctype.h> - -#include "hw-config.h" - -struct hw_base_data { - int finished_p; - const struct hw_descriptor *descriptor; - hw_delete_callback *to_delete; -}; - -static int -generic_hw_unit_decode (struct hw *bus, - const char *unit, - hw_unit *phys) -{ - memset (phys, 0, sizeof (*phys)); - if (unit == NULL) - return 0; - else - { - int nr_cells = 0; - const int max_nr_cells = hw_unit_nr_address_cells (bus); - while (1) - { - char *end = NULL; - unsigned long val; - val = strtoul (unit, &end, 0); - /* parse error? */ - if (unit == end) - return -1; - /* two many cells? */ - if (nr_cells >= max_nr_cells) - return -1; - /* save it */ - phys->cells[nr_cells] = val; - nr_cells++; - unit = end; - /* more to follow? */ - if (isspace (*unit) || *unit == '\0') - break; - if (*unit != ',') - return -1; - unit++; - } - if (nr_cells < max_nr_cells) { - /* shift everything to correct position */ - int i; - for (i = 1; i <= nr_cells; i++) - phys->cells[max_nr_cells - i] = phys->cells[nr_cells - i]; - for (i = 0; i < (max_nr_cells - nr_cells); i++) - phys->cells[i] = 0; - } - phys->nr_cells = max_nr_cells; - return max_nr_cells; - } -} - -static int -generic_hw_unit_encode (struct hw *bus, - const hw_unit *phys, - char *buf, - int sizeof_buf) -{ - int i; - int len; - char *pos = buf; - /* skip leading zero's */ - for (i = 0; i < phys->nr_cells; i++) - { - if (phys->cells[i] != 0) - break; - } - /* don't output anything if empty */ - if (phys->nr_cells == 0) - { - strcpy(pos, ""); - len = 0; - } - else if (i == phys->nr_cells) - { - /* all zero */ - strcpy(pos, "0"); - len = 1; - } - else - { - for (; i < phys->nr_cells; i++) - { - if (pos != buf) { - strcat(pos, ","); - pos = strchr(pos, '\0'); - } - if (phys->cells[i] < 10) - sprintf (pos, "%ld", (unsigned long)phys->cells[i]); - else - sprintf (pos, "0x%lx", (unsigned long)phys->cells[i]); - pos = strchr(pos, '\0'); - } - len = pos - buf; - } - if (len >= sizeof_buf) - hw_abort (NULL, "generic_unit_encode - buffer overflow\n"); - return len; -} - -static int -generic_hw_unit_address_to_attach_address (struct hw *me, - const hw_unit *address, - int *attach_space, - unsigned_word *attach_address, - struct hw *client) -{ - int i; - for (i = 0; i < address->nr_cells - 2; i++) - { - if (address->cells[i] != 0) - hw_abort (me, "Only 32bit addresses supported"); - } - if (address->nr_cells >= 2) - *attach_space = address->cells[address->nr_cells - 2]; - else - *attach_space = 0; - *attach_address = address->cells[address->nr_cells - 1]; - return 1; -} - -static int -generic_hw_unit_size_to_attach_size (struct hw *me, - const hw_unit *size, - unsigned *nr_bytes, - struct hw *client) -{ - int i; - for (i = 0; i < size->nr_cells - 1; i++) - { - if (size->cells[i] != 0) - hw_abort (me, "Only 32bit sizes supported"); - } - *nr_bytes = size->cells[0]; - return *nr_bytes; -} - - -/* ignore/passthrough versions of each function */ - -static void -passthrough_hw_attach_address (struct hw *me, - int level, - int space, - address_word addr, - address_word nr_bytes, - struct hw *client) /*callback/default*/ -{ - if (hw_parent (me) == NULL) - hw_abort (client, "hw_attach_address: no parent attach method"); - hw_attach_address (hw_parent (me), level, - space, addr, nr_bytes, - client); -} - -static void -passthrough_hw_detach_address (struct hw *me, - int level, - int space, - address_word addr, - address_word nr_bytes, - struct hw *client) /*callback/default*/ -{ - if (hw_parent (me) == NULL) - hw_abort (client, "hw_attach_address: no parent attach method"); - hw_detach_address (hw_parent (me), level, - space, addr, nr_bytes, - client); -} - -static unsigned -panic_hw_io_read_buffer (struct hw *me, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - hw_abort (me, "no io-read method"); - return 0; -} - -static unsigned -panic_hw_io_write_buffer (struct hw *me, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - hw_abort (me, "no io-write method"); - return 0; -} - -static unsigned -passthrough_hw_dma_read_buffer (struct hw *me, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - if (hw_parent (me) == NULL) - hw_abort (me, "no parent dma-read method"); - return hw_dma_read_buffer (hw_parent (me), dest, - space, addr, nr_bytes); -} - -static unsigned -passthrough_hw_dma_write_buffer (struct hw *me, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes, - int violate_read_only_section) -{ - if (hw_parent (me) == NULL) - hw_abort (me, "no parent dma-write method"); - return hw_dma_write_buffer (hw_parent (me), source, - space, addr, - nr_bytes, - violate_read_only_section); -} - -static void -ignore_hw_delete (struct hw *me) -{ - /* NOP */ -} - - - - -static const char * -full_name_of_hw (struct hw *leaf, - char *buf, - unsigned sizeof_buf) -{ - /* get a buffer */ - char full_name[1024]; - if (buf == (char*)0) - { - buf = full_name; - sizeof_buf = sizeof (full_name); - } - - /* use head recursion to construct the path */ - - if (hw_parent (leaf) == NULL) - /* root */ - { - if (sizeof_buf < 1) - hw_abort (leaf, "buffer overflow"); - *buf = '\0'; - } - else - /* sub node */ - { - char unit[1024]; - full_name_of_hw (hw_parent (leaf), buf, sizeof_buf); - if (hw_unit_encode (hw_parent (leaf), - hw_unit_address (leaf), - unit + 1, - sizeof (unit) - 1) - > 0) - unit[0] = '@'; - else - unit[0] = '\0'; - if (strlen (buf) + strlen ("/") + strlen (hw_name (leaf)) + strlen (unit) - >= sizeof_buf) - hw_abort (leaf, "buffer overflow"); - strcat (buf, "/"); - strcat (buf, hw_name (leaf)); - strcat (buf, unit); - } - - /* return it usefully */ - if (buf == full_name) - buf = hw_strdup (leaf, full_name); - return buf; -} - -struct hw * -hw_create (struct sim_state *sd, - struct hw *parent, - const char *family, - const char *name, - const char *unit, - const char *args) -{ - /* NOTE: HW must be allocated using ZALLOC, others use HW_ZALLOC */ - struct hw *hw = ZALLOC (struct hw); - - /* our identity */ - hw->family_of_hw = hw_strdup (hw, family); - hw->name_of_hw = hw_strdup (hw, name); - hw->args_of_hw = hw_strdup (hw, args); - - /* a hook into the system */ - if (sd != NULL) - hw->system_of_hw = sd; - else if (parent != NULL) - hw->system_of_hw = hw_system (parent); - else - hw_abort (parent, "No system found"); - - /* in a tree */ - if (parent != NULL) - { - struct hw **sibling = &parent->child_of_hw; - while ((*sibling) != NULL) - sibling = &(*sibling)->sibling_of_hw; - *sibling = hw; - hw->parent_of_hw = parent; - } - - /* top of tree */ - if (parent != NULL) - { - struct hw *root = parent; - while (root->parent_of_hw != NULL) - root = root->parent_of_hw; - hw->root_of_hw = root; - } - - /* a unique identifier for the device on the parents bus */ - if (parent != NULL) - { - hw_unit_decode (parent, unit, &hw->unit_address_of_hw); - } - - /* Determine our path */ - if (parent != NULL) - hw->path_of_hw = full_name_of_hw (hw, NULL, 0); - else - hw->path_of_hw = "/"; - - /* create our base type */ - hw->base_of_hw = HW_ZALLOC (hw, struct hw_base_data); - hw->base_of_hw->finished_p = 0; - - /* our callbacks */ - set_hw_io_read_buffer (hw, panic_hw_io_read_buffer); - set_hw_io_write_buffer (hw, panic_hw_io_write_buffer); - set_hw_dma_read_buffer (hw, passthrough_hw_dma_read_buffer); - set_hw_dma_write_buffer (hw, passthrough_hw_dma_write_buffer); - set_hw_unit_decode (hw, generic_hw_unit_decode); - set_hw_unit_encode (hw, generic_hw_unit_encode); - set_hw_unit_address_to_attach_address (hw, generic_hw_unit_address_to_attach_address); - set_hw_unit_size_to_attach_size (hw, generic_hw_unit_size_to_attach_size); - set_hw_attach_address (hw, passthrough_hw_attach_address); - set_hw_detach_address (hw, passthrough_hw_detach_address); - set_hw_delete (hw, ignore_hw_delete); - - /* locate a descriptor */ - { - const struct hw_descriptor **table; - for (table = hw_descriptors; - *table != NULL; - table++) - { - const struct hw_descriptor *entry; - for (entry = *table; - entry->family != NULL; - entry++) - { - if (strcmp (family, entry->family) == 0) - { - hw->base_of_hw->descriptor = entry; - break; - } - } - } - if (hw->base_of_hw->descriptor == NULL) - { - hw_abort (parent, "Unknown device `%s'", family); - } - } - - /* Attach dummy ports */ - create_hw_alloc_data (hw); - create_hw_property_data (hw); - create_hw_port_data (hw); - create_hw_event_data (hw); - create_hw_handle_data (hw); - create_hw_instance_data (hw); - - return hw; -} - - -int -hw_finished_p (struct hw *me) -{ - return (me->base_of_hw->finished_p); -} - -void -hw_finish (struct hw *me) -{ - if (hw_finished_p (me)) - hw_abort (me, "Attempt to finish finished device"); - - /* Fill in the (hopefully) defined address/size cells values */ - if (hw_find_property (me, "#address-cells") != NULL) - me->nr_address_cells_of_hw_unit = - hw_find_integer_property (me, "#address-cells"); - else - me->nr_address_cells_of_hw_unit = 2; - if (hw_find_property (me, "#size-cells") != NULL) - me->nr_size_cells_of_hw_unit = - hw_find_integer_property (me, "#size-cells"); - else - me->nr_size_cells_of_hw_unit = 1; - - /* Fill in the (hopefully) defined trace variable */ - if (hw_find_property (me, "trace?") != NULL) - me->trace_of_hw_p = hw_find_boolean_property (me, "trace?"); - /* allow global variable to define default tracing */ - else if (! hw_trace_p (me) - && hw_find_property (hw_root (me), "global-trace?") != NULL - && hw_find_boolean_property (hw_root (me), "global-trace?")) - me->trace_of_hw_p = 1; - - - /* Allow the real device to override any methods */ - me->base_of_hw->descriptor->to_finish (me); - me->base_of_hw->finished_p = 1; -} - - -void -hw_delete (struct hw *me) -{ - /* give the object a chance to tidy up */ - me->base_of_hw->to_delete (me); - - delete_hw_instance_data (me); - delete_hw_handle_data (me); - delete_hw_event_data (me); - delete_hw_port_data (me); - delete_hw_property_data (me); - - /* now unlink us from the tree */ - if (hw_parent (me)) - { - struct hw **sibling = &hw_parent (me)->child_of_hw; - while (*sibling != NULL) - { - if (*sibling == me) - { - *sibling = me->sibling_of_hw; - me->sibling_of_hw = NULL; - me->parent_of_hw = NULL; - break; - } - } - } - - /* some sanity checks */ - if (hw_child (me) != NULL) - { - hw_abort (me, "attempt to delete device with children"); - } - if (hw_sibling (me) != NULL) - { - hw_abort (me, "attempt to delete device with siblings"); - } - - /* blow away all memory belonging to the device */ - delete_hw_alloc_data (me); - - /* finally */ - zfree (me); -} - -void -set_hw_delete (struct hw *hw, hw_delete_callback method) -{ - hw->base_of_hw->to_delete = method; -} - - -/* Go through the devices various reg properties for those that - specify attach addresses */ - - -void -do_hw_attach_regs (struct hw *hw) -{ - static const char *(reg_property_names[]) = { - "attach-addresses", - "assigned-addresses", - "reg", - "alternate-reg" , - NULL - }; - const char **reg_property_name; - int nr_valid_reg_properties = 0; - for (reg_property_name = reg_property_names; - *reg_property_name != NULL; - reg_property_name++) - { - if (hw_find_property (hw, *reg_property_name) != NULL) - { - reg_property_spec reg; - int reg_entry; - for (reg_entry = 0; - hw_find_reg_array_property (hw, *reg_property_name, reg_entry, - ®); - reg_entry++) - { - unsigned_word attach_address; - int attach_space; - unsigned attach_size; - if (!hw_unit_address_to_attach_address (hw_parent (hw), - ®.address, - &attach_space, - &attach_address, - hw)) - continue; - if (!hw_unit_size_to_attach_size (hw_parent (hw), - ®.size, - &attach_size, hw)) - continue; - hw_attach_address (hw_parent (hw), - 0, - attach_space, attach_address, attach_size, - hw); - nr_valid_reg_properties++; - } - /* if first option matches don't try for any others */ - if (reg_property_name == reg_property_names) - break; - } - } -} diff --git a/sim/common/hw-base.h b/sim/common/hw-base.h deleted file mode 100644 index 9276256..0000000 --- a/sim/common/hw-base.h +++ /dev/null @@ -1,111 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 HW_BASE -#define HW_BASE - -/* Create a primative device */ - -struct hw *hw_create -(struct sim_state *sd, - struct hw *parent, - const char *family, - const char *name, - const char *unit, - const char *args); - - -/* Complete the creation of that device (finish overrides methods - using the set_hw_* operations below) */ - -void hw_finish -(struct hw *me); - -int hw_finished_p -(struct hw *me); - - -/* Delete the entire device */ - -void hw_delete -(struct hw *me); - - -/* Override device methods */ - -typedef void (hw_delete_callback) - (struct hw *me); - -extern void set_hw_delete(struct hw* hw, hw_delete_callback method); - - -/* ALLOC */ - -extern void create_hw_alloc_data -(struct hw *hw); -extern void delete_hw_alloc_data -(struct hw *hw); - - -/* PORTS */ - -extern void create_hw_port_data -(struct hw *hw); -extern void delete_hw_port_data -(struct hw *hw); - - -/* PROPERTIES */ - -extern void create_hw_property_data -(struct hw *hw); -extern void delete_hw_property_data -(struct hw *hw); - - -/* EVENTS */ - -extern void create_hw_event_data -(struct hw *hw); -extern void delete_hw_event_data -(struct hw *hw); - - -/* HANDLES */ - -extern void create_hw_handle_data -(struct hw *hw); -extern void delete_hw_handle_data -(struct hw *hw); - - -/* INSTANCES */ - -extern void create_hw_instance_data -(struct hw *hw); -extern void delete_hw_instance_data -(struct hw *hw); - - -#endif diff --git a/sim/common/hw-device.c b/sim/common/hw-device.c deleted file mode 100644 index 138df25..0000000 --- a/sim/common/hw-device.c +++ /dev/null @@ -1,69 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "hw-main.h" -#include "hw-base.h" - -#if HAVE_STDLIB_H -#include <stdlib.h> -#endif - -/* Address methods */ - -const hw_unit * -hw_unit_address (struct hw *me) -{ - return &me->unit_address_of_hw; -} - - -/* IOCTL: */ - -int -hw_ioctl (struct hw *me, - hw_ioctl_request request, - ...) -{ - int status; - va_list ap; - va_start(ap, request); - status = me->to_ioctl (me, request, ap); - va_end(ap); - return status; -} - -char * -hw_strdup (struct hw *me, const char *str) -{ - if (str != NULL) - { - char *dup = hw_zalloc (me, strlen (str) + 1); - strcpy (dup, str); - return dup; - } - else - { - return NULL; - } -} diff --git a/sim/common/hw-device.h b/sim/common/hw-device.h deleted file mode 100644 index d8dcce7..0000000 --- a/sim/common/hw-device.h +++ /dev/null @@ -1,538 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 HW_DEVICE_H -#define HW_DEVICE_H - -/* declared in sim-basics.h, this object is used everywhere */ -/* typedef struct _device device; */ - - -/* Introduction: - - As explained in earlier sections, the device, device instance, - property and ports lie at the heart of PSIM's device model. - - In the below a synopsis of the device object and the operations it - supports are given. - */ - - -/* Creation: - - The devices are created using a sequence of steps. In particular: - - o A tree framework is created. - - At this point, properties can be modified and extra - devices inserted (or removed?). - -#if LATER - - Any properties that have a run-time value (eg ihandle - or device instance pointer properties) are entered - into the device tree using a named reference to the - corresponding runtime object that is to be created. - -#endif - - o Real devices are created for all the dummy devices. - - A device can assume that all of its parents have been - initialized. - - A device can assume that all non run-time properties - have been initialized. - - As part of being created, the device normally attaches - itself to its parent bus. - -#if LATER - - Device instance data is initialized. - -#endif - -#if LATER - - o Any run-time properties are created. - -#endif - -#if MUCH_MUCH_LATER - - o Some devices, as part of their initialization - might want to refer to ihandle properties - in the device tree. - -#endif - - NOTES: - - o It is important to separate the creation - of an actual device from the creation - of the tree. The alternative creating - the device in two stages: As a separate - entity and then as a part of the tree. - -#if LATER - o Run-time properties can not be created - until after the devices in the tree - have been created. Hence an extra pass - for handling them. -#endif - - */ - -/* Relationships: - - A device is able to determine its relationship to other devices - within the tree. Operations include querying for a devices parent, - sibling, child, name, and path (from the root). - - */ - - -#define hw_parent(hw) ((hw)->parent_of_hw + 0) - -#define hw_sibling(hw) ((hw)->sibling_of_hw + 0) - -#define hw_child(hw) ((hw)->child_of_hw + 0) - - - -/* Herritage: - - */ - -#define hw_family(hw) ((hw)->family_of_hw + 0) - -#define hw_name(hw) ((hw)->name_of_hw + 0) - -#define hw_args(hw) ((hw)->args_of_hw + 0) - -#define hw_path(hw) ((hw)->path_of_hw + 0) - - - -/* Short cut to the root node of the tree */ - -#define hw_root(hw) ((hw)->root_of_hw + 0) - -/* Short cut back to the simulator object */ - -#define hw_system(hw) ((hw)->system_of_hw) - -/* For requests initiated by a CPU the cpu that initiated the request */ - -struct _sim_cpu *hw_system_cpu (struct hw *hw); - - -/* Device private data */ - -#define hw_data(hw) ((hw)->data_of_hw) - -#define set_hw_data(hw, value) \ -((hw)->data_of_hw = (value)) - - - -/* Perform a soft reset of the device */ - -typedef unsigned (hw_reset_method) - (struct hw *me); - -#define hw_reset(hw) ((hw)->to_reset (hw)) - -#define set_hw_reset(hw, method) \ -((hw)->to_reset = method) - - -/* Hardware operations: - - Connecting a parent to its children is a common bus. The parent - node is described as the bus owner and is responisble for - co-ordinating bus operations. On the bus, a SPACE:ADDR pair is used - to specify an address. A device that is both a bus owner (parent) - and bus client (child) are referred to as a bridging device. - - A child performing a data (DMA) transfer will pass its request to - the bus owner (the devices parent). The bus owner will then either - reflect the request to one of the other devices attached to the bus - (a child of the bus owner) or bridge the request up the tree to the - next bus. */ - - -/* Children attached to a bus can register (attach) themselves to - specific addresses on their attached bus. - - (A device may also be implicitly attached to certain bus - addresses). - - The SPACE:ADDR pair specify an address on the common bus that - connects the parent and child devices. */ - -typedef void (hw_attach_address_method) - (struct hw *me, - int level, - int space, - address_word addr, - address_word nr_bytes, - struct hw *client); /*callback/default*/ - -#define hw_attach_address(me, level, space, addr, nr_bytes, client) \ -((me)->to_attach_address (me, level, space, addr, nr_bytes, client)) - -#define set_hw_attach_address(hw, method) \ -((hw)->to_attach_address = (method)) - -typedef void (hw_detach_address_method) - (struct hw *me, - int level, - int space, - address_word addr, - address_word nr_bytes, - struct hw *client); /*callback/default*/ - -#define hw_detach_address(me, level, space, addr, nr_bytes, client) \ -((me)->to_detach_address (me, level, space, addr, nr_bytes, client)) - -#define set_hw_detach_address(hw, method) \ -((hw)->to_detach_address = (method)) - - -/* An IO operation from a parent to a child via the conecting bus. - - The SPACE:ADDR pair specify an address on the bus shared between - the parent and child devices. */ - -typedef unsigned (hw_io_read_buffer_method) - (struct hw *me, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes); - -#define hw_io_read_buffer(hw, dest, space, addr, nr_bytes) \ -((hw)->to_io_read_buffer (hw, dest, space, addr, nr_bytes)) - -#define set_hw_io_read_buffer(hw, method) \ -((hw)->to_io_read_buffer = (method)) - -typedef unsigned (hw_io_write_buffer_method) - (struct hw *me, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes); - -#define hw_io_write_buffer(hw, src, space, addr, nr_bytes) \ -((hw)->to_io_write_buffer (hw, src, space, addr, nr_bytes)) - -#define set_hw_io_write_buffer(hw, method) \ -((hw)->to_io_write_buffer = (method)) - - -/* Conversly, the device pci1000,1@1 may need to perform a dma transfer - into the cpu/memory core. Just as I/O moves towards the leaves, - dma transfers move towards the core via the initiating devices - parent nodes. The root device (special) converts the DMA transfer - into reads/writes to memory. - - The SPACE:ADDR pair specify an address on the common bus connecting - the parent and child devices. */ - -typedef unsigned (hw_dma_read_buffer_method) - (struct hw *bus, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes); - -#define hw_dma_read_buffer(bus, dest, space, addr, nr_bytes) \ -((bus)->to_dma_read_buffer (bus, dest, space, addr, nr_bytes)) - -#define set_hw_dma_read_buffer(me, method) \ -((me)->to_dma_read_buffer = (method)) - -typedef unsigned (hw_dma_write_buffer_method) - (struct hw *bus, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes, - int violate_read_only_section); - -#define hw_dma_write_buffer(bus, src, space, addr, nr_bytes, violate_ro) \ -((bus)->to_dma_write_buffer (bus, src, space, addr, nr_bytes, violate_ro)) - -#define set_hw_dma_write_buffer(me, method) \ -((me)->to_dma_write_buffer = (method)) - -/* Address/size specs for devices are encoded following a convention - similar to that used by OpenFirmware. In particular, an - address/size is packed into a sequence of up to four cell words. - The number of words determined by the number of {address,size} - cells attributes of the device. */ - -typedef struct _hw_unit { - int nr_cells; - unsigned_cell cells[4]; /* unused cells are zero */ -} hw_unit; - - -/* For the given bus, the number of address and size cells used in a - hw_unit. */ - -#define hw_unit_nr_address_cells(bus) ((bus)->nr_address_cells_of_hw_unit + 0) - -#define hw_unit_nr_size_cells(bus) ((bus)->nr_size_cells_of_hw_unit + 0) - - -/* For the given device, its identifying hw_unit address. - - Each device has an identifying hw_unit address. That address is - used when identifying one of a number of identical devices on a - common controller bus. ex fd0&fd1. */ - -const hw_unit *hw_unit_address -(struct hw *me); - - -/* Convert between a textual and the internal representation of a - hw_unit address/size. - - NOTE: A device asks its parent to translate between a hw_unit and - textual representation. This is because the textual address of a - device is specified using the parent busses notation. */ - -typedef int (hw_unit_decode_method) - (struct hw *bus, - const char *encoded, - hw_unit *unit); - -#define hw_unit_decode(bus, encoded, unit) \ -((bus)->to_unit_decode (bus, encoded, unit)) - -#define set_hw_unit_decode(hw, method) \ -((hw)->to_unit_decode = (method)) - -typedef int (hw_unit_encode_method) - (struct hw *bus, - const hw_unit *unit, - char *encoded, - int sizeof_buf); - -#define hw_unit_encode(bus, unit, encoded, sizeof_encoded) \ -((bus)->to_unit_encode (bus, unit, encoded, sizeof_encoded)) - -#define set_hw_unit_encode(hw, method) \ -((hw)->to_unit_encode = (method)) - - -/* As the bus that the device is attached too, to translate a devices - hw_unit address/size into a form suitable for an attach address - call. - - Return a zero result if the address should be ignored when looking - for attach addresses. */ - -typedef int (hw_unit_address_to_attach_address_method) - (struct hw *bus, - const hw_unit *unit_addr, - int *attach_space, - unsigned_word *attach_addr, - struct hw *client); - -#define hw_unit_address_to_attach_address(bus, unit_addr, attach_space, attach_addr, client) \ -((bus)->to_unit_address_to_attach_address (bus, unit_addr, attach_space, attach_addr, client)) - -#define set_hw_unit_address_to_attach_address(hw, method) \ -((hw)->to_unit_address_to_attach_address = (method)) - -typedef int (hw_unit_size_to_attach_size_method) - (struct hw *bus, - const hw_unit *unit_size, - unsigned *attach_size, - struct hw *client); - -#define hw_unit_size_to_attach_size(bus, unit_size, attach_size, client) \ -((bus)->to_unit_size_to_attach_size (bus, unit_size, attach_size, client)) - -#define set_hw_unit_size_to_attach_size(hw, method) \ -((hw)->to_unit_size_to_attach_size = (method)) - - -extern char *hw_strdup (struct hw *me, const char *str); - - -/* Utilities: - - */ - -/* IOCTL:: - - Often devices require `out of band' operations to be performed. - For instance a pal device may need to notify a PCI bridge device - that an interrupt ack cycle needs to be performed on the PCI bus. - Within PSIM such operations are performed by using the generic - ioctl call <<hw_ioctl()>>. - - */ - -typedef enum { - hw_ioctl_break, /* unsigned_word requested_break */ - hw_ioctl_set_trace, /* void */ - hw_ioctl_create_stack, /* unsigned_word *sp, char **argv, char **envp */ - hw_ioctl_change_media, /* const char *new_image (possibly NULL) */ - nr_hw_ioctl_requests, -} hw_ioctl_request; - -typedef int (hw_ioctl_method) - (struct hw *me, - hw_ioctl_request request, - va_list ap); - -int hw_ioctl -(struct hw *me, - hw_ioctl_request request, - ...); - - -/* Error reporting:: - - So that errors originating from devices appear in a consistent - format, the <<hw_abort()>> function can be used. Formats and - outputs the error message before aborting the simulation - - Devices should use this function to abort the simulation except - when the abort reason leaves the simulation in a hazardous - condition (for instance a failed malloc). - - */ - -void hw_abort -(struct hw *me, - const char *fmt, - ...) __attribute__ ((format (printf, 2, 3))); - -void hw_vabort -(struct hw *me, - const char *fmt, - va_list ap); - -void hw_halt -(struct hw *me, - int reason, - int status); - - -#define hw_trace_p(hw) ((hw)->trace_of_hw_p + 0) - -void hw_trace -(struct hw *me, - const char *fmt, - ...) __attribute__ ((format (printf, 2, 3))); - -#define HW_TRACE(ARGS) \ -do { \ - if (hw_trace_p (me)) \ - { \ - hw_trace ARGS; \ - } \ -} while (0) - - -/* Some of the related functions require specific types */ - -struct hw_property_data; -struct hw_port_data; -struct hw_base_data; -struct hw_alloc_data; -struct hw_event_data; -struct hw_handle_data; -struct hw_instance_data; - -/* Finally the hardware device - keep your grubby little mits off of - these internals! :-) */ - -struct hw { - - /* our relatives */ - struct hw *parent_of_hw; - struct hw *sibling_of_hw; - struct hw *child_of_hw; - - /* our identity */ - const char *name_of_hw; - const char *family_of_hw; - const char *args_of_hw; - const char *path_of_hw; - - /* our data */ - void *data_of_hw; - - /* hot links */ - struct hw *root_of_hw; - struct sim_state *system_of_hw; - - /* identifying data */ - hw_unit unit_address_of_hw; - int nr_address_cells_of_hw_unit; - int nr_size_cells_of_hw_unit; - - /* Soft reset */ - hw_reset_method *to_reset; - - /* Basic callbacks */ - hw_io_read_buffer_method *to_io_read_buffer; - hw_io_write_buffer_method *to_io_write_buffer; - hw_dma_read_buffer_method *to_dma_read_buffer; - hw_dma_write_buffer_method *to_dma_write_buffer; - hw_attach_address_method *to_attach_address; - hw_detach_address_method *to_detach_address; - - /* More complicated callbacks */ - hw_ioctl_method *to_ioctl; - int trace_of_hw_p; - - /* address callbacks */ - hw_unit_decode_method *to_unit_decode; - hw_unit_encode_method *to_unit_encode; - hw_unit_address_to_attach_address_method *to_unit_address_to_attach_address; - hw_unit_size_to_attach_size_method *to_unit_size_to_attach_size; - - /* related data */ - struct hw_property_data *properties_of_hw; - struct hw_port_data *ports_of_hw; - struct hw_base_data *base_of_hw; - struct hw_alloc_data *alloc_of_hw; - struct hw_event_data *events_of_hw; - struct hw_handle_data *handles_of_hw; - struct hw_instance_data *instances_of_hw; - -}; - - -#endif diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c deleted file mode 100644 index 78cceb6..0000000 --- a/sim/common/hw-events.c +++ /dev/null @@ -1,274 +0,0 @@ -/* Hardware event manager. - Copyright (C) 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 "hw-main.h" -#include "hw-base.h" - -#include "sim-events.h" - - -/* The hw-events object is implemented using sim-events */ - -struct hw_event { - void *data; - struct hw *me; - hw_event_callback *callback; - sim_event *real; - struct hw_event_data *entry; -}; - -struct hw_event_data { - struct hw_event event; - struct hw_event_data *next; -}; - -void -create_hw_event_data (struct hw *me) -{ - if (me->events_of_hw != NULL) - hw_abort (me, "stray events"); - /* NOP */ -} - -void -delete_hw_event_data (struct hw *me) -{ - /* Remove the scheduled event. */ - while (me->events_of_hw) - hw_event_queue_deschedule (me, &me->events_of_hw->event); -} - - -/* Pass the H/W event onto the real callback */ - -static void -bounce_hw_event (SIM_DESC sd, - void *data) -{ - /* save the data */ - struct hw_event_data *entry = (struct hw_event_data *) data; - struct hw *me = entry->event.me; - void *event_data = entry->event.data; - hw_event_callback *callback = entry->event.callback; - struct hw_event_data **prev = &me->events_of_hw; - while ((*prev) != entry) - prev = &(*prev)->next; - (*prev) = entry->next; - hw_free (me, entry); - callback (me, event_data); /* may not return */ -} - - - -/* Map onto the event functions */ - -struct hw_event * -hw_event_queue_schedule (struct hw *me, - signed64 delta_time, - hw_event_callback *callback, - void *data) -{ - 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; -} - -struct hw_event * -hw_event_queue_schedule_tracef (struct hw *me, - signed64 delta_time, - hw_event_callback *callback, - void *data, - const char *fmt, - ...) -{ - struct hw_event *event; - va_list ap; - va_start (ap, fmt); - event = hw_event_queue_schedule_vtracef (me, delta_time, callback, data, fmt, ap); - va_end (ap); - return event; -} - -struct hw_event * -hw_event_queue_schedule_vtracef (struct hw *me, - signed64 delta_time, - hw_event_callback *callback, - void *data, - const char *fmt, - va_list ap) -{ - struct hw_event_data *entry = HW_ZALLOC (me, struct hw_event_data); - entry->next = me->events_of_hw; - me->events_of_hw = entry; - /* fill it in */ - entry->event.entry = entry; - entry->event.data = data; - entry->event.callback = callback; - entry->event.me = me; - entry->event.real = sim_events_schedule_vtracef (hw_system (me), - delta_time, - bounce_hw_event, - entry, - fmt, ap); - return &entry->event; -} - - -void -hw_event_queue_deschedule (struct hw *me, - struct hw_event *event_to_remove) -{ -/* ZAP the event but only if it is still in the event queue. Note - that event_to_remove is only de-referenced after its validity has - been confirmed. */ - struct hw_event_data **prev; - for (prev = &me->events_of_hw; - (*prev) != NULL; - prev = &(*prev)->next) - { - struct hw_event_data *entry = (*prev); - if (&entry->event == event_to_remove) - { - sim_events_deschedule (hw_system (me), - entry->event.real); - (*prev) = entry->next; - hw_free (me, entry); - return; - } - } -} - - -signed64 -hw_event_queue_time (struct hw *me) -{ - return sim_events_time (hw_system (me)); -} - -/* Returns the time that remains before the event is raised. */ -signed64 -hw_event_remain_time (struct hw *me, struct hw_event *event) -{ - signed64 t; - - t = sim_events_remain_time (hw_system (me), event->real); - return t; -} - -/* Only worry about this compling on ANSI systems. - Build with `make test-hw-events' in sim/<cpu> directory*/ - -#if defined (MAIN) -#include "sim-main.h" -#include <string.h> -#include <stdio.h> - -static void -test_handler (struct hw *me, - void *data) -{ - int *n = data; - if (*n != hw_event_queue_time (me)) - abort (); - *n = -(*n); -} - -int -main (int argc, - char **argv) -{ - host_callback *cb = ZALLOC (host_callback); - struct sim_state *sd = sim_state_alloc (0, cb); - struct hw *me = ZALLOC (struct hw); - sim_pre_argv_init (sd, "test-hw-events"); - sim_post_argv_init (sd); - me->system_of_hw = sd; - - printf ("Create hw-event-data\n"); - { - create_hw_alloc_data (me); - create_hw_event_data (me); - delete_hw_event_data (me); - delete_hw_alloc_data (me); - } - - printf ("Create hw-events\n"); - { - struct hw_event *a; - struct hw_event *b; - struct hw_event *c; - struct hw_event *d; - create_hw_alloc_data (me); - create_hw_event_data (me); - a = hw_event_queue_schedule (me, 0, NULL, NULL); - b = hw_event_queue_schedule (me, 1, NULL, NULL); - c = hw_event_queue_schedule (me, 2, NULL, NULL); - d = hw_event_queue_schedule (me, 1, NULL, NULL); - hw_event_queue_deschedule (me, c); - hw_event_queue_deschedule (me, b); - hw_event_queue_deschedule (me, a); - hw_event_queue_deschedule (me, d); - c = HW_ZALLOC (me, struct hw_event); - hw_event_queue_deschedule (me, b); /* OOPS! */ - hw_free (me, c); - delete_hw_event_data (me); - delete_hw_alloc_data (me); - } - - printf ("Schedule hw-events\n"); - { - struct hw_event **e; - int *n; - int i; - int nr = 4; - e = HW_NZALLOC (me, struct hw_event *, nr); - n = HW_NZALLOC (me, int, nr); - create_hw_alloc_data (me); - create_hw_event_data (me); - for (i = 0; i < nr; i++) - { - n[i] = i; - e[i] = hw_event_queue_schedule (me, i, test_handler, &n[i]); - } - sim_events_preprocess (sd, 1, 1); - for (i = 0; i < nr; i++) - { - if (sim_events_tick (sd)) - sim_events_process (sd); - } - for (i = 0; i < nr; i++) - { - if (n[i] != -i) - abort (); - hw_event_queue_deschedule (me, e[i]); - } - hw_free (me, n); - hw_free (me, e); - delete_hw_event_data (me); - delete_hw_alloc_data (me); - } - - return 0; -} -#endif diff --git a/sim/common/hw-events.h b/sim/common/hw-events.h deleted file mode 100644 index 29e10fa..0000000 --- a/sim/common/hw-events.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Hardware event manager. - Copyright (C) 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. */ - -#ifndef HW_EVENTS_H -#define HW_EVENTS_H - -/* Event manager customized for hardware models. - - This interface is discussed further in sim-events.h. */ - -struct hw_event; -typedef void (hw_event_callback) (struct hw *me, void *data); - -struct hw_event *hw_event_queue_schedule -(struct hw *me, - signed64 delta_time, - hw_event_callback *handler, - void *data); - -struct hw_event *hw_event_queue_schedule_tracef -(struct hw *me, - signed64 delta_time, - hw_event_callback *handler, - void *data, - const char *fmt, - ...) __attribute__ ((format (printf, 5, 6))); - -struct hw_event *hw_event_queue_schedule_vtracef -(struct hw *me, - signed64 delta_time, - hw_event_callback *handler, - void *data, - const char *fmt, - va_list ap); - - -void hw_event_queue_deschedule -(struct hw *me, - struct hw_event *event_to_remove); - -signed64 hw_event_queue_time -(struct hw *me); - -/* Returns the time that remains before the event is raised. */ -signed64 hw_event_remain_time -(struct hw *me, struct hw_event *event); - -#endif diff --git a/sim/common/hw-handles.c b/sim/common/hw-handles.c deleted file mode 100644 index c97b167..0000000 --- a/sim/common/hw-handles.c +++ /dev/null @@ -1,240 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "hw-main.h" -#include "hw-base.h" - - -struct hw_handle_mapping { - cell_word external; - struct hw *phandle; - struct hw_instance *ihandle; - struct hw_handle_mapping *next; -}; - - -struct hw_handle_data { - int nr_mappings; - struct hw_handle_mapping *mappings; -}; - -void -create_hw_handle_data (struct hw *hw) -{ - if (hw_parent (hw) == NULL) - { - hw->handles_of_hw = HW_ZALLOC (hw, struct hw_handle_data); - } - else - { - hw->handles_of_hw = hw_root (hw)->handles_of_hw; - } -} - -void -delete_hw_handle_data (struct hw *hw) -{ - /* NULL */ -} - - - -#if 0 -void -hw_handle_init (struct hw *hw) -{ - struct hw_handle_mapping *current_map = db->mappings; - if (current_map != NULL) - { - db->nr_mappings = db->mappings->external; - /* verify that the mappings that were not removed are in - sequence down to nr 1 */ - while (current_map->next != NULL) - { - if (current_map->external != current_map->next->external + 1) - error ("hw_handle: hw_handle database possibly corrupt"); - current_map = current_map->next; - } - ASSERT (current_map->next == NULL); - if (current_map->external != 1) - error ("hw_handle: hw_handle database possibly corrupt"); - } - else - { - db->nr_mappings = 0; - } -} -#endif - - -struct hw_instance * -hw_handle_ihandle2 (struct hw *hw, - cell_word external) -{ - struct hw_handle_data *db = hw->handles_of_hw; - struct hw_handle_mapping *current_map = db->mappings; - while (current_map != NULL) - { - if (current_map->external == external) - return current_map->ihandle; - current_map = current_map->next; - } - return (void*)0; -} - - -struct hw * -hw_handle_phandle2 (struct hw *hw, - cell_word external) -{ - struct hw_handle_data *db = hw->handles_of_hw; - struct hw_handle_mapping *current_map = db->mappings; - while (current_map != NULL) - { - if (current_map->external == external) - return current_map->phandle; - current_map = current_map->next; - } - return (void*)0; -} - - -cell_word -hw_handle_2ihandle (struct hw *hw, - struct hw_instance *internal) -{ - struct hw_handle_data *db = hw->handles_of_hw; - struct hw_handle_mapping *current_map = db->mappings; - while (current_map != NULL) - { - if (current_map->ihandle == internal) - return current_map->external; - current_map = current_map->next; - } - return 0; -} - - -cell_word -hw_handle_2phandle (struct hw *hw, - struct hw *internal) -{ - struct hw_handle_data *db = hw->handles_of_hw; - struct hw_handle_mapping *current_map = db->mappings; - while (current_map != NULL) - { - if (current_map->phandle == internal) - return current_map->external; - current_map = current_map->next; - } - return 0; -} - - -void -hw_handle_add_ihandle (struct hw *hw, - struct hw_instance *internal) -{ - struct hw_handle_data *db = hw->handles_of_hw; - if (hw_handle_2ihandle (hw, internal) != 0) - { - hw_abort (hw, "attempting to add an ihandle already in the data base"); - } - else - { - /* insert at the front making things in decending order */ - struct hw_handle_mapping *new_map = ZALLOC (struct hw_handle_mapping); - new_map->next = db->mappings; - new_map->ihandle = internal; - db->nr_mappings += 1; - new_map->external = db->nr_mappings; - db->mappings = new_map; - } -} - - -void -hw_handle_add_phandle (struct hw *hw, - struct hw *internal) -{ - struct hw_handle_data *db = hw->handles_of_hw; - if (hw_handle_2phandle (hw, internal) != 0) - { - hw_abort (hw, "attempting to add a phandle already in the data base"); - } - else - { - /* insert at the front making things in decending order */ - struct hw_handle_mapping *new_map = ZALLOC (struct hw_handle_mapping); - new_map->next = db->mappings; - new_map->phandle = internal; - db->nr_mappings += 1; - new_map->external = db->nr_mappings; - db->mappings = new_map; - } -} - - -void -hw_handle_remove_ihandle (struct hw *hw, - struct hw_instance *internal) -{ - struct hw_handle_data *db = hw->handles_of_hw; - struct hw_handle_mapping **current_map = &db->mappings; - while (*current_map != NULL) - { - if ((*current_map)->ihandle == internal) - { - struct hw_handle_mapping *delete = *current_map; - *current_map = delete->next; - zfree (delete); - return; - } - current_map = &(*current_map)->next; - } - hw_abort (hw, "attempt to remove nonexistant ihandle"); -} - - -void -hw_handle_remove_phandle (struct hw *hw, - struct hw *internal) -{ - struct hw_handle_data *db = hw->handles_of_hw; - struct hw_handle_mapping **current_map = &db->mappings; - while (*current_map != NULL) - { - if ((*current_map)->phandle == internal) - { - struct hw_handle_mapping *delete = *current_map; - *current_map = delete->next; - zfree (delete); - return; - } - current_map = &(*current_map)->next; - } - hw_abort (hw, "attempt to remove nonexistant phandle"); -} - - diff --git a/sim/common/hw-handles.h b/sim/common/hw-handles.h deleted file mode 100644 index 394eea3..0000000 --- a/sim/common/hw-handles.h +++ /dev/null @@ -1,66 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 HW_HANDLES_H -#define HW_HANDLES_H - - -/* Export a capability (handle) data base that maps between internal - data values and those given to a simulation. */ - - -cell_word hw_handle_2ihandle -(struct hw *db, - struct hw_instance *instance); - -struct hw_instance *hw_handle_ihandle2 -(struct hw *db, - cell_word external); - -void hw_handle_add_ihandle -(struct hw *db, - struct hw_instance *instance); - -void hw_handle_remove_ihandle -(struct hw *db, - struct hw_instance *instance); - - -cell_word hw_handle_2phandle -(struct hw *db, - struct hw *hw); - -struct hw *hw_handle_phandle2 -(struct hw *db, - cell_word external); - -void hw_handle_add_phandle -(struct hw *db, - struct hw *hw); - -void hw_handle_remove_phandle -(struct hw *db, - struct hw *hw); - -#endif diff --git a/sim/common/hw-instances.c b/sim/common/hw-instances.c deleted file mode 100644 index b0cdb54..0000000 --- a/sim/common/hw-instances.c +++ /dev/null @@ -1,289 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "hw-main.h" -#include "hw-base.h" - -#include "sim-io.h" -#include "sim-assert.h" - -struct hw_instance_data { - hw_finish_instance_method *to_finish; - struct hw_instance *instances; -}; - -static hw_finish_instance_method abort_hw_finish_instance; - -void -create_hw_instance_data (struct hw *me) -{ - me->instances_of_hw = HW_ZALLOC (me, struct hw_instance_data); - set_hw_finish_instance (me, abort_hw_finish_instance); -} - -void -delete_hw_instance_data (struct hw *me) -{ - /* NOP */ -} - - -static void -abort_hw_finish_instance (struct hw *hw, - struct hw_instance *instance) -{ - hw_abort (hw, "no instance finish method"); -} - -void -set_hw_finish_instance (struct hw *me, - hw_finish_instance_method *finish) -{ - me->instances_of_hw->to_finish = finish; -} - - -#if 0 -void -clean_hw_instances (struct hw *me) -{ - struct hw_instance **instance = &me->instances; - while (*instance != NULL) - { - struct hw_instance *old_instance = *instance; - hw_instance_delete (old_instance); - instance = &me->instances; - } -} -#endif - - -void -hw_instance_delete (struct hw_instance *instance) -{ -#if 1 - hw_abort (hw_instance_hw (instance), "not implemented"); -#else - struct hw *me = hw_instance_hw (instance); - if (instance->to_instance_delete == NULL) - hw_abort (me, "no delete method"); - instance->method->delete(instance); - if (instance->args != NULL) - zfree (instance->args); - if (instance->path != NULL) - zfree (instance->path); - if (instance->child == NULL) - { - /* only remove leaf nodes */ - struct hw_instance **curr = &me->instances; - while (*curr != instance) - { - ASSERT (*curr != NULL); - curr = &(*curr)->next; - } - *curr = instance->next; - } - else - { - /* check it isn't in the instance list */ - struct hw_instance *curr = me->instances; - while (curr != NULL) - { - ASSERT(curr != instance); - curr = curr->next; - } - /* unlink the child */ - ASSERT (instance->child->parent == instance); - instance->child->parent = NULL; - } - cap_remove (me->ihandles, instance); - zfree (instance); -#endif -} - - -static int -panic_hw_instance_read (struct hw_instance *instance, - void *addr, - unsigned_word len) -{ - hw_abort (hw_instance_hw (instance), "no read method"); - return -1; -} - - - -static int -panic_hw_instance_write (struct hw_instance *instance, - const void *addr, - unsigned_word len) -{ - hw_abort (hw_instance_hw (instance), "no write method"); - return -1; -} - - -static int -panic_hw_instance_seek (struct hw_instance *instance, - unsigned_word pos_hi, - unsigned_word pos_lo) -{ - hw_abort (hw_instance_hw (instance), "no seek method"); - return -1; -} - - -int -hw_instance_call_method (struct hw_instance *instance, - const char *method_name, - int n_stack_args, - unsigned_cell stack_args[/*n_stack_args*/], - int n_stack_returns, - unsigned_cell stack_returns[/*n_stack_args*/]) -{ -#if 1 - hw_abort (hw_instance_hw (instance), "not implemented"); - return -1; -#else - struct hw *me = instance->owner; - const hw_instance_methods *method = instance->method->methods; - if (method == NULL) - { - hw_abort (me, "no methods (want %s)", method_name); - } - while (method->name != NULL) - { - if (strcmp(method->name, method_name) == 0) - { - return method->method (instance, - n_stack_args, stack_args, - n_stack_returns, stack_returns); - } - method++; - } - hw_abort (me, "no %s method", method_name); - return 0; -#endif -} - - -#define set_hw_instance_read(instance, method)\ -((instance)->to_instance_read = (method)) - -#define set_hw_instance_write(instance, method)\ -((instance)->to_instance_write = (method)) - -#define set_hw_instance_seek(instance, method)\ -((instance)->to_instance_seek = (method)) - - -#if 0 -static void -set_hw_instance_finish (struct hw *me, - hw_instance_finish_method *method) -{ - if (me->instances_of_hw == NULL) - me->instances_of_hw = HW_ZALLOC (me, struct hw_instance_data); - me->instances_of_hw->to_finish = method; -} -#endif - - -struct hw_instance * -hw_instance_create (struct hw *me, - struct hw_instance *parent, - const char *path, - const char *args) -{ - struct hw_instance *instance = ZALLOC (struct hw_instance); - /*instance->unit*/ - /* link this instance into the devices list */ - instance->hw_of_instance = me; - instance->parent_of_instance = NULL; - /* link this instance into the front of the devices instance list */ - instance->sibling_of_instance = me->instances_of_hw->instances; - me->instances_of_hw->instances = instance; - if (parent != NULL) - { - ASSERT (parent->child_of_instance == NULL); - parent->child_of_instance = instance; - instance->parent_of_instance = parent; - } - instance->args_of_instance = hw_strdup (me, args); - instance->path_of_instance = hw_strdup (me, path); - set_hw_instance_read (instance, panic_hw_instance_read); - set_hw_instance_write (instance, panic_hw_instance_write); - set_hw_instance_seek (instance, panic_hw_instance_seek); - hw_handle_add_ihandle (me, instance); - me->instances_of_hw->to_finish (me, instance); - return instance; -} - - -struct hw_instance * -hw_instance_interceed (struct hw_instance *parent, - const char *path, - const char *args) -{ -#if 1 - return NULL; -#else - struct hw_instance *instance = ZALLOC (struct hw_instance); - /*instance->unit*/ - /* link this instance into the devices list */ - if (me != NULL) - { - ASSERT (parent == NULL); - instance->hw_of_instance = me; - instance->parent_of_instance = NULL; - /* link this instance into the front of the devices instance list */ - instance->sibling_of_instance = me->instances_of_hw->instances; - me->instances_of_hw->instances = instance; - } - if (parent != NULL) - { - struct hw_instance **previous; - ASSERT (parent->child_of_instance == NULL); - parent->child_of_instance = instance; - instance->owner = parent->owner; - instance->parent_of_instance = parent; - /* in the devices instance list replace the parent instance with - this one */ - instance->next = parent->next; - /* replace parent with this new node */ - previous = &instance->owner->instances; - while (*previous != parent) - { - ASSERT (*previous != NULL); - previous = &(*previous)->next; - } - *previous = instance; - } - instance->data = data; - instance->args = (args == NULL ? NULL : (char *) strdup(args)); - instance->path = (path == NULL ? NULL : (char *) strdup(path)); - cap_add (instance->owner->ihandles, instance); - return instance; -#endif -} diff --git a/sim/common/hw-instances.h b/sim/common/hw-instances.h deleted file mode 100644 index 0966d81..0000000 --- a/sim/common/hw-instances.h +++ /dev/null @@ -1,160 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 HW_INSTANCES_H -#define HW_INSTANCES_H - -/* Instances: - - As with IEEE1275, a device can be opened, creating an instance. - Instances provide more abstract interfaces to the underlying - hardware. For example, the instance methods for a disk may include - code that is able to interpret file systems found on disks. Such - methods would there for allow the manipulation of files on the - disks file system. The operations would be implemented using the - basic block I/O model provided by the disk. - - This model includes methods that faciliate the creation of device - instance and (should a given device support it) standard operations - on those instances. - - */ - - -struct hw_instance; - - -typedef void (hw_finish_instance_method) - (struct hw *hw, - struct hw_instance *); - -extern void set_hw_finish_instance -(struct hw *hw, - hw_finish_instance_method *method); - - -/* construct an instance of the hardware */ - -struct hw_instance *hw_instance_create -(struct hw *hw, - struct hw_instance *parent, - const char *path, - const char *args); - -struct hw_instance *hw_instance_interceed -(struct hw_instance *parent, - const char *path, - const char *args); - -void hw_instance_delete -(struct hw_instance *instance); - - -/* methods applied to an instance of the hw */ - -typedef int (hw_instance_read_method) - (struct hw_instance *instance, - void *addr, - unsigned_cell len); - -#define hw_instance_read(instance, addr, len) \ -((instance)->to_instance_read ((instance), (addr), (len))) - -#define set_hw_instance_read(instance, method) \ -((instance)->to_instance_read = (method)) - - -typedef int (hw_instance_write_method) - (struct hw_instance *instance, - const void *addr, - unsigned_cell len); - -#define hw_instance_write(instance, addr, len) \ -((instance)->to_instance_write ((instance), (addr), (len))) - -#define set_hw_instance_write(instance, method) \ -((instance)->to_instance_write = (method)) - - -typedef int (hw_instance_seek_method) - (struct hw_instance *instance, - unsigned_cell pos_hi, - unsigned_cell pos_lo); - -#define hw_instance_seek(instance, pos_hi, pos_lo) \ -((instance)->to_instance_seek ((instance), (pos_hi), (pos_lo))); - -#define set_hw_instance_seek(instance, method) \ -((instance)->to_instance_seek = (method)) - - -int hw_instance_call_method -(struct hw_instance *instance, - const char *method, - int n_stack_args, - unsigned_cell stack_args[/*n_stack_args + 1(NULL)*/], - int n_stack_returns, - unsigned_cell stack_returns[/*n_stack_returns + 1(NULL)*/]); - - - -/* the definition of the instance */ - -#define hw_instance_hw(instance) ((instance)->hw_of_instance + 0) - -#define hw_instance_path(instance) ((instance)->path_of_instance + 0) - -#define hw_instance_args(instance) ((instance)->args_of_instance) - -#define hw_instance_data(instance) ((instance)->data_of_instance) - -#define hw_instance_system(instance) (hw_system (hw_instance_hw (instance))) - - - -/* Finally an instance of a hardware device - keep your grubby little - mits off of these internals! :-) */ - -struct hw_instance { - - void *data_of_instance; - char *args_of_instance; - char *path_of_instance; - - /* the device that owns the instance */ - struct hw *hw_of_instance; - struct hw_instance *sibling_of_instance; - - /* interposed instance */ - struct hw_instance *parent_of_instance; - struct hw_instance *child_of_instance; - - /* methods */ - hw_instance_read_method *to_instance_read; - hw_instance_write_method *to_instance_write; - hw_instance_seek_method *to_instance_seek; - -}; - -#endif diff --git a/sim/common/hw-main.h b/sim/common/hw-main.h deleted file mode 100644 index 3c086c1..0000000 --- a/sim/common/hw-main.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Common hardware header file. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Andrew Cagney and 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 HW_MAIN -#define HW_MAIN - -/* establish a type system */ -#include "sim-basics.h" - -/* construct a hw device */ -#include "hw-device.h" -#include "hw-properties.h" -#include "hw-events.h" -#include "hw-alloc.h" -#include "hw-instances.h" -#include "hw-handles.h" -#include "hw-ports.h" - -/* Description of a hardware device */ - -typedef void (hw_finish_method) - (struct hw *me); - -struct hw_descriptor { - const char *family; - hw_finish_method *to_finish; -}; - -/* Helper functions to make the implementation of a device easier */ - -/* Go through the devices reg properties and look for those specifying - an address to attach various registers to */ - -void do_hw_attach_regs (struct hw *me); - -/* Perform a polling read on FD returning either the number of bytes - or a hw_io status code that indicates the reason for the read - failure */ - -enum { - HW_IO_EOF = -1, HW_IO_NOT_READY = -2, /* See: IEEE 1275 */ -}; - -typedef int (do_hw_poll_read_method) - (SIM_DESC sd, int, char *, int); - -int do_hw_poll_read -(struct hw *me, - do_hw_poll_read_method *read, - int sim_io_fd, - void *buf, - unsigned size_of_buf); - - -#endif diff --git a/sim/common/hw-ports.c b/sim/common/hw-ports.c deleted file mode 100644 index b7dc985..0000000 --- a/sim/common/hw-ports.c +++ /dev/null @@ -1,339 +0,0 @@ -/* Hardware ports. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Andrew Cagney and Cygnus Solutions. - -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 "hw-main.h" -#include "hw-base.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 - -#include <ctype.h> - -#define TRACE(x,y) - - -struct hw_port_edge { - int my_port; - struct hw *dest; - int dest_port; - struct hw_port_edge *next; - object_disposition disposition; -}; - -struct hw_port_data { - hw_port_event_method *to_port_event; - const struct hw_port_descriptor *ports; - struct hw_port_edge *edges; -}; - -const struct hw_port_descriptor empty_hw_ports[] = { - { NULL, }, -}; - -static void -panic_hw_port_event (struct hw *me, - int my_port, - struct hw *source, - int source_port, - int level) -{ - hw_abort (me, "no port method"); -} - -void -create_hw_port_data (struct hw *me) -{ - me->ports_of_hw = HW_ZALLOC (me, struct hw_port_data); - set_hw_port_event (me, panic_hw_port_event); - set_hw_ports (me, empty_hw_ports); -} - -void -delete_hw_port_data (struct hw *me) -{ - hw_free (me, me->ports_of_hw); - me->ports_of_hw = NULL; -} - -void -set_hw_ports (struct hw *me, - const struct hw_port_descriptor ports[]) -{ - me->ports_of_hw->ports = ports; -} - -void -set_hw_port_event (struct hw *me, - hw_port_event_method *port_event) -{ - me->ports_of_hw->to_port_event = port_event; -} - - -static void -attach_hw_port_edge (struct hw *me, - struct hw_port_edge **list, - int my_port, - struct hw *dest, - int dest_port, - object_disposition disposition) -{ - struct hw_port_edge *new_edge = HW_ZALLOC (me, struct hw_port_edge); - new_edge->my_port = my_port; - new_edge->dest = dest; - new_edge->dest_port = dest_port; - new_edge->next = *list; - new_edge->disposition = disposition; - *list = new_edge; -} - - -static void -detach_hw_port_edge (struct hw *me, - struct hw_port_edge **list, - int my_port, - struct hw *dest, - int dest_port) -{ - while (*list != NULL) - { - struct hw_port_edge *old_edge = *list; - if (old_edge->dest == dest - && old_edge->dest_port == dest_port - && old_edge->my_port == my_port) - { - if (old_edge->disposition == permenant_object) - hw_abort (me, "attempt to delete permenant port edge"); - *list = old_edge->next; - hw_free (me, old_edge); - return; - } - } - hw_abort (me, "attempt to delete unattached port"); -} - - -#if 0 -static void -clean_hw_port_edges (struct hw_port_edge **list) -{ - while (*list != NULL) - { - struct hw_port_edge *old_edge = *list; - switch (old_edge->disposition) - { - case permenant_object: - list = &old_edge->next; - break; - case temporary_object: - *list = old_edge->next; - hw_free (me, old_edge); - break; - } - } -} -#endif - - -/* Ports: */ - -void -hw_port_event (struct hw *me, - int my_port, - int level) -{ - int found_an_edge = 0; - struct hw_port_edge *edge; - /* device's lines directly connected */ - for (edge = me->ports_of_hw->edges; - edge != NULL; - edge = edge->next) - { - if (edge->my_port == my_port) - { - edge->dest->ports_of_hw->to_port_event (edge->dest, - edge->dest_port, - me, - my_port, - level); - found_an_edge = 1; - } - } - if (!found_an_edge) - hw_abort (me, "No edge for port %d", my_port); -} - - -void -hw_port_attach (struct hw *me, - int my_port, - struct hw *dest, - int dest_port, - object_disposition disposition) -{ - attach_hw_port_edge (me, - &me->ports_of_hw->edges, - my_port, - dest, - dest_port, - disposition); -} - - -void -hw_port_detach (struct hw *me, - int my_port, - struct hw *dest, - int dest_port) -{ - detach_hw_port_edge (me, - &me->ports_of_hw->edges, - my_port, - dest, - dest_port); -} - - -void -hw_port_traverse (struct hw *me, - hw_port_traverse_function *handler, - void *data) -{ - struct hw_port_edge *port_edge; - for (port_edge = me->ports_of_hw->edges; - port_edge != NULL; - port_edge = port_edge->next) - { - handler (me, port_edge->my_port, - port_edge->dest, port_edge->dest_port, - data); - } -} - - -int -hw_port_decode (struct hw *me, - const char *port_name, - port_direction direction) -{ - if (port_name == NULL || port_name[0] == '\0') - return 0; - if (isdigit(port_name[0])) - { - return strtoul (port_name, NULL, 0); - } - else - { - const struct hw_port_descriptor *ports = - me->ports_of_hw->ports; - if (ports != NULL) - { - while (ports->name != NULL) - { - if (ports->direction == bidirect_port - || ports->direction == direction) - { - if (ports->nr_ports > 0) - { - int len = strlen (ports->name); - if (strncmp (port_name, ports->name, len) == 0) - { - if (port_name[len] == '\0') - return ports->number; - else if(isdigit (port_name[len])) - { - int port = (ports->number - + strtoul (&port_name[len], NULL, 0)); - if (port >= ports->number + ports->nr_ports) - hw_abort (me, - "Port %s out of range", - port_name); - return port; - } - } - } - else if (strcmp (port_name, ports->name) == 0) - return ports->number; - } - ports++; - } - } - } - hw_abort (me, "Unreconized port %s", port_name); - return 0; -} - - -int -hw_port_encode (struct hw *me, - int port_number, - char *buf, - int sizeof_buf, - port_direction direction) -{ - const struct hw_port_descriptor *ports = NULL; - ports = me->ports_of_hw->ports; - if (ports != NULL) { - while (ports->name != NULL) - { - if (ports->direction == bidirect_port - || ports->direction == direction) - { - if (ports->nr_ports > 0) - { - if (port_number >= ports->number - && port_number < ports->number + ports->nr_ports) - { - strcpy (buf, ports->name); - sprintf (buf + strlen(buf), "%d", port_number - ports->number); - if (strlen (buf) >= sizeof_buf) - hw_abort (me, "hw_port_encode: buffer overflow"); - return strlen (buf); - } - } - else - { - if (ports->number == port_number) - { - if (strlen(ports->name) >= sizeof_buf) - hw_abort (me, "hw_port_encode: buffer overflow"); - strcpy(buf, ports->name); - return strlen(buf); - } - } - } - ports++; - } - } - sprintf (buf, "%d", port_number); - if (strlen(buf) >= sizeof_buf) - hw_abort (me, "hw_port_encode: buffer overflow"); - return strlen(buf); -} diff --git a/sim/common/hw-ports.h b/sim/common/hw-ports.h deleted file mode 100644 index 566895a..0000000 --- a/sim/common/hw-ports.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Hardware ports. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Andrew Cagney and Cygnus Solutions. - -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 HW_PORTS_H -#define HW_PORTS_H - -/* Initialize a port */ - -struct hw_port_descriptor { - const char *name; - int number; - int nr_ports; - port_direction direction; -}; - -void set_hw_ports (struct hw *hw, const struct hw_port_descriptor ports[]); - -typedef void (hw_port_event_method) - (struct hw *me, - int my_port, - struct hw *source, - int source_port, - int level); - -void set_hw_port_event (struct hw *hw, hw_port_event_method *to_port_event); - - -/* Port source - - A device drives its output ports using the call - - */ - -void hw_port_event -(struct hw *me, - int my_port, - int value); - -/* This port event will then be propogated to any attached - destination ports. - - Any interpretation of PORT and VALUE is model dependant. As a - guideline the following are recommended: PCI interrupts A-D should - correspond to ports 0-3; level sensative interrupts be requested - with a value of one and withdrawn with a value of 0; edge sensative - interrupts always have a value of 1, the event its self is treated - as the interrupt. - - - Port destinations - - Attached to each port of a device can be zero or more - desitinations. These destinations consist of a device/port pair. - A destination is attached/detached to a device line using the - attach and detach calls. */ - -void hw_port_attach -(struct hw *me, - int my_port, - struct hw *dest, - int dest_port, - object_disposition disposition); - -void hw_port_detach -(struct hw *me, - int my_port, - struct hw *dest, - int dest_port); - - -/* Iterate over the list of ports attached to a device */ - -typedef void (hw_port_traverse_function) - (struct hw *me, - int my_port, - struct hw *dest, - int dest_port, - void *data); - -void hw_port_traverse -(struct hw *me, - hw_port_traverse_function *handler, - void *data); - - -/* DESTINATION is attached (detached) to LINE of the device ME - - - Port conversion - - Users refer to port numbers symbolically. For instance a device - may refer to its `INT' signal which is internally represented by - port 3. - - To convert to/from the symbolic and internal representation of a - port name/number. The following functions are available. */ - -int hw_port_decode -(struct hw *me, - const char *symbolic_name, - port_direction direction); - -int hw_port_encode -(struct hw *me, - int port_number, - char *buf, - int sizeof_buf, - port_direction direction); - - -#endif diff --git a/sim/common/hw-properties.c b/sim/common/hw-properties.c deleted file mode 100644 index 6e0d4bb..0000000 --- a/sim/common/hw-properties.c +++ /dev/null @@ -1,909 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "hw-main.h" -#include "hw-base.h" - -#include "sim-io.h" -#include "sim-assert.h" - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#define TRACE(A,B) - -/* property entries */ - -struct hw_property_data { - struct hw_property_data *next; - struct hw_property *property; - const void *init_array; - unsigned sizeof_init_array; -}; - -void -create_hw_property_data (struct hw *me) -{ -} - -void -delete_hw_property_data (struct hw *me) -{ -} - - -/* Device Properties: */ - -static struct hw_property_data * -find_property_data (struct hw *me, - const char *property) -{ - struct hw_property_data *entry; - ASSERT (property != NULL); - entry = me->properties_of_hw; - while (entry != NULL) - { - if (strcmp (entry->property->name, property) == 0) - return entry; - entry = entry->next; - } - return NULL; -} - - -static void -hw_add_property (struct hw *me, - const char *property, - hw_property_type type, - const void *init_array, - unsigned sizeof_init_array, - const void *array, - unsigned sizeof_array, - const struct hw_property *original, - object_disposition disposition) -{ - struct hw_property_data *new_entry = NULL; - struct hw_property *new_value = NULL; - - /* find the list end */ - struct hw_property_data **insertion_point = &me->properties_of_hw; - while (*insertion_point != NULL) - { - if (strcmp ((*insertion_point)->property->name, property) == 0) - return; - insertion_point = &(*insertion_point)->next; - } - - /* create a new value */ - new_value = HW_ZALLOC (me, struct hw_property); - new_value->name = (char *) strdup (property); - new_value->type = type; - if (sizeof_array > 0) - { - void *new_array = hw_zalloc (me, sizeof_array); - memcpy (new_array, array, sizeof_array); - new_value->array = new_array; - new_value->sizeof_array = sizeof_array; - } - new_value->owner = me; - new_value->original = original; - new_value->disposition = disposition; - - /* insert the value into the list */ - new_entry = HW_ZALLOC (me, struct hw_property_data); - *insertion_point = new_entry; - if (sizeof_init_array > 0) - { - void *new_init_array = hw_zalloc (me, sizeof_init_array); - memcpy (new_init_array, init_array, sizeof_init_array); - new_entry->init_array = new_init_array; - new_entry->sizeof_init_array = sizeof_init_array; - } - new_entry->property = new_value; -} - - -static void -hw_set_property (struct hw *me, - const char *property, - hw_property_type type, - const void *array, - int sizeof_array) -{ - /* find the property */ - struct hw_property_data *entry = find_property_data (me, property); - if (entry != NULL) - { - /* existing property - update it */ - void *new_array = 0; - struct hw_property *value = entry->property; - /* check the type matches */ - if (value->type != type) - hw_abort (me, "conflict between type of new and old value for property %s", property); - /* replace its value */ - if (value->array != NULL) - hw_free (me, (void*)value->array); - new_array = (sizeof_array > 0 - ? hw_zalloc (me, sizeof_array) - : (void*)0); - value->array = new_array; - value->sizeof_array = sizeof_array; - if (sizeof_array > 0) - memcpy (new_array, array, sizeof_array); - return; - } - else - { - /* new property - create it */ - hw_add_property (me, property, type, - NULL, 0, array, sizeof_array, - NULL, temporary_object); - } -} - - -#if 0 -static void -clean_hw_properties (struct hw *me) -{ - struct hw_property_data **delete_point = &me->properties_of_hw; - while (*delete_point != NULL) - { - struct hw_property_data *current = *delete_point; - switch (current->property->disposition) - { - case permenant_object: - /* zap the current value, will be initialized later */ - ASSERT (current->init_array != NULL); - if (current->property->array != NULL) - { - hw_free (me, (void*)current->property->array); - current->property->array = NULL; - } - delete_point = &(*delete_point)->next; - break; - case temporary_object: - /* zap the actual property, was created during simulation run */ - ASSERT (current->init_array == NULL); - *delete_point = current->next; - if (current->property->array != NULL) - hw_free (me, (void*)current->property->array); - hw_free (me, current->property); - hw_free (me, current); - break; - } - } -} -#endif - -#if 0 -void -hw_init_static_properties (SIM_DESC sd, - struct hw *me, - void *data) -{ - struct hw_property_data *property; - for (property = me->properties_of_hw; - property != NULL; - property = property->next) - { - ASSERT (property->init_array != NULL); - ASSERT (property->property->array == NULL); - ASSERT(property->property->disposition == permenant_object); - switch (property->property->type) - { - case array_property: - case boolean_property: - case range_array_property: - case reg_array_property: - case string_property: - case string_array_property: - case integer_property: - /* delete the property, and replace it with the original */ - hw_set_property (me, property->property->name, - property->property->type, - property->init_array, - property->sizeof_init_array); - break; -#if 0 - case ihandle_property: - break; -#endif - } - } -} -#endif - - -#if 0 -void -hw_init_runtime_properties (SIM_DESC sd, - struct hw *me, - void *data) -{ - struct hw_property_data *property; - for (property = me->properties_of_hw; - property != NULL; - property = property->next) - { - switch (property->property->disposition) - { - case permenant_object: - switch (property->property->type) - { -#if 0 - case ihandle_property: - { - struct hw_instance *ihandle; - ihandle_runtime_property_spec spec; - ASSERT (property->init_array != NULL); - ASSERT (property->property->array == NULL); - hw_find_ihandle_runtime_property (me, property->property->name, &spec); - ihandle = tree_instance (me, spec.full_path); - hw_set_ihandle_property (me, property->property->name, ihandle); - break; - } -#endif - case array_property: - case boolean_property: - case range_array_property: - case integer_property: - case reg_array_property: - case string_property: - case string_array_property: - ASSERT (property->init_array != NULL); - ASSERT (property->property->array != NULL); - break; - } - break; - case temporary_object: - ASSERT (property->init_array == NULL); - ASSERT (property->property->array != NULL); - break; - } - } -} -#endif - - - -const struct hw_property * -hw_next_property (const struct hw_property *property) -{ - /* find the property in the list */ - struct hw *owner = property->owner; - struct hw_property_data *entry = owner->properties_of_hw; - while (entry != NULL && entry->property != property) - entry = entry->next; - /* now return the following property */ - ASSERT (entry != NULL); /* must be a member! */ - if (entry->next != NULL) - return entry->next->property; - else - return NULL; -} - - -const struct hw_property * -hw_find_property (struct hw *me, - const char *property) -{ - if (me == NULL) - { - return NULL; - } - else if (property == NULL || strcmp (property, "") == 0) - { - if (me->properties_of_hw == NULL) - return NULL; - else - return me->properties_of_hw->property; - } - else - { - struct hw_property_data *entry = find_property_data (me, property); - if (entry != NULL) - return entry->property; - } - return NULL; -} - - -void -hw_add_array_property (struct hw *me, - const char *property, - const void *array, - int sizeof_array) -{ - hw_add_property (me, property, array_property, - array, sizeof_array, array, sizeof_array, - NULL, permenant_object); -} - -void -hw_set_array_property (struct hw *me, - const char *property, - const void *array, - int sizeof_array) -{ - hw_set_property (me, property, array_property, array, sizeof_array); -} - -const struct hw_property * -hw_find_array_property (struct hw *me, - const char *property) -{ - const struct hw_property *node; - node = hw_find_property (me, property); - if (node == NULL) - hw_abort (me, "property \"%s\" not found", property); - if (node->type != array_property) - hw_abort (me, "property \"%s\" of wrong type (array)", property); - return node; -} - - - -void -hw_add_boolean_property (struct hw *me, - const char *property, - int boolean) -{ - signed32 new_boolean = (boolean ? -1 : 0); - hw_add_property (me, property, boolean_property, - &new_boolean, sizeof(new_boolean), - &new_boolean, sizeof(new_boolean), - NULL, permenant_object); -} - -int -hw_find_boolean_property (struct hw *me, - const char *property) -{ - const struct hw_property *node; - unsigned_cell boolean; - node = hw_find_property (me, property); - if (node == NULL) - hw_abort (me, "property \"%s\" not found", property); - if (node->type != boolean_property) - hw_abort (me, "property \"%s\" of wrong type (boolean)", property); - ASSERT (sizeof (boolean) == node->sizeof_array); - memcpy (&boolean, node->array, sizeof (boolean)); - return boolean; -} - - - -#if 0 -void -hw_add_ihandle_runtime_property (struct hw *me, - const char *property, - const ihandle_runtime_property_spec *ihandle) -{ - /* enter the full path as the init array */ - hw_add_property (me, property, ihandle_property, - ihandle->full_path, strlen(ihandle->full_path) + 1, - NULL, 0, - NULL, permenant_object); -} -#endif - -#if 0 -void -hw_find_ihandle_runtime_property (struct hw *me, - const char *property, - ihandle_runtime_property_spec *ihandle) -{ - struct hw_property_data *entry = find_property_data (me, property); - TRACE (trace_devices, - ("hw_find_ihandle_runtime_property(me=0x%lx, property=%s)\n", - (long)me, property)); - if (entry == NULL) - hw_abort (me, "property \"%s\" not found", property); - if (entry->property->type != ihandle_property - || entry->property->disposition != permenant_object) - hw_abort (me, "property \"%s\" of wrong type", property); - ASSERT (entry->init_array != NULL); - /* the full path */ - ihandle->full_path = entry->init_array; -} -#endif - - - -#if 0 -void -hw_set_ihandle_property (struct hw *me, - const char *property, - hw_instance *ihandle) -{ - unsigned_cell cells; - cells = H2BE_cell (hw_instance_to_external (ihandle)); - hw_set_property (me, property, ihandle_property, - &cells, sizeof (cells)); - -} -#endif - -#if 0 -hw_instance * -hw_find_ihandle_property (struct hw *me, - const char *property) -{ - const hw_property_data *node; - unsigned_cell ihandle; - hw_instance *instance; - - node = hw_find_property (me, property); - if (node == NULL) - hw_abort (me, "property \"%s\" not found", property); - if (node->type != ihandle_property) - hw_abort(me, "property \"%s\" of wrong type (ihandle)", property); - if (node->array == NULL) - hw_abort(me, "runtime property \"%s\" not yet initialized", property); - - ASSERT (sizeof(ihandle) == node->sizeof_array); - memcpy (&ihandle, node->array, sizeof(ihandle)); - instance = external_to_hw_instance (me, BE2H_cell(ihandle)); - ASSERT (instance != NULL); - return instance; -} -#endif - - -void -hw_add_integer_property (struct hw *me, - const char *property, - signed_cell integer) -{ - H2BE (integer); - hw_add_property (me, property, integer_property, - &integer, sizeof(integer), - &integer, sizeof(integer), - NULL, permenant_object); -} - -signed_cell -hw_find_integer_property (struct hw *me, - const char *property) -{ - const struct hw_property *node; - signed_cell integer; - TRACE (trace_devices, - ("hw_find_integer(me=0x%lx, property=%s)\n", - (long)me, property)); - node = hw_find_property (me, property); - if (node == NULL) - hw_abort (me, "property \"%s\" not found", property); - if (node->type != integer_property) - hw_abort (me, "property \"%s\" of wrong type (integer)", property); - ASSERT (sizeof(integer) == node->sizeof_array); - memcpy (&integer, node->array, sizeof (integer)); - return BE2H_cell (integer); -} - -int -hw_find_integer_array_property (struct hw *me, - const char *property, - unsigned index, - signed_cell *integer) -{ - const struct hw_property *node; - int sizeof_integer = sizeof (*integer); - signed_cell *cell; - TRACE (trace_devices, - ("hw_find_integer(me=0x%lx, property=%s)\n", - (long)me, property)); - - /* check things sane */ - node = hw_find_property (me, property); - if (node == NULL) - hw_abort (me, "property \"%s\" not found", property); - if (node->type != integer_property - && node->type != array_property) - hw_abort (me, "property \"%s\" of wrong type (integer or array)", property); - if ((node->sizeof_array % sizeof_integer) != 0) - hw_abort (me, "property \"%s\" contains an incomplete number of cells", property); - if (node->sizeof_array <= sizeof_integer * index) - return 0; - - /* Find and convert the value */ - cell = ((signed_cell*)node->array) + index; - *integer = BE2H_cell (*cell); - - return node->sizeof_array / sizeof_integer; -} - - -static unsigned_cell * -unit_address_to_cells (const hw_unit *unit, - unsigned_cell *cell, - int nr_cells) -{ - int i; - ASSERT(nr_cells == unit->nr_cells); - for (i = 0; i < unit->nr_cells; i++) - { - *cell = H2BE_cell (unit->cells[i]); - cell += 1; - } - return cell; -} - - -static const unsigned_cell * -cells_to_unit_address (const unsigned_cell *cell, - hw_unit *unit, - int nr_cells) -{ - int i; - memset(unit, 0, sizeof(*unit)); - unit->nr_cells = nr_cells; - for (i = 0; i < unit->nr_cells; i++) - { - unit->cells[i] = BE2H_cell (*cell); - cell += 1; - } - return cell; -} - - -static unsigned -nr_range_property_cells (struct hw *me, - int nr_ranges) -{ - return ((hw_unit_nr_address_cells (me) - + hw_unit_nr_address_cells (hw_parent (me)) - + hw_unit_nr_size_cells (me)) - ) * nr_ranges; -} - -void -hw_add_range_array_property (struct hw *me, - const char *property, - const range_property_spec *ranges, - unsigned nr_ranges) -{ - unsigned sizeof_cells = (nr_range_property_cells (me, nr_ranges) - * sizeof (unsigned_cell)); - unsigned_cell *cells = hw_zalloc (me, sizeof_cells); - unsigned_cell *cell; - int i; - - /* copy the property elements over */ - cell = cells; - for (i = 0; i < nr_ranges; i++) - { - const range_property_spec *range = &ranges[i]; - /* copy the child address */ - cell = unit_address_to_cells (&range->child_address, cell, - hw_unit_nr_address_cells (me)); - /* copy the parent address */ - cell = unit_address_to_cells (&range->parent_address, cell, - hw_unit_nr_address_cells (hw_parent (me))); - /* copy the size */ - cell = unit_address_to_cells (&range->size, cell, - hw_unit_nr_size_cells (me)); - } - ASSERT (cell == &cells[nr_range_property_cells (me, nr_ranges)]); - - /* add it */ - hw_add_property (me, property, range_array_property, - cells, sizeof_cells, - cells, sizeof_cells, - NULL, permenant_object); - - hw_free (me, cells); -} - -int -hw_find_range_array_property (struct hw *me, - const char *property, - unsigned index, - range_property_spec *range) -{ - const struct hw_property *node; - unsigned sizeof_entry = (nr_range_property_cells (me, 1) - * sizeof (unsigned_cell)); - const unsigned_cell *cells; - - /* locate the property */ - node = hw_find_property (me, property); - if (node == NULL) - hw_abort (me, "property \"%s\" not found", property); - if (node->type != range_array_property) - hw_abort (me, "property \"%s\" of wrong type (range array)", property); - - /* aligned ? */ - if ((node->sizeof_array % sizeof_entry) != 0) - hw_abort (me, "property \"%s\" contains an incomplete number of entries", - property); - - /* within bounds? */ - if (node->sizeof_array < sizeof_entry * (index + 1)) - return 0; - - /* find the range of interest */ - cells = (unsigned_cell*)((char*)node->array + sizeof_entry * index); - - /* copy the child address out - converting as we go */ - cells = cells_to_unit_address (cells, &range->child_address, - hw_unit_nr_address_cells (me)); - - /* copy the parent address out - converting as we go */ - cells = cells_to_unit_address (cells, &range->parent_address, - hw_unit_nr_address_cells (hw_parent (me))); - - /* copy the size - converting as we go */ - cells = cells_to_unit_address (cells, &range->size, - hw_unit_nr_size_cells (me)); - - return node->sizeof_array / sizeof_entry; -} - - -static unsigned -nr_reg_property_cells (struct hw *me, - int nr_regs) -{ - return (hw_unit_nr_address_cells (hw_parent(me)) - + hw_unit_nr_size_cells (hw_parent(me)) - ) * nr_regs; -} - -void -hw_add_reg_array_property (struct hw *me, - const char *property, - const reg_property_spec *regs, - unsigned nr_regs) -{ - unsigned sizeof_cells = (nr_reg_property_cells (me, nr_regs) - * sizeof (unsigned_cell)); - unsigned_cell *cells = hw_zalloc (me, sizeof_cells); - unsigned_cell *cell; - int i; - - /* copy the property elements over */ - cell = cells; - for (i = 0; i < nr_regs; i++) - { - const reg_property_spec *reg = ®s[i]; - /* copy the address */ - cell = unit_address_to_cells (®->address, cell, - hw_unit_nr_address_cells (hw_parent (me))); - /* copy the size */ - cell = unit_address_to_cells (®->size, cell, - hw_unit_nr_size_cells (hw_parent (me))); - } - ASSERT (cell == &cells[nr_reg_property_cells (me, nr_regs)]); - - /* add it */ - hw_add_property (me, property, reg_array_property, - cells, sizeof_cells, - cells, sizeof_cells, - NULL, permenant_object); - - hw_free (me, cells); -} - -int -hw_find_reg_array_property (struct hw *me, - const char *property, - unsigned index, - reg_property_spec *reg) -{ - const struct hw_property *node; - unsigned sizeof_entry = (nr_reg_property_cells (me, 1) - * sizeof (unsigned_cell)); - const unsigned_cell *cells; - - /* locate the property */ - node = hw_find_property (me, property); - if (node == NULL) - hw_abort (me, "property \"%s\" not found", property); - if (node->type != reg_array_property) - hw_abort (me, "property \"%s\" of wrong type (reg array)", property); - - /* aligned ? */ - if ((node->sizeof_array % sizeof_entry) != 0) - hw_abort (me, "property \"%s\" contains an incomplete number of entries", - property); - - /* within bounds? */ - if (node->sizeof_array < sizeof_entry * (index + 1)) - return 0; - - /* find the range of interest */ - cells = (unsigned_cell*)((char*)node->array + sizeof_entry * index); - - /* copy the address out - converting as we go */ - cells = cells_to_unit_address (cells, ®->address, - hw_unit_nr_address_cells (hw_parent (me))); - - /* copy the size out - converting as we go */ - cells = cells_to_unit_address (cells, ®->size, - hw_unit_nr_size_cells (hw_parent (me))); - - return node->sizeof_array / sizeof_entry; -} - - -void -hw_add_string_property (struct hw *me, - const char *property, - const char *string) -{ - hw_add_property (me, property, string_property, - string, strlen(string) + 1, - string, strlen(string) + 1, - NULL, permenant_object); -} - -const char * -hw_find_string_property (struct hw *me, - const char *property) -{ - const struct hw_property *node; - const char *string; - node = hw_find_property (me, property); - if (node == NULL) - hw_abort (me, "property \"%s\" not found", property); - if (node->type != string_property) - hw_abort (me, "property \"%s\" of wrong type (string)", property); - string = node->array; - ASSERT (strlen(string) + 1 == node->sizeof_array); - return string; -} - -void -hw_add_string_array_property (struct hw *me, - const char *property, - const string_property_spec *strings, - unsigned nr_strings) -{ - int sizeof_array; - int string_nr; - char *array; - char *chp; - if (nr_strings == 0) - hw_abort (me, "property \"%s\" must be non-null", property); - /* total up the size of the needed array */ - for (sizeof_array = 0, string_nr = 0; - string_nr < nr_strings; - string_nr ++) - { - sizeof_array += strlen (strings[string_nr]) + 1; - } - /* create the array */ - array = (char*) hw_zalloc (me, sizeof_array); - chp = array; - for (string_nr = 0; - string_nr < nr_strings; - string_nr++) - { - strcpy (chp, strings[string_nr]); - chp += strlen (chp) + 1; - } - ASSERT (chp == array + sizeof_array); - /* now enter it */ - hw_add_property (me, property, string_array_property, - array, sizeof_array, - array, sizeof_array, - NULL, permenant_object); -} - -int -hw_find_string_array_property (struct hw *me, - const char *property, - unsigned index, - string_property_spec *string) -{ - const struct hw_property *node; - node = hw_find_property (me, property); - if (node == NULL) - hw_abort (me, "property \"%s\" not found", property); - switch (node->type) - { - default: - hw_abort (me, "property \"%s\" of wrong type", property); - break; - case string_property: - if (index == 0) - { - *string = node->array; - ASSERT (strlen(*string) + 1 == node->sizeof_array); - return 1; - } - break; - case array_property: - if (node->sizeof_array == 0 - || ((char*)node->array)[node->sizeof_array - 1] != '\0') - hw_abort (me, "property \"%s\" invalid for string array", property); - /* FALL THROUGH */ - case string_array_property: - ASSERT (node->sizeof_array > 0); - ASSERT (((char*)node->array)[node->sizeof_array - 1] == '\0'); - { - const char *chp = node->array; - int nr_entries = 0; - /* count the number of strings, keeping an eye out for the one - we're looking for */ - *string = chp; - do - { - if (*chp == '\0') - { - /* next string */ - nr_entries++; - chp++; - if (nr_entries == index) - *string = chp; - } - else - { - chp++; - } - } while (chp < (char*)node->array + node->sizeof_array); - if (index < nr_entries) - return nr_entries; - else - { - *string = NULL; - return 0; - } - } - break; - } - return 0; -} - -void -hw_add_duplicate_property (struct hw *me, - const char *property, - const struct hw_property *original) -{ - struct hw_property_data *master; - TRACE (trace_devices, - ("hw_add_duplicate_property(me=0x%lx, property=%s, ...)\n", - (long)me, property)); - if (original->disposition != permenant_object) - hw_abort (me, "Can only duplicate permenant objects"); - /* find the original's master */ - master = original->owner->properties_of_hw; - while (master->property != original) - { - master = master->next; - ASSERT(master != NULL); - } - /* now duplicate it */ - hw_add_property (me, property, - original->type, - master->init_array, master->sizeof_init_array, - original->array, original->sizeof_array, - original, permenant_object); -} diff --git a/sim/common/hw-properties.h b/sim/common/hw-properties.h deleted file mode 100644 index ba59b25..0000000 --- a/sim/common/hw-properties.h +++ /dev/null @@ -1,247 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 HW_PROPERTIES_H -#define HW_PROPERTIES_H - -/* The following are valid property types. The property `array' is - for generic untyped data. */ - -typedef enum { - array_property, - boolean_property, -#if 0 - ihandle_property, /*runtime*/ -#endif - integer_property, - range_array_property, - reg_array_property, - string_property, - string_array_property, -} hw_property_type; - -struct hw_property { - struct hw *owner; - const char *name; - hw_property_type type; - unsigned sizeof_array; - const void *array; - const struct hw_property *original; - object_disposition disposition; -}; - -#define hw_property_owner(p) ((p)->owner + 0) -#define hw_property_name(p) ((p)->name + 0) -#define hw_property_type(p) ((p)->type + 0) -#define hw_property_array(p) ((p)->array + 0) -#define hw_property_sizeof_array(p) ((p)->sizeof_array + 0) -#define hw_property_original(p) ((p)->original + 0) -#define hw_property_disposition(p) ((p)->disposition + 0) - - -/* Find/iterate over properites attached to a device. - - To iterate over all properties attached to a device, call - hw_find_property (.., NULL) and then hw_property_next. */ - -const struct hw_property *hw_find_property -(struct hw *me, - const char *property); - -const struct hw_property *hw_next_property -(const struct hw_property *previous); - - -/* Manipulate the properties belonging to a given device. - - HW_ADD_* will, if the property is not already present, add a - property to the device. Adding a property to a device after it has - been created is a checked run-time error (use HW_SET_*). - - HW_SET_* will always update (or create) the property so that it has - the specified value. Changing the type of a property is a checked - run-time error. - - FIND returns the specified properties value. It is a checked - runtime error to either request a nonexistant property or to - request a property using the wrong type. Code locating a property - should first check its type (using hw_find_property above) and then - obtain its value using the below. - - Naming convention: - - void hw_add_<type>_property(struct hw *, const char *, <type>) - void hw_add_*_array_property(struct hw *, const char *, const <type>*, int) - void hw_set_*_property(struct hw *, const char *, <type>) - void hw_set_*_array_property(struct hw *, const char *, const <type>*, int) - <type> hw_find_*_property(struct hw *, const char *) - int hw_find_*_array_property(struct hw *, const char *, int, <type>*) - - */ - - -void hw_add_array_property -(struct hw *me, - const char *property, - const void *array, - int sizeof_array); - -void hw_set_array_property -(struct hw *me, - const char *property, - const void *array, - int sizeof_array); - -const struct hw_property *hw_find_array_property -(struct hw *me, - const char *property); - - - -void hw_add_boolean_property -(struct hw *me, - const char *property, - int bool); - -int hw_find_boolean_property -(struct hw *me, - const char *property); - - - -#if 0 -typedef struct _ihandle_runtime_property_spec { - const char *full_path; -} ihandle_runtime_property_spec; - -void hw_add_ihandle_runtime_property -(struct hw *me, - const char *property, - const ihandle_runtime_property_spec *ihandle); - -void hw_find_ihandle_runtime_property -(struct hw *me, - const char *property, - ihandle_runtime_property_spec *ihandle); - -void hw_set_ihandle_property -(struct hw *me, - const char *property, - hw_instance *ihandle); - -hw_instance * hw_find_ihandle_property -(struct hw *me, - const char *property); -#endif - - -void hw_add_integer_property -(struct hw *me, - const char *property, - signed_cell integer); - -signed_cell hw_find_integer_property -(struct hw *me, - const char *property); - -int hw_find_integer_array_property -(struct hw *me, - const char *property, - unsigned index, - signed_cell *integer); - - - -typedef struct _range_property_spec { - hw_unit child_address; - hw_unit parent_address; - hw_unit size; -} range_property_spec; - -void hw_add_range_array_property -(struct hw *me, - const char *property, - const range_property_spec *ranges, - unsigned nr_ranges); - -int hw_find_range_array_property -(struct hw *me, - const char *property, - unsigned index, - range_property_spec *range); - - - -typedef struct _reg_property_spec { - hw_unit address; - hw_unit size; -} reg_property_spec; - -void hw_add_reg_array_property -(struct hw *me, - const char *property, - const reg_property_spec *reg, - unsigned nr_regs); - -int hw_find_reg_array_property -(struct hw *me, - const char *property, - unsigned index, - reg_property_spec *reg); - - - -void hw_add_string_property -(struct hw *me, - const char *property, - const char *string); - -const char *hw_find_string_property -(struct hw *me, - const char *property); - - - -typedef const char *string_property_spec; - -void hw_add_string_array_property -(struct hw *me, - const char *property, - const string_property_spec *strings, - unsigned nr_strings); - -int hw_find_string_array_property -(struct hw *me, - const char *property, - unsigned index, - string_property_spec *string); - - - -void hw_add_duplicate_property -(struct hw *me, - const char *property, - const struct hw_property *original); - -#endif diff --git a/sim/common/hw-tree.c b/sim/common/hw-tree.c deleted file mode 100644 index f228c69..0000000 --- a/sim/common/hw-tree.c +++ /dev/null @@ -1,1349 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "hw-main.h" -#include "hw-base.h" -#include "hw-tree.h" - -#include "sim-io.h" -#include "sim-assert.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 - -#include <ctype.h> - -/* manipulate/lookup device names */ - -typedef struct _name_specifier { - - /* components in the full length name */ - char *path; - char *property; - char *value; - - /* current device */ - char *family; - char *name; - char *unit; - char *args; - - /* previous device */ - char *last_name; - char *last_family; - char *last_unit; - char *last_args; - - /* work area */ - char buf[1024]; - -} name_specifier; - - - -/* Given a device specifier, break it up into its main components: - path (and if present) property name and property value. */ - -static int -split_device_specifier (struct hw *current, - const char *device_specifier, - name_specifier *spec) -{ - char *chp = NULL; - - /* expand any leading alias if present */ - if (current != NULL - && *device_specifier != '\0' - && *device_specifier != '.' - && *device_specifier != '/') - { - struct hw *aliases = hw_tree_find_device (current, "/aliases"); - char alias[32]; - int len = 0; - while (device_specifier[len] != '\0' - && device_specifier[len] != '/' - && device_specifier[len] != ':' - && !isspace (device_specifier[len])) - { - alias[len] = device_specifier[len]; - len++; - if (len >= sizeof(alias)) - hw_abort (NULL, "split_device_specifier: buffer overflow"); - } - alias[len] = '\0'; - if (aliases != NULL - && hw_find_property (aliases, alias)) - { - strcpy (spec->buf, hw_find_string_property(aliases, alias)); - strcat (spec->buf, device_specifier + len); - } - else - { - strcpy (spec->buf, device_specifier); - } - } - else - { - strcpy(spec->buf, device_specifier); - } - - /* check no overflow */ - if (strlen(spec->buf) >= sizeof(spec->buf)) - hw_abort (NULL, "split_device_specifier: buffer overflow\n"); - - /* strip leading spaces */ - chp = spec->buf; - while (*chp != '\0' && isspace(*chp)) - chp++; - if (*chp == '\0') - return 0; - - /* find the path and terminate it with null */ - spec->path = chp; - while (*chp != '\0' && !isspace(*chp)) - chp++; - if (*chp != '\0') - { - *chp = '\0'; - chp++; - } - - /* and any value */ - while (*chp != '\0' && isspace(*chp)) - chp++; - spec->value = chp; - - /* now go back and chop the property off of the path */ - if (spec->value[0] == '\0') - { - spec->property = NULL; /*not a property*/ - spec->value = NULL; - } - else if (spec->value[0] == '>' - || spec->value[0] == '<') - { - /* an interrupt spec */ - spec->property = NULL; - } - else { - chp = strrchr(spec->path, '/'); - if (chp == NULL) - { - spec->property = spec->path; - spec->path = strchr(spec->property, '\0'); - } - else { - *chp = '\0'; - spec->property = chp+1; - } - } - - /* and mark the rest as invalid */ - spec->name = NULL; - spec->family = NULL; - spec->unit = NULL; - spec->args = NULL; - spec->last_name = NULL; - spec->last_family = NULL; - spec->last_unit = NULL; - spec->last_args = NULL; - - return 1; -} - - -/* given a device specifier break it up into its main components - - path and property name - assuming that the last `device' is a - property name. */ - -static int -split_property_specifier (struct hw *current, - const char *property_specifier, - name_specifier *spec) -{ - if (split_device_specifier (current, property_specifier, spec)) - { - if (spec->property == NULL) - { - /* force the last name to be a property name */ - char *chp = strrchr (spec->path, '/'); - if (chp == NULL) - { - spec->property = spec->path; - spec->path = strrchr (spec->property, '\0');; - } - else - { - *chp = '\0'; - spec->property = chp + 1; - } - } - return 1; - } - else - return 0; -} - - -/* device the next device name and split it up, return 0 when no more - names to struct hw */ - -static int -split_device_name (name_specifier *spec) -{ - char *chp; - /* remember what came before */ - spec->last_name = spec->name; - spec->last_family = spec->family; - spec->last_unit = spec->unit; - spec->last_args = spec->args; - /* finished? */ - if (spec->path[0] == '\0') - { - spec->name = NULL; - spec->family = NULL; - spec->unit = NULL; - spec->args = NULL; - return 0; - } - /* break the current device spec from the path */ - spec->name = spec->path; - chp = strchr (spec->name, '/'); - if (chp == NULL) - spec->path = strchr (spec->name, '\0'); - else - { - spec->path = chp+1; - *chp = '\0'; - } - /* break out the base */ - if (spec->name[0] == '(') - { - chp = strchr(spec->name, ')'); - if (chp == NULL) - { - spec->family = spec->name; - } - else - { - *chp = '\0'; - spec->family = spec->name + 1; - spec->name = chp + 1; - } - } - else - { - spec->family = spec->name; - } - /* now break out the unit */ - chp = strchr(spec->name, '@'); - if (chp == NULL) - { - spec->unit = NULL; - chp = spec->name; - } - else - { - *chp = '\0'; - chp += 1; - spec->unit = chp; - } - /* finally any args */ - chp = strchr(chp, ':'); - if (chp == NULL) - spec->args = NULL; - else - { - *chp = '\0'; - spec->args = chp+1; - } - return 1; -} - - -/* device the value, returning the next non-space token */ - -static char * -split_value (name_specifier *spec) -{ - char *token; - if (spec->value == NULL) - return NULL; - /* skip leading white space */ - while (isspace (spec->value[0])) - spec->value++; - if (spec->value[0] == '\0') - { - spec->value = NULL; - return NULL; - } - token = spec->value; - /* find trailing space */ - while (spec->value[0] != '\0' && !isspace (spec->value[0])) - spec->value++; - /* chop this value out */ - if (spec->value[0] != '\0') - { - spec->value[0] = '\0'; - spec->value++; - } - return token; -} - - - -/* traverse the path specified by spec starting at current */ - -static struct hw * -split_find_device (struct hw *current, - name_specifier *spec) -{ - /* strip off (and process) any leading ., .., ./ and / */ - while (1) - { - if (strncmp (spec->path, "/", strlen ("/")) == 0) - { - /* cd /... */ - while (current != NULL && hw_parent (current) != NULL) - current = hw_parent (current); - spec->path += strlen ("/"); - } - else if (strncmp (spec->path, "./", strlen ("./")) == 0) - { - /* cd ./... */ - current = current; - spec->path += strlen ("./"); - } - else if (strncmp (spec->path, "../", strlen ("../")) == 0) - { - /* cd ../... */ - if (current != NULL && hw_parent (current) != NULL) - current = hw_parent (current); - spec->path += strlen ("../"); - } - else if (strcmp (spec->path, ".") == 0) - { - /* cd . */ - current = current; - spec->path += strlen ("."); - } - else if (strcmp (spec->path, "..") == 0) - { - /* cd .. */ - if (current != NULL && hw_parent (current) != NULL) - current = hw_parent (current); - spec->path += strlen (".."); - } - else - break; - } - - /* now go through the path proper */ - - if (current == NULL) - { - split_device_name (spec); - return NULL; - } - - while (split_device_name (spec)) - { - struct hw *child; - for (child = hw_child (current); - child != NULL; child = hw_sibling (child)) - { - if (strcmp (spec->name, hw_name (child)) == 0) - { - if (spec->unit == NULL) - break; - else - { - hw_unit phys; - hw_unit_decode (current, spec->unit, &phys); - if (memcmp (&phys, hw_unit_address (child), - sizeof (hw_unit)) == 0) - break; - } - } - } - if (child == NULL) - return current; /* search failed */ - current = child; - } - - return current; -} - - -static struct hw * -split_fill_path (struct hw *current, - const char *device_specifier, - name_specifier *spec) -{ - /* break it up */ - if (!split_device_specifier (current, device_specifier, spec)) - hw_abort (current, "error parsing %s\n", device_specifier); - - /* fill our tree with its contents */ - current = split_find_device (current, spec); - - /* add any additional devices as needed */ - if (spec->name != NULL) - { - do - { - if (current != NULL && !hw_finished_p (current)) - hw_finish (current); - current = hw_create (NULL, - current, - spec->family, - spec->name, - spec->unit, - spec->args); - } - while (split_device_name (spec)); - } - - return current; -} - - -/* <non-white-space> */ - -static const char * -skip_token(const char *chp) -{ - while (!isspace(*chp) && *chp != '\0') - chp++; - while (isspace(*chp) && *chp != '\0') - chp++; - return chp; -} - - -/* count the number of entries */ - -static int -count_entries (struct hw *current, - const char *property_name, - const char *property_value, - int modulo) -{ - const char *chp = property_value; - int nr_entries = 0; - while (*chp != '\0') - { - nr_entries += 1; - chp = skip_token (chp); - } - if ((nr_entries % modulo) != 0) - { - hw_abort (current, "incorrect number of entries for %s property %s, should be multiple of %d", - property_name, property_value, modulo); - } - return nr_entries / modulo; -} - - - -/* parse: <address> ::= <token> ; device dependant */ - -static const char * -parse_address (struct hw *current, - struct hw *bus, - const char *chp, - hw_unit *address) -{ - if (hw_unit_decode (bus, chp, address) < 0) - hw_abort (current, "invalid unit address in %s", chp); - return skip_token (chp); -} - - -/* parse: <size> ::= <number> { "," <number> } ; */ - -static const char * -parse_size (struct hw *current, - struct hw *bus, - const char *chp, - hw_unit *size) -{ - int i; - int nr; - const char *curr = chp; - memset(size, 0, sizeof(*size)); - /* parse the numeric list */ - size->nr_cells = hw_unit_nr_size_cells (bus); - nr = 0; - while (1) - { - char *next; - size->cells[nr] = strtoul (curr, &next, 0); - if (curr == next) - hw_abort (current, "Problem parsing <size> %s", chp); - nr += 1; - if (next[0] != ',') - break; - if (nr == size->nr_cells) - hw_abort (current, "Too many values in <size> %s", chp); - curr = next + 1; - } - ASSERT (nr > 0 && nr <= size->nr_cells); - /* right align the numbers */ - for (i = 1; i <= size->nr_cells; i++) - { - if (i <= nr) - size->cells[size->nr_cells - i] = size->cells[nr - i]; - else - size->cells[size->nr_cells - i] = 0; - } - return skip_token (chp); -} - - -/* parse: <reg> ::= { <address> <size> } ; */ - -static void -parse_reg_property (struct hw *current, - const char *property_name, - const char *property_value) -{ - int nr_regs; - int reg_nr; - reg_property_spec *regs; - const char *chp; - - /* determine the number of reg entries by counting tokens */ - nr_regs = count_entries (current, property_name, property_value, 2); - - /* create working space */ - regs = zalloc (nr_regs * sizeof (*regs)); - - /* fill it in */ - chp = property_value; - for (reg_nr = 0; reg_nr < nr_regs; reg_nr++) - { - chp = parse_address (current, hw_parent(current), - chp, ®s[reg_nr].address); - chp = parse_size (current, hw_parent(current), - chp, ®s[reg_nr].size); - } - - /* create it */ - hw_add_reg_array_property (current, property_name, - regs, nr_regs); - - zfree (regs); -} - - -/* { <child-address> <parent-address> <child-size> }* */ - -static void -parse_ranges_property (struct hw *current, - const char *property_name, - const char *property_value) -{ - int nr_ranges; - int range_nr; - range_property_spec *ranges; - const char *chp; - - /* determine the number of ranges specified */ - nr_ranges = count_entries (current, property_name, property_value, 3); - - /* create a property of that size */ - ranges = zalloc (nr_ranges * sizeof(*ranges)); - - /* fill it in */ - chp = property_value; - for (range_nr = 0; range_nr < nr_ranges; range_nr++) - { - chp = parse_address (current, current, - chp, &ranges[range_nr].child_address); - chp = parse_address (current, hw_parent(current), - chp, &ranges[range_nr].parent_address); - chp = parse_size (current, current, - chp, &ranges[range_nr].size); - } - - /* create it */ - hw_add_range_array_property (current, property_name, ranges, nr_ranges); - - zfree (ranges); -} - - -/* <integer> ... */ - -static void -parse_integer_property (struct hw *current, - const char *property_name, - const char *property_value) -{ - int nr_entries; - unsigned_cell words[1024]; - /* integer or integer array? */ - nr_entries = 0; - while (1) - { - char *end; - words[nr_entries] = strtoul (property_value, &end, 0); - if (property_value == end) - break; - nr_entries += 1; - if (nr_entries * sizeof (words[0]) >= sizeof (words)) - hw_abort (current, "buffer overflow"); - property_value = end; - } - if (nr_entries == 0) - hw_abort (current, "error parsing integer property %s (%s)", - property_name, property_value); - else if (nr_entries == 1) - hw_add_integer_property (current, property_name, words[0]); - else - { - int i; - for (i = 0; i < nr_entries; i++) - { - H2BE (words[i]); - } - /* perhaps integer array property is better */ - hw_add_array_property (current, property_name, words, - sizeof(words[0]) * nr_entries); - } -} - - -/* <string> ... */ - -static void -parse_string_property (struct hw *current, - const char *property_name, - const char *property_value) -{ - char **strings; - const char *chp; - int nr_strings; - int approx_nr_strings; - - /* get an estimate as to the number of strings by counting double - quotes */ - approx_nr_strings = 2; - for (chp = property_value; *chp; chp++) - { - if (*chp == '"') - approx_nr_strings++; - } - approx_nr_strings = (approx_nr_strings) / 2; - - /* create a string buffer for that many (plus a null) */ - strings = (char**) zalloc ((approx_nr_strings + 1) * sizeof(char*)); - - /* now find all the strings */ - chp = property_value; - nr_strings = 0; - while (1) - { - - /* skip leading space */ - while (*chp != '\0' && isspace (*chp)) - chp += 1; - if (*chp == '\0') - break; - - /* copy it in */ - if (*chp == '"') - { - /* a quoted string - watch for '\' et al. */ - /* estimate the size and allocate space for it */ - int pos; - chp++; - pos = 0; - while (chp[pos] != '\0' && chp[pos] != '"') - { - if (chp[pos] == '\\' && chp[pos+1] != '\0') - pos += 2; - else - pos += 1; - } - strings[nr_strings] = zalloc (pos + 1); - /* copy the string over */ - pos = 0; - while (*chp != '\0' && *chp != '"') - { - if (*chp == '\\' && *(chp+1) != '\0') { - strings[nr_strings][pos] = *(chp+1); - chp += 2; - pos++; - } - else - { - strings[nr_strings][pos] = *chp; - chp += 1; - pos++; - } - } - if (*chp != '\0') - chp++; - strings[nr_strings][pos] = '\0'; - } - else - { - /* copy over a single unquoted token */ - int len = 0; - while (chp[len] != '\0' && !isspace(chp[len])) - len++; - strings[nr_strings] = zalloc(len + 1); - strncpy(strings[nr_strings], chp, len); - strings[nr_strings][len] = '\0'; - chp += len; - } - nr_strings++; - if (nr_strings > approx_nr_strings) - hw_abort (current, "String property %s badly formatted", - property_name); - } - ASSERT (strings[nr_strings] == NULL); /* from zalloc */ - - /* install it */ - if (nr_strings == 0) - hw_add_string_property (current, property_name, ""); - else if (nr_strings == 1) - hw_add_string_property (current, property_name, strings[0]); - else - { - const char **specs = (const char**) strings; /* stop a bogus error */ - hw_add_string_array_property (current, property_name, - specs, nr_strings); - } - - /* flush the created string */ - while (nr_strings > 0) - { - nr_strings--; - zfree (strings[nr_strings]); - } - zfree(strings); -} - - -/* <path-to-ihandle-device> */ - -#if NOT_YET -static void -parse_ihandle_property (struct hw *current, - const char *property, - const char *value) -{ - ihandle_runtime_property_spec ihandle; - - /* pass the full path */ - ihandle.full_path = value; - - /* save this ready for the ihandle create */ - hw_add_ihandle_runtime_property (current, property, - &ihandle); -} -#endif - - -struct hw * -hw_tree_create (SIM_DESC sd, - const char *family) -{ - return hw_create (sd, NULL, family, family, NULL, NULL); -} - -void -hw_tree_delete (struct hw *me) -{ - /* Need to allow devices to disapear under our feet */ - while (hw_child (me) != NULL) - { - hw_tree_delete (hw_child (me)); - } - hw_delete (me); -} - - -struct hw * -hw_tree_parse (struct hw *current, - const char *fmt, - ...) -{ - va_list ap; - va_start (ap, fmt); - current = hw_tree_vparse (current, fmt, ap); - va_end (ap); - return current; -} - -struct hw * -hw_tree_vparse (struct hw *current, - const char *fmt, - va_list ap) -{ - char device_specifier[1024]; - name_specifier spec; - - /* format the path */ - vsprintf (device_specifier, fmt, ap); - if (strlen (device_specifier) >= sizeof (device_specifier)) - hw_abort (NULL, "device_tree_add_deviced: buffer overflow\n"); - - /* construct the tree down to the final struct hw */ - current = split_fill_path (current, device_specifier, &spec); - - /* is there an interrupt spec */ - if (spec.property == NULL - && spec.value != NULL) - { - char *op = split_value (&spec); - switch (op[0]) - { - case '>': - { - char *my_port_name = split_value (&spec); - int my_port; - char *dest_port_name = split_value (&spec); - int dest_port; - name_specifier dest_spec; - char *dest_hw_name = split_value (&spec); - struct hw *dest; - /* find my name */ - if (!hw_finished_p (current)) - hw_finish (current); - my_port = hw_port_decode (current, my_port_name, output_port); - /* find the dest device and port */ - dest = split_fill_path (current, dest_hw_name, &dest_spec); - if (!hw_finished_p (dest)) - hw_finish (dest); - dest_port = hw_port_decode (dest, dest_port_name, - input_port); - /* connect the two */ - hw_port_attach (current, - my_port, - dest, - dest_port, - permenant_object); - break; - } - default: - hw_abort (current, "unreconised interrupt spec %s\n", spec.value); - break; - } - } - - /* is there a property */ - if (spec.property != NULL) - { - if (strcmp (spec.value, "true") == 0) - hw_add_boolean_property (current, spec.property, 1); - else if (strcmp (spec.value, "false") == 0) - hw_add_boolean_property (current, spec.property, 0); - else - { - const struct hw_property *property; - switch (spec.value[0]) - { -#if NOT_YET - case '*': - { - parse_ihandle_property (current, spec.property, spec.value + 1); - break; - } -#endif - case '[': - { - unsigned8 words[1024]; - char *curr = spec.value + 1; - int nr_words = 0; - while (1) - { - char *next; - words[nr_words] = H2BE_1 (strtoul (curr, &next, 0)); - if (curr == next) - break; - curr = next; - nr_words += 1; - } - hw_add_array_property (current, spec.property, - words, sizeof(words[0]) * nr_words); - break; - } - case '"': - { - parse_string_property (current, spec.property, spec.value); - break; - } - case '!': - { - spec.value++; - property = hw_tree_find_property (current, spec.value); - if (property == NULL) - hw_abort (current, "property %s not found\n", spec.value); - hw_add_duplicate_property (current, - spec.property, - property); - break; - } - default: - { - if (strcmp (spec.property, "reg") == 0 - || strcmp (spec.property, "assigned-addresses") == 0 - || strcmp (spec.property, "alternate-reg") == 0) - { - parse_reg_property (current, spec.property, spec.value); - } - else if (strcmp (spec.property, "ranges") == 0) - { - parse_ranges_property (current, spec.property, spec.value); - } - else if (isdigit(spec.value[0]) - || (spec.value[0] == '-' && isdigit(spec.value[1])) - || (spec.value[0] == '+' && isdigit(spec.value[1]))) - { - parse_integer_property(current, spec.property, spec.value); - } - else - parse_string_property(current, spec.property, spec.value); - break; - } - } - } - } - return current; -} - - -static void -finish_hw_tree (struct hw *me, - void *data) -{ - if (!hw_finished_p (me)) - hw_finish (me); -} - -void -hw_tree_finish (struct hw *root) -{ - hw_tree_traverse (root, finish_hw_tree, NULL, NULL); -} - - - -void -hw_tree_traverse (struct hw *root, - hw_tree_traverse_function *prefix, - hw_tree_traverse_function *postfix, - void *data) -{ - struct hw *child; - if (prefix != NULL) - prefix (root, data); - for (child = hw_child (root); - child != NULL; - child = hw_sibling (child)) - { - hw_tree_traverse (child, prefix, postfix, data); - } - if (postfix != NULL) - postfix (root, data); -} - - - -struct printer { - hw_tree_print_callback *print; - void *file; -}; - -static void -print_address (struct hw *bus, - const hw_unit *phys, - struct printer *p) -{ - char unit[32]; - hw_unit_encode (bus, phys, unit, sizeof(unit)); - p->print (p->file, " %s", unit); -} - -static void -print_size (struct hw *bus, - const hw_unit *size, - struct printer *p) -{ - int i; - for (i = 0; i < size->nr_cells; i++) - if (size->cells[i] != 0) - break; - if (i < size->nr_cells) { - p->print (p->file, " 0x%lx", (unsigned long) size->cells[i]); - i++; - for (; i < size->nr_cells; i++) - p->print (p->file, ",0x%lx", (unsigned long) size->cells[i]); - } - else - p->print (p->file, " 0"); -} - -static void -print_reg_property (struct hw *me, - const struct hw_property *property, - struct printer *p) -{ - int reg_nr; - reg_property_spec reg; - for (reg_nr = 0; - hw_find_reg_array_property (me, property->name, reg_nr, ®); - reg_nr++) { - print_address (hw_parent (me), ®.address, p); - print_size (me, ®.size, p); - } -} - -static void -print_ranges_property (struct hw *me, - const struct hw_property *property, - struct printer *p) -{ - int range_nr; - range_property_spec range; - for (range_nr = 0; - hw_find_range_array_property (me, property->name, range_nr, &range); - range_nr++) - { - print_address (me, &range.child_address, p); - print_address (hw_parent (me), &range.parent_address, p); - print_size (me, &range.size, p); - } -} - -static void -print_string (struct hw *me, - const char *string, - struct printer *p) -{ - p->print (p->file, " \""); - while (*string != '\0') { - switch (*string) { - case '"': - p->print (p->file, "\\\""); - break; - case '\\': - p->print (p->file, "\\\\"); - break; - default: - p->print (p->file, "%c", *string); - break; - } - string++; - } - p->print (p->file, "\""); -} - -static void -print_string_array_property (struct hw *me, - const struct hw_property *property, - struct printer *p) -{ - int nr; - string_property_spec string; - for (nr = 0; - hw_find_string_array_property (me, property->name, nr, &string); - nr++) - { - print_string (me, string, p); - } -} - -static void -print_properties (struct hw *me, - struct printer *p) -{ - const struct hw_property *property; - for (property = hw_find_property (me, NULL); - property != NULL; - property = hw_next_property (property)) - { - if (hw_parent (me) == NULL) - p->print (p->file, "/%s", property->name); - else - p->print (p->file, "%s/%s", hw_path (me), property->name); - if (property->original != NULL) - { - p->print (p->file, " !"); - p->print (p->file, "%s/%s", - hw_path (property->original->owner), - property->original->name); - } - else - { - switch (property->type) - { - case array_property: - { - if ((property->sizeof_array % sizeof (signed_cell)) == 0) - { - unsigned_cell *w = (unsigned_cell*) property->array; - int cell_nr; - for (cell_nr = 0; - cell_nr < (property->sizeof_array / sizeof (unsigned_cell)); - cell_nr++) - { - p->print (p->file, " 0x%lx", (unsigned long) BE2H_cell (w[cell_nr])); - } - } - else - { - unsigned8 *w = (unsigned8*)property->array; - p->print (p->file, " ["); - while ((char*)w - (char*)property->array < property->sizeof_array) { - p->print (p->file, " 0x%2x", BE2H_1 (*w)); - w++; - } - } - break; - } - case boolean_property: - { - int b = hw_find_boolean_property(me, property->name); - p->print (p->file, " %s", b ? "true" : "false"); - break; - } -#if NOT_YET - case ihandle_property: - { - if (property->array != NULL) - { - device_instance *instance = hw_find_ihandle_property (me, property->name); - p->print (p->file, " *%s", device_instance_path(instance)); - } - else - { - /* not yet initialized, ask the device for the path */ - ihandle_runtime_property_spec spec; - hw_find_ihandle_runtime_property (me, property->name, &spec); - p->print (p->file, " *%s", spec.full_path); - } - break; - } -#endif - case integer_property: - { - unsigned_word w = hw_find_integer_property (me, property->name); - p->print (p->file, " 0x%lx", (unsigned long)w); - break; - } - case range_array_property: - { - print_ranges_property (me, property, p); - break; - } - case reg_array_property: - { - print_reg_property (me, property, p); - break; - } - case string_property: - { - const char *s = hw_find_string_property (me, property->name); - print_string (me, s, p); - break; - } - case string_array_property: - { - print_string_array_property (me, property, p); - break; - } - } - } - p->print (p->file, "\n"); - } -} - -static void -print_interrupts (struct hw *me, - int my_port, - struct hw *dest, - int dest_port, - void *data) -{ - struct printer *p = data; - char src[32]; - char dst[32]; - hw_port_encode (me, my_port, src, sizeof(src), output_port); - hw_port_encode (dest, dest_port, dst, sizeof(dst), input_port); - p->print (p->file, - "%s > %s %s %s\n", - hw_path (me), - src, dst, - hw_path (dest)); -} - -static void -print_device (struct hw *me, - void *data) -{ - struct printer *p = data; - p->print (p->file, "%s\n", hw_path (me)); - print_properties (me, p); - hw_port_traverse (me, print_interrupts, data); -} - -void -hw_tree_print (struct hw *root, - hw_tree_print_callback *print, - void *file) -{ - struct printer p; - p.print = print; - p.file = file; - hw_tree_traverse (root, - print_device, NULL, - &p); -} - - - -#if NOT_YET -device_instance * -tree_instance(struct hw *root, - const char *device_specifier) -{ - /* find the device node */ - struct hw *me; - name_specifier spec; - if (!split_device_specifier(root, device_specifier, &spec)) - return NULL; - me = split_find_device(root, &spec); - if (spec.name != NULL) - return NULL; - /* create the instance */ - return device_create_instance(me, device_specifier, spec.last_args); -} -#endif - -struct hw * -hw_tree_find_device (struct hw *root, - const char *path_to_device) -{ - struct hw *node; - name_specifier spec; - - /* parse the path */ - split_device_specifier (root, path_to_device, &spec); - if (spec.value != NULL) - return NULL; /* something wierd */ - - /* now find it */ - node = split_find_device (root, &spec); - if (spec.name != NULL) - return NULL; /* not a leaf */ - - return node; -} - - -const struct hw_property * -hw_tree_find_property (struct hw *root, - const char *path_to_property) -{ - name_specifier spec; - if (!split_property_specifier (root, path_to_property, &spec)) - hw_abort (root, "Invalid property path %s", path_to_property); - root = split_find_device (root, &spec); - if (spec.name != NULL) - return NULL; /* not a leaf */ - return hw_find_property (root, spec.property); -} - -int -hw_tree_find_boolean_property (struct hw *root, - const char *path_to_property) -{ - name_specifier spec; - if (!split_property_specifier (root, path_to_property, &spec)) - hw_abort (root, "Invalid property path %s", path_to_property); - root = split_find_device (root, &spec); - if (spec.name != NULL) - hw_abort (root, "device \"%s\" not found (property \"%s\")", - spec.name, path_to_property); - return hw_find_boolean_property (root, spec.property); -} - -signed_cell -hw_tree_find_integer_property (struct hw *root, - const char *path_to_property) -{ - name_specifier spec; - if (!split_property_specifier (root, path_to_property, &spec)) - hw_abort (root, "Invalid property path %s", path_to_property); - root = split_find_device (root, &spec); - if (spec.name != NULL) - hw_abort (root, "device \"%s\" not found (property \"%s\")", - spec.name, path_to_property); - return hw_find_integer_property (root, spec.property); -} - -#if NOT_YET -device_instance * -hw_tree_find_ihandle_property (struct hw *root, - const char *path_to_property) -{ - struct hw *root; - name_specifier spec; - if (!split_property_specifier (root, path_to_property, &spec)) - hw_abort (root, "Invalid property path %s", path_to_property); - root = split_find_device (root, &spec); - if (spec.name != NULL) - hw_abort (root, "device \"%s\" not found (property \"%s\")", - spec.name, path_to_property); - return hw_find_ihandle_property (root, spec.property); -} -#endif - -const char * -hw_tree_find_string_property (struct hw *root, - const char *path_to_property) -{ - name_specifier spec; - if (!split_property_specifier (root, path_to_property, &spec)) - hw_abort (root, "Invalid property path %s", path_to_property); - root = split_find_device (root, &spec); - if (spec.name != NULL) - hw_abort (root, "device \"%s\" not found (property \"%s\")", - spec.name, path_to_property); - return hw_find_string_property (root, spec.property); -} diff --git a/sim/common/hw-tree.h b/sim/common/hw-tree.h deleted file mode 100644 index 5428bae..0000000 --- a/sim/common/hw-tree.h +++ /dev/null @@ -1,122 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 HW_TREE -#define HW_TREE - - -struct hw *hw_tree_create -(SIM_DESC sd, - const char *device); - -void hw_tree_delete -(struct hw *root); - -struct hw *hw_tree_parse -(struct hw *root, - const char *fmt, - ...) __attribute__ ((format (printf, 2, 3))); - -struct hw *hw_tree_vparse -(struct hw *root, - const char *fmt, - va_list ap); - - -void hw_tree_finish -(struct hw *root); - -typedef void (hw_tree_print_callback) - (void *, - const char *fmt, - ...); - -void hw_tree_print -(struct hw *root, - hw_tree_print_callback *print, - void *file); - - -/* Tree traversal:: - - The entire device tree can be traversed using the - <<device_tree_traverse()>> function. The traversal can be in - either prefix or postfix order. - - */ - -typedef void (hw_tree_traverse_function) - (struct hw *device, - void *data); - -void hw_tree_traverse -(struct hw *root, - hw_tree_traverse_function *prefix, - hw_tree_traverse_function *postfix, - void *data); - - -/* Tree lookup:: - - The function <<hw_tree_find_device()>> will attempt to locate the - specified device within the tree. If the device is not found a - NULL device is returned. - - */ - -struct hw * hw_tree_find_device -(struct hw *root, - const char *path); - - -const struct hw_property *hw_tree_find_property -(struct hw *root, - const char *path_to_property); - -int hw_tree_find_boolean_property -(struct hw *root, - const char *path_to_property); - -signed_cell hw_tree_find_integer_property -(struct hw *root, - const char *path_to_property); - -#if NOT_YET -device_instance *hw_tree_find_ihandle_property -(struct hw *root, - const char *path_to_property); -#endif - -const char *hw_tree_find_string_property -(struct hw *root, - const char *path_to_property); - - -/* Perform a soft reset on the created tree. */ - -void hw_tree_reset -(struct hw *root); - - -#endif diff --git a/sim/common/nltvals.def b/sim/common/nltvals.def deleted file mode 100644 index 9139dc4..0000000 --- a/sim/common/nltvals.def +++ /dev/null @@ -1,420 +0,0 @@ -/* Newlib/libgloss macro values needed by remote target support. */ -/* This file is machine generated by gennltvals.sh. */ -#ifdef errno_defs -/* from errno.h */ -/* from sys/errno.h */ -/* begin errno target macros */ - { "E2BIG", 7 }, - { "EACCES", 13 }, - { "EADDRINUSE", 112 }, - { "EADDRNOTAVAIL", 125 }, - { "EADV", 68 }, - { "EAFNOSUPPORT", 106 }, - { "EAGAIN", 11 }, - { "EALREADY", 120 }, - { "EBADE", 50 }, - { "EBADF", 9 }, - { "EBADFD", 81 }, - { "EBADMSG", 77 }, - { "EBADR", 51 }, - { "EBADRQC", 54 }, - { "EBADSLT", 55 }, - { "EBFONT", 57 }, - { "EBUSY", 16 }, - { "ECHILD", 10 }, - { "ECHRNG", 37 }, - { "ECOMM", 70 }, - { "ECONNABORTED", 113 }, - { "ECONNREFUSED", 111 }, - { "ECONNRESET", 104 }, - { "EDEADLK", 45 }, - { "EDEADLOCK", 56 }, - { "EDESTADDRREQ", 121 }, - { "EDOM", 33 }, - { "EDOTDOT", 76 }, - { "EDQUOT", 132 }, - { "EEXIST", 17 }, - { "EFAULT", 14 }, - { "EFBIG", 27 }, - { "EHOSTDOWN", 117 }, - { "EHOSTUNREACH", 118 }, - { "EIDRM", 36 }, - { "EINPROGRESS", 119 }, - { "EINTR", 4 }, - { "EINVAL", 22 }, - { "EIO", 5 }, - { "EISCONN", 127 }, - { "EISDIR", 21 }, - { "EL2HLT", 44 }, - { "EL2NSYNC", 38 }, - { "EL3HLT", 39 }, - { "EL3RST", 40 }, - { "ELBIN", 75 }, - { "ELIBACC", 83 }, - { "ELIBBAD", 84 }, - { "ELIBEXEC", 87 }, - { "ELIBMAX", 86 }, - { "ELIBSCN", 85 }, - { "ELNRNG", 41 }, - { "ELOOP", 92 }, - { "EMFILE", 24 }, - { "EMLINK", 31 }, - { "EMSGSIZE", 122 }, - { "EMULTIHOP", 74 }, - { "ENAMETOOLONG", 91 }, - { "ENETDOWN", 115 }, - { "ENETRESET", 126 }, - { "ENETUNREACH", 114 }, - { "ENFILE", 23 }, - { "ENMFILE", 89 }, - { "ENOANO", 53 }, - { "ENOBUFS", 105 }, - { "ENOCSI", 43 }, - { "ENODATA", 61 }, - { "ENODEV", 19 }, - { "ENOENT", 2 }, - { "ENOEXEC", 8 }, - { "ENOLCK", 46 }, - { "ENOLINK", 67 }, - { "ENOMEM", 12 }, - { "ENOMSG", 35 }, - { "ENONET", 64 }, - { "ENOPKG", 65 }, - { "ENOPROTOOPT", 109 }, - { "ENOSPC", 28 }, - { "ENOSR", 63 }, - { "ENOSTR", 60 }, - { "ENOSYS", 88 }, - { "ENOTBLK", 15 }, - { "ENOTCONN", 128 }, - { "ENOTDIR", 20 }, - { "ENOTEMPTY", 90 }, - { "ENOTSOCK", 108 }, - { "ENOTSUP", 134 }, - { "ENOTTY", 25 }, - { "ENOTUNIQ", 80 }, - { "ENXIO", 6 }, - { "EOPNOTSUPP", 95 }, - { "EPERM", 1 }, - { "EPFNOSUPPORT", 96 }, - { "EPIPE", 32 }, - { "EPROCLIM", 130 }, - { "EPROTO", 71 }, - { "EPROTONOSUPPORT", 123 }, - { "EPROTOTYPE", 107 }, - { "ERANGE", 34 }, - { "EREMCHG", 82 }, - { "EREMOTE", 66 }, - { "EROFS", 30 }, - { "ESHUTDOWN", 110 }, - { "ESOCKTNOSUPPORT", 124 }, - { "ESPIPE", 29 }, - { "ESRCH", 3 }, - { "ESRMNT", 69 }, - { "ESTALE", 133 }, - { "ETIME", 62 }, - { "ETIMEDOUT", 116 }, - { "ETOOMANYREFS", 129 }, - { "ETXTBSY", 26 }, - { "EUNATCH", 42 }, - { "EUSERS", 131 }, - { "EWOULDBLOCK", 11 }, - { "EXDEV", 18 }, - { "EXFULL", 52 }, -/* end errno target macros */ -#endif -#ifdef signal_defs -/* from signal.h */ -/* from sys/signal.h */ -/* begin signal target macros */ - { "SIGABRT", 6 }, - { "SIGALRM", 14 }, - { "SIGBUS", 10 }, - { "SIGCHLD", 20 }, - { "SIGCLD", 20 }, - { "SIGCONT", 19 }, - { "SIGEMT", 7 }, - { "SIGFPE", 8 }, - { "SIGHUP", 1 }, - { "SIGILL", 4 }, - { "SIGINT", 2 }, - { "SIGIO", 23 }, - { "SIGIOT", 6 }, - { "SIGKILL", 9 }, - { "SIGLOST", 29 }, - { "SIGPIPE", 13 }, - { "SIGPOLL", 23 }, - { "SIGPROF", 27 }, - { "SIGQUIT", 3 }, - { "SIGSEGV", 11 }, - { "SIGSTOP", 17 }, - { "SIGSYS", 12 }, - { "SIGTERM", 15 }, - { "SIGTRAP", 5 }, - { "SIGTSTP", 18 }, - { "SIGTTIN", 21 }, - { "SIGTTOU", 22 }, - { "SIGURG", 16 }, - { "SIGUSR1", 30 }, - { "SIGUSR2", 31 }, - { "SIGVTALRM", 26 }, - { "SIGWINCH", 28 }, - { "SIGXCPU", 24 }, - { "SIGXFSZ", 25 }, -/* end signal target macros */ -#endif -#ifdef open_defs -/* from fcntl.h */ -/* from sys/fcntl.h */ -/* begin open target macros */ - { "O_ACCMODE", (0 | 1 | 2 ) }, - { "O_APPEND", 0x0008 }, - { "O_CREAT", 0x0200 }, - { "O_EXCL", 0x0800 }, - { "O_NOCTTY", 0x8000 }, - { "O_NONBLOCK", 0x4000 }, - { "O_RDONLY", 0 }, - { "O_RDWR", 2 }, - { "O_SYNC", 0x2000 }, - { "O_TRUNC", 0x0400 }, - { "O_WRONLY", 1 }, -/* end open target macros */ -#endif -#ifdef NL_TARGET_d10v -#ifdef sys_defs -/* from syscall.h */ -/* begin d10v sys target macros */ - { "SYS_ARG", 24 }, - { "SYS_chdir", 12 }, - { "SYS_chmod", 15 }, - { "SYS_chown", 16 }, - { "SYS_close", 6 }, - { "SYS_creat", 8 }, - { "SYS_execv", 11 }, - { "SYS_execve", 59 }, - { "SYS_exit", 1 }, - { "SYS_fork", 2 }, - { "SYS_fstat", 22 }, - { "SYS_getpid", 20 }, - { "SYS_isatty", 21 }, - { "SYS_kill", 60 }, - { "SYS_link", 9 }, - { "SYS_lseek", 19 }, - { "SYS_mknod", 14 }, - { "SYS_open", 5 }, - { "SYS_pipe", 42 }, - { "SYS_read", 3 }, - { "SYS_stat", 38 }, - { "SYS_time", 23 }, - { "SYS_unlink", 10 }, - { "SYS_utime", 201 }, - { "SYS_wait", 202 }, - { "SYS_wait4", 7 }, - { "SYS_write", 4 }, -/* end d10v sys target macros */ -#endif -#endif -#ifdef NL_TARGET_fr30 -#ifdef sys_defs -/* from syscall.h */ -/* begin fr30 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 fr30 sys target macros */ -#endif -#endif -#ifdef NL_TARGET_frv -#ifdef sys_defs -/* from syscall.h */ -/* begin frv 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_gettimeofday", 19 }, - { "SYS_kill", 9 }, - { "SYS_lseek", 6 }, - { "SYS_open", 2 }, - { "SYS_read", 4 }, - { "SYS_stat", 15 }, - { "SYS_time", 18 }, - { "SYS_times", 20 }, - { "SYS_unlink", 7 }, - { "SYS_utime", 17 }, - { "SYS_write", 5 }, -/* end frv sys target macros */ -#endif -#endif -#ifdef NL_TARGET_i960 -#ifdef sys_defs -/* from syscall.h */ -/* begin i960 sys target macros */ - { "SYS_argv", 13 }, - { "SYS_argvlen", 12 }, - { "SYS_chdir", 14 }, - { "SYS_chmod", 16 }, - { "SYS_close", 234 }, - { "SYS_exit", 257 }, - { "SYS_fstat", 10 }, - { "SYS_getpid", 8 }, - { "SYS_kill", 9 }, - { "SYS_lseek", 233 }, - { "SYS_open", 230 }, - { "SYS_read", 231 }, - { "SYS_stat", 15 }, - { "SYS_time", 18 }, - { "SYS_unlink", 7 }, - { "SYS_utime", 17 }, - { "SYS_write", 232 }, -/* end i960 sys target macros */ -#endif -#endif -#ifdef NL_TARGET_m32r -#ifdef sys_defs -/* from syscall.h */ -/* begin m32r 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 m32r sys target macros */ -#endif -#endif -#ifdef NL_TARGET_mn10200 -#ifdef sys_defs -/* from syscall.h */ -/* begin mn10200 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 mn10200 sys target macros */ -#endif -#endif -#ifdef NL_TARGET_mn10300 -#ifdef sys_defs -/* from syscall.h */ -/* begin mn10300 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 mn10300 sys target macros */ -#endif -#endif -#ifdef NL_TARGET_sparc -#ifdef sys_defs -/* from syscall.h */ -/* begin sparc 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 sparc sys target macros */ -#endif -#endif -#ifdef NL_TARGET_v850 -#ifdef sys_defs -/* from syscall.h */ -/* begin v850 sys target macros */ - { "SYS_ARG", 24 }, - { "SYS_chdir", 12 }, - { "SYS_chmod", 15 }, - { "SYS_chown", 16 }, - { "SYS_close", 6 }, - { "SYS_creat", 8 }, - { "SYS_execv", 11 }, - { "SYS_execve", 59 }, - { "SYS_exit", 1 }, - { "SYS_fork", 2 }, - { "SYS_fstat", 22 }, - { "SYS_getpid", 20 }, - { "SYS_gettimeofday", 116 }, - { "SYS_isatty", 21 }, - { "SYS_link", 9 }, - { "SYS_lseek", 19 }, - { "SYS_mknod", 14 }, - { "SYS_open", 5 }, - { "SYS_pipe", 42 }, - { "SYS_read", 3 }, - { "SYS_stat", 38 }, - { "SYS_time", 23 }, - { "SYS_unlink", 10 }, - { "SYS_utime", 201 }, - { "SYS_wait", 202 }, - { "SYS_wait4", 7 }, - { "SYS_write", 4 }, -/* end v850 sys target macros */ -#endif -#endif diff --git a/sim/common/nrun.c b/sim/common/nrun.c deleted file mode 100644 index ed1d1ea..0000000 --- a/sim/common/nrun.c +++ /dev/null @@ -1,227 +0,0 @@ -/* New version of run front end support for simulators. - Copyright (C) 1997, 2004 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. */ - -#include <signal.h> -#include "sim-main.h" - -#include "bfd.h" - -#ifdef HAVE_ENVIRON -extern char **environ; -#endif - -#ifdef HAVE_UNISTD_H -/* For chdir. */ -#include <unistd.h> -#endif - -static void usage (void); - -extern host_callback default_callback; - -static char *myname; - -static SIM_DESC sd; - -static RETSIGTYPE -cntrl_c (int sig) -{ - if (! sim_stop (sd)) - { - fprintf (stderr, "Quit!\n"); - exit (1); - } -} - -int -main (int argc, char **argv) -{ - char *name; - char **prog_argv = NULL; - struct bfd *prog_bfd; - enum sim_stop reason; - int sigrc = 0; - int single_step = 0; - RETSIGTYPE (*prev_sigint) (); - - myname = argv[0] + strlen (argv[0]); - while (myname > argv[0] && myname[-1] != '/') - --myname; - - /* INTERNAL: When MYNAME is `step', single step the simulator - instead of allowing it to run free. The sole purpose of this - HACK is to allow the sim_resume interface's step argument to be - tested without having to build/run gdb. */ - if (strlen (myname) > 4 && strcmp (myname - 4, "step") == 0) - { - single_step = 1; - } - - /* Create an instance of the simulator. */ - default_callback.init (&default_callback); - sd = sim_open (SIM_OPEN_STANDALONE, &default_callback, NULL, argv); - if (sd == 0) - exit (1); - if (STATE_MAGIC (sd) != SIM_MAGIC_NUMBER) - { - fprintf (stderr, "Internal error - bad magic number in simulator struct\n"); - abort (); - } - - /* We can't set the endianness in the callback structure until - sim_config is called, which happens in sim_open. */ - default_callback.target_endian - = (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN - ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE); - - /* Was there a program to run? */ - prog_argv = STATE_PROG_ARGV (sd); - prog_bfd = STATE_PROG_BFD (sd); - if (prog_argv == NULL || *prog_argv == NULL) - usage (); - - name = *prog_argv; - - /* For simulators that don't open prog during sim_open() */ - if (prog_bfd == NULL) - { - prog_bfd = bfd_openr (name, 0); - if (prog_bfd == NULL) - { - fprintf (stderr, "%s: can't open \"%s\": %s\n", - myname, name, bfd_errmsg (bfd_get_error ())); - exit (1); - } - if (!bfd_check_format (prog_bfd, bfd_object)) - { - fprintf (stderr, "%s: \"%s\" is not an object file: %s\n", - myname, name, bfd_errmsg (bfd_get_error ())); - exit (1); - } - } - - if (STATE_VERBOSE_P (sd)) - printf ("%s %s\n", myname, name); - - /* Load the program into the simulator. */ - if (sim_load (sd, name, prog_bfd, 0) == SIM_RC_FAIL) - exit (1); - - /* Prepare the program for execution. */ -#ifdef HAVE_ENVIRON - sim_create_inferior (sd, prog_bfd, prog_argv, environ); -#else - sim_create_inferior (sd, prog_bfd, prog_argv, NULL); -#endif - - /* To accommodate relative file paths, chdir to sysroot now. We - mustn't do this until BFD has opened the program, else we wouldn't - find the executable if it has a relative file path. */ - if (simulator_sysroot[0] != '\0' && chdir (simulator_sysroot) < 0) - { - fprintf (stderr, "%s: can't change directory to \"%s\"\n", - myname, simulator_sysroot); - exit (1); - } - - /* Run/Step the program. */ - if (single_step) - { - do - { - prev_sigint = signal (SIGINT, cntrl_c); - sim_resume (sd, 1/*step*/, 0); - signal (SIGINT, prev_sigint); - sim_stop_reason (sd, &reason, &sigrc); - - if ((reason == sim_stopped) && - (sigrc == sim_signal_to_host (sd, SIM_SIGINT))) - break; /* exit on control-C */ - } - /* remain on breakpoint or signals in oe mode*/ - while (((reason == sim_signalled) && - (sigrc == sim_signal_to_host (sd, SIM_SIGTRAP))) || - ((reason == sim_stopped) && - (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT))); - } - else - { - do - { -#if defined (HAVE_SIGACTION) && defined (SA_RESTART) - struct sigaction sa, osa; - sa.sa_handler = cntrl_c; - sigemptyset (&sa.sa_mask); - sa.sa_flags = 0; - sigaction (SIGINT, &sa, &osa); - prev_sigint = osa.sa_handler; -#else - prev_sigint = signal (SIGINT, cntrl_c); -#endif - sim_resume (sd, 0, sigrc); - signal (SIGINT, prev_sigint); - sim_stop_reason (sd, &reason, &sigrc); - - if ((reason == sim_stopped) && - (sigrc == sim_signal_to_host (sd, SIM_SIGINT))) - break; /* exit on control-C */ - - /* remain on signals in oe mode */ - } while ((reason == sim_stopped) && - (STATE_ENVIRONMENT (sd) == OPERATING_ENVIRONMENT)); - - } - /* Print any stats the simulator collected. */ - if (STATE_VERBOSE_P (sd)) - sim_info (sd, 0); - - /* Shutdown the simulator. */ - sim_close (sd, 0); - - /* If reason is sim_exited, then sigrc holds the exit code which we want - to return. If reason is sim_stopped or sim_signalled, then sigrc holds - the signal that the simulator received; we want to return that to - indicate failure. */ - - /* Why did we stop? */ - switch (reason) - { - case sim_signalled: - case sim_stopped: - if (sigrc != 0) - fprintf (stderr, "program stopped with signal %d.\n", sigrc); - break; - - case sim_exited: - break; - - default: - fprintf (stderr, "program in undefined state (%d:%d)\n", reason, sigrc); - break; - - } - - return sigrc; -} - -static void -usage () -{ - fprintf (stderr, "Usage: %s [options] program [program args]\n", myname); - fprintf (stderr, "Run `%s --help' for full list of options.\n", myname); - exit (1); -} diff --git a/sim/common/run-sim.h b/sim/common/run-sim.h deleted file mode 100644 index 3424fa5..0000000 --- a/sim/common/run-sim.h +++ /dev/null @@ -1,94 +0,0 @@ -/* This file defines the part of the interface between the standalone - simaulator program - run - and simulator library - libsim.a - that - is not used by GDB. The GDB part is described in include/remote-sim.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 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 - about them. Returns the adjusted value of argc. */ -int sim_target_parse_command_line PARAMS ((int, char **)); - - /* 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.1 b/sim/common/run.1 deleted file mode 100644 index 7de3c7a..0000000 --- a/sim/common/run.1 +++ /dev/null @@ -1,475 +0,0 @@ -.\" Copyright (c) 1993, 2004 Free Software Foundation -.\" See section COPYING for conditions for redistribution -.TH run 1 "13oct1993" "GNU Tools" "GNU Tools" -.de BP -.sp -.ti -.2i -\(** -.. - -.SH NAME -run\(em\&Simulator front-end - -.SH SYNOPSIS -.hy 0 -.na -.TP -.B run -.RB "[\|" \-v "\|]" -." .RB "[\|" \-t "\|]" -.RB "[\|" \-p -.IR freq "\|]" -.RB "[\|" \-m -.IR memory "\|]" -.RB "[\|" \--sysroot -.IR filepath "\|]" -.I program -.ad b -.hy 1 -.SH DESCRIPTION - -Use `\|\c -.BI run " program"\c -\&\|' to execute a binary by interpreting machine instructions on your -host computer. - -.B run -is the same emulator used by GDB's `\|\c -.B target sim\c -\&\|' command. You can run it directly by executing -.B run -if you just want to see your program execute, and do not need any -debugger functionality. You can also use -.B run -to generate profiling information for analysis with -.BR gprof . - -.SH OPTIONS - -.TP -.B \-v -Verbose output. Display the name of the program to run before -execution; after execution, display the number of instructions -executed, the number of machine cycles emulated, the number of -pipeline stalls, the real time taken, the emulated execution time -taken, and a summary of how much profiling information was generated. -." -." .TP -." .B \-t -." `trace', calls a sim_trace routine that does nothing. - -.TP -.BI \-p " freq" -Generate profile information (for use with -.B gprof\c -\&). -.I freq -is the profiling frequency. Write the profiling information to a file called -.BR gmon.out . - -.TP -.BI \-m " memory" -Set the memory size for the emulated machine to two to the power -.IR memory . -The default value is 19, emulating a board with 524288 bytes of memory. - -.TP -.BI \--sysroot " filepath" -Prepend -.IR filepath -to all simulator system calls that pass absolute file paths. -Change working directory to -.IR filepath -at program start. Not all simulators support this option; those -that don't, will ignore it. - -.PP - -.SH "SEE ALSO" -.RB "`\|" gprof "\|'" -entry in -.B info\c -\&; -.RB "`\|" gdb "\|'" -entry in -.B info\c -\&; -.I -Using GDB: A Guide to the GNU Source-Level Debugger\c -, Richard M. Stallman and Roland H. Pesch. - -.SH COPYING -Copyright (c) 1993, 2000 Free Software Foundation, Inc. -.PP -This document is distributed under the terms of the GNU Free -Documentation License, version 1.1. That license is described in the -sources for this manual page, but it is not displayed here in order to -make this manual more consise. Copies of this license can also be -obtained from: http://www.gnu.org/copyleft/. - -\" GNU Free Documentation License -\" Version 1.1, March 2000 - -\" Copyright (C) 2000 Free Software Foundation, Inc. -\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -\" Everyone is permitted to copy and distribute verbatim -\" copies of this license document, but changing it is -\" not allowed. -\" .PP -\" 0. PREAMBLE -\" .PP -\" The purpose of this License is to make a manual, textbook, or other -\" written document "free" in the sense of freedom: to assure everyone -\" the effective freedom to copy and redistribute it, with or without -\" modifying it, either commercially or noncommercially. Secondarily, -\" this License preserves for the author and publisher a way to get -\" credit for their work, while not being considered responsible for -\" modifications made by others. -\" .PP -\" This License is a kind of "copyleft", which means that derivative -\" works of the document must themselves be free in the same sense. It -\" complements the GNU General Public License, which is a copyleft -\" license designed for free software. -\" .PP -\" We have designed this License in order to use it for manuals for free -\" software, because free software needs free documentation: a free -\" program should come with manuals providing the same freedoms that the -\" software does. But this License is not limited to software manuals; -\" it can be used for any textual work, regardless of subject matter or -\" whether it is published as a printed book. We recommend this License -\" principally for works whose purpose is instruction or reference. -\" .PP -\" 1. APPLICABILITY AND DEFINITIONS -\" .PP -\" This License applies to any manual or other work that contains a -\" notice placed by the copyright holder saying it can be distributed -\" under the terms of this License. The "Document", below, refers to any -\" such manual or work. Any member of the public is a licensee, and is -\" addressed as "you". -\" .PP -\" A "Modified Version" of the Document means any work containing the -\" Document or a portion of it, either copied verbatim, or with -\" modifications and/or translated into another language. -\" .PP -\" A "Secondary Section" is a named appendix or a front-matter section of -\" the Document that deals exclusively with the relationship of the -\" publishers or authors of the Document to the Document's overall subject -\" (or to related matters) and contains nothing that could fall directly -\" within that overall subject. (For example, if the Document is in part a -\" textbook of mathematics, a Secondary Section may not explain any -\" mathematics.) The relationship could be a matter of historical -\" connection with the subject or with related matters, or of legal, -\" commercial, philosophical, ethical or political position regarding -\" them. -\" .PP -\" The "Invariant Sections" are certain Secondary Sections whose titles -\" are designated, as being those of Invariant Sections, in the notice -\" that says that the Document is released under this License. -\" .PP -\" The "Cover Texts" are certain short passages of text that are listed, -\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that -\" the Document is released under this License. -\" .PP -\" A "Transparent" copy of the Document means a machine-readable copy, -\" represented in a format whose specification is available to the -\" general public, whose contents can be viewed and edited directly and -\" straightforwardly with generic text editors or (for images composed of -\" pixels) generic paint programs or (for drawings) some widely available -\" drawing editor, and that is suitable for input to text formatters or -\" for automatic translation to a variety of formats suitable for input -\" to text formatters. A copy made in an otherwise Transparent file -\" format whose markup has been designed to thwart or discourage -\" subsequent modification by readers is not Transparent. A copy that is -\" not "Transparent" is called "Opaque". -\" .PP -\" Examples of suitable formats for Transparent copies include plain -\" ASCII without markup, Texinfo input format, LaTeX input format, SGML -\" or XML using a publicly available DTD, and standard-conforming simple -\" HTML designed for human modification. Opaque formats include -\" PostScript, PDF, proprietary formats that can be read and edited only -\" by proprietary word processors, SGML or XML for which the DTD and/or -\" processing tools are not generally available, and the -\" machine-generated HTML produced by some word processors for output -\" purposes only. -\" .PP -\" The "Title Page" means, for a printed book, the title page itself, -\" plus such following pages as are needed to hold, legibly, the material -\" this License requires to appear in the title page. For works in -\" formats which do not have any title page as such, "Title Page" means -\" the text near the most prominent appearance of the work's title, -\" preceding the beginning of the body of the text. -\" .PP -\" 2. VERBATIM COPYING -\" .PP -\" You may copy and distribute the Document in any medium, either -\" commercially or noncommercially, provided that this License, the -\" copyright notices, and the license notice saying this License applies -\" to the Document are reproduced in all copies, and that you add no other -\" conditions whatsoever to those of this License. You may not use -\" technical measures to obstruct or control the reading or further -\" copying of the copies you make or distribute. However, you may accept -\" compensation in exchange for copies. If you distribute a large enough -\" number of copies you must also follow the conditions in section 3. -\" .PP -\" You may also lend copies, under the same conditions stated above, and -\" you may publicly display copies. -\" .PP -\" 3. COPYING IN QUANTITY -\" .PP -\" If you publish printed copies of the Document numbering more than 100, -\" and the Document's license notice requires Cover Texts, you must enclose -\" the copies in covers that carry, clearly and legibly, all these Cover -\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on -\" the back cover. Both covers must also clearly and legibly identify -\" you as the publisher of these copies. The front cover must present -\" the full title with all words of the title equally prominent and -\" visible. You may add other material on the covers in addition. -\" Copying with changes limited to the covers, as long as they preserve -\" the title of the Document and satisfy these conditions, can be treated -\" as verbatim copying in other respects. -\" .PP -\" If the required texts for either cover are too voluminous to fit -\" legibly, you should put the first ones listed (as many as fit -\" reasonably) on the actual cover, and continue the rest onto adjacent -\" pages. -\" .PP -\" If you publish or distribute Opaque copies of the Document numbering -\" more than 100, you must either include a machine-readable Transparent -\" copy along with each Opaque copy, or state in or with each Opaque copy -\" a publicly-accessible computer-network location containing a complete -\" Transparent copy of the Document, free of added material, which the -\" general network-using public has access to download anonymously at no -\" charge using public-standard network protocols. If you use the latter -\" option, you must take reasonably prudent steps, when you begin -\" distribution of Opaque copies in quantity, to ensure that this -\" Transparent copy will remain thus accessible at the stated location -\" until at least one year after the last time you distribute an Opaque -\" copy (directly or through your agents or retailers) of that edition to -\" the public. -\" .PP -\" It is requested, but not required, that you contact the authors of the -\" Document well before redistributing any large number of copies, to give -\" them a chance to provide you with an updated version of the Document. -\" .PP -\" 4. MODIFICATIONS -\" .PP -\" You may copy and distribute a Modified Version of the Document under -\" the conditions of sections 2 and 3 above, provided that you release -\" the Modified Version under precisely this License, with the Modified -\" Version filling the role of the Document, thus licensing distribution -\" and modification of the Modified Version to whoever possesses a copy -\" of it. In addition, you must do these things in the Modified Version: -\" .PP -\" A. Use in the Title Page (and on the covers, if any) a title distinct -\" from that of the Document, and from those of previous versions -\" (which should, if there were any, be listed in the History section -\" of the Document). You may use the same title as a previous version -\" if the original publisher of that version gives permission. -\" .PP -\" B. List on the Title Page, as authors, one or more persons or entities -\" responsible for authorship of the modifications in the Modified -\" Version, together with at least five of the principal authors of the -\" Document (all of its principal authors, if it has less than five). -\" .PP -\" C. State on the Title page the name of the publisher of the -\" Modified Version, as the publisher. -\" .PP -\" D. Preserve all the copyright notices of the Document. -\" .PP -\" E. Add an appropriate copyright notice for your modifications -\" adjacent to the other copyright notices. -\" .PP -\" F. Include, immediately after the copyright notices, a license notice -\" giving the public permission to use the Modified Version under the -\" terms of this License, in the form shown in the Addendum below. -\" Preserve in that license notice the full lists of Invariant Sections -\" and required Cover Texts given in the Document's license notice. -\" .PP -\" H. Include an unaltered copy of this License. -\" .PP -\" I. Preserve the section entitled "History", and its title, and add to -\" it an item stating at least the title, year, new authors, and -\" publisher of the Modified Version as given on the Title Page. If -\" there is no section entitled "History" in the Document, create one -\" stating the title, year, authors, and publisher of the Document as -\" given on its Title Page, then add an item describing the Modified -\" Version as stated in the previous sentence. -\" .PP -\" J. Preserve the network location, if any, given in the Document for -\" public access to a Transparent copy of the Document, and likewise -\" the network locations given in the Document for previous versions -\" it was based on. These may be placed in the "History" section. -\" You may omit a network location for a work that was published at -\" least four years before the Document itself, or if the original -\" publisher of the version it refers to gives permission. -\" .PP -\" K. In any section entitled "Acknowledgements" or "Dedications", -\" preserve the section's title, and preserve in the section all the -\" substance and tone of each of the contributor acknowledgements -\" and/or dedications given therein. -\" .PP -\" L. Preserve all the Invariant Sections of the Document, -\" unaltered in their text and in their titles. Section numbers -\" or the equivalent are not considered part of the section titles. -\" .PP -\" M. Delete any section entitled "Endorsements". Such a section -\" may not be included in the Modified Version. -\" .PP -\" N. Do not retitle any existing section as "Endorsements" -\" or to conflict in title with any Invariant Section. -\" .PP -\" If the Modified Version includes new front-matter sections or -\" appendices that qualify as Secondary Sections and contain no material -\" copied from the Document, you may at your option designate some or all -\" of these sections as invariant. To do this, add their titles to the -\" list of Invariant Sections in the Modified Version's license notice. -\" These titles must be distinct from any other section titles. -\" .PP -\" You may add a section entitled "Endorsements", provided it contains -\" nothing but endorsements of your Modified Version by various -\" parties--for example, statements of peer review or that the text has -\" been approved by an organization as the authoritative definition of a -\" standard. -\" .PP -\" You may add a passage of up to five words as a Front-Cover Text, and a -\" passage of up to 25 words as a Back-Cover Text, to the end of the list -\" of Cover Texts in the Modified Version. Only one passage of -\" Front-Cover Text and one of Back-Cover Text may be added by (or -\" through arrangements made by) any one entity. If the Document already -\" includes a cover text for the same cover, previously added by you or -\" by arrangement made by the same entity you are acting on behalf of, -\" you may not add another; but you may replace the old one, on explicit -\" permission from the previous publisher that added the old one. -\" .PP -\" The author(s) and publisher(s) of the Document do not by this License -\" give permission to use their names for publicity for or to assert or -\" imply endorsement of any Modified Version. -\" .PP - -\" 5. COMBINING DOCUMENTS -\" .PP -\" You may combine the Document with other documents released under this -\" License, under the terms defined in section 4 above for modified -\" versions, provided that you include in the combination all of the -\" Invariant Sections of all of the original documents, unmodified, and -\" list them all as Invariant Sections of your combined work in its -\" license notice. -\" .PP -\" The combined work need only contain one copy of this License, and -\" multiple identical Invariant Sections may be replaced with a single -\" copy. If there are multiple Invariant Sections with the same name but -\" different contents, make the title of each such section unique by -\" adding at the end of it, in parentheses, the name of the original -\" author or publisher of that section if known, or else a unique number. -\" Make the same adjustment to the section titles in the list of -\" Invariant Sections in the license notice of the combined work. -\" .PP -\" In the combination, you must combine any sections entitled "History" -\" in the various original documents, forming one section entitled -\" "History"; likewise combine any sections entitled "Acknowledgements", -\" and any sections entitled "Dedications". You must delete all sections -\" entitled "Endorsements." -\" .PP - -\" 6. COLLECTIONS OF DOCUMENTS -\" .PP -\" You may make a collection consisting of the Document and other documents -\" released under this License, and replace the individual copies of this -\" License in the various documents with a single copy that is included in -\" the collection, provided that you follow the rules of this License for -\" verbatim copying of each of the documents in all other respects. -\" .PP -\" You may extract a single document from such a collection, and distribute -\" it individually under this License, provided you insert a copy of this -\" License into the extracted document, and follow this License in all -\" other respects regarding verbatim copying of that document. -\" .PP - -\" 7. AGGREGATION WITH INDEPENDENT WORKS -\" .PP -\" A compilation of the Document or its derivatives with other separate -\" and independent documents or works, in or on a volume of a storage or -\" distribution medium, does not as a whole count as a Modified Version -\" of the Document, provided no compilation copyright is claimed for the -\" compilation. Such a compilation is called an "aggregate", and this -\" License does not apply to the other self-contained works thus compiled -\" with the Document, on account of their being thus compiled, if they -\" are not themselves derivative works of the Document. -\" .PP -\" If the Cover Text requirement of section 3 is applicable to these -\" copies of the Document, then if the Document is less than one quarter -\" of the entire aggregate, the Document's Cover Texts may be placed on -\" covers that surround only the Document within the aggregate. -\" Otherwise they must appear on covers around the whole aggregate. -\" .PP - -\" 8. TRANSLATION -\" .PP -\" Translation is considered a kind of modification, so you may -\" distribute translations of the Document under the terms of section 4. -\" Replacing Invariant Sections with translations requires special -\" permission from their copyright holders, but you may include -\" translations of some or all Invariant Sections in addition to the -\" original versions of these Invariant Sections. You may include a -\" translation of this License provided that you also include the -\" original English version of this License. In case of a disagreement -\" between the translation and the original English version of this -\" License, the original English version will prevail. -\" .PP - -\" 9. TERMINATION -\" .PP -\" You may not copy, modify, sublicense, or distribute the Document except -\" as expressly provided for under this License. Any other attempt to -\" copy, modify, sublicense or distribute the Document is void, and will -\" automatically terminate your rights under this License. However, -\" parties who have received copies, or rights, from you under this -\" License will not have their licenses terminated so long as such -\" parties remain in full compliance. -\" .PP - -\" 10. FUTURE REVISIONS OF THIS LICENSE -\" .PP -\" The Free Software Foundation may publish new, revised versions -\" of the GNU Free Documentation License from time to time. Such new -\" versions will be similar in spirit to the present version, but may -\" differ in detail to address new problems or concerns. See -\" http://www.gnu.org/copyleft/. -\" .PP -\" Each version of the License is given a distinguishing version number. -\" If the Document specifies that a particular numbered version of this -\" License "or any later version" applies to it, you have the option of -\" following the terms and conditions either of that specified version or -\" of any later version that has been published (not as a draft) by the -\" Free Software Foundation. If the Document does not specify a version -\" number of this License, you may choose any version ever published (not -\" as a draft) by the Free Software Foundation. -\" .PP - -\" ADDENDUM: How to use this License for your documents -\" .PP -\" To use this License in a document you have written, include a copy of -\" the License in the document and put the following copyright and -\" license notices just after the title page: -\" .PP -\" Copyright (c) YEAR YOUR NAME. -\" Permission is granted to copy, distribute and/or -\" modify this document under the terms of the GNU -\" Free Documentation License, Version 1.1 or any later -\" version published by the Free Software Foundation; -\" with the Invariant Sections being LIST THEIR TITLES, -\" with the Front-Cover Texts being LIST, and with the -\" Back-Cover Texts being LIST. A copy of the license -\" is included in the section entitled "GNU Free -\" Documentation License". -\" .PP -\" If you have no Invariant Sections, write "with no Invariant Sections" -\" instead of saying which ones are invariant. If you have no -\" Front-Cover Texts, write "no Front-Cover Texts" instead of -\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. -\" .PP -\" If your document contains nontrivial examples of program code, we -\" recommend releasing these examples in parallel under your choice of -\" free software license, such as the GNU General Public License, -\" to permit their use in free software. diff --git a/sim/common/run.c b/sim/common/run.c deleted file mode 100644 index a88e404..0000000 --- a/sim/common/run.c +++ /dev/null @@ -1,332 +0,0 @@ -/* run front end support for all the simulators. - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004 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. */ - -/* Steve Chamberlain sac@cygnus.com, - and others at Cygnus. */ - -#ifdef HAVE_CONFIG_H -#include "cconfig.h" -#include "tconfig.h" -#endif - -#include <signal.h> -#include <stdio.h> -#ifdef __STDC__ -#include <stdarg.h> -#else -#include <varargs.h> -#endif - -#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 - -#include "libiberty.h" -#include "bfd.h" -#include "gdb/callback.h" -#include "gdb/remote-sim.h" -#include "ansidecl.h" -#include "run-sim.h" - -static void usage PARAMS ((void)); -extern int optind; -extern char *optarg; - -extern host_callback default_callback; - -static char *myname; - -extern int getopt (); - -#ifdef NEED_UI_LOOP_HOOK -/* Gdb foolery. This is only needed for gdb using a gui. */ -int (*deprecated_ui_loop_hook) PARAMS ((int signo)); -#endif - -static SIM_DESC sd; - -static RETSIGTYPE -cntrl_c (int sig ATTRIBUTE_UNUSED) -{ - if (! sim_stop (sd)) - { - fprintf (stderr, "Quit!\n"); - exit (1); - } -} - -int -main (ac, av) - int ac; - char **av; -{ - RETSIGTYPE (*prev_sigint) (); - bfd *abfd; - int i; - int verbose = 0; - int trace = 0; -#ifdef SIM_HAVE_ENVIRONMENT - int operating_p = 0; -#endif - char *name; - static char *no_args[4]; - char **sim_argv = &no_args[0]; - char **prog_args; - enum sim_stop reason; - int sigrc; - - myname = av[0] + strlen (av[0]); - while (myname > av[0] && myname[-1] != '/') - --myname; - - /* The first element of sim_open's argv is the program name. */ - no_args[0] = av[0]; -#ifdef SIM_HAVE_BIENDIAN - no_args[1] = "-E"; - no_args[2] = "set-later"; -#endif - - /* FIXME: This is currently being migrated into sim_open. - Simulators that use functions such as sim_size() still require - this. */ - default_callback.init (&default_callback); - sim_set_callbacks (&default_callback); - -#ifdef SIM_TARGET_SWITCHES - ac = sim_target_parse_command_line (ac, av); -#endif - - /* FIXME: This is currently being rewritten to have each simulator - do all argv processing. */ - - while ((i = getopt (ac, av, "a:c:m:op:s:tv")) != EOF) - switch (i) - { - case 'a': - /* FIXME: Temporary hack. */ - { - int len = strlen (av[0]) + strlen (optarg); - char *argbuf = (char *) alloca (len + 2 + 50); - sprintf (argbuf, "%s %s", av[0], optarg); -#ifdef SIM_HAVE_BIENDIAN - /* The desired endianness must be passed to sim_open. - The value for "set-later" is set when we know what it is. - -E support isn't yet part of the published interface. */ - strcat (argbuf, " -E set-later"); -#endif - sim_argv = buildargv (argbuf); - } - break; -#ifdef SIM_HAVE_SIMCACHE - case 'c': - sim_set_simcache_size (atoi (optarg)); - break; -#endif - case 'm': - /* FIXME: Rename to sim_set_mem_size. */ - sim_size (atoi (optarg)); - break; -#ifdef SIM_HAVE_ENVIRONMENT - case 'o': - /* Operating enironment where any signals are delivered to the - target. */ - operating_p = 1; - break; -#endif -#ifdef SIM_HAVE_PROFILE - case 'p': - sim_set_profile (atoi (optarg)); - break; - case 's': - sim_set_profile_size (atoi (optarg)); - break; -#endif - case 't': - trace = 1; - break; - case 'v': - /* Things that are printed with -v are the kinds of things that - gcc -v prints. This is not meant to include detailed tracing - or debugging information, just summaries. */ - verbose = 1; - /* sim_set_verbose (1); */ - break; - /* FIXME: Quick hack, to be replaced by more general facility. */ - default: - usage (); - } - - ac -= optind; - av += optind; - if (ac <= 0) - usage (); - - name = *av; - prog_args = av; - - if (verbose) - { - printf ("%s %s\n", myname, name); - } - - abfd = bfd_openr (name, 0); - if (!abfd) - { - fprintf (stderr, "%s: can't open %s: %s\n", - myname, name, bfd_errmsg (bfd_get_error ())); - exit (1); - } - - if (!bfd_check_format (abfd, bfd_object)) - { - fprintf (stderr, "%s: can't load %s: %s\n", - myname, name, bfd_errmsg (bfd_get_error ())); - exit (1); - } - -#ifdef SIM_HAVE_BIENDIAN - /* The endianness must be passed to sim_open because one may wish to - examine/set registers before calling sim_load [which is the other - place where one can determine endianness]. We previously passed the - endianness via global `target_byte_order' but that's not a clean - interface. */ - for (i = 1; sim_argv[i + 1] != NULL; ++i) - continue; - if (bfd_big_endian (abfd)) - sim_argv[i] = "big"; - else - sim_argv[i] = "little"; -#endif - - /* Ensure that any run-time initialisation that needs to be - performed by the simulator can occur. */ - sd = sim_open (SIM_OPEN_STANDALONE, &default_callback, abfd, sim_argv); - if (sd == 0) - exit (1); - - if (sim_load (sd, name, abfd, 0) == SIM_RC_FAIL) - exit (1); - - if (sim_create_inferior (sd, abfd, prog_args, NULL) == SIM_RC_FAIL) - exit (1); - -#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. */ - if (trace) - sim_set_trace (); - sigrc = 0; - do - { - prev_sigint = signal (SIGINT, cntrl_c); - sim_resume (sd, 0, sigrc); - signal (SIGINT, prev_sigint); - sim_stop_reason (sd, &reason, &sigrc); - } - while (operating_p && reason == sim_stopped && sigrc != SIGINT); -#else - if (trace) - { - int done = 0; - prev_sigint = signal (SIGINT, cntrl_c); - while (!done) - { - done = sim_trace (sd); - } - signal (SIGINT, prev_sigint); - sim_stop_reason (sd, &reason, &sigrc); - } - else - { - prev_sigint = signal (SIGINT, cntrl_c); - sigrc = 0; - sim_resume (sd, 0, sigrc); - signal (SIGINT, prev_sigint); - sim_stop_reason (sd, &reason, &sigrc); - } -#endif - - if (verbose) - sim_info (sd, 0); - sim_close (sd, 0); - - /* If reason is sim_exited, then sigrc holds the exit code which we want - to return. If reason is sim_stopped or sim_signalled, then sigrc holds - the signal that the simulator received; we want to return that to - indicate failure. */ - - /* Why did we stop? */ - switch (reason) - { - case sim_signalled: - case sim_stopped: - if (sigrc != 0) - 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. */ - abort (); - break; - - } - - return sigrc; -} - -static void -usage () -{ - fprintf (stderr, "Usage: %s [options] program [program args]\n", myname); - fprintf (stderr, "Options:\n"); - fprintf (stderr, "-a args Pass `args' to simulator.\n"); -#ifdef SIM_HAVE_SIMCACHE - fprintf (stderr, "-c size Set simulator cache size to `size'.\n"); -#endif - fprintf (stderr, "-m size Set memory size of simulator, in bytes.\n"); -#ifdef SIM_HAVE_ENVIRONMENT - fprintf (stderr, "-o Select operating (kernel) environment.\n"); -#endif -#ifdef SIM_HAVE_PROFILE - fprintf (stderr, "-p freq Set profiling frequency.\n"); - fprintf (stderr, "-s size Set profiling size.\n"); -#endif - fprintf (stderr, "-t Perform instruction tracing.\n"); - fprintf (stderr, " Note: Very few simulators support tracing.\n"); - fprintf (stderr, "-v Verbose output.\n"); - fprintf (stderr, "\n"); - fprintf (stderr, "program args Arguments to pass to simulated program.\n"); - fprintf (stderr, " Note: Very few simulators support this.\n"); -#ifdef SIM_TARGET_SWITCHES - fprintf (stderr, "\nTarget specific options:\n"); - sim_target_display_usage (); -#endif - exit (1); -} diff --git a/sim/common/sim-abort.c b/sim/common/sim-abort.c deleted file mode 100644 index 014f48b..0000000 --- a/sim/common/sim-abort.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Generic simulator abort. - 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. */ - -#include <stdio.h> - -#include "sim-main.h" -#include "sim-assert.h" - -/* This is an implementation of sim_engine_abort that does not use - longjmp, instead it just calls sim_io_error. sim_io_error will - jump right out of the simulator. - - It is intended as a holder for simulators that have started to use - sim-core et al. but are not yet in a position to use sim-engine - (the setjmp/longjmp code). */ - - -void -sim_engine_abort (SIM_DESC sd, - sim_cpu *cpu, - sim_cia cia, - const char *fmt, - ...) -{ - ASSERT (sd == NULL || STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - if (sd != NULL) - { - va_list ap; - va_start(ap, fmt); - sim_io_evprintf (sd, fmt, ap); - va_end(ap); - sim_io_error (sd, "\n"); - } - else - { - va_list ap; - va_start(ap, fmt); - vfprintf (stderr, fmt, ap); - va_end(ap); - fprintf (stderr, "\n"); - abort (); - } -} diff --git a/sim/common/sim-alu.h b/sim/common/sim-alu.h deleted file mode 100644 index 2bfe399..0000000 --- a/sim/common/sim-alu.h +++ /dev/null @@ -1,1049 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 _SIM_ALU_H_ -#define _SIM_ALU_H_ - -#include "symcat.h" - - -/* INTEGER ALU MODULE: - - This module provides an implementation of 2's complement arithmetic - including the recording of carry and overflow status bits. - - - EXAMPLE: - - Code using this module includes it into sim-main.h and then, as a - convention, defines macro's ALU*_END that records the result of any - arithmetic performed. Ex: - - #include "sim-alu.h" - #define ALU32_END(RES) \ - (RES) = ALU32_OVERFLOW_RESULT; \ - carry = ALU32_HAD_CARRY_BORROW; \ - overflow = ALU32_HAD_OVERFLOW - - The macro's are then used vis: - - { - ALU32_BEGIN (GPR[i]); - ALU32_ADDC (GPR[j]); - ALU32_END (GPR[k]); - } - - - NOTES: - - Macros exist for efficiently computing 8, 16, 32 and 64 bit - arithmetic - ALU8_*, ALU16_*, .... In addition, according to - TARGET_WORD_BITSIZE a set of short-hand macros are defined - ALU_* - - Initialization: - - ALU*_BEGIN(ACC): Declare initialize the ALU accumulator with ACC. - - Results: - - The calculation of the final result may be computed a number - of different ways. Three different overflow macro's are - defined, the most efficient one to use depends on which other - outputs from the alu are being used. - - ALU*_RESULT: Generic ALU result output. - - ALU*_HAD_OVERFLOW: Returns a nonzero value if signed overflow - occurred. - - ALU*_OVERFLOW_RESULT: If the macro ALU*_HAD_OVERFLOW is being - used this is the most efficient result available. Ex: - - #define ALU16_END(RES) \ - if (ALU16_HAD_OVERFLOW) \ - sim_engine_halt (...); \ - (RES) = ALU16_OVERFLOW_RESULT - - ALU*_HAD_CARRY_BORROW: Returns a nonzero value if unsigned - overflow or underflow (also referred to as carry and borrow) - occurred. - - ALU*_CARRY_BORROW_RESULT: If the macro ALU*_HAD_CARRY_BORROW is being - used this is the most efficient result available. Ex: - - #define ALU64_END(RES) \ - State.carry = ALU64_HAD_CARRY_BORROW; \ - (RES) = ALU64_CARRY_BORROW_RESULT - - - Addition: - - ALU*_ADD(VAL): Add VAL to the ALU accumulator. Record any - overflow as well as the final result. - - ALU*_ADDC(VAL): Add VAL to the ALU accumulator. Record any - carry-out or overflow as well as the final result. - - ALU*_ADDC_C(VAL,CI): Add VAL and CI (carry-in). Record any - carry-out or overflow as well as the final result. - - Subtraction: - - ALU*_SUB(VAL): Subtract VAL from the ALU accumulator. Record - any underflow as well as the final result. - - ALU*_SUBC(VAL): Subtract VAL from the ALU accumulator using - negated addition. Record any underflow or carry-out as well - as the final result. - - ALU*_SUBB(VAL): Subtract VAL from the ALU accumulator using - direct subtraction (ACC+~VAL+1). Record any underflow or - borrow-out as well as the final result. - - ALU*_SUBC_X(VAL,CI): Subtract VAL and CI (carry-in) from the - ALU accumulator using extended negated addition (ACC+~VAL+CI). - Record any underflow or carry-out as well as the final result. - - ALU*_SUBB_B(VAL,BI): Subtract VAL and BI (borrow-in) from the - ALU accumulator using direct subtraction. Record any - underflow or borrow-out as well as the final result. - - - */ - - - -/* Twos complement arithmetic - addition/subtraction - carry/borrow - (or you thought you knew the answer to 0-0) - - - - Notation and Properties: - - - Xn denotes the value X stored in N bits. - - MSBn (X): The most significant (sign) bit of X treated as an N bit - value. - - SEXTn (X): The infinite sign extension of X treated as an N bit - value. - - MAXn, MINn: The upper and lower bound of a signed, two's - complement N bit value. - - UMAXn: The upper bound of an unsigned N bit value (the lower - bound is always zero). - - Un: UMAXn + 1. Unsigned arithmetic is computed `modulo (Un)'. - - X[p]: Is bit P of X. X[0] denotes the least significant bit. - - ~X[p]: Is the inversion of bit X[p]. Also equal to 1-X[p], - (1+X[p])mod(2). - - - - Addition - Overflow - Introduction: - - - Overflow/Overflow indicates an error in computation of signed - arithmetic. i.e. given X,Y in [MINn..MAXn]; overflow - indicates that the result X+Y > MAXn or X+Y < MIN_INTx. - - Hardware traditionally implements overflow by computing the XOR of - carry-in/carry-out of the most significant bit of the ALU. Here - other methods need to be found. - - - - Addition - Overflow - method 1: - - - Overflow occurs when the sign (most significant bit) of the two N - bit operands is identical but different to the sign of the result: - - Rn = (Xn + Yn) - V = MSBn (~(Xn ^ Yn) & (Rn ^ Xn)) - - - - Addition - Overflow - method 2: - - - The two N bit operands are sign extended to M>N bits and then - added. Overflow occurs when SIGN_BIT<n> and SIGN_BIT<m> do not - match. - - Rm = (SEXTn (Xn) + SEXTn (Yn)) - V = MSBn ((Rm >> (M - N)) ^ Rm) - - - - Addition - Overflow - method 3: - - - The two N bit operands are sign extended to M>N bits and then - added. Overflow occurs when the result is outside of the sign - extended range [MINn .. MAXn]. - - - - Addition - Overflow - method 4: - - - Given the Result and Carry-out bits, the oVerflow from the addition - of X, Y and carry-In can be computed using the equation: - - Rn = (Xn + Yn) - V = (MSBn ((Xn ^ Yn) ^ Rn)) ^ C) - - As shown in the table below: - - I X Y R C | V | X^Y ^R ^C - ---------------+---+------------- - 0 0 0 0 0 | 0 | 0 0 0 - 0 0 1 1 0 | 0 | 1 0 0 - 0 1 0 1 0 | 0 | 1 0 0 - 0 1 1 0 1 | 1 | 0 0 1 - 1 0 0 1 0 | 1 | 0 1 1 - 1 0 1 0 1 | 0 | 1 1 0 - 1 1 0 0 1 | 0 | 1 1 0 - 1 1 1 1 1 | 0 | 0 1 0 - - - - Addition - Carry - Introduction: - - - Carry (poorly named) indicates that an overflow occurred for - unsigned N bit addition. i.e. given X, Y in [0..UMAXn] then - carry indicates X+Y > UMAXn or X+Y >= Un. - - The following table lists the output for all given inputs into a - full-adder. - - I X Y R | C - ------------+--- - 0 0 0 0 | 0 - 0 0 1 1 | 0 - 0 1 0 1 | 0 - 0 1 1 0 | 1 - 1 0 0 1 | 0 - 1 0 1 0 | 1 - 1 1 0 0 | 1 - 1 1 1 1 | 1 - - (carry-In, X, Y, Result, Carry-out): - - - - Addition - Carry - method 1: - - - Looking at the terms X, Y and R we want an equation for C. - - XY\R 0 1 - +------- - 00 | 0 0 - 01 | 1 0 - 11 | 1 1 - 10 | 1 0 - - This giving us the sum-of-prod equation: - - MSBn ((Xn & Yn) | (Xn & ~Rn) | (Yn & ~Rn)) - - Verifying: - - I X Y R | C | X&Y X&~R Y&~R - ------------+---+--------------- - 0 0 0 0 | 0 | 0 0 0 - 0 0 1 1 | 0 | 0 0 0 - 0 1 0 1 | 0 | 0 0 0 - 0 1 1 0 | 1 | 1 1 1 - 1 0 0 1 | 0 | 0 0 0 - 1 0 1 0 | 1 | 0 0 1 - 1 1 0 0 | 1 | 0 1 0 - 1 1 1 1 | 1 | 1 0 0 - - - - Addition - Carry - method 2: - - - Given two signed N bit numbers, a carry can be detected by treating - the numbers as N bit unsigned and adding them using M>N unsigned - arithmetic. Carry is indicated by bit (1 << N) being set (result - >= 2**N). - - - - Addition - Carry - method 3: - - - Given the oVerflow bit. The carry can be computed from: - - (~R&V) | (R&V) - - - - Addition - Carry - method 4: - - Given two signed numbers. Treating them as unsigned we have: - - 0 <= X < Un, 0 <= Y < Un - ==> X + Y < 2 Un - - Consider Y when carry occurs: - - X + Y >= Un, Y < Un - ==> (Un - X) <= Y < Un # rearrange - ==> Un <= X + Y < Un + X < 2 Un # add Xn - ==> 0 <= (X + Y) mod Un < X mod Un - - or when carry as occurred: - - (X + Y) mod Un < X mod Un - - Consider Y when carry does not occur: - - X + Y < Un - have X < Un, Y >= 0 - ==> X <= X + Y < Un - ==> X mod Un <= (X + Y) mod Un - - or when carry has not occurred: - - ! ( (X + Y) mod Un < X mod Un) - - hence we get carry by computing in N bit unsigned arithmetic. - - carry <- (Xn + Yn) < Xn - - - - Subtraction - Introduction - - - There are two different ways of computing the signed two's - complement difference of two numbers. The first is based on - negative addition, the second on direct subtraction. - - - - Subtraction - Carry - Introduction - Negated Addition - - - The equation X - Y can be computed using: - - X + (-Y) - ==> X + ~Y + 1 # -Y = ~Y + 1 - - In addition to the result, the equation produces Carry-out. For - succeeding extended precision calculations, the more general - equation can be used: - - C[p]:R[p] = X[p] + ~Y[p] + C[p-1] - where C[0]:R[0] = X[0] + ~Y[0] + 1 - - - - Subtraction - Borrow - Introduction - Direct Subtraction - - - The alternative to negative addition is direct subtraction where - `X-Y is computed directly. In addition to the result of the - calculation, a Borrow bit is produced. In general terms: - - B[p]:R[p] = X[p] - Y[p] - B[p-1] - where B[0]:R[0] = X[0] - Y[0] - - The Borrow bit is the complement of the Carry bit produced by - Negated Addition above. A dodgy proof follows: - - Case 0: - C[0]:R[0] = X[0] + ~Y[0] + 1 - ==> C[0]:R[0] = X[0] + 1 - Y[0] + 1 # ~Y[0] = (1 - Y[0])? - ==> C[0]:R[0] = 2 + X[0] - Y[0] - ==> C[0]:R[0] = 2 + B[0]:R[0] - ==> C[0]:R[0] = (1 + B[0]):R[0] - ==> C[0] = ~B[0] # (1 + B[0]) mod 2 = ~B[0]? - - Case P: - C[p]:R[p] = X[p] + ~Y[p] + C[p-1] - ==> C[p]:R[p] = X[p] + 1 - Y[0] + 1 - B[p-1] - ==> C[p]:R[p] = 2 + X[p] - Y[0] - B[p-1] - ==> C[p]:R[p] = 2 + B[p]:R[p] - ==> C[p]:R[p] = (1 + B[p]):R[p] - ==> C[p] = ~B[p] - - The table below lists all possible inputs/outputs for a - full-subtractor: - - X Y I | R B - 0 0 0 | 0 0 - 0 0 1 | 1 1 - 0 1 0 | 1 1 - 0 1 1 | 0 1 - 1 0 0 | 1 0 - 1 0 1 | 0 0 - 1 1 0 | 0 0 - 1 1 1 | 1 1 - - - - Subtraction - Method 1 - - - Treating Xn and Yn as unsigned values then a borrow (unsigned - underflow) occurs when: - - B = Xn < Yn - ==> C = Xn >= Yn - - */ - - - -/* 8 bit target expressions: - - Since the host's natural bitsize > 8 bits, carry method 2 and - overflow method 2 are used. */ - -#define ALU8_BEGIN(VAL) \ -unsigned alu8_cr = (unsigned8) (VAL); \ -signed alu8_vr = (signed8) (alu8_cr) - -#define ALU8_SET(VAL) \ -alu8_cr = (unsigned8) (VAL); \ -alu8_vr = (signed8) (alu8_cr) - -#define ALU8_SET_CARRY_BORROW(CARRY) \ -do { \ - if (CARRY) \ - alu8_cr |= ((signed)-1) << 8; \ - else \ - alu8_cr &= 0xff; \ -} while (0) - -#define ALU8_HAD_CARRY_BORROW (alu8_cr & LSBIT32(8)) -#define ALU8_HAD_OVERFLOW (((alu8_vr >> 8) ^ alu8_vr) & LSBIT32 (8-1)) - -#define ALU8_RESULT ((unsigned8) alu8_cr) -#define ALU8_CARRY_BORROW_RESULT ((unsigned8) alu8_cr) -#define ALU8_OVERFLOW_RESULT ((unsigned8) alu8_vr) - -/* #define ALU8_END ????? - target dependant */ - - - -/* 16 bit target expressions: - - Since the host's natural bitsize > 16 bits, carry method 2 and - overflow method 2 are used. */ - -#define ALU16_BEGIN(VAL) \ -signed alu16_cr = (unsigned16) (VAL); \ -unsigned alu16_vr = (signed16) (alu16_cr) - -#define ALU16_SET(VAL) \ -alu16_cr = (unsigned16) (VAL); \ -alu16_vr = (signed16) (alu16_cr) - -#define ALU16_SET_CARRY_BORROW(CARRY) \ -do { \ - if (CARRY) \ - alu16_cr |= ((signed)-1) << 16; \ - else \ - alu16_cr &= 0xffff; \ -} while (0) - -#define ALU16_HAD_CARRY_BORROW (alu16_cr & LSBIT32(16)) -#define ALU16_HAD_OVERFLOW (((alu16_vr >> 16) ^ alu16_vr) & LSBIT32 (16-1)) - -#define ALU16_RESULT ((unsigned16) alu16_cr) -#define ALU16_CARRY_BORROW_RESULT ((unsigned16) alu16_cr) -#define ALU16_OVERFLOW_RESULT ((unsigned16) alu16_vr) - -/* #define ALU16_END ????? - target dependant */ - - - -/* 32 bit target expressions: - - Since most hosts do not support 64 (> 32) bit arithmetic, carry - method 4 and overflow method 4 are used. */ - -#define ALU32_BEGIN(VAL) \ -unsigned32 alu32_r = (VAL); \ -int alu32_c = 0; \ -int alu32_v = 0 - -#define ALU32_SET(VAL) \ -alu32_r = (VAL); \ -alu32_c = 0; \ -alu32_v = 0 - -#define ALU32_SET_CARRY_BORROW(CARRY) alu32_c = (CARRY) - -#define ALU32_HAD_CARRY_BORROW (alu32_c) -#define ALU32_HAD_OVERFLOW (alu32_v) - -#define ALU32_RESULT (alu32_r) -#define ALU32_CARRY_BORROW_RESULT (alu32_r) -#define ALU32_OVERFLOW_RESULT (alu32_r) - - - -/* 64 bit target expressions: - - Even though the host typically doesn't support native 64 bit - arithmetic, it is still used. */ - -#define ALU64_BEGIN(VAL) \ -unsigned64 alu64_r = (VAL); \ -int alu64_c = 0; \ -int alu64_v = 0 - -#define ALU64_SET(VAL) \ -alu64_r = (VAL); \ -alu64_c = 0; \ -alu64_v = 0 - -#define ALU64_SET_CARRY_BORROW(CARRY) alu64_c = (CARRY) - -#define ALU64_HAD_CARRY_BORROW (alu64_c) -#define ALU64_HAD_OVERFLOW (alu64_v) - -#define ALU64_RESULT (alu64_r) -#define ALU64_CARRY_BORROW_RESULT (alu64_r) -#define ALU64_OVERFLOW_RESULT (alu64_r) - - - -/* Generic versions of above macros */ - -#define ALU_BEGIN XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_BEGIN) -#define ALU_SET XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_SET) -#define ALU_SET_CARRY XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_SET_CARRY) - -#define ALU_HAD_OVERFLOW XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_HAD_OVERFLOW) -#define ALU_HAD_CARRY XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_HAD_CARRY) - -#define ALU_RESULT XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_RESULT) -#define ALU_OVERFLOW_RESULT XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_OVERFLOW_RESULT) -#define ALU_CARRY_RESULT XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_CARRY_RESULT) - - - -/* Basic operation - add (overflowing) */ - -#define ALU8_ADD(VAL) \ -do { \ - unsigned8 alu8add_val = (VAL); \ - ALU8_ADDC (alu8add_val); \ -} while (0) - -#define ALU16_ADD(VAL) \ -do { \ - unsigned16 alu16add_val = (VAL); \ - ALU16_ADDC (alu8add_val); \ -} while (0) - -#define ALU32_ADD(VAL) \ -do { \ - unsigned32 alu32add_val = (VAL); \ - ALU32_ADDC (alu32add_val); \ -} while (0) - -#define ALU64_ADD(VAL) \ -do { \ - unsigned64 alu64add_val = (unsigned64) (VAL); \ - ALU64_ADDC (alu64add_val); \ -} while (0) - -#define ALU_ADD XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_ADD) - - - -/* Basic operation - add carrying (and overflowing) */ - -#define ALU8_ADDC(VAL) \ -do { \ - unsigned8 alu8addc_val = (VAL); \ - alu8_cr += (unsigned8)(alu8addc_val); \ - alu8_vr += (signed8)(alu8addc_val); \ -} while (0) - -#define ALU16_ADDC(VAL) \ -do { \ - unsigned16 alu16addc_val = (VAL); \ - alu16_cr += (unsigned16)(alu16addc_val); \ - alu16_vr += (signed16)(alu16addc_val); \ -} while (0) - -#define ALU32_ADDC(VAL) \ -do { \ - unsigned32 alu32addc_val = (VAL); \ - unsigned32 alu32addc_sign = alu32addc_val ^ alu32_r; \ - alu32_r += (alu32addc_val); \ - alu32_c = (alu32_r < alu32addc_val); \ - alu32_v = ((alu32addc_sign ^ - (unsigned32)alu32_c) ^ alu32_r) >> 31; \ -} while (0) - -#define ALU64_ADDC(VAL) \ -do { \ - unsigned64 alu64addc_val = (unsigned64) (VAL); \ - unsigned64 alu64addc_sign = alu64addc_val ^ alu64_r; \ - alu64_r += (alu64addc_val); \ - alu64_c = (alu64_r < alu64addc_val); \ - alu64_v = ((alu64addc_sign ^ - (unsigned64)alu64_c) ^ alu64_r) >> 63; \ -} while (0) - -#define ALU_ADDC XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_ADDC) - - - -/* Compound operation - add carrying (and overflowing) with carry-in */ - -#define ALU8_ADDC_C(VAL,C) \ -do { \ - unsigned8 alu8addcc_val = (VAL); \ - unsigned8 alu8addcc_c = (C); \ - alu8_cr += (unsigned)(unsigned8)alu8addcc_val + alu8addcc_c; \ - alu8_vr += (signed)(signed8)(alu8addcc_val) + alu8addcc_c; \ -} while (0) - -#define ALU16_ADDC_C(VAL,C) \ -do { \ - unsigned16 alu16addcc_val = (VAL); \ - unsigned16 alu16addcc_c = (C); \ - alu16_cr += (unsigned)(unsigned16)alu16addcc_val + alu16addcc_c; \ - alu16_vr += (signed)(signed16)(alu16addcc_val) + alu16addcc_c; \ -} while (0) - -#define ALU32_ADDC_C(VAL,C) \ -do { \ - unsigned32 alu32addcc_val = (VAL); \ - unsigned32 alu32addcc_c = (C); \ - unsigned32 alu32addcc_sign = (alu32addcc_val ^ alu32_r); \ - alu32_r += (alu32addcc_val + alu32addcc_c); \ - alu32_c = ((alu32_r < alu32addcc_val) \ - || (alu32addcc_c && alu32_r == alu32addcc_val)); \ - alu32_v = ((alu32addcc_sign ^ - (unsigned32)alu32_c) ^ alu32_r) >> 31;\ -} while (0) - -#define ALU64_ADDC_C(VAL,C) \ -do { \ - unsigned64 alu64addcc_val = (VAL); \ - unsigned64 alu64addcc_c = (C); \ - unsigned64 alu64addcc_sign = (alu64addcc_val ^ alu64_r); \ - alu64_r += (alu64addcc_val + alu64addcc_c); \ - alu64_c = ((alu64_r < alu64addcc_val) \ - || (alu64addcc_c && alu64_r == alu64addcc_val)); \ - alu64_v = ((alu64addcc_sign ^ - (unsigned64)alu64_c) ^ alu64_r) >> 63;\ -} while (0) - -#define ALU_ADDC_C XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_ADDC_C) - - - -/* Basic operation - subtract (overflowing) */ - -#define ALU8_SUB(VAL) \ -do { \ - unsigned8 alu8sub_val = (VAL); \ - ALU8_ADDC_C (~alu8sub_val, 1); \ -} while (0) - -#define ALU16_SUB(VAL) \ -do { \ - unsigned16 alu16sub_val = (VAL); \ - ALU16_ADDC_C (~alu16sub_val, 1); \ -} while (0) - -#define ALU32_SUB(VAL) \ -do { \ - unsigned32 alu32sub_val = (VAL); \ - ALU32_ADDC_C (~alu32sub_val, 1); \ -} while (0) - -#define ALU64_SUB(VAL) \ -do { \ - unsigned64 alu64sub_val = (VAL); \ - ALU64_ADDC_C (~alu64sub_val, 1); \ -} while (0) - -#define ALU_SUB XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_SUB) - - - -/* Basic operation - subtract carrying (and overflowing) */ - -#define ALU8_SUBC(VAL) \ -do { \ - unsigned8 alu8subc_val = (VAL); \ - ALU8_ADDC_C (~alu8subc_val, 1); \ -} while (0) - -#define ALU16_SUBC(VAL) \ -do { \ - unsigned16 alu16subc_val = (VAL); \ - ALU16_ADDC_C (~alu16subc_val, 1); \ -} while (0) - -#define ALU32_SUBC(VAL) \ -do { \ - unsigned32 alu32subc_val = (VAL); \ - ALU32_ADDC_C (~alu32subc_val, 1); \ -} while (0) - -#define ALU64_SUBC(VAL) \ -do { \ - unsigned64 alu64subc_val = (VAL); \ - ALU64_ADDC_C (~alu64subc_val, 1); \ -} while (0) - -#define ALU_SUBC XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_SUBC) - - - -/* Compound operation - subtract carrying (and overflowing), extended */ - -#define ALU8_SUBC_X(VAL,C) \ -do { \ - unsigned8 alu8subcx_val = (VAL); \ - unsigned8 alu8subcx_c = (C); \ - ALU8_ADDC_C (~alu8subcx_val, alu8subcx_c); \ -} while (0) - -#define ALU16_SUBC_X(VAL,C) \ -do { \ - unsigned16 alu16subcx_val = (VAL); \ - unsigned16 alu16subcx_c = (C); \ - ALU16_ADDC_C (~alu16subcx_val, alu16subcx_c); \ -} while (0) - -#define ALU32_SUBC_X(VAL,C) \ -do { \ - unsigned32 alu32subcx_val = (VAL); \ - unsigned32 alu32subcx_c = (C); \ - ALU32_ADDC_C (~alu32subcx_val, alu32subcx_c); \ -} while (0) - -#define ALU64_SUBC_X(VAL,C) \ -do { \ - unsigned64 alu64subcx_val = (VAL); \ - unsigned64 alu64subcx_c = (C); \ - ALU64_ADDC_C (~alu64subcx_val, alu64subcx_c); \ -} while (0) - -#define ALU_SUBC_X XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_SUBC_X) - - - -/* Basic operation - subtract borrowing (and overflowing) */ - -#define ALU8_SUBB(VAL) \ -do { \ - unsigned8 alu8subb_val = (VAL); \ - alu8_cr -= (unsigned)(unsigned8)alu8subb_val; \ - alu8_vr -= (signed)(signed8)alu8subb_val; \ -} while (0) - -#define ALU16_SUBB(VAL) \ -do { \ - unsigned16 alu16subb_val = (VAL); \ - alu16_cr -= (unsigned)(unsigned16)alu16subb_val; \ - alu16_vr -= (signed)(signed16)alu16subb_val; \ -} while (0) - -#define ALU32_SUBB(VAL) \ -do { \ - unsigned32 alu32subb_val = (VAL); \ - unsigned32 alu32subb_sign = alu32subb_val ^ alu32_r; \ - alu32_c = (alu32_r < alu32subb_val); \ - alu32_r -= (alu32subb_val); \ - alu32_v = ((alu32subb_sign ^ - (unsigned32)alu32_c) ^ alu32_r) >> 31; \ -} while (0) - -#define ALU64_SUBB(VAL) \ -do { \ - unsigned64 alu64subb_val = (VAL); \ - unsigned64 alu64subb_sign = alu64subb_val ^ alu64_r; \ - alu64_c = (alu64_r < alu64subb_val); \ - alu64_r -= (alu64subb_val); \ - alu64_v = ((alu64subb_sign ^ - (unsigned64)alu64_c) ^ alu64_r) >> 31; \ -} while (0) - -#define ALU_SUBB XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_SUBB) - - - -/* Compound operation - subtract borrowing (and overflowing) with borrow-in */ - -#define ALU8_SUBB_B(VAL,B) \ -do { \ - unsigned8 alu8subbb_val = (VAL); \ - unsigned8 alu8subbb_b = (B); \ - alu8_cr -= (unsigned)(unsigned8)alu8subbb_val; \ - alu8_cr -= (unsigned)(unsigned8)alu8subbb_b; \ - alu8_vr -= (signed)(signed8)alu8subbb_val + alu8subbb_b; \ -} while (0) - -#define ALU16_SUBB_B(VAL,B) \ -do { \ - unsigned16 alu16subbb_val = (VAL); \ - unsigned16 alu16subbb_b = (B); \ - alu16_cr -= (unsigned)(unsigned16)alu16subbb_val; \ - alu16_cr -= (unsigned)(unsigned16)alu16subbb_b; \ - alu16_vr -= (signed)(signed16)alu16subbb_val + alu16subbb_b; \ -} while (0) - -#define ALU32_SUBB_B(VAL,B) \ -do { \ - unsigned32 alu32subbb_val = (VAL); \ - unsigned32 alu32subbb_b = (B); \ - ALU32_ADDC_C (~alu32subbb_val, !alu32subbb_b); \ - alu32_c = !alu32_c; \ -} while (0) - -#define ALU64_SUBB_B(VAL,B) \ -do { \ - unsigned64 alu64subbb_val = (VAL); \ - unsigned64 alu64subbb_b = (B); \ - ALU64_ADDC_C (~alu64subbb_val, !alu64subbb_b); \ - alu64_c = !alu64_c; \ -} while (0) - -#define ALU_SUBB_B XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_SUBB_B) - - - -/* Basic operation - negate (overflowing) */ - -#define ALU8_NEG() \ -do { \ - signed alu8neg_val = (ALU8_RESULT); \ - ALU8_SET (1); \ - ALU8_ADDC (~alu8neg_val); \ -} while (0) - -#define ALU16_NEG() \ -do { \ - signed alu16neg_val = (ALU16_RESULT); \ - ALU16_SET (1); \ - ALU16_ADDC (~alu16neg_val); \ -} while (0) - -#define ALU32_NEG() \ -do { \ - unsigned32 alu32neg_val = (ALU32_RESULT); \ - ALU32_SET (1); \ - ALU32_ADDC (~alu32neg_val); \ -} while(0) - -#define ALU64_NEG() \ -do { \ - unsigned64 alu64neg_val = (ALU64_RESULT); \ - ALU64_SET (1); \ - ALU64_ADDC (~alu64neg_val); \ -} while (0) - -#define ALU_NEG XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_NEG) - - - - -/* Basic operation - negate carrying (and overflowing) */ - -#define ALU8_NEGC() \ -do { \ - signed alu8negc_val = (ALU8_RESULT); \ - ALU8_SET (1); \ - ALU8_ADDC (~alu8negc_val); \ -} while (0) - -#define ALU16_NEGC() \ -do { \ - signed alu16negc_val = (ALU16_RESULT); \ - ALU16_SET (1); \ - ALU16_ADDC (~alu16negc_val); \ -} while (0) - -#define ALU32_NEGC() \ -do { \ - unsigned32 alu32negc_val = (ALU32_RESULT); \ - ALU32_SET (1); \ - ALU32_ADDC (~alu32negc_val); \ -} while(0) - -#define ALU64_NEGC() \ -do { \ - unsigned64 alu64negc_val = (ALU64_RESULT); \ - ALU64_SET (1); \ - ALU64_ADDC (~alu64negc_val); \ -} while (0) - -#define ALU_NEGC XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_NEGC) - - - - -/* Basic operation - negate borrowing (and overflowing) */ - -#define ALU8_NEGB() \ -do { \ - signed alu8negb_val = (ALU8_RESULT); \ - ALU8_SET (0); \ - ALU8_SUBB (alu8negb_val); \ -} while (0) - -#define ALU16_NEGB() \ -do { \ - signed alu16negb_val = (ALU16_RESULT); \ - ALU16_SET (0); \ - ALU16_SUBB (alu16negb_val); \ -} while (0) - -#define ALU32_NEGB() \ -do { \ - unsigned32 alu32negb_val = (ALU32_RESULT); \ - ALU32_SET (0); \ - ALU32_SUBB (alu32negb_val); \ -} while(0) - -#define ALU64_NEGB() \ -do { \ - unsigned64 alu64negb_val = (ALU64_RESULT); \ - ALU64_SET (0); \ - ALU64_SUBB (alu64negb_val); \ -} while (0) - -#define ALU_NEGB XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_NEGB) - - - - -/* Other */ - -#define ALU8_OR(VAL) \ -do { \ - error("ALU16_OR"); \ -} while (0) - -#define ALU16_OR(VAL) \ -do { \ - error("ALU16_OR"); \ -} while (0) - -#define ALU32_OR(VAL) \ -do { \ - alu32_r |= (VAL); \ - alu32_c = 0; \ - alu32_v = 0; \ -} while (0) - -#define ALU64_OR(VAL) \ -do { \ - alu64_r |= (VAL); \ - alu64_c = 0; \ - alu64_v = 0; \ -} while (0) - -#define ALU_OR(VAL) XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_OR)(VAL) - - - -#define ALU16_XOR(VAL) \ -do { \ - error("ALU16_XOR"); \ -} while (0) - -#define ALU32_XOR(VAL) \ -do { \ - alu32_r ^= (VAL); \ - alu32_c = 0; \ - alu32_v = 0; \ -} while (0) - -#define ALU64_XOR(VAL) \ -do { \ - alu64_r ^= (VAL); \ - alu64_c = 0; \ - alu64_v = 0; \ -} while (0) - -#define ALU_XOR(VAL) XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_XOR)(VAL) - - - - -#define ALU16_AND(VAL) \ -do { \ - error("ALU_AND16"); \ -} while (0) - -#define ALU32_AND(VAL) \ -do { \ - alu32_r &= (VAL); \ - alu32_r = 0; \ - alu32_v = 0; \ -} while (0) - -#define ALU64_AND(VAL) \ -do { \ - alu64_r &= (VAL); \ - alu64_r = 0; \ - alu64_v = 0; \ -} while (0) - -#define ALU_AND(VAL) XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_AND)(VAL) - - - - -#define ALU16_NOT(VAL) \ -do { \ - error("ALU_NOT16"); \ -} while (0) - -#define ALU32_NOT \ -do { \ - alu32_r = ~alu32_r; \ - alu32_c = 0; \ - alu32_v = 0; \ -} while (0) - -#define ALU64_NOT \ -do { \ - alu64_r = ~alu64_r; \ - alu64_c = 0; \ - alu64_v = 0; \ -} while (0) - -#define ALU_NOT XCONCAT3(ALU,WITH_TARGET_WORD_BITSIZE,_NOT) - -#endif diff --git a/sim/common/sim-arange.c b/sim/common/sim-arange.c deleted file mode 100644 index fc08113..0000000 --- a/sim/common/sim-arange.c +++ /dev/null @@ -1,305 +0,0 @@ -/* Address ranges. - Copyright (C) 1998 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. */ - -/* Tell sim-arange.h it's us. */ -#define SIM_ARANGE_C - -#include "libiberty.h" -#include "sim-basics.h" -#include "sim-assert.h" - -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H -#include <string.h> -#endif - -#define DEFINE_INLINE_P (! defined (SIM_ARANGE_C_INCLUDED)) -#define DEFINE_NON_INLINE_P defined (SIM_ARANGE_C_INCLUDED) - -#if DEFINE_NON_INLINE_P - -/* Insert a range. */ - -static void -insert_range (ADDR_SUBRANGE **pos, ADDR_SUBRANGE *asr) -{ - asr->next = *pos; - *pos = asr; -} - -/* Delete a range. */ - -static void -delete_range (ADDR_SUBRANGE **thisasrp) -{ - ADDR_SUBRANGE *thisasr; - - thisasr = *thisasrp; - *thisasrp = thisasr->next; - - free (thisasr); -} - -/* Add or delete an address range. - This code was borrowed from linux's locks.c:posix_lock_file(). - ??? Todo: Given our simpler needs this could be simplified - (split into two fns). */ - -static void -frob_range (ADDR_RANGE *ar, address_word start, address_word end, int delete_p) -{ - ADDR_SUBRANGE *asr; - ADDR_SUBRANGE *new_asr, *new_asr2; - ADDR_SUBRANGE *left = NULL; - ADDR_SUBRANGE *right = NULL; - ADDR_SUBRANGE **before; - ADDR_SUBRANGE init_caller; - ADDR_SUBRANGE *caller = &init_caller; - int added_p = 0; - - memset (caller, 0, sizeof (ADDR_SUBRANGE)); - new_asr = ZALLOC (ADDR_SUBRANGE); - new_asr2 = ZALLOC (ADDR_SUBRANGE); - - caller->start = start; - caller->end = end; - before = &ar->ranges; - - while ((asr = *before) != NULL) - { - if (! delete_p) - { - /* Try next range if current range preceeds new one and not - adjacent or overlapping. */ - if (asr->end < caller->start - 1) - goto next_range; - - /* Break out if new range preceeds current one and not - adjacent or overlapping. */ - if (asr->start > caller->end + 1) - break; - - /* If we come here, the new and current ranges are adjacent or - overlapping. Make one range yielding from the lower start address - of both ranges to the higher end address. */ - if (asr->start > caller->start) - asr->start = caller->start; - else - caller->start = asr->start; - if (asr->end < caller->end) - asr->end = caller->end; - else - caller->end = asr->end; - - if (added_p) - { - delete_range (before); - continue; - } - caller = asr; - added_p = 1; - } - else /* deleting a range */ - { - /* Try next range if current range preceeds new one. */ - if (asr->end < caller->start) - goto next_range; - - /* Break out if new range preceeds current one. */ - if (asr->start > caller->end) - break; - - added_p = 1; - - if (asr->start < caller->start) - left = asr; - - /* If the next range in the list has a higher end - address than the new one, insert the new one here. */ - if (asr->end > caller->end) - { - right = asr; - break; - } - if (asr->start >= caller->start) - { - /* The new range completely replaces an old - one (This may happen several times). */ - if (added_p) - { - delete_range (before); - continue; - } - - /* Replace the old range with the new one. */ - asr->start = caller->start; - asr->end = caller->end; - caller = asr; - added_p = 1; - } - } - - /* Go on to next range. */ - next_range: - before = &asr->next; - } - - if (!added_p) - { - if (delete_p) - goto out; - new_asr->start = caller->start; - new_asr->end = caller->end; - insert_range (before, new_asr); - new_asr = NULL; - } - if (right) - { - if (left == right) - { - /* The new range breaks the old one in two pieces, - so we have to use the second new range. */ - new_asr2->start = right->start; - new_asr2->end = right->end; - left = new_asr2; - insert_range (before, left); - new_asr2 = NULL; - } - right->start = caller->end + 1; - } - if (left) - { - left->end = caller->start - 1; - } - - out: - if (new_asr) - free(new_asr); - if (new_asr2) - free(new_asr2); -} - -/* Free T and all subtrees. */ - -static void -free_search_tree (ADDR_RANGE_TREE *t) -{ - if (t != NULL) - { - free_search_tree (t->lower); - free_search_tree (t->higher); - free (t); - } -} - -/* Subroutine of build_search_tree to recursively build a balanced tree. - ??? It's not an optimum tree though. */ - -static ADDR_RANGE_TREE * -build_tree_1 (ADDR_SUBRANGE **asrtab, unsigned int n) -{ - unsigned int mid = n / 2; - ADDR_RANGE_TREE *t; - - if (n == 0) - return NULL; - t = (ADDR_RANGE_TREE *) xmalloc (sizeof (ADDR_RANGE_TREE)); - t->start = asrtab[mid]->start; - t->end = asrtab[mid]->end; - if (mid != 0) - t->lower = build_tree_1 (asrtab, mid); - else - t->lower = NULL; - if (n > mid + 1) - t->higher = build_tree_1 (asrtab + mid + 1, n - mid - 1); - else - t->higher = NULL; - return t; -} - -/* Build a search tree for address range AR. */ - -static void -build_search_tree (ADDR_RANGE *ar) -{ - /* ??? Simple version for now. */ - ADDR_SUBRANGE *asr,**asrtab; - unsigned int i, n; - - for (n = 0, asr = ar->ranges; asr != NULL; ++n, asr = asr->next) - continue; - asrtab = (ADDR_SUBRANGE **) xmalloc (n * sizeof (ADDR_SUBRANGE *)); - for (i = 0, asr = ar->ranges; i < n; ++i, asr = asr->next) - asrtab[i] = asr; - ar->range_tree = build_tree_1 (asrtab, n); - free (asrtab); -} - -void -sim_addr_range_add (ADDR_RANGE *ar, address_word start, address_word end) -{ - frob_range (ar, start, end, 0); - - /* Rebuild the search tree. */ - /* ??? Instead of rebuilding it here it could be done in a module resume - handler, say by first checking for a `changed' flag, assuming of course - this would never be done while the simulation is running. */ - free_search_tree (ar->range_tree); - build_search_tree (ar); -} - -void -sim_addr_range_delete (ADDR_RANGE *ar, address_word start, address_word end) -{ - frob_range (ar, start, end, 1); - - /* Rebuild the search tree. */ - /* ??? Instead of rebuilding it here it could be done in a module resume - handler, say by first checking for a `changed' flag, assuming of course - this would never be done while the simulation is running. */ - free_search_tree (ar->range_tree); - build_search_tree (ar); -} - -#endif /* DEFINE_NON_INLINE_P */ - -#if DEFINE_INLINE_P - -SIM_ARANGE_INLINE int -sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr) -{ - ADDR_RANGE_TREE *t = ar->range_tree; - - while (t != NULL) - { - if (addr < t->start) - t = t->lower; - else if (addr > t->end) - t = t->higher; - else - return 1; - } - return 0; -} - -#endif /* DEFINE_INLINE_P */ diff --git a/sim/common/sim-arange.h b/sim/common/sim-arange.h deleted file mode 100644 index 10ba0f4..0000000 --- a/sim/common/sim-arange.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Address ranges. - Copyright (C) 1998 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. */ - -/* This file is meant to be included by sim-basics.h. */ - -#ifndef SIM_ARANGE_H -#define SIM_ARANGE_H - -/* A list of address ranges. */ - -typedef struct _addr_subrange { - struct _addr_subrange *next; - - /* Range of addresses to be traced is [start,end]. */ - address_word start,end; -} ADDR_SUBRANGE; - -/* For speed, searching is done on a tree. */ - -typedef struct _addr_range_tree { - struct _addr_range_tree *lower; - struct _addr_range_tree *higher; - - /* Range of addresses to be traced is [start,end]. */ - address_word start,end; -} ADDR_RANGE_TREE; - -/* The top level struct. */ - -typedef struct _addr_range { - ADDR_SUBRANGE *ranges; -#define ADDR_RANGE_RANGES(ar) ((ar)->ranges) - ADDR_RANGE_TREE *range_tree; -#define ADDR_RANGE_TREE(ar) ((ar)->range_tree) -} ADDR_RANGE; - -/* Add address range START,END to AR. */ -extern void sim_addr_range_add (ADDR_RANGE * /*ar*/, - address_word /*start*/, - address_word /*end*/); - -/* Delete address range START,END from AR. */ -extern void sim_addr_range_delete (ADDR_RANGE * /*ar*/, - address_word /*start*/, - address_word /*end*/); - -/* Return non-zero if ADDR is in range AR, traversing the entire tree. - If no range is specified, that is defined to mean "everything". */ -extern INLINE int -sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/); -#define ADDR_RANGE_HIT_P(ar, addr) \ - ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr))) - -#ifdef HAVE_INLINE -#ifdef SIM_ARANGE_C -#define SIM_ARANGE_INLINE INLINE -#else -#define SIM_ARANGE_INLINE EXTERN_INLINE -#endif -#include "sim-arange.c" -#else -#define SIM_ARANGE_INLINE -#endif -#define SIM_ARANGE_C_INCLUDED - -#endif /* SIM_ARANGE_H */ diff --git a/sim/common/sim-assert.h b/sim/common/sim-assert.h deleted file mode 100644 index 0274084..0000000 --- a/sim/common/sim-assert.h +++ /dev/null @@ -1,90 +0,0 @@ -/* This file is part of the program GDB. - - Copyright (C) 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. - - */ - - -#ifndef _SIM_ASSERT_H_ -#define _SIM_ASSERT_H_ - -#define SIM_FILTER_PATH(FILE, PATH) \ -do \ - { \ - /* strip leading path */ \ - const char *p = (PATH); \ - (FILE) = p; \ - while (*p != '\0' && *p != ':') \ - { \ - if (*p == '/') \ - (FILE) = p + 1; \ - p++; \ - } \ - } \ -while (0) - -/* The subtle difference between SIM_ASSERT and ASSERT is that - SIM_ASSERT passes `sd' to sim_io_error for the SIM_DESC, - ASSERT passes NULL. */ - -#if !defined (SIM_ASSERT) -#if defined (WITH_ASSERT) -#define SIM_ASSERT(EXPRESSION) \ -do \ - { \ - if (WITH_ASSERT) \ - { \ - if (!(EXPRESSION)) \ - { \ - /* report the failure */ \ - const char *file; \ - SIM_FILTER_PATH(file, __FILE__); \ - sim_io_error (sd, "%s:%d: assertion failed - %s", \ - file, __LINE__, #EXPRESSION); \ - } \ - } \ - } \ -while (0) -#else -#define SIM_ASSERT(EXPRESSION) do { /*nothing*/; } while (0) -#endif -#endif - -#if !defined (ASSERT) -#if defined (WITH_ASSERT) -#define ASSERT(EXPRESSION) \ -do \ - { \ - if (WITH_ASSERT) \ - { \ - if (!(EXPRESSION)) \ - { \ - /* report the failure */ \ - const char *file; \ - SIM_FILTER_PATH(file, __FILE__); \ - sim_io_error (NULL, "%s:%d: assertion failed - %s", \ - file, __LINE__, #EXPRESSION); \ - } \ - } \ - } \ -while (0) -#else -#define ASSERT(EXPRESSION) do { /*nothing*/; } while (0) -#endif -#endif - -#endif diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h deleted file mode 100644 index fde9847..0000000 --- a/sim/common/sim-base.h +++ /dev/null @@ -1,251 +0,0 @@ -/* Simulator pseudo baseclass. - - Copyright 1997, 1998, 2003 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. */ - - -/* Simulator state pseudo baseclass. - - Each simulator is required to have the file ``sim-main.h''. That - file includes ``sim-basics.h'', defines the base type ``sim_cia'' - (the data type that contains complete current instruction address - information), include ``sim-base.h'': - - #include "sim-basics.h" - typedef address_word sim_cia; - /-* If `sim_cia' is not an integral value (e.g. a struct), define - CIA_ADDR to return the integral value. *-/ - /-* #define CIA_ADDR(cia) (...) *-/ - #include "sim-base.h" - - finally, two data types `struct _sim_cpu' and `struct sim_state' - are defined: - - struct _sim_cpu { - ... simulator specific members ... - sim_cpu_base base; - }; - - struct sim_state { - 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 - ... simulator specific members ... - sim_state_base base; - }; - - Note that `base' appears last. This makes `base.magic' appear last - in the entire struct and helps catch miscompilation errors. */ - - -#ifndef SIM_BASE_H -#define SIM_BASE_H - -/* Pre-declare certain types. */ - -/* typedef <target-dependant> sim_cia; */ -#ifndef NULL_CIA -#define NULL_CIA ((sim_cia) 0) -#endif -/* Return the current instruction address as a number. - Some targets treat the current instruction address as a struct - (e.g. for delay slot handling). */ -#ifndef CIA_ADDR -#define CIA_ADDR(cia) (cia) -#endif -#ifndef INVALID_INSTRUCTION_ADDRESS -#define INVALID_INSTRUCTION_ADDRESS ((address_word)0 - 1) -#endif - -typedef struct _sim_cpu sim_cpu; - -#include "sim-module.h" - -#include "sim-trace.h" -#include "sim-core.h" -#include "sim-events.h" -#include "sim-profile.h" -#ifdef SIM_HAVE_MODEL -#include "sim-model.h" -#endif -#include "sim-io.h" -#include "sim-engine.h" -#include "sim-watch.h" -#include "sim-memopt.h" -#include "sim-cpu.h" - -/* Global pointer to current state while sim_resume is running. - On a machine with lots of registers, it might be possible to reserve - one of them for current_state. However on a machine with few registers - current_state can't permanently live in one and indirecting through it - will be slower [in which case one can have sim_resume set globals from - current_state for faster access]. - If CURRENT_STATE_REG is defined, it means current_state is living in - a global register. */ - - -#ifdef CURRENT_STATE_REG -/* FIXME: wip */ -#else -extern struct sim_state *current_state; -#endif - - -/* The simulator may provide different (and faster) definition. */ -#ifndef CURRENT_STATE -#define CURRENT_STATE current_state -#endif - - -typedef struct { - - /* Simulator's argv[0]. */ - const char *my_name; -#define STATE_MY_NAME(sd) ((sd)->base.my_name) - - /* Who opened the simulator. */ - SIM_OPEN_KIND open_kind; -#define STATE_OPEN_KIND(sd) ((sd)->base.open_kind) - - /* The host callbacks. */ - struct host_callback_struct *callback; -#define STATE_CALLBACK(sd) ((sd)->base.callback) - - /* The type of simulation environment (user/operating). */ - enum sim_environment environment; -#define STATE_ENVIRONMENT(sd) ((sd)->base.environment) - -#if 0 /* FIXME: Not ready yet. */ - /* Stuff defined in sim-config.h. */ - struct sim_config config; -#define STATE_CONFIG(sd) ((sd)->base.config) -#endif - - /* List of installed module `init' handlers. */ - struct module_list *modules; -#define STATE_MODULES(sd) ((sd)->base.modules) - - /* Supported options. */ - struct option_list *options; -#define STATE_OPTIONS(sd) ((sd)->base.options) - - /* Non-zero if -v specified. */ - int verbose_p; -#define STATE_VERBOSE_P(sd) ((sd)->base.verbose_p) - - /* Non cpu-specific trace data. See sim-trace.h. */ - TRACE_DATA trace_data; -#define STATE_TRACE_DATA(sd) (& (sd)->base.trace_data) - - /* If non NULL, the BFD architecture specified on the command line */ - const struct bfd_arch_info *architecture; -#define STATE_ARCHITECTURE(sd) ((sd)->base.architecture) - - /* If non NULL, the bfd target specified on the command line */ - const char *target; -#define STATE_TARGET(sd) ((sd)->base.target) - - /* In standalone simulator, this is the program's arguments passed - on the command line. */ - char **prog_argv; -#define STATE_PROG_ARGV(sd) ((sd)->base.prog_argv) - - /* The program's bfd. */ - struct bfd *prog_bfd; -#define STATE_PROG_BFD(sd) ((sd)->base.prog_bfd) - - /* Symbol table for prog_bfd */ - struct bfd_symbol **prog_syms; -#define STATE_PROG_SYMS(sd) ((sd)->base.prog_syms) - - /* The program's text section. */ - struct bfd_section *text_section; - /* Starting and ending text section addresses from the bfd. */ - SIM_ADDR text_start, text_end; -#define STATE_TEXT_SECTION(sd) ((sd)->base.text_section) -#define STATE_TEXT_START(sd) ((sd)->base.text_start) -#define STATE_TEXT_END(sd) ((sd)->base.text_end) - - /* Start address, set when the program is loaded from the bfd. */ - SIM_ADDR start_addr; -#define STATE_START_ADDR(sd) ((sd)->base.start_addr) - - /* Size of the simulator's cache, if any. - This is not the target's cache. It is the cache the simulator uses - to process instructions. */ - unsigned int scache_size; -#define STATE_SCACHE_SIZE(sd) ((sd)->base.scache_size) - - /* FIXME: Move to top level sim_state struct (as some struct)? */ -#ifdef SIM_HAVE_FLATMEM - unsigned int mem_size; -#define STATE_MEM_SIZE(sd) ((sd)->base.mem_size) - unsigned int mem_base; -#define STATE_MEM_BASE(sd) ((sd)->base.mem_base) - unsigned char *memory; -#define STATE_MEMORY(sd) ((sd)->base.memory) -#endif - - /* core memory bus */ -#define STATE_CORE(sd) (&(sd)->base.core) - sim_core core; - - /* Record of memory sections added via the memory-options interface. */ -#define STATE_MEMOPT(sd) ((sd)->base.memopt) - sim_memopt *memopt; - - /* event handler */ -#define STATE_EVENTS(sd) (&(sd)->base.events) - sim_events events; - - /* generic halt/resume engine */ - sim_engine engine; -#define STATE_ENGINE(sd) (&(sd)->base.engine) - - /* generic watchpoint support */ - sim_watchpoints watchpoints; -#define STATE_WATCHPOINTS(sd) (&(sd)->base.watchpoints) - -#if WITH_HW - struct sim_hw *hw; -#define STATE_HW(sd) ((sd)->base.hw) -#endif - - /* Should image loads be performed using the LMA or VMA? Older - simulators use the VMA while newer simulators prefer the LMA. */ - int load_at_lma_p; -#define STATE_LOAD_AT_LMA_P(SD) ((SD)->base.load_at_lma_p) - - /* Marker for those wanting to do sanity checks. - This should remain the last member of this struct to help catch - miscompilation errors. */ - int magic; -#define SIM_MAGIC_NUMBER 0x4242 -#define STATE_MAGIC(sd) ((sd)->base.magic) -} sim_state_base; - -/* Functions for allocating/freeing a sim_state. */ -SIM_DESC sim_state_alloc PARAMS ((SIM_OPEN_KIND kind, host_callback *callback)); -void sim_state_free PARAMS ((SIM_DESC)); - -#endif /* SIM_BASE_H */ diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h deleted file mode 100644 index b140566..0000000 --- a/sim/common/sim-basics.h +++ /dev/null @@ -1,156 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002, 2004 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 _SIM_BASICS_H_ -#define _SIM_BASICS_H_ - - -/* Basic configuration */ - -#ifdef HAVE_CONFIG_H -#include "cconfig.h" -#endif - -/* Basic host dependant mess - hopefully <stdio.h> + <stdarg.h> will - bring potential conflicts out in the open */ - -#include <stdarg.h> -#include <stdio.h> -#include <setjmp.h> - -#ifdef __CYGWIN32__ -extern int vasprintf (char **result, const char *format, va_list args); -extern int asprintf (char **result, const char *format, ...); -#endif - - -#ifndef NULL -#define NULL 0 -#endif - - - -/* Some versions of GCC include an attribute operator, define it */ - -#if !defined (__attribute__) -#if (!defined(__GNUC__) || (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)) -#define __attribute__(arg) -#endif -#endif - - -/* Global types that code manipulates */ - -typedef struct _device device; -struct hw; -struct _sim_fpu; - - -/* Generic address space (maps) and access attributes */ - -enum { - read_map = 0, - write_map = 1, - exec_map = 2, - io_map = 3, - nr_maps = 32, /* something small */ -}; - -enum { - access_invalid = 0, - access_read = 1 << read_map, - access_write = 1 << write_map, - access_exec = 1 << exec_map, - access_io = 1 << io_map, -}; - -enum { - access_read_write = (access_read | access_write), - access_read_exec = (access_read | access_exec), - access_write_exec = (access_write | access_exec), - access_read_write_exec = (access_read | access_write | access_exec), - access_read_io = (access_read | access_io), - access_write_io = (access_write | access_io), - access_read_write_io = (access_read | access_write | access_io), - access_exec_io = (access_exec | access_io), - access_read_exec_io = (access_read | access_exec | access_io), - access_write_exec_io = (access_write | access_exec | access_io), - access_read_write_exec_io = (access_read | access_write | access_exec | access_io), -}; - - -/* disposition of an object when things are reset */ - -typedef enum { - permenant_object, - temporary_object, -} object_disposition; - - -/* Memory transfer types */ - -typedef enum _transfer_type { - read_transfer, - write_transfer, -} transfer_type; - - -/* directions */ - -typedef enum { - bidirect_port, - input_port, - output_port, -} port_direction; - - - -/* Basic definitions - ordered so that nothing calls what comes after it. */ - -/* FIXME: conditionalizing tconfig.h on HAVE_CONFIG_H seems wrong. */ -#ifdef HAVE_CONFIG_H -#include "tconfig.h" -#endif - -#include "ansidecl.h" -#include "gdb/callback.h" -#include "gdb/remote-sim.h" - -#include "sim-config.h" - -#include "sim-inline.h" - -#include "sim-types.h" -#include "sim-bits.h" -#include "sim-endian.h" -#include "sim-signal.h" -#include "sim-arange.h" - -#include "sim-utils.h" - -/* Note: Only the simpler interfaces are defined here. More heavy - weight objects, such as core and events, are defined in the more - serious sim-base.h header. */ - -#endif /* _SIM_BASICS_H_ */ diff --git a/sim/common/sim-bits.c b/sim/common/sim-bits.c deleted file mode 100644 index da07ff7..0000000 --- a/sim/common/sim-bits.c +++ /dev/null @@ -1,273 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 _SIM_BITS_C_ -#define _SIM_BITS_C_ - -#include "sim-basics.h" -#include "sim-assert.h" -#include "sim-io.h" - - -INLINE_SIM_BITS\ -(unsigned_word) -LSMASKED (unsigned_word val, - int start, - int stop) -{ - /* NOTE - start, stop can wrap */ - val &= LSMASK (start, stop); - return val; -} - - -INLINE_SIM_BITS\ -(unsigned_word) -MSMASKED (unsigned_word val, - int start, - int stop) -{ - /* NOTE - start, stop can wrap */ - val &= MSMASK (start, stop); - return val; -} - - -INLINE_SIM_BITS\ -(unsigned_word) -LSEXTRACTED (unsigned_word val, - int start, - int stop) -{ - ASSERT (start >= stop); -#if (WITH_TARGET_WORD_BITSIZE == 64) - return LSEXTRACTED64 (val, start, stop); -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) - if (stop >= 32) - return 0; - else - { - if (start < 32) - val &= LSMASK (start, 0); - val >>= stop; - return val; - } -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) - if (stop >= 16) - return 0; - else - { - if (start < 16) - val &= LSMASK (start, 0); - val >>= stop; - return val; - } -#endif -} - - -INLINE_SIM_BITS\ -(unsigned_word) -MSEXTRACTED (unsigned_word val, - int start, - int stop) -{ - ASSERT (start <= stop); -#if (WITH_TARGET_WORD_BITSIZE == 64) - return MSEXTRACTED64 (val, start, stop); -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) - if (stop < 32) - return 0; - else - { - if (start >= 32) - val &= MSMASK (start, 64 - 1); - val >>= (64 - stop - 1); - return val; - } -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) - if (stop < 16) - return 0; - else - { - if (start >= 16) - val &= MSMASK (start, 64 - 1); - val >>= (64 - stop - 1); - return val; - } -#endif -} - - -INLINE_SIM_BITS\ -(unsigned_word) -LSINSERTED (unsigned_word val, - int start, - int stop) -{ - ASSERT (start >= stop); -#if (WITH_TARGET_WORD_BITSIZE == 64) - return LSINSERTED64 (val, start, stop); -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) - /* Bit numbers are 63..0, even for 32 bit targets. - On 32 bit targets we ignore 63..32 */ - if (stop >= 32) - return 0; - else - { - val <<= stop; - val &= LSMASK (start, stop); - return val; - } -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) - /* Bit numbers are 63..0, even for 16 bit targets. - On 16 bit targets we ignore 63..16 */ - if (stop >= 16) - return 0; - else - { - val <<= stop; - val &= LSMASK (start, stop); - return val; - } -#endif -} - -INLINE_SIM_BITS\ -(unsigned_word) -MSINSERTED (unsigned_word val, - int start, - int stop) -{ - ASSERT (start <= stop); -#if (WITH_TARGET_WORD_BITSIZE == 64) - return MSINSERTED64 (val, start, stop); -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) - /* Bit numbers are 0..63, even for 32 bit targets. - On 32 bit targets we ignore 0..31. */ - if (stop < 32) - return 0; - else - { - val <<= ((64 - 1) - stop); - val &= MSMASK (start, stop); - return val; - } -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) - /* Bit numbers are 0..63, even for 16 bit targets. - On 16 bit targets we ignore 0..47. */ - if (stop < 32 + 16) - return 0; - else - { - val <<= ((64 - 1) - stop); - val &= MSMASK (start, stop); - return val; - } -#endif -} - - - -INLINE_SIM_BITS\ -(unsigned_word) -LSSEXT (signed_word val, - int sign_bit) -{ - ASSERT (sign_bit < 64); -#if (WITH_TARGET_WORD_BITSIZE == 64) - return LSSEXT64 (val, sign_bit); -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) - if (sign_bit >= 32) - return val; - else { - val = LSSEXT32 (val, sign_bit); - return val; - } -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) - if (sign_bit >= 16) - return val; - else { - val = LSSEXT16 (val, sign_bit); - return val; - } -#endif -} - -INLINE_SIM_BITS\ -(unsigned_word) -MSSEXT (signed_word val, - int sign_bit) -{ - ASSERT (sign_bit < 64); -#if (WITH_TARGET_WORD_BITSIZE == 64) - return MSSEXT64 (val, sign_bit); -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) - if (sign_bit < 32) - return val; - else { - val = MSSEXT32 (val, sign_bit - 32); - return val; - } -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) - if (sign_bit < 32 + 16) - return val; - else { - val = MSSEXT16 (val, sign_bit - 32 - 16); - return val; - } -#endif -} - - - -#define N 8 -#include "sim-n-bits.h" -#undef N - -#define N 16 -#include "sim-n-bits.h" -#undef N - -#define N 32 -#include "sim-n-bits.h" -#undef N - -#define N 64 -#include "sim-n-bits.h" -#undef N - -#endif /* _SIM_BITS_C_ */ diff --git a/sim/common/sim-bits.h b/sim/common/sim-bits.h deleted file mode 100644 index 735fc0f..0000000 --- a/sim/common/sim-bits.h +++ /dev/null @@ -1,610 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 _SIM_BITS_H_ -#define _SIM_BITS_H_ - - -/* Bit manipulation routines: - - Bit numbering: The bits are numbered according to the target ISA's - convention. That being controlled by WITH_TARGET_WORD_MSB. For - the PowerPC (WITH_TARGET_WORD_MSB == 0) the numbering is 0..31 - while for the MIPS (WITH_TARGET_WORD_MSB == 31) it is 31..0. - - Size convention: Each macro is in three forms - <MACRO>32 which - operates in 32bit quantity (bits are numbered 0..31); <MACRO>64 - which operates using 64bit quantites (and bits are numbered 0..63); - and <MACRO> which operates using the bit size of the target - architecture (bits are still numbered 0..63), with 32bit - architectures ignoring the first 32bits leaving bit 32 as the most - significant. - - NB: Use EXTRACTED, MSEXTRACTED and LSEXTRACTED as a guideline for - naming. LSMASK and LSMASKED are wrong. - - BIT*(POS): `*' bit constant with just 1 bit set. - - LSBIT*(OFFSET): `*' bit constant with just 1 bit set - LS bit is - zero. - - MSBIT*(OFFSET): `*' bit constant with just 1 bit set - MS bit is - zero. - - MASK*(FIRST, LAST): `*' bit constant with bits [FIRST .. LAST] - set. The <MACRO> (no size) version permits FIRST >= LAST and - generates a wrapped bit mask vis ([0..LAST] | [FIRST..LSB]). - - LSMASK*(FIRST, LAST): Like MASK - LS bit is zero. - - MSMASK*(FIRST, LAST): Like MASK - LS bit is zero. - - MASKED*(VALUE, FIRST, LAST): Masks out all but bits [FIRST - .. LAST]. - - LSMASKED*(VALUE, FIRST, LAST): Like MASKED - LS bit is zero. - - MSMASKED*(VALUE, FIRST, LAST): Like MASKED - MS bit is zero. - - EXTRACTED*(VALUE, FIRST, LAST): Masks out bits [FIRST .. LAST] but - also right shifts the masked value so that bit LAST becomes the - least significant (right most). - - LSEXTRACTED*(VALUE, FIRST, LAST): Same as extracted - LS bit is - zero. - - MSEXTRACTED*(VALUE, FIRST, LAST): Same as extracted - MS bit is - zero. - - SHUFFLED**(VALUE, OLD, NEW): Mask then move a single bit from OLD - new NEW. - - MOVED**(VALUE, OLD_FIRST, OLD_LAST, NEW_FIRST, NEW_LAST): Moves - things around so that bits OLD_FIRST..OLD_LAST are masked then - moved to NEW_FIRST..NEW_LAST. - - INSERTED*(VALUE, FIRST, LAST): Takes VALUE and `inserts' the (LAST - - FIRST + 1) least significant bits into bit positions [ FIRST - .. LAST ]. This is almost the complement to EXTRACTED. - - IEA_MASKED(SHOULD_MASK, ADDR): Convert the address to the targets - natural size. If in 32bit mode, discard the high 32bits. - - EXTEND*(VALUE): Convert the `*' bit value to the targets natural - word size. Sign extend the value if needed. - - ALIGN_*(VALUE): Round the value upwards so that it is aligned to a - `_*' byte boundary. - - FLOOR_*(VALUE): Truncate the value so that it is aligned to a `_*' - byte boundary. - - ROT*(VALUE, NR_BITS): Return the `*' bit VALUE rotated by NR_BITS - right (positive) or left (negative). - - ROTL*(VALUE, NR_BITS): Return the `*' bit value rotated by NR_BITS - left. 0 <= NR_BITS <= `*'. - - ROTR*(VALUE, NR_BITS): Return the `*' bit value rotated by NR_BITS - right. 0 <= NR_BITS <= N. - - SEXT*(VALUE, SIGN_BIT): Treat SIGN_BIT as VALUEs sign, extend it ti - `*' bits. - - Note: Only the BIT* and MASK* macros return a constant that can be - used in variable declarations. - - */ - - -/* compute the number of bits between START and STOP */ - -#if (WITH_TARGET_WORD_MSB == 0) -#define _MAKE_WIDTH(START, STOP) (STOP - START + 1) -#else -#define _MAKE_WIDTH(START, STOP) (START - STOP + 1) -#endif - - - -/* compute the number shifts required to move a bit between LSB (MSB) - and POS */ - -#if (WITH_TARGET_WORD_MSB == 0) -#define _LSB_SHIFT(WIDTH, POS) (WIDTH - 1 - POS) -#else -#define _LSB_SHIFT(WIDTH, POS) (POS) -#endif - -#if (WITH_TARGET_WORD_MSB == 0) -#define _MSB_SHIFT(WIDTH, POS) (POS) -#else -#define _MSB_SHIFT(WIDTH, POS) (WIDTH - 1 - POS) -#endif - - -/* compute the absolute bit position given the OFFSET from the MSB(LSB) - NB: _MAKE_xxx_POS (WIDTH, _MAKE_xxx_SHIFT (WIDTH, POS)) == POS */ - -#if (WITH_TARGET_WORD_MSB == 0) -#define _MSB_POS(WIDTH, SHIFT) (SHIFT) -#else -#define _MSB_POS(WIDTH, SHIFT) (WIDTH - 1 - SHIFT) -#endif - -#if (WITH_TARGET_WORD_MSB == 0) -#define _LSB_POS(WIDTH, SHIFT) (WIDTH - 1 - SHIFT) -#else -#define _LSB_POS(WIDTH, SHIFT) (SHIFT) -#endif - - -/* convert a 64 bit position into a corresponding 32bit position. MSB - pos handles the posibility that the bit lies beyond the 32bit - boundary */ - -#if (WITH_TARGET_WORD_MSB == 0) -#define _MSB_32(START, STOP) (START <= STOP \ - ? (START < 32 ? 0 : START - 32) \ - : (STOP < 32 ? 0 : STOP - 32)) -#define _MSB_16(START, STOP) (START <= STOP \ - ? (START < 48 ? 0 : START - 48) \ - : (STOP < 48 ? 0 : STOP - 48)) -#else -#define _MSB_32(START, STOP) (START >= STOP \ - ? (START >= 32 ? 31 : START) \ - : (STOP >= 32 ? 31 : STOP)) -#define _MSB_16(START, STOP) (START >= STOP \ - ? (START >= 16 ? 15 : START) \ - : (STOP >= 16 ? 15 : STOP)) -#endif - -#if (WITH_TARGET_WORD_MSB == 0) -#define _LSB_32(START, STOP) (START <= STOP \ - ? (STOP < 32 ? 0 : STOP - 32) \ - : (START < 32 ? 0 : START - 32)) -#define _LSB_16(START, STOP) (START <= STOP \ - ? (STOP < 48 ? 0 : STOP - 48) \ - : (START < 48 ? 0 : START - 48)) -#else -#define _LSB_32(START, STOP) (START >= STOP \ - ? (STOP >= 32 ? 31 : STOP) \ - : (START >= 32 ? 31 : START)) -#define _LSB_16(START, STOP) (START >= STOP \ - ? (STOP >= 16 ? 15 : STOP) \ - : (START >= 16 ? 15 : START)) -#endif - -#if (WITH_TARGET_WORD_MSB == 0) -#define _MSB(START, STOP) (START <= STOP ? START : STOP) -#else -#define _MSB(START, STOP) (START >= STOP ? START : STOP) -#endif - -#if (WITH_TARGET_WORD_MSB == 0) -#define _LSB(START, STOP) (START <= STOP ? STOP : START) -#else -#define _LSB(START, STOP) (START >= STOP ? STOP : START) -#endif - - -/* LS/MS Bit operations */ - -#define LSBIT8(POS) ((unsigned8) 1 << (POS)) -#define LSBIT16(POS) ((unsigned16)1 << (POS)) -#define LSBIT32(POS) ((unsigned32)1 << (POS)) -#define LSBIT64(POS) ((unsigned64)1 << (POS)) - -#if (WITH_TARGET_WORD_BITSIZE == 64) -#define LSBIT(POS) LSBIT64 (POS) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) -#define LSBIT(POS) ((unsigned32)((POS) >= 32 \ - ? 0 \ - : (1 << ((POS) >= 32 ? 0 : (POS))))) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) -#define LSBIT(POS) ((unsigned16)((POS) >= 16 \ - ? 0 \ - : (1 << ((POS) >= 16 ? 0 : (POS))))) -#endif - - -#define MSBIT8(POS) ((unsigned8) 1 << ( 8 - 1 - (POS))) -#define MSBIT16(POS) ((unsigned16)1 << (16 - 1 - (POS))) -#define MSBIT32(POS) ((unsigned32)1 << (32 - 1 - (POS))) -#define MSBIT64(POS) ((unsigned64)1 << (64 - 1 - (POS))) - -#if (WITH_TARGET_WORD_BITSIZE == 64) -#define MSBIT(POS) MSBIT64 (POS) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) -#define MSBIT(POS) ((unsigned32)((POS) < 32 \ - ? 0 \ - : (1 << ((POS) < 32 ? 0 : (64 - 1) - (POS))))) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) -#define MSBIT(POS) ((unsigned16)((POS) < 48 \ - ? 0 \ - : (1 << ((POS) < 48 ? 0 : (64 - 1) - (POS))))) -#endif - - -/* Bit operations */ - -#define BIT4(POS) (1 << _LSB_SHIFT (4, (POS))) -#define BIT5(POS) (1 << _LSB_SHIFT (5, (POS))) -#define BIT10(POS) (1 << _LSB_SHIFT (10, (POS))) - -#if (WITH_TARGET_WORD_MSB == 0) -#define BIT8 MSBIT8 -#define BIT16 MSBIT16 -#define BIT32 MSBIT32 -#define BIT64 MSBIT64 -#define BIT MSBIT -#else -#define BIT8 LSBIT8 -#define BIT16 LSBIT16 -#define BIT32 LSBIT32 -#define BIT64 LSBIT64 -#define BIT LSBIT -#endif - - - -/* multi bit mask */ - -/* 111111 -> mmll11 -> mm11ll */ -#define _MASKn(WIDTH, START, STOP) (((unsigned##WIDTH)(-1) \ - >> (_MSB_SHIFT (WIDTH, START) \ - + _LSB_SHIFT (WIDTH, STOP))) \ - << _LSB_SHIFT (WIDTH, STOP)) - -#if (WITH_TARGET_WORD_MSB == 0) -#define _POS_LE(START, STOP) (START <= STOP) -#else -#define _POS_LE(START, STOP) (STOP <= START) -#endif - -#if (WITH_TARGET_WORD_BITSIZE == 64) -#define MASK(START, STOP) \ - (_POS_LE ((START), (STOP)) \ - ? _MASKn(64, \ - _MSB ((START), (STOP)), \ - _LSB ((START), (STOP)) ) \ - : (_MASKn(64, _MSB_POS (64, 0), (STOP)) \ - | _MASKn(64, (START), _LSB_POS (64, 0)))) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) -#define MASK(START, STOP) \ - (_POS_LE ((START), (STOP)) \ - ? (_POS_LE ((STOP), _MSB_POS (64, 31)) \ - ? 0 \ - : _MASKn (32, \ - _MSB_32 ((START), (STOP)), \ - _LSB_32 ((START), (STOP)))) \ - : (_MASKn (32, \ - _LSB_32 ((START), (STOP)), \ - _LSB_POS (32, 0)) \ - | (_POS_LE ((STOP), _MSB_POS (64, 31)) \ - ? 0 \ - : _MASKn (32, \ - _MSB_POS (32, 0), \ - _MSB_32 ((START), (STOP)))))) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) -#define MASK(START, STOP) \ - (_POS_LE ((START), (STOP)) \ - ? (_POS_LE ((STOP), _MSB_POS (64, 15)) \ - ? 0 \ - : _MASKn (16, \ - _MSB_16 ((START), (STOP)), \ - _LSB_16 ((START), (STOP)))) \ - : (_MASKn (16, \ - _LSB_16 ((START), (STOP)), \ - _LSB_POS (16, 0)) \ - | (_POS_LE ((STOP), _MSB_POS (64, 15)) \ - ? 0 \ - : _MASKn (16, \ - _MSB_POS (16, 0), \ - _MSB_16 ((START), (STOP)))))) -#endif -#if !defined (MASK) -#error "MASK never undefined" -#endif - - -/* Multi-bit mask on least significant bits */ - -#define _LSMASKn(WIDTH, FIRST, LAST) _MASKn (WIDTH, \ - _LSB_POS (WIDTH, FIRST), \ - _LSB_POS (WIDTH, LAST)) - -#define LSMASK8(FIRST, LAST) _LSMASKn ( 8, (FIRST), (LAST)) -#define LSMASK16(FIRST, LAST) _LSMASKn (16, (FIRST), (LAST)) -#define LSMASK32(FIRST, LAST) _LSMASKn (32, (FIRST), (LAST)) -#define LSMASK64(FIRST, LAST) _LSMASKn (64, (FIRST), (LAST)) - -#define LSMASK(FIRST, LAST) (MASK (_LSB_POS (64, FIRST), _LSB_POS (64, LAST))) - - -/* Multi-bit mask on most significant bits */ - -#define _MSMASKn(WIDTH, FIRST, LAST) _MASKn (WIDTH, \ - _MSB_POS (WIDTH, FIRST), \ - _MSB_POS (WIDTH, LAST)) - -#define MSMASK8(FIRST, LAST) _MSMASKn ( 8, (FIRST), (LAST)) -#define MSMASK16(FIRST, LAST) _MSMASKn (16, (FIRST), (LAST)) -#define MSMASK32(FIRST, LAST) _MSMASKn (32, (FIRST), (LAST)) -#define MSMASK64(FIRST, LAST) _MSMASKn (64, (FIRST), (LAST)) - -#define MSMASK(FIRST, LAST) (MASK (_MSB_POS (64, FIRST), _MSB_POS (64, LAST))) - - - -#if (WITH_TARGET_WORD_MSB == 0) -#define MASK8 MSMASK8 -#define MASK16 MSMASK16 -#define MASK32 MSMASK32 -#define MASK64 MSMASK64 -#else -#define MASK8 LSMASK8 -#define MASK16 LSMASK16 -#define MASK32 LSMASK32 -#define MASK64 LSMASK64 -#endif - - - -/* mask the required bits, leaving them in place */ - -INLINE_SIM_BITS(unsigned8) LSMASKED8 (unsigned8 word, int first, int last); -INLINE_SIM_BITS(unsigned16) LSMASKED16 (unsigned16 word, int first, int last); -INLINE_SIM_BITS(unsigned32) LSMASKED32 (unsigned32 word, int first, int last); -INLINE_SIM_BITS(unsigned64) LSMASKED64 (unsigned64 word, int first, int last); - -INLINE_SIM_BITS(unsigned_word) LSMASKED (unsigned_word word, int first, int last); - -INLINE_SIM_BITS(unsigned8) MSMASKED8 (unsigned8 word, int first, int last); -INLINE_SIM_BITS(unsigned16) MSMASKED16 (unsigned16 word, int first, int last); -INLINE_SIM_BITS(unsigned32) MSMASKED32 (unsigned32 word, int first, int last); -INLINE_SIM_BITS(unsigned64) MSMASKED64 (unsigned64 word, int first, int last); - -INLINE_SIM_BITS(unsigned_word) MSMASKED (unsigned_word word, int first, int last); - -#if (WITH_TARGET_WORD_MSB == 0) -#define MASKED8 MSMASKED8 -#define MASKED16 MSMASKED16 -#define MASKED32 MSMASKED32 -#define MASKED64 MSMASKED64 -#define MASKED MSMASKED -#else -#define MASKED8 LSMASKED8 -#define MASKED16 LSMASKED16 -#define MASKED32 LSMASKED32 -#define MASKED64 LSMASKED64 -#define MASKED LSMASKED -#endif - - - -/* extract the required bits aligning them with the lsb */ - -INLINE_SIM_BITS(unsigned8) LSEXTRACTED8 (unsigned8 val, int start, int stop); -INLINE_SIM_BITS(unsigned16) LSEXTRACTED16 (unsigned16 val, int start, int stop); -INLINE_SIM_BITS(unsigned32) LSEXTRACTED32 (unsigned32 val, int start, int stop); -INLINE_SIM_BITS(unsigned64) LSEXTRACTED64 (unsigned64 val, int start, int stop); - -INLINE_SIM_BITS(unsigned_word) LSEXTRACTED (unsigned_word val, int start, int stop); - -INLINE_SIM_BITS(unsigned8) MSEXTRACTED8 (unsigned8 val, int start, int stop); -INLINE_SIM_BITS(unsigned16) MSEXTRACTED16 (unsigned16 val, int start, int stop); -INLINE_SIM_BITS(unsigned32) MSEXTRACTED32 (unsigned32 val, int start, int stop); -INLINE_SIM_BITS(unsigned64) MSEXTRACTED64 (unsigned64 val, int start, int stop); - -INLINE_SIM_BITS(unsigned_word) MSEXTRACTED (unsigned_word val, int start, int stop); - -#if (WITH_TARGET_WORD_MSB == 0) -#define EXTRACTED8 MSEXTRACTED8 -#define EXTRACTED16 MSEXTRACTED16 -#define EXTRACTED32 MSEXTRACTED32 -#define EXTRACTED64 MSEXTRACTED64 -#define EXTRACTED MSEXTRACTED -#else -#define EXTRACTED8 LSEXTRACTED8 -#define EXTRACTED16 LSEXTRACTED16 -#define EXTRACTED32 LSEXTRACTED32 -#define EXTRACTED64 LSEXTRACTED64 -#define EXTRACTED LSEXTRACTED -#endif - - - -/* move a single bit around */ -/* NB: the wierdness (N>O?N-O:0) is to stop a warning from GCC */ -#define _SHUFFLEDn(N, WORD, OLD, NEW) \ -((OLD) < (NEW) \ - ? (((unsigned##N)(WORD) \ - >> (((NEW) > (OLD)) ? ((NEW) - (OLD)) : 0)) \ - & MASK32((NEW), (NEW))) \ - : (((unsigned##N)(WORD) \ - << (((OLD) > (NEW)) ? ((OLD) - (NEW)) : 0)) \ - & MASK32((NEW), (NEW)))) - -#define SHUFFLED32(WORD, OLD, NEW) _SHUFFLEDn (32, WORD, OLD, NEW) -#define SHUFFLED64(WORD, OLD, NEW) _SHUFFLEDn (64, WORD, OLD, NEW) - -#define SHUFFLED(WORD, OLD, NEW) _SHUFFLEDn (_word, WORD, OLD, NEW) - - -/* Insert a group of bits into a bit position */ - -INLINE_SIM_BITS(unsigned8) LSINSERTED8 (unsigned8 val, int start, int stop); -INLINE_SIM_BITS(unsigned16) LSINSERTED16 (unsigned16 val, int start, int stop); -INLINE_SIM_BITS(unsigned32) LSINSERTED32 (unsigned32 val, int start, int stop); -INLINE_SIM_BITS(unsigned64) LSINSERTED64 (unsigned64 val, int start, int stop); -INLINE_SIM_BITS(unsigned_word) LSINSERTED (unsigned_word val, int start, int stop); - -INLINE_SIM_BITS(unsigned8) MSINSERTED8 (unsigned8 val, int start, int stop); -INLINE_SIM_BITS(unsigned16) MSINSERTED16 (unsigned16 val, int start, int stop); -INLINE_SIM_BITS(unsigned32) MSINSERTED32 (unsigned32 val, int start, int stop); -INLINE_SIM_BITS(unsigned64) MSINSERTED64 (unsigned64 val, int start, int stop); -INLINE_SIM_BITS(unsigned_word) MSINSERTED (unsigned_word val, int start, int stop); - -#if (WITH_TARGET_WORD_MSB == 0) -#define INSERTED8 MSINSERTED8 -#define INSERTED16 MSINSERTED16 -#define INSERTED32 MSINSERTED32 -#define INSERTED64 MSINSERTED64 -#define INSERTED MSINSERTED -#else -#define INSERTED8 LSINSERTED8 -#define INSERTED16 LSINSERTED16 -#define INSERTED32 LSINSERTED32 -#define INSERTED64 LSINSERTED64 -#define INSERTED LSINSERTED -#endif - - - -/* MOVE bits from one loc to another (combination of extract/insert) */ - -#define MOVED8(VAL,OH,OL,NH,NL) INSERTED8 (EXTRACTED8 ((VAL), OH, OL), NH, NL) -#define MOVED16(VAL,OH,OL,NH,NL) INSERTED16(EXTRACTED16((VAL), OH, OL), NH, NL) -#define MOVED32(VAL,OH,OL,NH,NL) INSERTED32(EXTRACTED32((VAL), OH, OL), NH, NL) -#define MOVED64(VAL,OH,OL,NH,NL) INSERTED64(EXTRACTED64((VAL), OH, OL), NH, NL) -#define MOVED(VAL,OH,OL,NH,NL) INSERTED (EXTRACTED ((VAL), OH, OL), NH, NL) - - - -/* Sign extend the quantity to the targets natural word size */ - -#define EXTEND4(X) (LSSEXT ((X), 3)) -#define EXTEND5(X) (LSSEXT ((X), 4)) -#define EXTEND8(X) ((signed_word)(signed8)(X)) -#define EXTEND11(X) (LSSEXT ((X), 10)) -#define EXTEND15(X) (LSSEXT ((X), 14)) -#define EXTEND16(X) ((signed_word)(signed16)(X)) -#define EXTEND24(X) (LSSEXT ((X), 23)) -#define EXTEND32(X) ((signed_word)(signed32)(X)) -#define EXTEND64(X) ((signed_word)(signed64)(X)) - -/* depending on MODE return a 64bit or 32bit (sign extended) value */ -#if (WITH_TARGET_WORD_BITSIZE == 64) -#define EXTENDED(X) ((signed64)(signed32)(X)) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) -#define EXTENDED(X) (X) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) -#define EXTENDED(X) (X) -#endif - - -/* memory alignment macro's */ -#define _ALIGNa(A,X) (((X) + ((A) - 1)) & ~((A) - 1)) -#define _FLOORa(A,X) ((X) & ~((A) - 1)) - -#define ALIGN_8(X) _ALIGNa (8, X) -#define ALIGN_16(X) _ALIGNa (16, X) - -#define ALIGN_PAGE(X) _ALIGNa (0x1000, X) -#define FLOOR_PAGE(X) ((X) & ~(0x1000 - 1)) - - -/* bit bliting macro's */ -#define BLIT32(V, POS, BIT) \ -do { \ - if (BIT) \ - V |= BIT32 (POS); \ - else \ - V &= ~BIT32 (POS); \ -} while (0) -#define MBLIT32(V, LO, HI, VAL) \ -do { \ - (V) = (((V) & ~MASK32 ((LO), (HI))) \ - | INSERTED32 (VAL, LO, HI)); \ -} while (0) - - - -/* some rotate functions. The generic macro's ROT, ROTL, ROTR are - intentionally omited. */ - - -INLINE_SIM_BITS(unsigned8) ROT8 (unsigned8 val, int shift); -INLINE_SIM_BITS(unsigned16) ROT16 (unsigned16 val, int shift); -INLINE_SIM_BITS(unsigned32) ROT32 (unsigned32 val, int shift); -INLINE_SIM_BITS(unsigned64) ROT64 (unsigned64 val, int shift); - - -INLINE_SIM_BITS(unsigned8) ROTL8 (unsigned8 val, int shift); -INLINE_SIM_BITS(unsigned16) ROTL16 (unsigned16 val, int shift); -INLINE_SIM_BITS(unsigned32) ROTL32 (unsigned32 val, int shift); -INLINE_SIM_BITS(unsigned64) ROTL64 (unsigned64 val, int shift); - - -INLINE_SIM_BITS(unsigned8) ROTR8 (unsigned8 val, int shift); -INLINE_SIM_BITS(unsigned16) ROTR16 (unsigned16 val, int shift); -INLINE_SIM_BITS(unsigned32) ROTR32 (unsigned32 val, int shift); -INLINE_SIM_BITS(unsigned64) ROTR64 (unsigned64 val, int shift); - - - -/* Sign extension operations */ - -INLINE_SIM_BITS(unsigned8) LSSEXT8 (signed8 val, int sign_bit); -INLINE_SIM_BITS(unsigned16) LSSEXT16 (signed16 val, int sign_bit); -INLINE_SIM_BITS(unsigned32) LSSEXT32 (signed32 val, int sign_bit); -INLINE_SIM_BITS(unsigned64) LSSEXT64 (signed64 val, int sign_bit); -INLINE_SIM_BITS(unsigned_word) LSSEXT (signed_word val, int sign_bit); - -INLINE_SIM_BITS(unsigned8) MSSEXT8 (signed8 val, int sign_bit); -INLINE_SIM_BITS(unsigned16) MSSEXT16 (signed16 val, int sign_bit); -INLINE_SIM_BITS(unsigned32) MSSEXT32 (signed32 val, int sign_bit); -INLINE_SIM_BITS(unsigned64) MSSEXT64 (signed64 val, int sign_bit); -INLINE_SIM_BITS(unsigned_word) MSSEXT (signed_word val, int sign_bit); - -#if (WITH_TARGET_WORD_MSB == 0) -#define SEXT8 MSSEXT8 -#define SEXT16 MSSEXT16 -#define SEXT32 MSSEXT32 -#define SEXT64 MSSEXT64 -#define SEXT MSSEXT -#else -#define SEXT8 LSSEXT8 -#define SEXT16 LSSEXT16 -#define SEXT32 LSSEXT32 -#define SEXT64 LSSEXT64 -#define SEXT LSSEXT -#endif - - - -#if H_REVEALS_MODULE_P (SIM_BITS_INLINE) -#include "sim-bits.c" -#endif - -#endif /* _SIM_BITS_H_ */ diff --git a/sim/common/sim-config.c b/sim/common/sim-config.c deleted file mode 100644 index 87a38fe..0000000 --- a/sim/common/sim-config.c +++ /dev/null @@ -1,384 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "sim-main.h" -#include "sim-assert.h" -#include "bfd.h" - - -int current_host_byte_order; -int current_target_byte_order; -int current_stdio; - -enum sim_alignments current_alignment; - -#if defined (WITH_FLOATING_POINT) -int current_floating_point; -#endif - - - -/* map a byte order onto a textual string */ - -static const char * -config_byte_order_to_a (int byte_order) -{ - switch (byte_order) - { - case LITTLE_ENDIAN: - return "LITTLE_ENDIAN"; - case BIG_ENDIAN: - return "BIG_ENDIAN"; - case 0: - return "0"; - } - return "UNKNOWN"; -} - - -static const char * -config_stdio_to_a (int stdio) -{ - switch (stdio) - { - case DONT_USE_STDIO: - return "DONT_USE_STDIO"; - case DO_USE_STDIO: - return "DO_USE_STDIO"; - case 0: - return "0"; - } - return "UNKNOWN"; -} - - -static const char * -config_environment_to_a (enum sim_environment environment) -{ - switch (environment) - { - case ALL_ENVIRONMENT: - return "ALL_ENVIRONMENT"; - case USER_ENVIRONMENT: - return "USER_ENVIRONMENT"; - case VIRTUAL_ENVIRONMENT: - return "VIRTUAL_ENVIRONMENT"; - case OPERATING_ENVIRONMENT: - return "OPERATING_ENVIRONMENT"; - } - return "UNKNOWN"; -} - - -static const char * -config_alignment_to_a (enum sim_alignments alignment) -{ - switch (alignment) - { - case MIXED_ALIGNMENT: - return "MIXED_ALIGNMENT"; - case NONSTRICT_ALIGNMENT: - return "NONSTRICT_ALIGNMENT"; - case STRICT_ALIGNMENT: - return "STRICT_ALIGNMENT"; - case FORCED_ALIGNMENT: - return "FORCED_ALIGNMENT"; - } - return "UNKNOWN"; -} - - -#if defined (WITH_FLOATING_POINT) -static const char * -config_floating_point_to_a (int floating_point) -{ - switch (floating_point) - { - case SOFT_FLOATING_POINT: - return "SOFT_FLOATING_POINT"; - case HARD_FLOATING_POINT: - return "HARD_FLOATING_POINT"; - case 0: - return "0"; - } - return "UNKNOWN"; -} -#endif - -/* Set the default environment, prior to parsing argv. */ - -void -sim_config_default (SIM_DESC sd) -{ - /* Set the current environment to ALL_ENVIRONMENT to indicate none has been - selected yet. This is so that after parsing argv, we know whether the - environment was explicitly specified or not. */ - STATE_ENVIRONMENT (sd) = ALL_ENVIRONMENT; -} - -/* Complete and verify the simulation environment. */ - -SIM_RC -sim_config (SIM_DESC sd) -{ - int prefered_target_byte_order; - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - - /* extract all relevant information */ - if (STATE_PROG_BFD (sd) == NULL - /* If we have a binary input file (presumably with specified - "--architecture"), it'll have no endianness. */ - || (!bfd_little_endian (STATE_PROG_BFD (sd)) - && !bfd_big_endian (STATE_PROG_BFD (sd)))) - prefered_target_byte_order = 0; - else - prefered_target_byte_order = (bfd_little_endian(STATE_PROG_BFD (sd)) - ? LITTLE_ENDIAN - : BIG_ENDIAN); - - /* set the host byte order */ - current_host_byte_order = 1; - if (*(char*)(¤t_host_byte_order)) - current_host_byte_order = LITTLE_ENDIAN; - else - current_host_byte_order = BIG_ENDIAN; - - /* verify the host byte order */ - if (CURRENT_HOST_BYTE_ORDER != current_host_byte_order) - { - sim_io_eprintf (sd, "host (%s) and configured (%s) byte order in conflict", - config_byte_order_to_a (current_host_byte_order), - config_byte_order_to_a (CURRENT_HOST_BYTE_ORDER)); - return SIM_RC_FAIL; - } - - - /* set the target byte order */ -#if (WITH_TREE_PROPERTIES) - if (current_target_byte_order == 0) - current_target_byte_order - = (tree_find_boolean_property (root, "/options/little-endian?") - ? LITTLE_ENDIAN - : BIG_ENDIAN); -#endif - if (current_target_byte_order == 0 - && prefered_target_byte_order != 0) - current_target_byte_order = prefered_target_byte_order; - if (current_target_byte_order == 0) - current_target_byte_order = WITH_TARGET_BYTE_ORDER; - if (current_target_byte_order == 0) - current_target_byte_order = WITH_DEFAULT_TARGET_BYTE_ORDER; - - /* verify the target byte order */ - if (CURRENT_TARGET_BYTE_ORDER == 0) - { - sim_io_eprintf (sd, "Target byte order unspecified\n"); - return SIM_RC_FAIL; - } - if (CURRENT_TARGET_BYTE_ORDER != current_target_byte_order) - sim_io_eprintf (sd, "Target (%s) and configured (%s) byte order in conflict\n", - config_byte_order_to_a (current_target_byte_order), - config_byte_order_to_a (CURRENT_TARGET_BYTE_ORDER)); - if (prefered_target_byte_order != 0 - && CURRENT_TARGET_BYTE_ORDER != prefered_target_byte_order) - sim_io_eprintf (sd, "Target (%s) and specified (%s) byte order in conflict\n", - config_byte_order_to_a (CURRENT_TARGET_BYTE_ORDER), - config_byte_order_to_a (prefered_target_byte_order)); - - - /* set the stdio */ - if (current_stdio == 0) - current_stdio = WITH_STDIO; - if (current_stdio == 0) - current_stdio = DO_USE_STDIO; - - /* verify the stdio */ - if (CURRENT_STDIO == 0) - { - sim_io_eprintf (sd, "Target standard IO unspecified\n"); - return SIM_RC_FAIL; - } - if (CURRENT_STDIO != current_stdio) - { - sim_io_eprintf (sd, "Target (%s) and configured (%s) standard IO in conflict\n", - config_stdio_to_a (CURRENT_STDIO), - config_stdio_to_a (current_stdio)); - return SIM_RC_FAIL; - } - - - /* check the value of MSB */ - if (WITH_TARGET_WORD_MSB != 0 - && WITH_TARGET_WORD_MSB != (WITH_TARGET_WORD_BITSIZE - 1)) - { - sim_io_eprintf (sd, "Target bitsize (%d) contradicts target most significant bit (%d)\n", - WITH_TARGET_WORD_BITSIZE, WITH_TARGET_WORD_MSB); - return SIM_RC_FAIL; - } - - - /* set the environment */ -#if (WITH_TREE_PROPERTIES) - if (STATE_ENVIRONMENT (sd) == ALL_ENVIRONMENT) - { - const char *env = - tree_find_string_property(root, "/openprom/options/env"); - STATE_ENVIRONMENT (sd) = ((strcmp(env, "user") == 0 - || strcmp(env, "uea") == 0) - ? USER_ENVIRONMENT - : (strcmp(env, "virtual") == 0 - || strcmp(env, "vea") == 0) - ? VIRTUAL_ENVIRONMENT - : (strcmp(env, "operating") == 0 - || strcmp(env, "oea") == 0) - ? OPERATING_ENVIRONMENT - : ALL_ENVIRONMENT); - } -#endif - if (STATE_ENVIRONMENT (sd) == ALL_ENVIRONMENT) - STATE_ENVIRONMENT (sd) = DEFAULT_ENVIRONMENT; - - - /* set the alignment */ -#if (WITH_TREE_PROPERTIES) - if (current_alignment == 0) - current_alignment = - (tree_find_boolean_property(root, "/openprom/options/strict-alignment?") - ? STRICT_ALIGNMENT - : NONSTRICT_ALIGNMENT); -#endif - if (current_alignment == 0) - current_alignment = WITH_ALIGNMENT; - if (current_alignment == 0) - current_alignment = WITH_DEFAULT_ALIGNMENT; - - /* verify the alignment */ - if (CURRENT_ALIGNMENT == 0) - { - sim_io_eprintf (sd, "Target alignment unspecified\n"); - return SIM_RC_FAIL; - } - if (CURRENT_ALIGNMENT != current_alignment) - { - sim_io_eprintf (sd, "Target (%s) and configured (%s) alignment in conflict\n", - config_alignment_to_a (CURRENT_ALIGNMENT), - config_alignment_to_a (current_alignment)); - return SIM_RC_FAIL; - } - -#if defined (WITH_FLOATING_POINT) - - /* set the floating point */ - if (current_floating_point == 0) - current_floating_point = WITH_FLOATING_POINT; - - /* verify the floating point */ - if (CURRENT_FLOATING_POINT == 0) - { - sim_io_eprintf (sd, "Target floating-point unspecified\n"); - return SIM_RC_FAIL; - } - if (CURRENT_FLOATING_POINT != current_floating_point) - { - sim_io_eprintf (sd, "Target (%s) and configured (%s) floating-point in conflict\n", - config_alignment_to_a (CURRENT_FLOATING_POINT), - config_alignment_to_a (current_floating_point)); - return SIM_RC_FAIL; - } - -#endif - return SIM_RC_OK; -} - - -void -print_sim_config (SIM_DESC sd) -{ -#if defined (__GNUC__) && defined (__VERSION__) - sim_io_printf (sd, "Compiled by GCC %s on %s %s\n", - __VERSION__, __DATE__, __TIME__); -#else - sim_io_printf (sd, "Compiled on %s %s\n", __DATE__, __TIME__); -#endif - - sim_io_printf (sd, "WITH_TARGET_BYTE_ORDER = %s\n", - config_byte_order_to_a (WITH_TARGET_BYTE_ORDER)); - - sim_io_printf (sd, "WITH_DEFAULT_TARGET_BYTE_ORDER = %s\n", - config_byte_order_to_a (WITH_DEFAULT_TARGET_BYTE_ORDER)); - - sim_io_printf (sd, "WITH_HOST_BYTE_ORDER = %s\n", - config_byte_order_to_a (WITH_HOST_BYTE_ORDER)); - - sim_io_printf (sd, "WITH_STDIO = %s\n", - config_stdio_to_a (WITH_STDIO)); - - sim_io_printf (sd, "WITH_TARGET_WORD_MSB = %d\n", - WITH_TARGET_WORD_MSB); - - sim_io_printf (sd, "WITH_TARGET_WORD_BITSIZE = %d\n", - WITH_TARGET_WORD_BITSIZE); - - sim_io_printf (sd, "WITH_TARGET_ADDRESS_BITSIZE = %d\n", - WITH_TARGET_ADDRESS_BITSIZE); - - sim_io_printf (sd, "WITH_TARGET_CELL_BITSIZE = %d\n", - WITH_TARGET_CELL_BITSIZE); - - sim_io_printf (sd, "WITH_TARGET_FLOATING_POINT_BITSIZE = %d\n", - WITH_TARGET_FLOATING_POINT_BITSIZE); - - sim_io_printf (sd, "WITH_ENVIRONMENT = %s\n", - config_environment_to_a (WITH_ENVIRONMENT)); - - sim_io_printf (sd, "WITH_ALIGNMENT = %s\n", - config_alignment_to_a (WITH_ALIGNMENT)); - -#if defined (WITH_DEFAULT_ALIGNMENT) - sim_io_printf (sd, "WITH_DEFAULT_ALIGNMENT = %s\n", - config_alignment_to_a (WITH_DEFAULT_ALIGNMENT)); -#endif - -#if defined (WITH_XOR_ENDIAN) - sim_io_printf (sd, "WITH_XOR_ENDIAN = %d\n", WITH_XOR_ENDIAN); -#endif - -#if defined (WITH_FLOATING_POINT) - sim_io_printf (sd, "WITH_FLOATING_POINT = %s\n", - config_floating_point_to_a (WITH_FLOATING_POINT)); -#endif - -#if defined (WITH_SMP) - sim_io_printf (sd, "WITH_SMP = %d\n", WITH_SMP); -#endif - -#if defined (WITH_RESERVED_BITS) - sim_io_printf (sd, "WITH_RESERVED_BITS = %d\n", WITH_RESERVED_BITS); -#endif - -#if defined (WITH_PROFILE) - sim_io_printf (sd, "WITH_PROFILE = %d\n", WITH_PROFILE); -#endif - -} diff --git a/sim/common/sim-config.h b/sim/common/sim-config.h deleted file mode 100644 index 9d4d254..0000000 --- a/sim/common/sim-config.h +++ /dev/null @@ -1,600 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002, 2004 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 SIM_CONFIG_H -#define SIM_CONFIG_H - - -/* Host dependant: - - The CPP below defines information about the compilation host. In - particular it defines the macro's: - - WITH_HOST_BYTE_ORDER The byte order of the host. Could - be any of LITTLE_ENDIAN, BIG_ENDIAN - or 0 (unknown). Those macro's also - need to be defined. - - */ - - -/* NetBSD: - - NetBSD is easy, everything you could ever want is in a header file - (well almost :-) */ - -#if defined(__NetBSD__) -# include <machine/endian.h> -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BYTE_ORDER -# endif -# if (BYTE_ORDER != WITH_HOST_BYTE_ORDER) -# error "host endian incorrectly configured, check config.h" -# endif -#endif - -/* Linux is similarly easy. */ - -#if defined(__linux__) -# include <endian.h> -# if defined(__LITTLE_ENDIAN) && !defined(LITTLE_ENDIAN) -# define LITTLE_ENDIAN __LITTLE_ENDIAN -# endif -# if defined(__BIG_ENDIAN) && !defined(BIG_ENDIAN) -# define BIG_ENDIAN __BIG_ENDIAN -# endif -# if defined(__BYTE_ORDER) && !defined(BYTE_ORDER) -# define BYTE_ORDER __BYTE_ORDER -# endif -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BYTE_ORDER -# endif -# if (BYTE_ORDER != WITH_HOST_BYTE_ORDER) -# error "host endian incorrectly configured, check config.h" -# endif -#endif - -/* INSERT HERE - hosts that have available LITTLE_ENDIAN and - BIG_ENDIAN macro's */ - - -/* Some hosts don't define LITTLE_ENDIAN or BIG_ENDIAN, help them out */ - -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 -#endif -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 -#endif - - -/* SunOS on SPARC: - - Big endian last time I looked */ - -#if defined(sparc) || defined(__sparc__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BIG_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != BIG_ENDIAN) -# error "sun was big endian last time I looked ..." -# endif -#endif - - -/* Random x86 - - Little endian last time I looked */ - -#if defined(i386) || defined(i486) || defined(i586) || defined (i686) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined (__i686__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER LITTLE_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != LITTLE_ENDIAN) -# error "x86 was little endian last time I looked ..." -# endif -#endif - -#if (defined (__i486__) || defined (__i586__) || defined (__i686__)) && defined(__GNUC__) && WITH_BSWAP -#undef htonl -#undef ntohl -#define htonl(IN) __extension__ ({ int _out; __asm__ ("bswap %0" : "=r" (_out) : "0" (IN)); _out; }) -#define ntohl(IN) __extension__ ({ int _out; __asm__ ("bswap %0" : "=r" (_out) : "0" (IN)); _out; }) -#endif - -/* Power or PowerPC running AIX */ -#if defined(_POWER) && defined(_AIX) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BIG_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != BIG_ENDIAN) -# error "Power/PowerPC AIX was big endian last time I looked ..." -# endif -#endif - -/* Solaris running PowerPC */ -#if defined(__PPC) && defined(__sun__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER LITTLE_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != LITTLE_ENDIAN) -# error "Solaris on PowerPCs was little endian last time I looked ..." -# endif -#endif - -/* HP/PA */ -#if defined(__hppa__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BIG_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != BIG_ENDIAN) -# error "HP/PA was big endian last time I looked ..." -# endif -#endif - -/* Big endian MIPS */ -#if defined(__MIPSEB__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER BIG_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != BIG_ENDIAN) -# error "MIPSEB was big endian last time I looked ..." -# endif -#endif - -/* Little endian MIPS */ -#if defined(__MIPSEL__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER LITTLE_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != LITTLE_ENDIAN) -# error "MIPSEL was little endian last time I looked ..." -# endif -#endif - -/* Windows NT */ -#if defined(__WIN32__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER LITTLE_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != LITTLE_ENDIAN) -# error "Windows NT was little endian last time I looked ..." -# endif -#endif - -/* Alpha running DEC unix */ -#if defined(__osf__) && defined(__alpha__) -# if (WITH_HOST_BYTE_ORDER == 0) -# undef WITH_HOST_BYTE_ORDER -# define WITH_HOST_BYTE_ORDER LITTLE_ENDIAN -# endif -# if (WITH_HOST_BYTE_ORDER != LITTLE_ENDIAN) -# error "AXP running DEC unix was little endian last time I looked ..." -# endif -#endif - - -/* INSERT HERE - additional hosts that do not have LITTLE_ENDIAN and - BIG_ENDIAN definitions available. */ - -/* Until devices and tree properties are sorted out, tell sim-config.c - not to call the tree_find_foo fns. */ -#define WITH_TREE_PROPERTIES 0 - - -/* endianness of the host/target: - - If the build process is aware (at compile time) of the endianness - of the host/target it is able to eliminate slower generic endian - handling code. - - Possible values are 0 (unknown), LITTLE_ENDIAN, BIG_ENDIAN */ - -#ifndef WITH_HOST_BYTE_ORDER -#define WITH_HOST_BYTE_ORDER 0 /*unknown*/ -#endif - -#ifndef WITH_TARGET_BYTE_ORDER -#define WITH_TARGET_BYTE_ORDER 0 /*unknown*/ -#endif - -#ifndef WITH_DEFAULT_TARGET_BYTE_ORDER -#define WITH_DEFAULT_TARGET_BYTE_ORDER 0 /* fatal */ -#endif - -extern int current_host_byte_order; -#define CURRENT_HOST_BYTE_ORDER (WITH_HOST_BYTE_ORDER \ - ? WITH_HOST_BYTE_ORDER \ - : current_host_byte_order) -extern int current_target_byte_order; -#define CURRENT_TARGET_BYTE_ORDER (WITH_TARGET_BYTE_ORDER \ - ? WITH_TARGET_BYTE_ORDER \ - : current_target_byte_order) - - - -/* XOR endian. - - In addition to the above, the simulator can support the horrible - XOR endian mode (as found in the PowerPC and MIPS ISA). See - sim-core for more information. - - If WITH_XOR_ENDIAN is non-zero, it specifies the number of bytes - potentially involved in the XOR munge. A typical value is 8. */ - -#ifndef WITH_XOR_ENDIAN -#define WITH_XOR_ENDIAN 0 -#endif - - - -/* Intel host BSWAP support: - - Whether to use bswap on the 486 and pentiums rather than the 386 - sequence that uses xchgb/rorl/xchgb */ -#ifndef WITH_BSWAP -#define WITH_BSWAP 0 -#endif - - - -/* SMP support: - - Sets a limit on the number of processors that can be simulated. If - WITH_SMP is set to zero (0), the simulator is restricted to - suporting only one processor (and as a consequence leaves the SMP - code out of the build process). - - The actual number of processors is taken from the device - /options/smp@<nr-cpu> */ - -#if defined (WITH_SMP) && (WITH_SMP > 0) -#define MAX_NR_PROCESSORS WITH_SMP -#endif - -#ifndef MAX_NR_PROCESSORS -#define MAX_NR_PROCESSORS 1 -#endif - - -/* Size of target word, address and OpenFirmware Cell: - - The target word size is determined by the natural size of its - reginsters. - - On most hosts, the address and cell are the same size as a target - word. */ - -#ifndef WITH_TARGET_WORD_BITSIZE -#define WITH_TARGET_WORD_BITSIZE 32 -#endif - -#ifndef WITH_TARGET_ADDRESS_BITSIZE -#define WITH_TARGET_ADDRESS_BITSIZE WITH_TARGET_WORD_BITSIZE -#endif - -#ifndef WITH_TARGET_CELL_BITSIZE -#define WITH_TARGET_CELL_BITSIZE WITH_TARGET_WORD_BITSIZE -#endif - -#ifndef WITH_TARGET_FLOATING_POINT_BITSIZE -#define WITH_TARGET_FLOATING_POINT_BITSIZE 64 -#endif - - - -/* Most significant bit of target: - - Set this according to your target's bit numbering convention. For - the PowerPC it is zero, for many other targets it is 31 or 63. - - For targets that can both have either 32 or 64 bit words and number - MSB as 31, 63. Define this to be (WITH_TARGET_WORD_BITSIZE - 1) */ - -#ifndef WITH_TARGET_WORD_MSB -#define WITH_TARGET_WORD_MSB 0 -#endif - - - -/* Program environment: - - Three environments are available - UEA (user), VEA (virtual) and - OEA (perating). The former two are environment that users would - expect to see (VEA includes things like coherency and the time - base) while OEA is what an operating system expects to see. By - setting these to specific values, the build process is able to - eliminate non relevent environment code. - - STATE_ENVIRONMENT(sd) specifies which of vea or oea is required for - the current runtime. - - ALL_ENVIRONMENT is used during configuration as a value for - WITH_ENVIRONMENT to indicate the choice is runtime selectable. - The default is then USER_ENVIRONMENT [since allowing the user to choose - the default at configure time seems like featuritis and since people using - OPERATING_ENVIRONMENT have more to worry about than selecting the - default]. - ALL_ENVIRONMENT is also used to set STATE_ENVIRONMENT to the - "uninitialized" state. */ - -enum sim_environment { - ALL_ENVIRONMENT, - USER_ENVIRONMENT, - VIRTUAL_ENVIRONMENT, - OPERATING_ENVIRONMENT -}; - -/* If the simulator specified SIM_AC_OPTION_ENVIRONMENT, indicate so. */ -#ifdef WITH_ENVIRONMENT -#define SIM_HAVE_ENVIRONMENT -#endif - -/* If the simulator doesn't specify SIM_AC_OPTION_ENVIRONMENT in its - configure.in, the only supported environment is the user environment. */ -#ifndef WITH_ENVIRONMENT -#define WITH_ENVIRONMENT USER_ENVIRONMENT -#endif - -#define DEFAULT_ENVIRONMENT (WITH_ENVIRONMENT != ALL_ENVIRONMENT \ - ? WITH_ENVIRONMENT \ - : USER_ENVIRONMENT) - -/* To be prepended to simulator calls with absolute file paths and - chdir:ed at startup. */ -extern char *simulator_sysroot; - -/* Callback & Modulo Memory. - - Core includes a builtin memory type (raw_memory) that is - implemented using an array. raw_memory does not require any - additional functions etc. - - Callback memory is where the core calls a core device for the data - it requires. Callback memory can be layered using priorities. - - Modulo memory is a variation on raw_memory where ADDRESS & (MODULO - - 1) is used as the index into the memory array. - - The OEA model uses callback memory for devices. - - The VEA model uses callback memory to capture `page faults'. - - BTW, while raw_memory could have been implemented as a callback, - profiling has shown that there is a biger win (at least for the - x86) in eliminating a function call for the most common - (raw_memory) case. */ - -#ifndef WITH_CALLBACK_MEMORY -#define WITH_CALLBACK_MEMORY 1 -#endif - -#ifndef WITH_MODULO_MEMORY -#define WITH_MODULO_MEMORY 0 -#endif - - - -/* Alignment: - - A processor architecture may or may not handle miss aligned - transfers. - - As alternatives: both little and big endian modes take an exception - (STRICT_ALIGNMENT); big and little endian models handle mis aligned - transfers (NONSTRICT_ALIGNMENT); or the address is forced into - alignment using a mask (FORCED_ALIGNMENT). - - Mixed alignment should be specified when the simulator needs to be - able to change the alignment requirements on the fly (eg for - bi-endian support). */ - -enum sim_alignments { - MIXED_ALIGNMENT, - NONSTRICT_ALIGNMENT, - STRICT_ALIGNMENT, - FORCED_ALIGNMENT, -}; - -extern enum sim_alignments current_alignment; - -#if !defined (WITH_ALIGNMENT) -#define WITH_ALIGNMENT 0 -#endif - -#if !defined (WITH_DEFAULT_ALIGNMENT) -#define WITH_DEFAULT_ALIGNMENT 0 /* fatal */ -#endif - - - - -#define CURRENT_ALIGNMENT (WITH_ALIGNMENT \ - ? WITH_ALIGNMENT \ - : current_alignment) - - - -/* Floating point suport: - - Should the processor trap for all floating point instructions (as - if the hardware wasn't implemented) or implement the floating point - instructions directly. */ - -#if defined (WITH_FLOATING_POINT) - -#define SOFT_FLOATING_POINT 1 -#define HARD_FLOATING_POINT 2 - -extern int current_floating_point; -#define CURRENT_FLOATING_POINT (WITH_FLOATING_POINT \ - ? WITH_FLOATING_POINT \ - : current_floating_point) - -#endif - - - -/* Engine module. - - Use the common start/stop/restart framework (sim-engine). - Simulators using the other modules but not the engine should define - WITH_ENGINE=0. */ - -#ifndef WITH_ENGINE -#define WITH_ENGINE 1 -#endif - - - -/* Debugging: - - Control the inclusion of debugging code. - Debugging is only turned on in rare circumstances [say during development] - and is not intended to be turned on otherwise. */ - -#ifndef WITH_DEBUG -#define WITH_DEBUG 0 -#endif - -/* Include the tracing code. Disabling this eliminates all tracing - code */ - -#ifndef WITH_TRACE -#define WITH_TRACE (-1) -#endif - -/* Include the profiling code. Disabling this eliminates all profiling - code. */ - -#ifndef WITH_PROFILE -#define WITH_PROFILE (-1) -#endif - - -/* include code that checks assertions scattered through out the - program */ - -#ifndef WITH_ASSERT -#define WITH_ASSERT 1 -#endif - - -/* Whether to check instructions for reserved bits being set */ - -/* #define WITH_RESERVED_BITS 1 */ - - - -/* include monitoring code */ - -#define MONITOR_INSTRUCTION_ISSUE 1 -#define MONITOR_LOAD_STORE_UNIT 2 -/* do not define WITH_MON by default */ -#define DEFAULT_WITH_MON (MONITOR_LOAD_STORE_UNIT \ - | MONITOR_INSTRUCTION_ISSUE) - - -/* Current CPU model (models are in the generated models.h include file) */ -#ifndef WITH_MODEL -#define WITH_MODEL 0 -#endif - -#define CURRENT_MODEL (WITH_MODEL \ - ? WITH_MODEL \ - : current_model) - -#ifndef WITH_DEFAULT_MODEL -#define WITH_DEFAULT_MODEL DEFAULT_MODEL -#endif - -#define MODEL_ISSUE_IGNORE (-1) -#define MODEL_ISSUE_PROCESS 1 - -#ifndef WITH_MODEL_ISSUE -#define WITH_MODEL_ISSUE 0 -#endif - -extern int current_model_issue; -#define CURRENT_MODEL_ISSUE (WITH_MODEL_ISSUE \ - ? WITH_MODEL_ISSUE \ - : current_model_issue) - - - -/* Whether or not input/output just uses stdio, or uses printf_filtered for - output, and polling input for input. */ - -#define DONT_USE_STDIO 2 -#define DO_USE_STDIO 1 - -#ifndef WITH_STDIO -#define WITH_STDIO 0 -#endif - -extern int current_stdio; -#define CURRENT_STDIO (WITH_STDIO \ - ? WITH_STDIO \ - : current_stdio) - - - -/* Specify that configured calls pass parameters in registers when the - convention is that they are placed on the stack */ - -#ifndef WITH_REGPARM -#define WITH_REGPARM 0 -#endif - -/* Specify that configured calls use an alternative calling mechanism */ - -#ifndef WITH_STDCALL -#define WITH_STDCALL 0 -#endif - - -/* Set the default state configuration, before parsing argv. */ - -extern void sim_config_default (SIM_DESC sd); - -/* Complete and verify the simulator configuration. */ - -extern SIM_RC sim_config (SIM_DESC sd); - -/* Print the simulator configuration. */ - -extern void print_sim_config (SIM_DESC sd); - - -#endif diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c deleted file mode 100644 index 65c28d7..0000000 --- a/sim/common/sim-core.c +++ /dev/null @@ -1,858 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 SIM_CORE_C -#define SIM_CORE_C - -#include "sim-main.h" -#include "sim-assert.h" - -#if (WITH_HW) -#include "sim-hw.h" -#endif - -/* "core" module install handler. - - This is called via sim_module_install to install the "core" - subsystem into the simulator. */ - -#if EXTERN_SIM_CORE_P -static MODULE_INIT_FN sim_core_init; -static MODULE_UNINSTALL_FN sim_core_uninstall; -#endif - -#if EXTERN_SIM_CORE_P -SIM_RC -sim_core_install (SIM_DESC sd) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - - /* establish the other handlers */ - sim_module_add_uninstall_fn (sd, sim_core_uninstall); - sim_module_add_init_fn (sd, sim_core_init); - - /* establish any initial data structures - none */ - return SIM_RC_OK; -} -#endif - - -/* Uninstall the "core" subsystem from the simulator. */ - -#if EXTERN_SIM_CORE_P -static void -sim_core_uninstall (SIM_DESC sd) -{ - sim_core *core = STATE_CORE(sd); - unsigned map; - /* blow away any mappings */ - for (map = 0; map < nr_maps; map++) { - sim_core_mapping *curr = core->common.map[map].first; - while (curr != NULL) { - sim_core_mapping *tbd = curr; - curr = curr->next; - if (tbd->free_buffer != NULL) { - SIM_ASSERT(tbd->buffer != NULL); - zfree(tbd->free_buffer); - } - zfree(tbd); - } - core->common.map[map].first = NULL; - } -} -#endif - - -#if EXTERN_SIM_CORE_P -static SIM_RC -sim_core_init (SIM_DESC sd) -{ - /* Nothing to do */ - return SIM_RC_OK; -} -#endif - - - -#ifndef SIM_CORE_SIGNAL -#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \ -sim_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR)) -#endif - -#if EXTERN_SIM_CORE_P -void -sim_core_signal (SIM_DESC sd, - sim_cpu *cpu, - sim_cia cia, - unsigned map, - int nr_bytes, - address_word addr, - transfer_type transfer, - sim_core_signals sig) -{ - const char *copy = (transfer == read_transfer ? "read" : "write"); - address_word ip = CIA_ADDR (cia); - switch (sig) - { - case sim_core_unmapped_signal: - sim_io_eprintf (sd, "core: %d byte %s to unmapped address 0x%lx at 0x%lx\n", - nr_bytes, copy, (unsigned long) addr, (unsigned long) ip); - sim_engine_halt (sd, cpu, NULL, cia, sim_stopped, SIM_SIGSEGV); - break; - case sim_core_unaligned_signal: - sim_io_eprintf (sd, "core: %d byte misaligned %s to address 0x%lx at 0x%lx\n", - nr_bytes, copy, (unsigned long) addr, (unsigned long) ip); - sim_engine_halt (sd, cpu, NULL, cia, sim_stopped, SIM_SIGBUS); - break; - default: - sim_engine_abort (sd, cpu, cia, - "sim_core_signal - internal error - bad switch"); - } -} -#endif - - -#if EXTERN_SIM_CORE_P -static sim_core_mapping * -new_sim_core_mapping (SIM_DESC sd, - int level, - int space, - address_word addr, - address_word nr_bytes, - unsigned modulo, -#if WITH_HW - struct hw *device, -#else - device *device, -#endif - void *buffer, - void *free_buffer) -{ - sim_core_mapping *new_mapping = ZALLOC(sim_core_mapping); - /* common */ - new_mapping->level = level; - new_mapping->space = space; - new_mapping->base = addr; - new_mapping->nr_bytes = nr_bytes; - new_mapping->bound = addr + (nr_bytes - 1); - if (modulo == 0) - new_mapping->mask = (unsigned) 0 - 1; - else - new_mapping->mask = modulo - 1; - new_mapping->buffer = buffer; - new_mapping->free_buffer = free_buffer; - new_mapping->device = device; - return new_mapping; -} -#endif - - -#if EXTERN_SIM_CORE_P -static void -sim_core_map_attach (SIM_DESC sd, - sim_core_map *access_map, - int level, - int space, - address_word addr, - address_word nr_bytes, - unsigned modulo, -#if WITH_HW - struct hw *client, /*callback/default*/ -#else - device *client, /*callback/default*/ -#endif - void *buffer, /*raw_memory*/ - void *free_buffer) /*raw_memory*/ -{ - /* find the insertion point for this additional mapping and then - insert */ - sim_core_mapping *next_mapping; - sim_core_mapping **last_mapping; - - SIM_ASSERT ((client == NULL) != (buffer == NULL)); - SIM_ASSERT ((client == NULL) >= (free_buffer != NULL)); - - /* actually do occasionally get a zero size map */ - if (nr_bytes == 0) - { -#if (WITH_DEVICES) - device_error(client, "called on sim_core_map_attach with size zero"); -#endif -#if (WITH_HW) - sim_hw_abort (sd, client, "called on sim_core_map_attach with size zero"); -#endif - sim_io_error (sd, "called on sim_core_map_attach with size zero"); - } - - /* find the insertion point (between last/next) */ - next_mapping = access_map->first; - last_mapping = &access_map->first; - while(next_mapping != NULL - && (next_mapping->level < level - || (next_mapping->level == level - && next_mapping->bound < addr))) - { - /* provided levels are the same */ - /* assert: next_mapping->base > all bases before next_mapping */ - /* assert: next_mapping->bound >= all bounds before next_mapping */ - last_mapping = &next_mapping->next; - next_mapping = next_mapping->next; - } - - /* check insertion point correct */ - SIM_ASSERT (next_mapping == NULL || next_mapping->level >= level); - if (next_mapping != NULL && next_mapping->level == level - && next_mapping->base < (addr + (nr_bytes - 1))) - { -#if (WITH_DEVICES) - device_error (client, "memory map %d:0x%lx..0x%lx (%ld bytes) overlaps %d:0x%lx..0x%lx (%ld bytes)", - space, - (long) addr, - (long) (addr + nr_bytes - 1), - (long) nr_bytes, - next_mapping->space, - (long) next_mapping->base, - (long) next_mapping->bound, - (long) next_mapping->nr_bytes); -#endif -#if WITH_HW - sim_hw_abort (sd, client, "memory map %d:0x%lx..0x%lx (%ld bytes) overlaps %d:0x%lx..0x%lx (%ld bytes)", - space, - (long) addr, - (long) (addr + (nr_bytes - 1)), - (long) nr_bytes, - next_mapping->space, - (long) next_mapping->base, - (long) next_mapping->bound, - (long) next_mapping->nr_bytes); -#endif - sim_io_error (sd, "memory map %d:0x%lx..0x%lx (%ld bytes) overlaps %d:0x%lx..0x%lx (%ld bytes)", - space, - (long) addr, - (long) (addr + (nr_bytes - 1)), - (long) nr_bytes, - next_mapping->space, - (long) next_mapping->base, - (long) next_mapping->bound, - (long) next_mapping->nr_bytes); - } - - /* create/insert the new mapping */ - *last_mapping = new_sim_core_mapping(sd, - level, - space, addr, nr_bytes, modulo, - client, buffer, free_buffer); - (*last_mapping)->next = next_mapping; -} -#endif - - -/* Attach memory or a memory mapped device to the simulator. - See sim-core.h for a full description. */ - -#if EXTERN_SIM_CORE_P -void -sim_core_attach (SIM_DESC sd, - sim_cpu *cpu, - int level, - unsigned mapmask, - int space, - address_word addr, - address_word nr_bytes, - unsigned modulo, -#if WITH_HW - struct hw *client, -#else - device *client, -#endif - void *optional_buffer) -{ - sim_core *memory = STATE_CORE(sd); - unsigned map; - void *buffer; - void *free_buffer; - - /* check for for attempt to use unimplemented per-processor core map */ - if (cpu != NULL) - sim_io_error (sd, "sim_core_map_attach - processor specific memory map not yet supported"); - - /* verify modulo memory */ - if (!WITH_MODULO_MEMORY && modulo != 0) - { -#if (WITH_DEVICES) - device_error (client, "sim_core_attach - internal error - modulo memory disabled"); -#endif -#if (WITH_HW) - sim_hw_abort (sd, client, "sim_core_attach - internal error - modulo memory disabled"); -#endif - sim_io_error (sd, "sim_core_attach - internal error - modulo memory disabled"); - } - if (client != NULL && modulo != 0) - { -#if (WITH_DEVICES) - device_error (client, "sim_core_attach - internal error - modulo and callback memory conflict"); -#endif -#if (WITH_HW) - sim_hw_abort (sd, client, "sim_core_attach - internal error - modulo and callback memory conflict"); -#endif - sim_io_error (sd, "sim_core_attach - internal error - modulo and callback memory conflict"); - } - if (modulo != 0) - { - unsigned mask = modulo - 1; - /* any zero bits */ - while (mask >= sizeof (unsigned64)) /* minimum modulo */ - { - if ((mask & 1) == 0) - mask = 0; - else - mask >>= 1; - } - if (mask != sizeof (unsigned64) - 1) - { -#if (WITH_DEVICES) - device_error (client, "sim_core_attach - internal error - modulo %lx not power of two", (long) modulo); -#endif -#if (WITH_HW) - sim_hw_abort (sd, client, "sim_core_attach - internal error - modulo %lx not power of two", (long) modulo); -#endif - sim_io_error (sd, "sim_core_attach - internal error - modulo %lx not power of two", (long) modulo); - } - } - - /* verify consistency between device and buffer */ - if (client != NULL && optional_buffer != NULL) - { -#if (WITH_DEVICES) - device_error (client, "sim_core_attach - internal error - conflicting buffer and attach arguments"); -#endif -#if (WITH_HW) - sim_hw_abort (sd, client, "sim_core_attach - internal error - conflicting buffer and attach arguments"); -#endif - sim_io_error (sd, "sim_core_attach - internal error - conflicting buffer and attach arguments"); - } - if (client == NULL) - { - if (optional_buffer == NULL) - { - int padding = (addr % sizeof (unsigned64)); - unsigned long bytes = (modulo == 0 ? nr_bytes : modulo) + padding; - free_buffer = zalloc (bytes); - buffer = (char*) free_buffer + padding; - } - else - { - buffer = optional_buffer; - free_buffer = NULL; - } - } - else - { - /* a device */ - buffer = NULL; - free_buffer = NULL; - } - - /* attach the region to all applicable access maps */ - for (map = 0; - map < nr_maps; - map++) - { - if (mapmask & (1 << map)) - { - sim_core_map_attach (sd, &memory->common.map[map], - level, space, addr, nr_bytes, modulo, - client, buffer, free_buffer); - free_buffer = NULL; - } - } - - /* Just copy this map to each of the processor specific data structures. - FIXME - later this will be replaced by true processor specific - maps. */ - { - int i; - for (i = 0; i < MAX_NR_PROCESSORS; i++) - { - CPU_CORE (STATE_CPU (sd, i))->common = STATE_CORE (sd)->common; - } - } -} -#endif - - -/* Remove any memory reference related to this address */ -#if EXTERN_SIM_CORE_P -static void -sim_core_map_detach (SIM_DESC sd, - sim_core_map *access_map, - int level, - int space, - address_word addr) -{ - sim_core_mapping **entry; - for (entry = &access_map->first; - (*entry) != NULL; - entry = &(*entry)->next) - { - if ((*entry)->base == addr - && (*entry)->level == level - && (*entry)->space == space) - { - sim_core_mapping *dead = (*entry); - (*entry) = dead->next; - if (dead->free_buffer != NULL) - zfree (dead->free_buffer); - zfree (dead); - return; - } - } -} -#endif - -#if EXTERN_SIM_CORE_P -void -sim_core_detach (SIM_DESC sd, - sim_cpu *cpu, - int level, - int address_space, - address_word addr) -{ - sim_core *memory = STATE_CORE (sd); - unsigned map; - for (map = 0; map < nr_maps; map++) - { - sim_core_map_detach (sd, &memory->common.map[map], - level, address_space, addr); - } - /* Just copy this update to each of the processor specific data - structures. FIXME - later this will be replaced by true - processor specific maps. */ - { - int i; - for (i = 0; i < MAX_NR_PROCESSORS; i++) - { - CPU_CORE (STATE_CPU (sd, i))->common = STATE_CORE (sd)->common; - } - } -} -#endif - - -STATIC_INLINE_SIM_CORE\ -(sim_core_mapping *) -sim_core_find_mapping(sim_core_common *core, - unsigned map, - address_word addr, - unsigned nr_bytes, - transfer_type transfer, - int abort, /*either 0 or 1 - hint to inline/-O */ - sim_cpu *cpu, /* abort => cpu != NULL */ - sim_cia cia) -{ - sim_core_mapping *mapping = core->map[map].first; - ASSERT ((addr & (nr_bytes - 1)) == 0); /* must be aligned */ - ASSERT ((addr + (nr_bytes - 1)) >= addr); /* must not wrap */ - ASSERT (!abort || cpu != NULL); /* abort needs a non null CPU */ - while (mapping != NULL) - { - if (addr >= mapping->base - && (addr + (nr_bytes - 1)) <= mapping->bound) - return mapping; - mapping = mapping->next; - } - if (abort) - { - SIM_CORE_SIGNAL (CPU_STATE (cpu), cpu, cia, map, nr_bytes, addr, transfer, - sim_core_unmapped_signal); - } - return NULL; -} - - -STATIC_INLINE_SIM_CORE\ -(void *) -sim_core_translate (sim_core_mapping *mapping, - address_word addr) -{ - if (WITH_MODULO_MEMORY) - return (void *)((unsigned8 *) mapping->buffer - + ((addr - mapping->base) & mapping->mask)); - else - return (void *)((unsigned8 *) mapping->buffer - + addr - mapping->base); -} - - -#if EXTERN_SIM_CORE_P -unsigned -sim_core_read_buffer (SIM_DESC sd, - sim_cpu *cpu, - unsigned map, - void *buffer, - address_word addr, - unsigned len) -{ - sim_core_common *core = (cpu == NULL ? &STATE_CORE (sd)->common : &CPU_CORE (cpu)->common); - unsigned count = 0; - while (count < len) - { - unsigned_word raddr = addr + count; - sim_core_mapping *mapping = - sim_core_find_mapping (core, map, - raddr, /*nr-bytes*/1, - read_transfer, - 0 /*dont-abort*/, NULL, NULL_CIA); - if (mapping == NULL) - break; -#if (WITH_DEVICES) - if (mapping->device != NULL) - { - int nr_bytes = len - count; - sim_cia cia = cpu ? CIA_GET (cpu) : NULL_CIA; - if (raddr + nr_bytes - 1> mapping->bound) - nr_bytes = mapping->bound - raddr + 1; - if (device_io_read_buffer (mapping->device, - (unsigned_1*)buffer + count, - mapping->space, - raddr, - nr_bytes, - sd, - cpu, - cia) != nr_bytes) - break; - count += nr_bytes; - continue; - } -#endif -#if (WITH_HW) - if (mapping->device != NULL) - { - int nr_bytes = len - count; - if (raddr + nr_bytes - 1> mapping->bound) - nr_bytes = mapping->bound - raddr + 1; - if (sim_hw_io_read_buffer (sd, mapping->device, - (unsigned_1*)buffer + count, - mapping->space, - raddr, - nr_bytes) != nr_bytes) - break; - count += nr_bytes; - continue; - } -#endif - ((unsigned_1*)buffer)[count] = - *(unsigned_1*)sim_core_translate(mapping, raddr); - count += 1; - } - return count; -} -#endif - - -#if EXTERN_SIM_CORE_P -unsigned -sim_core_write_buffer (SIM_DESC sd, - sim_cpu *cpu, - unsigned map, - const void *buffer, - address_word addr, - unsigned len) -{ - sim_core_common *core = (cpu == NULL ? &STATE_CORE (sd)->common : &CPU_CORE (cpu)->common); - unsigned count = 0; - while (count < len) - { - unsigned_word raddr = addr + count; - sim_core_mapping *mapping = - sim_core_find_mapping (core, map, - raddr, /*nr-bytes*/1, - write_transfer, - 0 /*dont-abort*/, NULL, NULL_CIA); - if (mapping == NULL) - break; -#if (WITH_DEVICES) - if (WITH_CALLBACK_MEMORY - && mapping->device != NULL) - { - int nr_bytes = len - count; - sim_cia cia = cpu ? CIA_GET (cpu) : NULL_CIA; - if (raddr + nr_bytes - 1 > mapping->bound) - nr_bytes = mapping->bound - raddr + 1; - if (device_io_write_buffer (mapping->device, - (unsigned_1*)buffer + count, - mapping->space, - raddr, - nr_bytes, - sd, - cpu, - cia) != nr_bytes) - break; - count += nr_bytes; - continue; - } -#endif -#if (WITH_HW) - if (WITH_CALLBACK_MEMORY - && mapping->device != NULL) - { - int nr_bytes = len - count; - if (raddr + nr_bytes - 1 > mapping->bound) - nr_bytes = mapping->bound - raddr + 1; - if (sim_hw_io_write_buffer (sd, mapping->device, - (unsigned_1*)buffer + count, - mapping->space, - raddr, - nr_bytes) != nr_bytes) - break; - count += nr_bytes; - continue; - } -#endif - *(unsigned_1*)sim_core_translate(mapping, raddr) = - ((unsigned_1*)buffer)[count]; - count += 1; - } - return count; -} -#endif - - -#if EXTERN_SIM_CORE_P -void -sim_core_set_xor (SIM_DESC sd, - sim_cpu *cpu, - int is_xor) -{ - /* set up the XOR map if required. */ - if (WITH_XOR_ENDIAN) { - { - sim_core *core = STATE_CORE (sd); - sim_cpu_core *cpu_core = (cpu != NULL ? CPU_CORE (cpu) : NULL); - if (cpu_core != NULL) - { - int i = 1; - unsigned mask; - if (is_xor) - mask = WITH_XOR_ENDIAN - 1; - else - mask = 0; - while (i - 1 < WITH_XOR_ENDIAN) - { - cpu_core->xor[i-1] = mask; - mask = (mask << 1) & (WITH_XOR_ENDIAN - 1); - i = (i << 1); - } - } - else - { - if (is_xor) - core->byte_xor = WITH_XOR_ENDIAN - 1; - else - core->byte_xor = 0; - } - } - } - else { - if (is_xor) - sim_engine_abort (sd, NULL, NULL_CIA, - "Attempted to enable xor-endian mode when permenantly disabled."); - } -} -#endif - - -#if EXTERN_SIM_CORE_P -static void -reverse_n (unsigned_1 *dest, - const unsigned_1 *src, - int nr_bytes) -{ - int i; - for (i = 0; i < nr_bytes; i++) - { - dest [nr_bytes - i - 1] = src [i]; - } -} -#endif - - -#if EXTERN_SIM_CORE_P -unsigned -sim_core_xor_read_buffer (SIM_DESC sd, - sim_cpu *cpu, - unsigned map, - void *buffer, - address_word addr, - unsigned nr_bytes) -{ - address_word byte_xor = (cpu == NULL ? STATE_CORE (sd)->byte_xor : CPU_CORE (cpu)->xor[0]); - if (!WITH_XOR_ENDIAN || !byte_xor) - return sim_core_read_buffer (sd, cpu, map, buffer, addr, nr_bytes); - else - /* only break up transfers when xor-endian is both selected and enabled */ - { - unsigned_1 x[WITH_XOR_ENDIAN + 1]; /* +1 to avoid zero-sized array */ - unsigned nr_transfered = 0; - address_word start = addr; - unsigned nr_this_transfer = (WITH_XOR_ENDIAN - (addr & ~(WITH_XOR_ENDIAN - 1))); - address_word stop; - /* initial and intermediate transfers are broken when they cross - an XOR endian boundary */ - while (nr_transfered + nr_this_transfer < nr_bytes) - /* initial/intermediate transfers */ - { - /* since xor-endian is enabled stop^xor defines the start - address of the transfer */ - stop = start + nr_this_transfer - 1; - SIM_ASSERT (start <= stop); - SIM_ASSERT ((stop ^ byte_xor) <= (start ^ byte_xor)); - if (sim_core_read_buffer (sd, cpu, map, x, stop ^ byte_xor, nr_this_transfer) - != nr_this_transfer) - return nr_transfered; - reverse_n (&((unsigned_1*)buffer)[nr_transfered], x, nr_this_transfer); - nr_transfered += nr_this_transfer; - nr_this_transfer = WITH_XOR_ENDIAN; - start = stop + 1; - } - /* final transfer */ - nr_this_transfer = nr_bytes - nr_transfered; - stop = start + nr_this_transfer - 1; - SIM_ASSERT (stop == (addr + nr_bytes - 1)); - if (sim_core_read_buffer (sd, cpu, map, x, stop ^ byte_xor, nr_this_transfer) - != nr_this_transfer) - return nr_transfered; - reverse_n (&((unsigned_1*)buffer)[nr_transfered], x, nr_this_transfer); - return nr_bytes; - } -} -#endif - - -#if EXTERN_SIM_CORE_P -unsigned -sim_core_xor_write_buffer (SIM_DESC sd, - sim_cpu *cpu, - unsigned map, - const void *buffer, - address_word addr, - unsigned nr_bytes) -{ - address_word byte_xor = (cpu == NULL ? STATE_CORE (sd)->byte_xor : CPU_CORE (cpu)->xor[0]); - if (!WITH_XOR_ENDIAN || !byte_xor) - return sim_core_write_buffer (sd, cpu, map, buffer, addr, nr_bytes); - else - /* only break up transfers when xor-endian is both selected and enabled */ - { - unsigned_1 x[WITH_XOR_ENDIAN + 1]; /* +1 to avoid zero sized array */ - unsigned nr_transfered = 0; - address_word start = addr; - unsigned nr_this_transfer = (WITH_XOR_ENDIAN - (addr & ~(WITH_XOR_ENDIAN - 1))); - address_word stop; - /* initial and intermediate transfers are broken when they cross - an XOR endian boundary */ - while (nr_transfered + nr_this_transfer < nr_bytes) - /* initial/intermediate transfers */ - { - /* since xor-endian is enabled stop^xor defines the start - address of the transfer */ - stop = start + nr_this_transfer - 1; - SIM_ASSERT (start <= stop); - SIM_ASSERT ((stop ^ byte_xor) <= (start ^ byte_xor)); - reverse_n (x, &((unsigned_1*)buffer)[nr_transfered], nr_this_transfer); - if (sim_core_read_buffer (sd, cpu, map, x, stop ^ byte_xor, nr_this_transfer) - != nr_this_transfer) - return nr_transfered; - nr_transfered += nr_this_transfer; - nr_this_transfer = WITH_XOR_ENDIAN; - start = stop + 1; - } - /* final transfer */ - nr_this_transfer = nr_bytes - nr_transfered; - stop = start + nr_this_transfer - 1; - SIM_ASSERT (stop == (addr + nr_bytes - 1)); - reverse_n (x, &((unsigned_1*)buffer)[nr_transfered], nr_this_transfer); - if (sim_core_read_buffer (sd, cpu, map, x, stop ^ byte_xor, nr_this_transfer) - != nr_this_transfer) - return nr_transfered; - return nr_bytes; - } -} -#endif - -#if EXTERN_SIM_CORE_P -void * -sim_core_trans_addr (SIM_DESC sd, - sim_cpu *cpu, - unsigned map, - address_word addr) -{ - sim_core_common *core = (cpu == NULL ? &STATE_CORE (sd)->common : &CPU_CORE (cpu)->common); - sim_core_mapping *mapping = - sim_core_find_mapping (core, map, - addr, /*nr-bytes*/1, - write_transfer, - 0 /*dont-abort*/, NULL, NULL_CIA); - if (mapping == NULL) - return NULL; - return sim_core_translate(mapping, addr); -} -#endif - - - -/* define the read/write 1/2/4/8/16/word functions */ - -#define N 16 -#include "sim-n-core.h" - -#define N 8 -#include "sim-n-core.h" - -#define N 7 -#define M 8 -#include "sim-n-core.h" - -#define N 6 -#define M 8 -#include "sim-n-core.h" - -#define N 5 -#define M 8 -#include "sim-n-core.h" - -#define N 4 -#include "sim-n-core.h" - -#define N 3 -#define M 4 -#include "sim-n-core.h" - -#define N 2 -#include "sim-n-core.h" - -#define N 1 -#include "sim-n-core.h" - -#endif diff --git a/sim/common/sim-core.h b/sim/common/sim-core.h deleted file mode 100644 index 14725fb..0000000 --- a/sim/common/sim-core.h +++ /dev/null @@ -1,355 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 SIM_CORE_H -#define SIM_CORE_H - - -/* core signals (error conditions) - Define SIM_CORE_SIGNAL to catch these signals - see sim-core.c for - details. */ - -typedef enum { - sim_core_unmapped_signal, - sim_core_unaligned_signal, - nr_sim_core_signals, -} sim_core_signals; - -/* Type of SIM_CORE_SIGNAL handler. */ -typedef void (SIM_CORE_SIGNAL_FN) - (SIM_DESC sd, sim_cpu *cpu, sim_cia cia, unsigned map, int nr_bytes, - address_word addr, transfer_type transfer, sim_core_signals sig); - -extern SIM_CORE_SIGNAL_FN sim_core_signal; - - -/* basic types */ - -typedef struct _sim_core_mapping sim_core_mapping; -struct _sim_core_mapping { - /* common */ - int level; - int space; - unsigned_word base; - unsigned_word bound; - unsigned_word nr_bytes; - unsigned mask; - /* memory map */ - void *free_buffer; - void *buffer; - /* callback map */ -#if (WITH_HW) - struct hw *device; -#else - device *device; -#endif - /* tracing */ - int trace; - /* growth */ - sim_core_mapping *next; -}; - -typedef struct _sim_core_map sim_core_map; -struct _sim_core_map { - sim_core_mapping *first; -}; - - -typedef struct _sim_core_common { - sim_core_map map[nr_maps]; -} sim_core_common; - - -/* Main core structure */ - -typedef struct _sim_core sim_core; -struct _sim_core { - sim_core_common common; - address_word byte_xor; /* apply xor universally */ -}; - - -/* Per CPU distributed component of the core. At present this is - mostly a clone of the global core data structure. */ - -typedef struct _sim_cpu_core { - sim_core_common common; - address_word xor[WITH_XOR_ENDIAN + 1]; /* +1 to avoid zero-sized array */ -} sim_cpu_core; - - -/* Install the "core" module. */ - -extern SIM_RC sim_core_install (SIM_DESC sd); - - - -/* Create a memory region within the core. - - CPU - when non NULL, specifes the single processor that the memory - space is to be attached to. (INIMPLEMENTED). - - LEVEL - specifies the ordering of the memory region. Lower regions - are searched first. Within a level, memory regions can not - overlap. - - MAPMASK - Bitmask specifying the memory maps that the region is to - be attached to. Typically the enums sim-basics.h:access_* are used. - - ADDRESS_SPACE - For device regions, a MAP:ADDRESS pair is - translated into ADDRESS_SPACE:OFFSET before being passed to the - client device. - - MODULO - when the simulator has been configured WITH_MODULO support - and is greater than zero, specifies that accesses to the region - [ADDR .. ADDR+NR_BYTES) should be mapped onto the sub region [ADDR - .. ADDR+MODULO). The modulo value must be a power of two. - - DEVICE - When non NULL, indicates that this is a callback memory - space and specified device's memory callback handler should be - called. - - OPTIONAL_BUFFER - when non NULL, specifies the buffer to use for - data read & written to the region. Normally a more efficient - internal structure is used. It is assumed that buffer is allocated - such that the byte alignmed of OPTIONAL_BUFFER matches ADDR vis - (OPTIONAL_BUFFER % 8) == (ADDR % 8)). It is defined to be a sub-optimal - hook that allows clients to do nasty things that the interface doesn't - accomodate. */ - -extern void sim_core_attach -(SIM_DESC sd, - sim_cpu *cpu, - int level, - unsigned mapmask, - int address_space, - address_word addr, - address_word nr_bytes, - unsigned modulo, -#if (WITH_HW) - struct hw *client, -#else - device *client, -#endif - void *optional_buffer); - - -/* Delete a memory section within the core. - - */ - -extern void sim_core_detach -(SIM_DESC sd, - sim_cpu *cpu, - int level, - int address_space, - address_word addr); - - -/* Variable sized read/write - - Transfer a variable sized block of raw data between the host and - target. Should any problems occur, the number of bytes - successfully transfered is returned. - - No host/target byte endian conversion is performed. No xor-endian - conversion is performed. - - If CPU argument, when non NULL, specifies the processor specific - address map that is to be used in the transfer. */ - - -extern unsigned sim_core_read_buffer -(SIM_DESC sd, - sim_cpu *cpu, - unsigned map, - void *buffer, - address_word addr, - unsigned nr_bytes); - -extern unsigned sim_core_write_buffer -(SIM_DESC sd, - sim_cpu *cpu, - unsigned map, - const void *buffer, - address_word addr, - unsigned nr_bytes); - - - -/* Configure the core's XOR endian transfer mode. Only applicable - when WITH_XOR_ENDIAN is enabled. - - Targets suporting XOR endian, shall notify the core of any changes - in state via this call. - - The CPU argument, when non NULL, specifes the single processor that - the xor-endian configuration is to be applied to. */ - -extern void sim_core_set_xor -(SIM_DESC sd, - sim_cpu *cpu, - int is_xor); - - -/* XOR version of variable sized read/write. - - Transfer a variable sized block of raw data between the host and - target. Should any problems occur, the number of bytes - successfully transfered is returned. - - No host/target byte endian conversion is performed. If applicable - (WITH_XOR_ENDIAN and xor-endian set), xor-endian conversion *is* - performed. - - If CPU argument, when non NULL, specifies the processor specific - address map that is to be used in the transfer. */ - -extern unsigned sim_core_xor_read_buffer -(SIM_DESC sd, - sim_cpu *cpu, - unsigned map, - void *buffer, - address_word addr, - unsigned nr_bytes); - -extern unsigned sim_core_xor_write_buffer -(SIM_DESC sd, - sim_cpu *cpu, - unsigned map, - const void *buffer, - address_word addr, - unsigned nr_bytes); - - - -/* Fixed sized, processor oriented, read/write. - - Transfer a fixed amout of memory between the host and target. The - data transfered is translated from/to host to/from target byte - order (including xor endian). Should the transfer fail, the - operation shall abort (no return). - - ALIGNED assumes yhat the specified ADDRESS is correctly alligned - for an N byte transfer (no alignment checks are made). Passing an - incorrectly aligned ADDRESS is erroneous. - - UNALIGNED checks/modifies the ADDRESS according to the requirements - of an N byte transfer. Action, as defined by WITH_ALIGNMENT, being - taken should the check fail. - - MISSALIGNED transfers the data regardless. - - Misaligned xor-endian accesses are broken into a sequence of - transfers each <= WITH_XOR_ENDIAN bytes */ - - -#define DECLARE_SIM_CORE_WRITE_N(ALIGNMENT,N,M) \ -INLINE_SIM_CORE\ -(void) sim_core_write_##ALIGNMENT##_##N \ -(sim_cpu *cpu, \ - sim_cia cia, \ - unsigned map, \ - address_word addr, \ - unsigned_##M val); - -DECLARE_SIM_CORE_WRITE_N(aligned,1,1) -DECLARE_SIM_CORE_WRITE_N(aligned,2,2) -DECLARE_SIM_CORE_WRITE_N(aligned,4,4) -DECLARE_SIM_CORE_WRITE_N(aligned,8,8) -DECLARE_SIM_CORE_WRITE_N(aligned,16,16) - -#define sim_core_write_unaligned_1 sim_core_write_aligned_1 -DECLARE_SIM_CORE_WRITE_N(unaligned,2,2) -DECLARE_SIM_CORE_WRITE_N(unaligned,4,4) -DECLARE_SIM_CORE_WRITE_N(unaligned,8,8) -DECLARE_SIM_CORE_WRITE_N(unaligned,16,16) - -DECLARE_SIM_CORE_WRITE_N(misaligned,3,4) -DECLARE_SIM_CORE_WRITE_N(misaligned,5,8) -DECLARE_SIM_CORE_WRITE_N(misaligned,6,8) -DECLARE_SIM_CORE_WRITE_N(misaligned,7,8) - -#define sim_core_write_1 sim_core_write_aligned_1 -#define sim_core_write_2 sim_core_write_aligned_2 -#define sim_core_write_4 sim_core_write_aligned_4 -#define sim_core_write_8 sim_core_write_aligned_8 -#define sim_core_write_16 sim_core_write_aligned_16 - -#define sim_core_write_unaligned_word XCONCAT2(sim_core_write_unaligned_,WITH_TARGET_WORD_BITSIZE) -#define sim_core_write_aligned_word XCONCAT2(sim_core_write_aligned_,WITH_TARGET_WORD_BITSIZE) -#define sim_core_write_word XCONCAT2(sim_core_write_,WITH_TARGET_WORD_BITSIZE) - -#undef DECLARE_SIM_CORE_WRITE_N - - -#define DECLARE_SIM_CORE_READ_N(ALIGNMENT,N,M) \ -INLINE_SIM_CORE\ -(unsigned_##M) sim_core_read_##ALIGNMENT##_##N \ -(sim_cpu *cpu, \ - sim_cia cia, \ - unsigned map, \ - address_word addr); - -DECLARE_SIM_CORE_READ_N(aligned,1,1) -DECLARE_SIM_CORE_READ_N(aligned,2,2) -DECLARE_SIM_CORE_READ_N(aligned,4,4) -DECLARE_SIM_CORE_READ_N(aligned,8,8) -DECLARE_SIM_CORE_READ_N(aligned,16,16) - -#define sim_core_read_unaligned_1 sim_core_read_aligned_1 -DECLARE_SIM_CORE_READ_N(unaligned,2,2) -DECLARE_SIM_CORE_READ_N(unaligned,4,4) -DECLARE_SIM_CORE_READ_N(unaligned,8,8) -DECLARE_SIM_CORE_READ_N(unaligned,16,16) - -DECLARE_SIM_CORE_READ_N(misaligned,3,4) -DECLARE_SIM_CORE_READ_N(misaligned,5,8) -DECLARE_SIM_CORE_READ_N(misaligned,6,8) -DECLARE_SIM_CORE_READ_N(misaligned,7,8) - - -#define sim_core_read_1 sim_core_read_aligned_1 -#define sim_core_read_2 sim_core_read_aligned_2 -#define sim_core_read_4 sim_core_read_aligned_4 -#define sim_core_read_8 sim_core_read_aligned_8 -#define sim_core_read_16 sim_core_read_aligned_16 - -#define sim_core_read_unaligned_word XCONCAT2(sim_core_read_unaligned_,WITH_TARGET_WORD_BITSIZE) -#define sim_core_read_aligned_word XCONCAT2(sim_core_read_aligned_,WITH_TARGET_WORD_BITSIZE) -#define sim_core_read_word XCONCAT2(sim_core_read_,WITH_TARGET_WORD_BITSIZE) - -#undef DECLARE_SIM_CORE_READ_N - - -#if (WITH_DEVICES) -/* TODO: create sim/common/device.h */ -/* These are defined with each particular cpu. */ -void device_error (device *me, char* message, ...); -int device_io_read_buffer(device *me, void *dest, int space, address_word addr, unsigned nr_bytes, SIM_DESC sd, sim_cpu *processor, sim_cia cia); -int device_io_write_buffer(device *me, const void *source, int space, address_word addr, unsigned nr_bytes, SIM_DESC sd, sim_cpu *processor, sim_cia cia); -#endif - - -#endif diff --git a/sim/common/sim-cpu.c b/sim/common/sim-cpu.c deleted file mode 100644 index 0e6d52c..0000000 --- a/sim/common/sim-cpu.c +++ /dev/null @@ -1,80 +0,0 @@ -/* CPU support. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Cygnus Solutions. - -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" -#include "bfd.h" - -/* Allocate space for all cpus in the simulator. - Space for the cpu must currently exist prior to parsing ARGV. - EXTRA_BYTES is additional space to allocate for the sim_cpu struct. */ -/* ??? wip. better solution must wait. */ - -SIM_RC -sim_cpu_alloc_all (SIM_DESC sd, int ncpus, int extra_bytes) -{ - int c; - - for (c = 0; c < ncpus; ++c) - STATE_CPU (sd, c) = sim_cpu_alloc (sd, extra_bytes); - return SIM_RC_OK; -} - -/* Allocate space for a cpu object. - EXTRA_BYTES is additional space to allocate for the sim_cpu struct. */ - -sim_cpu * -sim_cpu_alloc (SIM_DESC sd, int extra_bytes) -{ - return zalloc (sizeof (sim_cpu) + extra_bytes); -} - -/* Free all resources held by all cpus. */ - -void -sim_cpu_free_all (SIM_DESC sd) -{ - int c; - - for (c = 0; c < MAX_NR_PROCESSORS; ++c) - if (STATE_CPU (sd, c)) - sim_cpu_free (STATE_CPU (sd, c)); -} - -/* Free all resources used by CPU. */ - -void -sim_cpu_free (sim_cpu *cpu) -{ - zfree (cpu); -} - -/* PC utilities. */ - -sim_cia -sim_pc_get (sim_cpu *cpu) -{ - return (* CPU_PC_FETCH (cpu)) (cpu); -} - -void -sim_pc_set (sim_cpu *cpu, sim_cia newval) -{ - (* CPU_PC_STORE (cpu)) (cpu, newval); -} diff --git a/sim/common/sim-cpu.h b/sim/common/sim-cpu.h deleted file mode 100644 index 069fead..0000000 --- a/sim/common/sim-cpu.h +++ /dev/null @@ -1,152 +0,0 @@ -/* CPU support. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Cygnus Solutions. - -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 file is intended to be included by sim-base.h. - - This file provides an interface between the simulator framework and - the selected cpu. */ - -#ifndef SIM_CPU_H -#define SIM_CPU_H - -/* Type of function to return an insn name. */ -typedef const char * (CPU_INSN_NAME_FN) (sim_cpu *, int); - -/* Types for register access functions. - These routines implement the sim_{fetch,store}_register interface. */ -typedef int (CPUREG_FETCH_FN) (sim_cpu *, int, unsigned char *, int); -typedef int (CPUREG_STORE_FN) (sim_cpu *, int, unsigned char *, int); - -/* Types for PC access functions. - Some simulators require a functional interface to access the program - counter [a macro is insufficient as the PC is kept in a cpu-specific part - of the sim_cpu struct]. */ -typedef sim_cia (PC_FETCH_FN) (sim_cpu *); -typedef void (PC_STORE_FN) (sim_cpu *, sim_cia); - -/* Pseudo baseclass for each cpu. */ - -typedef struct { - - /* Backlink to main state struct. */ - SIM_DESC state; -#define CPU_STATE(cpu) ((cpu)->base.state) - - /* Processor index within the SD_DESC */ - int index; -#define CPU_INDEX(cpu) ((cpu)->base.index) - - /* The name of the cpu. */ - const char *name; -#define CPU_NAME(cpu) ((cpu)->base.name) - - /* Options specific to this cpu. */ - struct option_list *options; -#define CPU_OPTIONS(cpu) ((cpu)->base.options) - - /* Processor specific core data */ - sim_cpu_core core; -#define CPU_CORE(cpu) (& (cpu)->base.core) - - /* Number of instructions (used to iterate over CPU_INSN_NAME). */ - unsigned int max_insns; -#define CPU_MAX_INSNS(cpu) ((cpu)->base.max_insns) - - /* Function to return the name of an insn. */ - CPU_INSN_NAME_FN *insn_name; -#define CPU_INSN_NAME(cpu) ((cpu)->base.insn_name) - - /* Trace data. See sim-trace.h. */ - TRACE_DATA trace_data; -#define CPU_TRACE_DATA(cpu) (& (cpu)->base.trace_data) - - /* Maximum number of debuggable entities. - This debugging is not intended for normal use. - It is only enabled when the simulator is configured with --with-debug - which shouldn't normally be specified. */ -#ifndef MAX_DEBUG_VALUES -#define MAX_DEBUG_VALUES 4 -#endif - - /* Boolean array of specified debugging flags. */ - char debug_flags[MAX_DEBUG_VALUES]; -#define CPU_DEBUG_FLAGS(cpu) ((cpu)->base.debug_flags) - /* Standard values. */ -#define DEBUG_INSN_IDX 0 -#define DEBUG_NEXT_IDX 2 /* simulator specific debug bits begin here */ - - /* Debugging output goes to this or stderr if NULL. - We can't store `stderr' here as stderr goes through a callback. */ - FILE *debug_file; -#define CPU_DEBUG_FILE(cpu) ((cpu)->base.debug_file) - - /* Profile data. See sim-profile.h. */ - PROFILE_DATA profile_data; -#define CPU_PROFILE_DATA(cpu) (& (cpu)->base.profile_data) - -#ifdef SIM_HAVE_MODEL - /* Machine tables for this cpu. See sim-model.h. */ - const MACH *mach; -#define CPU_MACH(cpu) ((cpu)->base.mach) - /* The selected model. */ - const MODEL *model; -#define CPU_MODEL(cpu) ((cpu)->base.model) - /* Model data (profiling state, etc.). */ - void *model_data; -#define CPU_MODEL_DATA(cpu) ((cpu)->base.model_data) -#endif - - /* Routines to fetch/store registers. */ - CPUREG_FETCH_FN *reg_fetch; -#define CPU_REG_FETCH(c) ((c)->base.reg_fetch) - CPUREG_STORE_FN *reg_store; -#define CPU_REG_STORE(c) ((c)->base.reg_store) - PC_FETCH_FN *pc_fetch; -#define CPU_PC_FETCH(c) ((c)->base.pc_fetch) - PC_STORE_FN *pc_store; -#define CPU_PC_STORE(c) ((c)->base.pc_store) - -} sim_cpu_base; - -/* Create all cpus. */ -extern SIM_RC sim_cpu_alloc_all (SIM_DESC, int, int); -/* Create a cpu. */ -extern sim_cpu *sim_cpu_alloc (SIM_DESC, int); -/* Release resources held by all cpus. */ -extern void sim_cpu_free_all (SIM_DESC); -/* Release resources held by a cpu. */ -extern void sim_cpu_free (sim_cpu *); - -/* Return a pointer to the cpu data for CPU_NAME, or NULL if not found. */ -extern sim_cpu *sim_cpu_lookup (SIM_DESC, const char *); - -/* Return prefix to use in cpu specific messages. */ -extern const char *sim_cpu_msg_prefix (sim_cpu *); -/* Cover fn to sim_io_eprintf. */ -extern void sim_io_eprintf_cpu (sim_cpu *, const char *, ...); - -/* Get/set a pc value. */ -#define CPU_PC_GET(cpu) ((* CPU_PC_FETCH (cpu)) (cpu)) -#define CPU_PC_SET(cpu,newval) ((* CPU_PC_STORE (cpu)) ((cpu), (newval))) -/* External interface to accessing the pc. */ -sim_cia sim_pc_get (sim_cpu *); -void sim_pc_set (sim_cpu *, sim_cia); - -#endif /* SIM_CPU_H */ diff --git a/sim/common/sim-endian.c b/sim/common/sim-endian.c deleted file mode 100644 index 05450a4..0000000 --- a/sim/common/sim-endian.c +++ /dev/null @@ -1,131 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 _SIM_ENDIAN_C_ -#define _SIM_ENDIAN_C_ - -#include "sim-basics.h" -#include "sim-assert.h" -#include "sim-io.h" - - -#if !defined(_SWAP_1) -#define _SWAP_1(SET,RAW) SET (RAW) -#endif - -#if !defined(_SWAP_2) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && defined(htons) -#define _SWAP_2(SET,RAW) SET htons (RAW) -#endif - -#ifndef _SWAP_2 -#define _SWAP_2(SET,RAW) SET (((RAW) >> 8) | ((RAW) << 8)) -#endif - -#if !defined(_SWAP_4) && (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) && defined(htonl) -#define _SWAP_4(SET,RAW) SET htonl (RAW) -#endif - -#ifndef _SWAP_4 -#define _SWAP_4(SET,RAW) SET (((RAW) << 24) | (((RAW) & 0xff00) << 8) | (((RAW) & 0xff0000) >> 8) | ((RAW) >> 24)) -#endif - -#ifndef _SWAP_8 -#define _SWAP_8(SET,RAW) \ - union { unsigned_8 dword; unsigned_4 words[2]; } in, out; \ - in.dword = RAW; \ - _SWAP_4 (out.words[0] =, in.words[1]); \ - _SWAP_4 (out.words[1] =, in.words[0]); \ - SET out.dword; -#endif - -#ifndef _SWAP_16 -#define _SWAP_16(SET,RAW) \ - union { unsigned_16 word; unsigned_4 words[4]; } in, out; \ - in.word = (RAW); \ - _SWAP_4 (out.words[0] =, in.words[3]); \ - _SWAP_4 (out.words[1] =, in.words[2]); \ - _SWAP_4 (out.words[2] =, in.words[1]); \ - _SWAP_4 (out.words[3] =, in.words[0]); \ - SET out.word; -#endif - - -#define N 1 -#include "sim-n-endian.h" -#undef N - -#define N 2 -#include "sim-n-endian.h" -#undef N - -#define N 4 -#include "sim-n-endian.h" -#undef N - -#define N 8 -#include "sim-n-endian.h" -#undef N - -#define N 16 -#include "sim-n-endian.h" -#undef N - - -INLINE_SIM_ENDIAN\ -(unsigned_8) -sim_endian_split_16 (unsigned_16 word, int w) -{ - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) - { - return word.a[1 - w]; - } - else - { - return word.a[w]; - } -} - - -INLINE_SIM_ENDIAN\ -(unsigned_16) -sim_endian_join_16 (unsigned_8 h, unsigned_8 l) - -{ - unsigned_16 word; - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) - { - word.a[0] = l; - word.a[1] = h; - } - else - { - word.a[0] = h; - word.a[1] = l; - } - return word; -} - - - -#endif /* _SIM_ENDIAN_C_ */ diff --git a/sim/common/sim-endian.h b/sim/common/sim-endian.h deleted file mode 100644 index 3a52f0f..0000000 --- a/sim/common/sim-endian.h +++ /dev/null @@ -1,416 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 _SIM_ENDIAN_H_ -#define _SIM_ENDIAN_H_ - - -/* C byte conversion functions */ - -INLINE_SIM_ENDIAN(unsigned_1) endian_h2t_1(unsigned_1 x); -INLINE_SIM_ENDIAN(unsigned_2) endian_h2t_2(unsigned_2 x); -INLINE_SIM_ENDIAN(unsigned_4) endian_h2t_4(unsigned_4 x); -INLINE_SIM_ENDIAN(unsigned_8) endian_h2t_8(unsigned_8 x); -INLINE_SIM_ENDIAN(unsigned_16) endian_h2t_16(unsigned_16 x); - -INLINE_SIM_ENDIAN(unsigned_1) endian_t2h_1(unsigned_1 x); -INLINE_SIM_ENDIAN(unsigned_2) endian_t2h_2(unsigned_2 x); -INLINE_SIM_ENDIAN(unsigned_4) endian_t2h_4(unsigned_4 x); -INLINE_SIM_ENDIAN(unsigned_8) endian_t2h_8(unsigned_8 x); -INLINE_SIM_ENDIAN(unsigned_16) endian_t2h_16(unsigned_16 x); - -INLINE_SIM_ENDIAN(unsigned_1) swap_1(unsigned_1 x); -INLINE_SIM_ENDIAN(unsigned_2) swap_2(unsigned_2 x); -INLINE_SIM_ENDIAN(unsigned_4) swap_4(unsigned_4 x); -INLINE_SIM_ENDIAN(unsigned_8) swap_8(unsigned_8 x); -INLINE_SIM_ENDIAN(unsigned_16) swap_16(unsigned_16 x); - -INLINE_SIM_ENDIAN(unsigned_1) endian_h2be_1(unsigned_1 x); -INLINE_SIM_ENDIAN(unsigned_2) endian_h2be_2(unsigned_2 x); -INLINE_SIM_ENDIAN(unsigned_4) endian_h2be_4(unsigned_4 x); -INLINE_SIM_ENDIAN(unsigned_8) endian_h2be_8(unsigned_8 x); -INLINE_SIM_ENDIAN(unsigned_16) endian_h2be_16(unsigned_16 x); - -INLINE_SIM_ENDIAN(unsigned_1) endian_be2h_1(unsigned_1 x); -INLINE_SIM_ENDIAN(unsigned_2) endian_be2h_2(unsigned_2 x); -INLINE_SIM_ENDIAN(unsigned_4) endian_be2h_4(unsigned_4 x); -INLINE_SIM_ENDIAN(unsigned_8) endian_be2h_8(unsigned_8 x); -INLINE_SIM_ENDIAN(unsigned_16) endian_be2h_16(unsigned_16 x); - -INLINE_SIM_ENDIAN(unsigned_1) endian_h2le_1(unsigned_1 x); -INLINE_SIM_ENDIAN(unsigned_2) endian_h2le_2(unsigned_2 x); -INLINE_SIM_ENDIAN(unsigned_4) endian_h2le_4(unsigned_4 x); -INLINE_SIM_ENDIAN(unsigned_8) endian_h2le_8(unsigned_8 x); -INLINE_SIM_ENDIAN(unsigned_16) endian_h2le_16(unsigned_16 x); - -INLINE_SIM_ENDIAN(unsigned_1) endian_le2h_1(unsigned_1 x); -INLINE_SIM_ENDIAN(unsigned_2) endian_le2h_2(unsigned_2 x); -INLINE_SIM_ENDIAN(unsigned_4) endian_le2h_4(unsigned_4 x); -INLINE_SIM_ENDIAN(unsigned_8) endian_le2h_8(unsigned_8 x); -INLINE_SIM_ENDIAN(unsigned_16) endian_le2h_16(unsigned_16 x); - -INLINE_SIM_ENDIAN(void*) offset_1(unsigned_1 *x, unsigned ws, unsigned w); -INLINE_SIM_ENDIAN(void*) offset_2(unsigned_2 *x, unsigned ws, unsigned w); -INLINE_SIM_ENDIAN(void*) offset_4(unsigned_4 *x, unsigned ws, unsigned w); -INLINE_SIM_ENDIAN(void*) offset_8(unsigned_8 *x, unsigned ws, unsigned w); -INLINE_SIM_ENDIAN(void*) offset_16(unsigned_16 *x, unsigned ws, unsigned w); - -INLINE_SIM_ENDIAN(unsigned_16) sim_endian_join_16 (unsigned_8 h, unsigned_8 l); -INLINE_SIM_ENDIAN(unsigned_8) sim_endian_split_16 (unsigned_16 word, int w); - - -/* SWAP */ - -#define SWAP_1 swap_1 -#define SWAP_2 swap_2 -#define SWAP_4 swap_4 -#define SWAP_8 swap_8 -#define SWAP_16 swap_16 - - -/* HOST to BE */ - -#define H2BE_1 endian_h2be_1 -#define H2BE_2 endian_h2be_2 -#define H2BE_4 endian_h2be_4 -#define H2BE_8 endian_h2be_8 -#define H2BE_16 endian_h2be_16 -#define BE2H_1 endian_be2h_1 -#define BE2H_2 endian_be2h_2 -#define BE2H_4 endian_be2h_4 -#define BE2H_8 endian_be2h_8 -#define BE2H_16 endian_be2h_16 - - -/* HOST to LE */ - -#define H2LE_1 endian_h2le_1 -#define H2LE_2 endian_h2le_2 -#define H2LE_4 endian_h2le_4 -#define H2LE_8 endian_h2le_8 -#define H2LE_16 endian_h2le_16 -#define LE2H_1 endian_le2h_1 -#define LE2H_2 endian_le2h_2 -#define LE2H_4 endian_le2h_4 -#define LE2H_8 endian_le2h_8 -#define LE2H_16 endian_le2h_16 - - -/* HOST to TARGET */ - -#define H2T_1 endian_h2t_1 -#define H2T_2 endian_h2t_2 -#define H2T_4 endian_h2t_4 -#define H2T_8 endian_h2t_8 -#define H2T_16 endian_h2t_16 -#define T2H_1 endian_t2h_1 -#define T2H_2 endian_t2h_2 -#define T2H_4 endian_t2h_4 -#define T2H_8 endian_t2h_8 -#define T2H_16 endian_t2h_16 - - -/* CONVERT IN PLACE - - These macros, given an argument of unknown size, swap its value in - place if a host/target conversion is required. */ - -#define H2T(VARIABLE) \ -do { \ - void *vp = &(VARIABLE); \ - switch (sizeof (VARIABLE)) { \ - case 1: *(unsigned_1*)vp = H2T_1(*(unsigned_1*)vp); break; \ - case 2: *(unsigned_2*)vp = H2T_2(*(unsigned_2*)vp); break; \ - case 4: *(unsigned_4*)vp = H2T_4(*(unsigned_4*)vp); break; \ - case 8: *(unsigned_8*)vp = H2T_8(*(unsigned_8*)vp); break; \ - case 16: *(unsigned_16*)vp = H2T_16(*(unsigned_16*)vp); break; \ - } \ -} while (0) - -#define T2H(VARIABLE) \ -do { \ - switch (sizeof(VARIABLE)) { \ - case 1: VARIABLE = T2H_1(VARIABLE); break; \ - case 2: VARIABLE = T2H_2(VARIABLE); break; \ - case 4: VARIABLE = T2H_4(VARIABLE); break; \ - case 8: VARIABLE = T2H_8(VARIABLE); break; \ - /*case 16: VARIABLE = T2H_16(VARIABLE); break;*/ \ - } \ -} while (0) - -#define SWAP(VARIABLE) \ -do { \ - switch (sizeof(VARIABLE)) { \ - case 1: VARIABLE = SWAP_1(VARIABLE); break; \ - case 2: VARIABLE = SWAP_2(VARIABLE); break; \ - case 4: VARIABLE = SWAP_4(VARIABLE); break; \ - case 8: VARIABLE = SWAP_8(VARIABLE); break; \ - /*case 16: VARIABLE = SWAP_16(VARIABLE); break;*/ \ - } \ -} while (0) - -#define H2BE(VARIABLE) \ -do { \ - switch (sizeof(VARIABLE)) { \ - case 1: VARIABLE = H2BE_1(VARIABLE); break; \ - case 2: VARIABLE = H2BE_2(VARIABLE); break; \ - case 4: VARIABLE = H2BE_4(VARIABLE); break; \ - case 8: VARIABLE = H2BE_8(VARIABLE); break; \ - /*case 16: VARIABLE = H2BE_16(VARIABLE); break;*/ \ - } \ -} while (0) - -#define BE2H(VARIABLE) \ -do { \ - switch (sizeof(VARIABLE)) { \ - case 1: VARIABLE = BE2H_1(VARIABLE); break; \ - case 2: VARIABLE = BE2H_2(VARIABLE); break; \ - case 4: VARIABLE = BE2H_4(VARIABLE); break; \ - case 8: VARIABLE = BE2H_8(VARIABLE); break; \ - /*case 16: VARIABLE = BE2H_16(VARIABLE); break;*/ \ - } \ -} while (0) - -#define H2LE(VARIABLE) \ -do { \ - switch (sizeof(VARIABLE)) { \ - case 1: VARIABLE = H2LE_1(VARIABLE); break; \ - case 2: VARIABLE = H2LE_2(VARIABLE); break; \ - case 4: VARIABLE = H2LE_4(VARIABLE); break; \ - case 8: VARIABLE = H2LE_8(VARIABLE); break; \ - /*case 16: VARIABLE = H2LE_16(VARIABLE); break;*/ \ - } \ -} while (0) - -#define LE2H(VARIABLE) \ -do { \ - switch (sizeof(VARIABLE)) { \ - case 1: VARIABLE = LE2H_1(VARIABLE); break; \ - case 2: VARIABLE = LE2H_2(VARIABLE); break; \ - case 4: VARIABLE = LE2H_4(VARIABLE); break; \ - case 8: VARIABLE = LE2H_8(VARIABLE); break; \ - /*case 16: VARIABLE = LE2H_16(VARIABLE); break;*/ \ - } \ -} while (0) - - - -/* TARGET WORD: - - Byte swap a quantity the size of the targets word */ - -#if (WITH_TARGET_WORD_BITSIZE == 64) -#define H2T_word H2T_8 -#define T2H_word T2H_8 -#define H2BE_word H2BE_8 -#define BE2H_word BE2H_8 -#define H2LE_word H2LE_8 -#define LE2H_word LE2H_8 -#define SWAP_word SWAP_8 -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) -#define H2T_word H2T_4 -#define T2H_word T2H_4 -#define H2BE_word H2BE_4 -#define BE2H_word BE2H_4 -#define H2LE_word H2LE_4 -#define LE2H_word LE2H_4 -#define SWAP_word SWAP_4 -#endif - - - -/* TARGET CELL: - - Byte swap a quantity the size of the targets IEEE 1275 memory cell */ - -#define H2T_cell H2T_4 -#define T2H_cell T2H_4 -#define H2BE_cell H2BE_4 -#define BE2H_cell BE2H_4 -#define H2LE_cell H2LE_4 -#define LE2H_cell LE2H_4 -#define SWAP_cell SWAP_4 - - - -/* HOST Offsets: - - Address of high/low sub-word within a host word quantity. - - Address of sub-word N within a host word quantity. NOTE: Numbering - is BIG endian always. */ - -#define AH1_2(X) (unsigned_1*)offset_2((X), 1, 0) -#define AL1_2(X) (unsigned_1*)offset_2((X), 1, 1) - -#define AH2_4(X) (unsigned_2*)offset_4((X), 2, 0) -#define AL2_4(X) (unsigned_2*)offset_4((X), 2, 1) - -#define AH4_8(X) (unsigned_4*)offset_8((X), 4, 0) -#define AL4_8(X) (unsigned_4*)offset_8((X), 4, 1) - -#define AH8_16(X) (unsigned_8*)offset_16((X), 8, 0) -#define AL8_16(X) (unsigned_8*)offset_16((X), 8, 1) - -#if (WITH_TARGET_WORD_BITSIZE == 64) -#define AH_word(X) AH4_8(X) -#define AL_word(X) AL4_8(X) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) -#define AH_word(X) AH2_4(X) -#define AL_word(X) AL2_4(X) -#endif - - -#define A1_2(X,N) (unsigned_1*)offset_2((X), 1, (N)) - -#define A1_4(X,N) (unsigned_1*)offset_4((X), 1, (N)) -#define A2_4(X,N) (unsigned_2*)offset_4((X), 2, (N)) - -#define A1_8(X,N) (unsigned_1*)offset_8((X), 1, (N)) -#define A2_8(X,N) (unsigned_2*)offset_8((X), 2, (N)) -#define A4_8(X,N) (unsigned_4*)offset_8((X), 4, (N)) - -#define A1_16(X,N) (unsigned_1*)offset_16((X), 1, (N)) -#define A2_16(X,N) (unsigned_2*)offset_16((X), 2, (N)) -#define A4_16(X,N) (unsigned_4*)offset_16((X), 4, (N)) -#define A8_16(X,N) (unsigned_8*)offset_16((X), 8, (N)) - - - - -/* HOST Components: - - Value of sub-word within a host word quantity */ - -#define VH1_2(X) ((unsigned_1)((unsigned_2)(X) >> 8)) -#define VL1_2(X) (unsigned_1)(X) - -#define VH2_4(X) ((unsigned_2)((unsigned_4)(X) >> 16)) -#define VL2_4(X) ((unsigned_2)(X)) - -#define VH4_8(X) ((unsigned_4)((unsigned_8)(X) >> 32)) -#define VL4_8(X) ((unsigned_4)(X)) - -#define VH8_16(X) (sim_endian_split_16 ((X), 0)) -#define VL8_16(X) (sim_endian_split_16 ((X), 1)) - -#if (WITH_TARGET_WORD_BITSIZE == 64) -#define VH_word(X) VH4_8(X) -#define VL_word(X) VL4_8(X) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) -#define VH_word(X) VH2_4(X) -#define VL_word(X) VL2_4(X) -#endif - - -#define V1_2(X,N) ((unsigned_1)((unsigned_2)(X) >> ( 8 * (1 - (N))))) - -#define V1_4(X,N) ((unsigned_1)((unsigned_4)(X) >> ( 8 * (3 - (N))))) -#define V2_4(X,N) ((unsigned_2)((unsigned_4)(X) >> (16 * (1 - (N))))) - -#define V1_8(X,N) ((unsigned_1)((unsigned_8)(X) >> ( 8 * (7 - (N))))) -#define V2_8(X,N) ((unsigned_2)((unsigned_8)(X) >> (16 * (3 - (N))))) -#define V4_8(X,N) ((unsigned_4)((unsigned_8)(X) >> (32 * (1 - (N))))) - -#define V1_16(X,N) (*A1_16 (&(X),N)) -#define V2_16(X,N) (*A2_16 (&(X),N)) -#define V4_16(X,N) (*A4_16 (&(X),N)) -#define V8_16(X,N) (*A8_16 (&(X),N)) - - -/* Reverse - insert sub-word into word quantity */ - -#define V2_H1(X) ((unsigned_2)(unsigned_1)(X) << 8) -#define V2_L1(X) ((unsigned_2)(unsigned_1)(X)) - -#define V4_H2(X) ((unsigned_4)(unsigned_2)(X) << 16) -#define V4_L2(X) ((unsigned_4)(unsigned_2)(X)) - -#define V8_H4(X) ((unsigned_8)(unsigned_4)(X) << 32) -#define V8_L4(X) ((unsigned_8)(unsigned_4)(X)) - -#define V16_H8(X) ((unsigned_16)(unsigned_8)(X) << 64) -#define V16_L8(X) ((unsigned_16)(unsigned_8)(X)) - - -#define V2_1(X,N) ((unsigned_2)(unsigned_1)(X) << ( 8 * (1 - (N)))) - -#define V4_1(X,N) ((unsigned_4)(unsigned_1)(X) << ( 8 * (3 - (N)))) -#define V4_2(X,N) ((unsigned_4)(unsigned_2)(X) << (16 * (1 - (N)))) - -#define V8_1(X,N) ((unsigned_8)(unsigned_1)(X) << ( 8 * (7 - (N)))) -#define V8_2(X,N) ((unsigned_8)(unsigned_2)(X) << (16 * (3 - (N)))) -#define V8_4(X,N) ((unsigned_8)(unsigned_4)(X) << (32 * (1 - (N)))) - -#define V16_1(X,N) ((unsigned_16)(unsigned_1)(X) << ( 8 * (15 - (N)))) -#define V16_2(X,N) ((unsigned_16)(unsigned_2)(X) << (16 * (7 - (N)))) -#define V16_4(X,N) ((unsigned_16)(unsigned_4)(X) << (32 * (3 - (N)))) -#define V16_8(X,N) ((unsigned_16)(unsigned_8)(X) << (64 * (1 - (N)))) - - -/* Reverse - insert N sub-words into single word quantity */ - -#define U2_1(I0,I1) (V2_1(I0,0) | V2_1(I1,1)) -#define U4_1(I0,I1,I2,I3) (V4_1(I0,0) | V4_1(I1,1) | V4_1(I2,2) | V4_1(I3,3)) -#define U8_1(I0,I1,I2,I3,I4,I5,I6,I7) \ -(V8_1(I0,0) | V8_1(I1,1) | V8_1(I2,2) | V8_1(I3,3) \ - | V8_1(I4,4) | V8_1(I5,5) | V8_1(I6,6) | V8_1(I7,7)) -#define U16_1(I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,I10,I11,I12,I13,I14,I15) \ -(V16_1(I0,0) | V16_1(I1,1) | V16_1(I2,2) | V16_1(I3,3) \ - | V16_1(I4,4) | V16_1(I5,5) | V16_1(I6,6) | V16_1(I7,7) \ - | V16_1(I8,8) | V16_1(I9,9) | V16_1(I10,10) | V16_1(I11,11) \ - | V16_1(I12,12) | V16_1(I13,13) | V16_1(I14,14) | V16_1(I15,15)) - -#define U4_2(I0,I1) (V4_2(I0,0) | V4_2(I1,1)) -#define U8_2(I0,I1,I2,I3) (V8_2(I0,0) | V8_2(I1,1) | V8_2(I2,2) | V8_2(I3,3)) -#define U16_2(I0,I1,I2,I3,I4,I5,I6,I7) \ -(V16_2(I0,0) | V16_2(I1,1) | V16_2(I2,2) | V16_2(I3,3) \ - | V16_2(I4,4) | V16_2(I5,5) | V16_2(I6,6) | V16_2(I7,7) ) - -#define U8_4(I0,I1) (V8_4(I0,0) | V8_4(I1,1)) -#define U16_4(I0,I1,I2,I3) (V16_4(I0,0) | V16_4(I1,1) | V16_4(I2,2) | V16_4(I3,3)) - -#define U16_8(I0,I1) (sim_endian_join_16 (I0, I1)) - - -#if (WITH_TARGET_WORD_BITSIZE == 64) -#define Vword_H(X) V8_H4(X) -#define Vword_L(X) V8_L4(X) -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) -#define Vword_H(X) V4_H2(X) -#define Vword_L(X) V4_L2(X) -#endif - - - - -#if H_REVEALS_MODULE_P (SIM_ENDIAN_INLINE) -#include "sim-endian.c" -#endif - -#endif /* _SIM_ENDIAN_H_ */ diff --git a/sim/common/sim-engine.c b/sim/common/sim-engine.c deleted file mode 100644 index 192b9ac..0000000 --- a/sim/common/sim-engine.c +++ /dev/null @@ -1,214 +0,0 @@ -/* Generic simulator halt/restart. - 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 <stdio.h> - -#include "sim-main.h" -#include "sim-assert.h" - -/* Get the run state. - REASON/SIGRC are the values returned by sim_stop_reason. - ??? Should each cpu have its own copy? */ - -void -sim_engine_get_run_state (SIM_DESC sd, enum sim_stop *reason, int *sigrc) -{ - sim_engine *engine = STATE_ENGINE (sd); - ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - *reason = engine->reason; - *sigrc = engine->sigrc; -} - -/* Set the run state to REASON/SIGRC. - REASON/SIGRC are the values returned by sim_stop_reason. - ??? Should each cpu have its own copy? */ - -void -sim_engine_set_run_state (SIM_DESC sd, enum sim_stop reason, int sigrc) -{ - sim_engine *engine = STATE_ENGINE (sd); - ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - engine->reason = reason; - engine->sigrc = sigrc; -} - -/* Generic halt */ - -void -sim_engine_halt (SIM_DESC sd, - sim_cpu *last_cpu, - sim_cpu *next_cpu, /* NULL - use default */ - sim_cia cia, - enum sim_stop reason, - int sigrc) -{ - sim_engine *engine = STATE_ENGINE (sd); - ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - if (engine->jmpbuf != NULL) - { - jmp_buf *halt_buf = engine->jmpbuf; - engine->last_cpu = last_cpu; - engine->next_cpu = next_cpu; - engine->reason = reason; - engine->sigrc = sigrc; - - SIM_ENGINE_HALT_HOOK (sd, last_cpu, cia); - -#ifdef SIM_CPU_EXCEPTION_SUSPEND - if (last_cpu != NULL && reason != sim_exited) - SIM_CPU_EXCEPTION_SUSPEND (sd, last_cpu, sim_signal_to_host (sd, sigrc)); -#endif - - longjmp (*halt_buf, sim_engine_halt_jmpval); - } - else - { - sim_io_error (sd, "sim_halt - bad long jump"); - abort (); - } -} - - -/* Generic restart */ - -void -sim_engine_restart (SIM_DESC sd, - sim_cpu *last_cpu, - sim_cpu *next_cpu, - sim_cia cia) -{ - sim_engine *engine = STATE_ENGINE (sd); - ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - if (engine->jmpbuf != NULL) - { - jmp_buf *halt_buf = engine->jmpbuf; - engine->last_cpu = last_cpu; - engine->next_cpu = next_cpu; - SIM_ENGINE_RESTART_HOOK (sd, last_cpu, cia); - longjmp (*halt_buf, sim_engine_restart_jmpval); - } - else - sim_io_error (sd, "sim_restart - bad long jump"); -} - - -/* Generic error code */ - -void -sim_engine_vabort (SIM_DESC sd, - sim_cpu *cpu, - sim_cia cia, - const char *fmt, - va_list ap) -{ - ASSERT (sd == NULL || STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - if (sd == NULL) - { - vfprintf (stderr, fmt, ap); - fprintf (stderr, "\nQuit\n"); - abort (); - } - else if (STATE_ENGINE (sd)->jmpbuf == NULL) - { - sim_io_evprintf (sd, fmt, ap); - sim_io_eprintf (sd, "\n"); - sim_io_error (sd, "Quit Simulator"); - abort (); - } - else - { - sim_io_evprintf (sd, fmt, ap); - sim_io_eprintf (sd, "\n"); - sim_engine_halt (sd, cpu, NULL, cia, sim_stopped, SIM_SIGABRT); - } -} - -void -sim_engine_abort (SIM_DESC sd, - sim_cpu *cpu, - sim_cia cia, - const char *fmt, - ...) -{ - va_list ap; - ASSERT (sd == NULL || STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - va_start(ap, fmt); - sim_engine_vabort (sd, cpu, cia, fmt, ap); - va_end (ap); -} - - -/* Generic next/last cpu */ - -int -sim_engine_last_cpu_nr (SIM_DESC sd) -{ - sim_engine *engine = STATE_ENGINE (sd); - if (engine->last_cpu != NULL) - return engine->last_cpu - STATE_CPU (sd, 0); - else - return MAX_NR_PROCESSORS; -} - -int -sim_engine_next_cpu_nr (SIM_DESC sd) -{ - sim_engine *engine = STATE_ENGINE (sd); - if (engine->next_cpu != NULL) - return engine->next_cpu - STATE_CPU (sd, 0); - else - return sim_engine_last_cpu_nr (sd) + 1; -} - -int -sim_engine_nr_cpus (SIM_DESC sd) -{ - sim_engine *engine = STATE_ENGINE (sd); - return engine->nr_cpus; -} - - - - -/* Initialization */ - -static SIM_RC -sim_engine_init (SIM_DESC sd) -{ - /* initialize the start/stop/resume engine */ - sim_engine *engine = STATE_ENGINE (sd); - engine->jmpbuf = NULL; - engine->last_cpu = NULL; - engine->next_cpu = NULL; - engine->nr_cpus = MAX_NR_PROCESSORS; - engine->reason = sim_running; - engine->sigrc = 0; - engine->stepper = NULL; /* sim_events_init will clean it up */ - return SIM_RC_OK; -} - - -SIM_RC -sim_engine_install (SIM_DESC sd) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - sim_module_add_init_fn (sd, sim_engine_init); - return SIM_RC_OK; -} diff --git a/sim/common/sim-engine.h b/sim/common/sim-engine.h deleted file mode 100644 index 18513a6..0000000 --- a/sim/common/sim-engine.h +++ /dev/null @@ -1,161 +0,0 @@ -/* Generic simulator halt/resume. - 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. */ - -#ifndef SIM_ENGINE_H -#define SIM_ENGINE_H - - -typedef struct _sim_engine sim_engine; -struct _sim_engine -{ - void *jmpbuf; - sim_cpu *last_cpu; - sim_cpu *next_cpu; - int nr_cpus; - enum sim_stop reason; - sim_event *stepper; - int sigrc; -}; - - - -/* jmpval: 0 (initial use) start simulator - 1 halt simulator - 2 restart simulator - This is required by the ISO C standard (the only time 0 is returned - is at the initial call to setjmp). */ - -enum { - sim_engine_start_jmpval, - sim_engine_halt_jmpval, - sim_engine_restart_jmpval, -}; - - -/* Get/set the run state of CPU to REASON/SIGRC. - REASON/SIGRC are the values returned by sim_stop_reason. */ -void sim_engine_get_run_state (SIM_DESC sd, enum sim_stop *reason, int *sigrc); -void sim_engine_set_run_state (SIM_DESC sd, enum sim_stop reason, int sigrc); - - -/* Halt the simulator *now* */ - -extern void sim_engine_halt -(SIM_DESC sd, - sim_cpu *last_cpu, /* NULL -> in event-mgr */ - sim_cpu *next_cpu, /* NULL -> succ (last_cpu) or event-mgr */ - sim_cia cia, - enum sim_stop reason, - int sigrc) __attribute__ ((noreturn)); - -/* Halt hook - allow target specific operation when halting a - simulator */ - -#if !defined (SIM_ENGINE_HALT_HOOK) -#define SIM_ENGINE_HALT_HOOK(SD, LAST_CPU, CIA) \ -if ((LAST_CPU) != NULL) CIA_SET (LAST_CPU, CIA) -#endif - -/* NB: If a port uses the SIM_CPU_EXCEPTION_* hooks, the default - SIM_ENGINE_HALT_HOOK and SIM_ENGINE_RESUME_HOOK must not be used. - They conflict in that the PC set by the HALT_HOOK may overwrite the - proper one, as intended to be saved by the EXCEPTION_TRIGGER - hook. */ - - -/* restart the simulator *now* */ - -extern void sim_engine_restart -(SIM_DESC sd, - sim_cpu *last_cpu, /* NULL -> in event-mgr */ - sim_cpu *next_cpu, /* NULL -> succ (last_cpu) or event-mgr */ - sim_cia cia); - -/* Restart hook - allow target specific operation when restarting a - simulator */ - -#if !defined (SIM_ENGINE_RESTART_HOOK) -#define SIM_ENGINE_RESTART_HOOK(SD, LAST_CPU, CIA) SIM_ENGINE_HALT_HOOK(SD, LAST_CPU, CIA) -#endif - - - - -/* Abort the simulator *now*. - - This function is NULL safe. It can be called when either of SD or - CIA are NULL. - - This function is setjmp/longjmp safe. It can be called when of - the sim_engine setjmp/longjmp buffer has not been established. - - Simulators that are using components such as sim-core but are not - yet using this sim-engine module should link in file sim-abort.o - which implements a non setjmp/longjmp version of - sim_engine_abort. */ - -extern void sim_engine_abort -(SIM_DESC sd, - sim_cpu *cpu, - sim_cia cia, - const char *fmt, - ...) __attribute__ ((format (printf, 4, 5))) __attribute__ ((noreturn)); - -extern void sim_engine_vabort -(SIM_DESC sd, - sim_cpu *cpu, - sim_cia cia, - const char *fmt, - va_list ap) __attribute__ ((noreturn)); - -/* No abort hook - when possible this function exits using the - engine_halt function (and SIM_ENGINE_HALT_HOOK). */ - - - - -/* Called by the generic sim_resume to run the simulation within the - above safty net. - - An example implementation of sim_engine_run can be found in the - file sim-run.c */ - -extern void sim_engine_run -(SIM_DESC sd, - int next_cpu_nr, - int nr_cpus, - int siggnal); /* most simulators ignore siggnal */ - - - -/* Determine the state of next/last cpu when the simulator was last - halted - a value >= MAX_NR_PROCESSORS indicates that the - event-queue was next/last. */ - -extern int sim_engine_next_cpu_nr (SIM_DESC sd); -extern int sim_engine_last_cpu_nr (SIM_DESC sd); -extern int sim_engine_nr_cpus (SIM_DESC sd); - - -/* Establish the simulator engine */ -MODULE_INSTALL_FN sim_engine_install; - - -#endif diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c deleted file mode 100644 index aea8ea8..0000000 --- a/sim/common/sim-events.c +++ /dev/null @@ -1,1205 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 _SIM_EVENTS_C_ -#define _SIM_EVENTS_C_ - -#include "sim-main.h" -#include "sim-assert.h" - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif - -#include <signal.h> /* For SIGPROCMASK et al. */ - -typedef enum { - watch_invalid, - - /* core - target byte order */ - watch_core_targ_1, - watch_core_targ_2, - watch_core_targ_4, - watch_core_targ_8, - /* core - big-endian */ - watch_core_be_1, - watch_core_be_2, - watch_core_be_4, - watch_core_be_8, - /* core - little-endian */ - watch_core_le_1, - watch_core_le_2, - watch_core_le_4, - watch_core_le_8, - - /* sim - host byte order */ - watch_sim_host_1, - watch_sim_host_2, - watch_sim_host_4, - watch_sim_host_8, - /* sim - big-endian */ - watch_sim_be_1, - watch_sim_be_2, - watch_sim_be_4, - watch_sim_be_8, - /* sim - little-endian */ - watch_sim_le_1, - watch_sim_le_2, - watch_sim_le_4, - watch_sim_le_8, - - /* wallclock */ - watch_clock, - - /* timer */ - watch_timer, -} sim_event_watchpoints; - - -struct _sim_event { - sim_event_watchpoints watching; - void *data; - sim_event_handler *handler; - /* timer event */ - signed64 time_of_event; - /* watch wallclock event */ - unsigned wallclock; - /* watch core address */ - address_word core_addr; - unsigned core_map; - /* watch sim addr */ - void *host_addr; - /* watch core/sim range */ - int is_within; /* 0/1 */ - unsigned ub; - unsigned lb; - unsigned64 ub64; - unsigned64 lb64; - /* trace info (if any) */ - char *trace; - /* list */ - sim_event *next; -}; - - -/* The event queue maintains a single absolute time using two - variables. - - TIME_OF_EVENT: this holds the time at which the next event is ment - to occur. If no next event it will hold the time of the last - event. - - TIME_FROM_EVENT: The current distance from TIME_OF_EVENT. A value - <= 0 (except when poll-event is being processed) indicates that - event processing is due. This variable is decremented once for - each iteration of a clock cycle. - - Initially, the clock is started at time one (0) with TIME_OF_EVENT - == 0 and TIME_FROM_EVENT == 0 and with NR_TICKS_TO_PROCESS == 1. - - Clearly there is a bug in that this code assumes that the absolute - time counter will never become greater than 2^62. - - To avoid the need to use 64bit arithmetic, the event queue always - contains at least one event scheduled every 16 000 ticks. This - limits the time from event counter to values less than - 16 000. */ - - -#if !defined (SIM_EVENTS_POLL_RATE) -#define SIM_EVENTS_POLL_RATE 0x1000 -#endif - - -#define _ETRACE sd, NULL - -#undef ETRACE_P -#define ETRACE_P (WITH_TRACE && STATE_EVENTS (sd)->trace) - -#undef ETRACE -#define ETRACE(ARGS) \ -do \ - { \ - if (ETRACE_P) \ - { \ - if (STRACE_DEBUG_P (sd)) \ - { \ - const char *file; \ - SIM_FILTER_PATH (file, __FILE__); \ - trace_printf (sd, NULL, "%s:%d: ", file, __LINE__); \ - } \ - trace_printf ARGS; \ - } \ - } \ -while (0) - - -/* event queue iterator - don't iterate over the held queue. */ - -#if EXTERN_SIM_EVENTS_P -static sim_event ** -next_event_queue (SIM_DESC sd, - sim_event **queue) -{ - if (queue == NULL) - return &STATE_EVENTS (sd)->queue; - else if (queue == &STATE_EVENTS (sd)->queue) - return &STATE_EVENTS (sd)->watchpoints; - else if (queue == &STATE_EVENTS (sd)->watchpoints) - return &STATE_EVENTS (sd)->watchedpoints; - else if (queue == &STATE_EVENTS (sd)->watchedpoints) - return NULL; - else - sim_io_error (sd, "next_event_queue - bad queue"); - return NULL; -} -#endif - - -STATIC_INLINE_SIM_EVENTS\ -(void) -sim_events_poll (SIM_DESC sd, - void *data) -{ - /* just re-schedule in 1000 million ticks time */ - sim_events_schedule (sd, SIM_EVENTS_POLL_RATE, sim_events_poll, sd); - sim_io_poll_quit (sd); -} - - -/* "events" module install handler. - This is called via sim_module_install to install the "events" subsystem - into the simulator. */ - -#if EXTERN_SIM_EVENTS_P -STATIC_SIM_EVENTS (MODULE_UNINSTALL_FN) sim_events_uninstall; -STATIC_SIM_EVENTS (MODULE_INIT_FN) sim_events_init; -STATIC_SIM_EVENTS (MODULE_RESUME_FN) sim_events_resume; -STATIC_SIM_EVENTS (MODULE_SUSPEND_FN) sim_events_suspend; -#endif - -#if EXTERN_SIM_EVENTS_P -SIM_RC -sim_events_install (SIM_DESC sd) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - sim_module_add_uninstall_fn (sd, sim_events_uninstall); - sim_module_add_init_fn (sd, sim_events_init); - sim_module_add_resume_fn (sd, sim_events_resume); - sim_module_add_suspend_fn (sd, sim_events_suspend); - return SIM_RC_OK; -} -#endif - - -/* Suspend/resume the event queue manager when the simulator is not - running */ - -#if EXTERN_SIM_EVENTS_P -static SIM_RC -sim_events_resume (SIM_DESC sd) -{ - sim_events *events = STATE_EVENTS (sd); - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (events->resume_wallclock == 0); - events->resume_wallclock = sim_elapsed_time_get (); - return SIM_RC_OK; -} -#endif - -#if EXTERN_SIM_EVENTS_P -static SIM_RC -sim_events_suspend (SIM_DESC sd) -{ - sim_events *events = STATE_EVENTS (sd); - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (events->resume_wallclock != 0); - events->elapsed_wallclock += sim_elapsed_time_since (events->resume_wallclock); - events->resume_wallclock = 0; - return SIM_RC_OK; -} -#endif - - -/* Uninstall the "events" subsystem from the simulator. */ - -#if EXTERN_SIM_EVENTS_P -static void -sim_events_uninstall (SIM_DESC sd) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - /* FIXME: free buffers, etc. */ -} -#endif - - -/* malloc/free */ - -#if EXTERN_SIM_EVENTS_P -static sim_event * -sim_events_zalloc (SIM_DESC sd) -{ - sim_events *events = STATE_EVENTS (sd); - sim_event *new = events->free_list; - if (new != NULL) - { - events->free_list = new->next; - memset (new, 0, sizeof (*new)); - } - else - { -#if defined (HAVE_SIGPROCMASK) && defined (SIG_SETMASK) - /*-LOCK-*/ - sigset_t old_mask; - sigset_t new_mask; - sigfillset(&new_mask); - sigprocmask (SIG_SETMASK, &new_mask, &old_mask); -#endif - new = ZALLOC (sim_event); -#if defined (HAVE_SIGPROCMASK) && defined (SIG_SETMASK) - /*-UNLOCK-*/ - sigprocmask (SIG_SETMASK, &old_mask, NULL); -#endif - } - return new; -} -#endif - -STATIC_INLINE_SIM_EVENTS\ -(void) -sim_events_free (SIM_DESC sd, - sim_event *dead) -{ - sim_events *events = STATE_EVENTS (sd); - dead->next = events->free_list; - events->free_list = dead; - if (dead->trace != NULL) - { - free (dead->trace); /* NB: asprintf returns a `free' buf */ - dead->trace = NULL; - } -} - - -/* Initialize the simulator event manager */ - -#if EXTERN_SIM_EVENTS_P -SIM_RC -sim_events_init (SIM_DESC sd) -{ - sim_events *events = STATE_EVENTS (sd); - - /* drain the interrupt queue */ - events->nr_held = 0; - if (events->held == NULL) - events->held = NZALLOC (sim_event, MAX_NR_SIGNAL_SIM_EVENTS); - - /* drain the normal queues */ - { - sim_event **queue = NULL; - while ((queue = next_event_queue (sd, queue)) != NULL) - { - if (queue == NULL) break; - while (*queue != NULL) - { - sim_event *dead = *queue; - *queue = dead->next; - sim_events_free (sd, dead); - } - *queue = NULL; - } - } - - /* wind time back to zero */ - events->nr_ticks_to_process = 1; /* start by doing queue */ - events->time_of_event = 0; - events->time_from_event = 0; - events->elapsed_wallclock = 0; - events->resume_wallclock = 0; - - /* schedule our initial counter event */ - sim_events_schedule (sd, 0, sim_events_poll, sd); - - /* from now on, except when the large-int event is being processed - the event queue is non empty */ - SIM_ASSERT (events->queue != NULL); - - return SIM_RC_OK; -} -#endif - - -INLINE_SIM_EVENTS\ -(signed64) -sim_events_time (SIM_DESC sd) -{ - sim_events *events = STATE_EVENTS (sd); - return (events->time_of_event - events->time_from_event); -} - - -INLINE_SIM_EVENTS\ -(unsigned long) -sim_events_elapsed_time (SIM_DESC sd) -{ - unsigned long elapsed = STATE_EVENTS (sd)->elapsed_wallclock; - - /* Are we being called inside sim_resume? - (Is there a simulation in progress?) */ - if (STATE_EVENTS (sd)->resume_wallclock != 0) - elapsed += sim_elapsed_time_since (STATE_EVENTS (sd)->resume_wallclock); - - return elapsed; -} - - -/* Returns the time that remains before the event is raised. */ -INLINE_SIM_EVENTS\ -(signed64) -sim_events_remain_time (SIM_DESC sd, sim_event *event) -{ - if (event == 0) - return 0; - - return (event->time_of_event - sim_events_time (sd)); -} - - - -STATIC_INLINE_SIM_EVENTS\ -(void) -update_time_from_event (SIM_DESC sd) -{ - sim_events *events = STATE_EVENTS (sd); - signed64 current_time = sim_events_time (sd); - if (events->queue != NULL) - { - events->time_of_event = events->queue->time_of_event; - events->time_from_event = (events->queue->time_of_event - current_time); - } - else - { - events->time_of_event = current_time - 1; - events->time_from_event = -1; - } - if (ETRACE_P) - { - sim_event *event; - int i; - for (event = events->queue, i = 0; - event != NULL; - event = event->next, i++) - { - ETRACE ((_ETRACE, - "event time-from-event - time %ld, delta %ld - event %d, tag 0x%lx, time %ld, handler 0x%lx, data 0x%lx%s%s\n", - (long)current_time, - (long)events->time_from_event, - i, - (long)event, - (long)event->time_of_event, - (long)event->handler, - (long)event->data, - (event->trace != NULL) ? ", " : "", - (event->trace != NULL) ? event->trace : "")); - } - } - SIM_ASSERT (current_time == sim_events_time (sd)); -} - - -#if EXTERN_SIM_EVENTS_P -static void -insert_sim_event (SIM_DESC sd, - sim_event *new_event, - signed64 delta) -{ - sim_events *events = STATE_EVENTS (sd); - sim_event *curr; - sim_event **prev; - signed64 time_of_event; - - if (delta < 0) - sim_io_error (sd, "what is past is past!\n"); - - /* compute when the event should occur */ - time_of_event = sim_events_time (sd) + delta; - - /* find the queue insertion point - things are time ordered */ - prev = &events->queue; - curr = events->queue; - while (curr != NULL && time_of_event >= curr->time_of_event) - { - SIM_ASSERT (curr->next == NULL - || curr->time_of_event <= curr->next->time_of_event); - prev = &curr->next; - curr = curr->next; - } - SIM_ASSERT (curr == NULL || time_of_event < curr->time_of_event); - - /* insert it */ - new_event->next = curr; - *prev = new_event; - new_event->time_of_event = time_of_event; - - /* adjust the time until the first event */ - update_time_from_event (sd); -} -#endif - - -#if EXTERN_SIM_EVENTS_P -sim_event * -sim_events_schedule (SIM_DESC sd, - signed64 delta_time, - sim_event_handler *handler, - void *data) -{ - va_list dummy; - memset (&dummy, 0, sizeof dummy); - return sim_events_schedule_vtracef (sd, delta_time, handler, data, - NULL, dummy); -} -#endif - - -#if EXTERN_SIM_EVENTS_P -sim_event * -sim_events_schedule_tracef (SIM_DESC sd, - signed64 delta_time, - sim_event_handler *handler, - void *data, - const char *fmt, - ...) -{ - sim_event *new_event; - va_list ap; - va_start (ap, fmt); - new_event = sim_events_schedule_vtracef (sd, delta_time, handler, data, fmt, ap); - va_end (ap); - return new_event; -} -#endif - - -#if EXTERN_SIM_EVENTS_P -sim_event * -sim_events_schedule_vtracef (SIM_DESC sd, - signed64 delta_time, - sim_event_handler *handler, - void *data, - const char *fmt, - va_list ap) -{ - sim_event *new_event = sim_events_zalloc (sd); - new_event->data = data; - new_event->handler = handler; - new_event->watching = watch_timer; - if (fmt == NULL || !ETRACE_P || vasprintf (&new_event->trace, fmt, ap) < 0) - new_event->trace = NULL; - insert_sim_event(sd, new_event, delta_time); - ETRACE((_ETRACE, - "event scheduled at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx%s%s\n", - (long)sim_events_time(sd), - (long)new_event, - (long)new_event->time_of_event, - (long)new_event->handler, - (long)new_event->data, - (new_event->trace != NULL) ? ", " : "", - (new_event->trace != NULL) ? new_event->trace : "")); - return new_event; -} -#endif - - -#if EXTERN_SIM_EVENTS_P -void -sim_events_schedule_after_signal (SIM_DESC sd, - signed64 delta_time, - sim_event_handler *handler, - void *data) -{ - sim_events *events = STATE_EVENTS (sd); - sim_event *new_event; -#if defined (HAVE_SIGPROCMASK) && defined (SIG_SETMASK) - /*-LOCK-*/ - sigset_t old_mask; - sigset_t new_mask; - sigfillset(&new_mask); - sigprocmask (SIG_SETMASK, &new_mask, &old_mask); -#endif - - /* allocate an event entry from the signal buffer */ - new_event = &events->held [events->nr_held]; - events->nr_held ++; - if (events->nr_held > MAX_NR_SIGNAL_SIM_EVENTS) - { - sim_engine_abort (NULL, NULL, NULL_CIA, - "sim_events_schedule_after_signal - buffer oveflow"); - } - - new_event->data = data; - new_event->handler = handler; - new_event->time_of_event = delta_time; /* work it out later */ - new_event->next = NULL; - - events->work_pending = 1; /* notify main process */ - -#if defined (HAVE_SIGPROCMASK) && defined (SIG_SETMASK) - /*-UNLOCK-*/ - sigprocmask (SIG_SETMASK, &old_mask, NULL); -#endif - - ETRACE ((_ETRACE, - "signal scheduled at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx\n", - (long)sim_events_time(sd), - (long)new_event, - (long)new_event->time_of_event, - (long)new_event->handler, - (long)new_event->data)); -} -#endif - - -#if EXTERN_SIM_EVENTS_P -sim_event * -sim_events_watch_clock (SIM_DESC sd, - unsigned delta_ms_time, - sim_event_handler *handler, - void *data) -{ - sim_events *events = STATE_EVENTS (sd); - sim_event *new_event = sim_events_zalloc (sd); - /* type */ - new_event->watching = watch_clock; - /* handler */ - new_event->data = data; - new_event->handler = handler; - /* data */ - if (events->resume_wallclock == 0) - new_event->wallclock = (events->elapsed_wallclock + delta_ms_time); - else - new_event->wallclock = (events->elapsed_wallclock - + sim_elapsed_time_since (events->resume_wallclock) - + delta_ms_time); - /* insert */ - new_event->next = events->watchpoints; - events->watchpoints = new_event; - events->work_pending = 1; - ETRACE ((_ETRACE, - "event watching clock at %ld - tag 0x%lx - wallclock %ld, handler 0x%lx, data 0x%lx\n", - (long)sim_events_time (sd), - (long)new_event, - (long)new_event->wallclock, - (long)new_event->handler, - (long)new_event->data)); - return new_event; -} -#endif - - -#if EXTERN_SIM_EVENTS_P -sim_event * -sim_events_watch_sim (SIM_DESC sd, - void *host_addr, - int nr_bytes, - int byte_order, - int is_within, - unsigned64 lb, - unsigned64 ub, - sim_event_handler *handler, - void *data) -{ - sim_events *events = STATE_EVENTS (sd); - sim_event *new_event = sim_events_zalloc (sd); - /* type */ - switch (byte_order) - { - case 0: - switch (nr_bytes) - { - case 1: new_event->watching = watch_sim_host_1; break; - case 2: new_event->watching = watch_sim_host_2; break; - case 4: new_event->watching = watch_sim_host_4; break; - case 8: new_event->watching = watch_sim_host_8; break; - default: sim_io_error (sd, "sim_events_watch_sim - invalid nr bytes"); - } - break; - case BIG_ENDIAN: - switch (nr_bytes) - { - case 1: new_event->watching = watch_sim_be_1; break; - case 2: new_event->watching = watch_sim_be_2; break; - case 4: new_event->watching = watch_sim_be_4; break; - case 8: new_event->watching = watch_sim_be_8; break; - default: sim_io_error (sd, "sim_events_watch_sim - invalid nr bytes"); - } - break; - case LITTLE_ENDIAN: - switch (nr_bytes) - { - case 1: new_event->watching = watch_sim_le_1; break; - case 2: new_event->watching = watch_sim_le_2; break; - case 4: new_event->watching = watch_sim_le_4; break; - case 8: new_event->watching = watch_sim_le_8; break; - default: sim_io_error (sd, "sim_events_watch_sim - invalid nr bytes"); - } - break; - default: - sim_io_error (sd, "sim_events_watch_sim - invalid byte order"); - } - /* handler */ - new_event->data = data; - new_event->handler = handler; - /* data */ - new_event->host_addr = host_addr; - new_event->lb = lb; - new_event->lb64 = lb; - new_event->ub = ub; - new_event->ub64 = ub; - new_event->is_within = (is_within != 0); - /* insert */ - new_event->next = events->watchpoints; - events->watchpoints = new_event; - events->work_pending = 1; - ETRACE ((_ETRACE, - "event watching host at %ld - tag 0x%lx - host-addr 0x%lx, 0x%lx..0x%lx, handler 0x%lx, data 0x%lx\n", - (long)sim_events_time (sd), - (long)new_event, - (long)new_event->host_addr, - (long)new_event->lb, - (long)new_event->ub, - (long)new_event->handler, - (long)new_event->data)); - return new_event; -} -#endif - - -#if EXTERN_SIM_EVENTS_P -sim_event * -sim_events_watch_core (SIM_DESC sd, - address_word core_addr, - unsigned core_map, - int nr_bytes, - int byte_order, - int is_within, - unsigned64 lb, - unsigned64 ub, - sim_event_handler *handler, - void *data) -{ - sim_events *events = STATE_EVENTS (sd); - sim_event *new_event = sim_events_zalloc (sd); - /* type */ - switch (byte_order) - { - case 0: - switch (nr_bytes) - { - case 1: new_event->watching = watch_core_targ_1; break; - case 2: new_event->watching = watch_core_targ_2; break; - case 4: new_event->watching = watch_core_targ_4; break; - case 8: new_event->watching = watch_core_targ_8; break; - default: sim_io_error (sd, "sim_events_watch_core - invalid nr bytes"); - } - break; - case BIG_ENDIAN: - switch (nr_bytes) - { - case 1: new_event->watching = watch_core_be_1; break; - case 2: new_event->watching = watch_core_be_2; break; - case 4: new_event->watching = watch_core_be_4; break; - case 8: new_event->watching = watch_core_be_8; break; - default: sim_io_error (sd, "sim_events_watch_core - invalid nr bytes"); - } - break; - case LITTLE_ENDIAN: - switch (nr_bytes) - { - case 1: new_event->watching = watch_core_le_1; break; - case 2: new_event->watching = watch_core_le_2; break; - case 4: new_event->watching = watch_core_le_4; break; - case 8: new_event->watching = watch_core_le_8; break; - default: sim_io_error (sd, "sim_events_watch_core - invalid nr bytes"); - } - break; - default: - sim_io_error (sd, "sim_events_watch_core - invalid byte order"); - } - /* handler */ - new_event->data = data; - new_event->handler = handler; - /* data */ - new_event->core_addr = core_addr; - new_event->core_map = core_map; - new_event->lb = lb; - new_event->lb64 = lb; - new_event->ub = ub; - new_event->ub64 = ub; - new_event->is_within = (is_within != 0); - /* insert */ - new_event->next = events->watchpoints; - events->watchpoints = new_event; - events->work_pending = 1; - ETRACE ((_ETRACE, - "event watching host at %ld - tag 0x%lx - host-addr 0x%lx, 0x%lx..0x%lx, handler 0x%lx, data 0x%lx\n", - (long)sim_events_time (sd), - (long)new_event, - (long)new_event->host_addr, - (long)new_event->lb, - (long)new_event->ub, - (long)new_event->handler, - (long)new_event->data)); - return new_event; -} -#endif - - -#if EXTERN_SIM_EVENTS_P -void -sim_events_deschedule (SIM_DESC sd, - sim_event *event_to_remove) -{ - sim_events *events = STATE_EVENTS (sd); - sim_event *to_remove = (sim_event*)event_to_remove; - if (event_to_remove != NULL) - { - sim_event **queue = NULL; - while ((queue = next_event_queue (sd, queue)) != NULL) - { - sim_event **ptr_to_current; - for (ptr_to_current = queue; - *ptr_to_current != NULL && *ptr_to_current != to_remove; - ptr_to_current = &(*ptr_to_current)->next); - if (*ptr_to_current == to_remove) - { - sim_event *dead = *ptr_to_current; - *ptr_to_current = dead->next; - ETRACE ((_ETRACE, - "event/watch descheduled at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx%s%s\n", - (long) sim_events_time (sd), - (long) event_to_remove, - (long) dead->time_of_event, - (long) dead->handler, - (long) dead->data, - (dead->trace != NULL) ? ", " : "", - (dead->trace != NULL) ? dead->trace : "")); - sim_events_free (sd, dead); - update_time_from_event (sd); - SIM_ASSERT ((events->time_from_event >= 0) == (events->queue != NULL)); - return; - } - } - } - ETRACE ((_ETRACE, - "event/watch descheduled at %ld - tag 0x%lx - not found\n", - (long) sim_events_time (sd), - (long) event_to_remove)); -} -#endif - - -STATIC_INLINE_SIM_EVENTS\ -(int) -sim_watch_valid (SIM_DESC sd, - sim_event *to_do) -{ - switch (to_do->watching) - { - -#define WATCH_CORE(N,OP,EXT) \ - int ok; \ - unsigned_##N word = 0; \ - int nr_read = sim_core_read_buffer (sd, NULL, to_do->core_map, &word, \ - to_do->core_addr, sizeof (word)); \ - OP (word); \ - ok = (nr_read == sizeof (unsigned_##N) \ - && (to_do->is_within \ - == (word >= to_do->lb##EXT \ - && word <= to_do->ub##EXT))); - - case watch_core_targ_1: - { - WATCH_CORE (1, T2H,); - return ok; - } - case watch_core_targ_2: - { - WATCH_CORE (2, T2H,); - return ok; - } - case watch_core_targ_4: - { - WATCH_CORE (4, T2H,); - return ok; - } - case watch_core_targ_8: - { - WATCH_CORE (8, T2H,64); - return ok; - } - - case watch_core_be_1: - { - WATCH_CORE (1, BE2H,); - return ok; - } - case watch_core_be_2: - { - WATCH_CORE (2, BE2H,); - return ok; - } - case watch_core_be_4: - { - WATCH_CORE (4, BE2H,); - return ok; - } - case watch_core_be_8: - { - WATCH_CORE (8, BE2H,64); - return ok; - } - - case watch_core_le_1: - { - WATCH_CORE (1, LE2H,); - return ok; - } - case watch_core_le_2: - { - WATCH_CORE (2, LE2H,); - return ok; - } - case watch_core_le_4: - { - WATCH_CORE (4, LE2H,); - return ok; - } - case watch_core_le_8: - { - WATCH_CORE (8, LE2H,64); - return ok; - } -#undef WATCH_CORE - -#define WATCH_SIM(N,OP,EXT) \ - int ok; \ - unsigned_##N word = *(unsigned_##N*)to_do->host_addr; \ - OP (word); \ - ok = (to_do->is_within \ - == (word >= to_do->lb##EXT \ - && word <= to_do->ub##EXT)); - - case watch_sim_host_1: - { - WATCH_SIM (1, word = ,); - return ok; - } - case watch_sim_host_2: - { - WATCH_SIM (2, word = ,); - return ok; - } - case watch_sim_host_4: - { - WATCH_SIM (4, word = ,); - return ok; - } - case watch_sim_host_8: - { - WATCH_SIM (8, word = ,64); - return ok; - } - - case watch_sim_be_1: - { - WATCH_SIM (1, BE2H,); - return ok; - } - case watch_sim_be_2: - { - WATCH_SIM (2, BE2H,); - return ok; - } - case watch_sim_be_4: - { - WATCH_SIM (4, BE2H,); - return ok; - } - case watch_sim_be_8: - { - WATCH_SIM (8, BE2H,64); - return ok; - } - - case watch_sim_le_1: - { - WATCH_SIM (1, LE2H,); - return ok; - } - case watch_sim_le_2: - { - WATCH_SIM (1, LE2H,); - return ok; - } - case watch_sim_le_4: - { - WATCH_SIM (1, LE2H,); - return ok; - } - case watch_sim_le_8: - { - WATCH_SIM (1, LE2H,64); - return ok; - } -#undef WATCH_SIM - - case watch_clock: /* wallclock */ - { - unsigned long elapsed_time = sim_events_elapsed_time (sd); - return (elapsed_time >= to_do->wallclock); - } - - default: - sim_io_error (sd, "sim_watch_valid - bad switch"); - break; - - } - return 1; -} - - -INLINE_SIM_EVENTS\ -(int) -sim_events_tick (SIM_DESC sd) -{ - sim_events *events = STATE_EVENTS (sd); - - /* this should only be called after the previous ticks have been - fully processed */ - - /* Advance the time but *only* if there is nothing to process */ - if (events->work_pending - || events->time_from_event == 0) - { - events->nr_ticks_to_process += 1; - return 1; - } - else - { - events->time_from_event -= 1; - return 0; - } -} - - -INLINE_SIM_EVENTS\ -(int) -sim_events_tickn (SIM_DESC sd, - int n) -{ - sim_events *events = STATE_EVENTS (sd); - SIM_ASSERT (n > 0); - - /* this should only be called after the previous ticks have been - fully processed */ - - /* Advance the time but *only* if there is nothing to process */ - if (events->work_pending || events->time_from_event < n) - { - events->nr_ticks_to_process += n; - return 1; - } - else - { - events->time_from_event -= n; - return 0; - } -} - - -INLINE_SIM_EVENTS\ -(void) -sim_events_slip (SIM_DESC sd, - int slip) -{ - sim_events *events = STATE_EVENTS (sd); - SIM_ASSERT (slip > 0); - - /* Flag a ready event with work_pending instead of number of ticks - to process so that the time continues to be correct */ - if (events->time_from_event < slip) - { - events->work_pending = 1; - } - events->time_from_event -= slip; -} - - -INLINE_SIM_EVENTS\ -(void) -sim_events_preprocess (SIM_DESC sd, - int events_were_last, - int events_were_next) -{ - sim_events *events = STATE_EVENTS(sd); - if (events_were_last) - { - /* Halted part way through event processing */ - ASSERT (events->nr_ticks_to_process != 0); - /* The external world can't tell if the event that stopped the - simulator was the last event to process. */ - ASSERT (events_were_next); - sim_events_process (sd); - } - else if (events_were_next) - { - /* Halted by the last processor */ - if (sim_events_tick (sd)) - sim_events_process (sd); - } -} - - -INLINE_SIM_EVENTS\ -(void) -sim_events_process (SIM_DESC sd) -{ - sim_events *events = STATE_EVENTS(sd); - signed64 event_time = sim_events_time(sd); - - /* Clear work_pending before checking nr_held. Clearing - work_pending after nr_held (with out a lock could loose an - event). */ - events->work_pending = 0; - - /* move any events that were asynchronously queued by any signal - handlers onto the real event queue. */ - if (events->nr_held > 0) - { - int i; - -#if defined(HAVE_SIGPROCMASK) && defined(SIG_SETMASK) - /*-LOCK-*/ - sigset_t old_mask; - sigset_t new_mask; - sigfillset(&new_mask); - sigprocmask(SIG_SETMASK, &new_mask, &old_mask); -#endif - - for (i = 0; i < events->nr_held; i++) - { - sim_event *entry = &events->held [i]; - sim_events_schedule (sd, - entry->time_of_event, - entry->handler, - entry->data); - } - events->nr_held = 0; - -#if defined(HAVE_SIGPROCMASK) && defined(SIG_SETMASK) - /*-UNLOCK-*/ - sigprocmask(SIG_SETMASK, &old_mask, NULL); -#endif - - } - - /* Process any watchpoints. Be careful to allow a watchpoint to - appear/disappear under our feet. - To ensure that watchpoints are processed only once per cycle, - they are moved onto a watched queue, this returned to the - watchpoint queue when all queue processing has been - completed. */ - while (events->watchpoints != NULL) - { - sim_event *to_do = events->watchpoints; - events->watchpoints = to_do->next; - if (sim_watch_valid (sd, to_do)) - { - sim_event_handler *handler = to_do->handler; - void *data = to_do->data; - ETRACE((_ETRACE, - "event issued at %ld - tag 0x%lx - handler 0x%lx, data 0x%lx%s%s\n", - (long) event_time, - (long) to_do, - (long) handler, - (long) data, - (to_do->trace != NULL) ? ", " : "", - (to_do->trace != NULL) ? to_do->trace : "")); - sim_events_free (sd, to_do); - handler (sd, data); - } - else - { - to_do->next = events->watchedpoints; - events->watchedpoints = to_do; - } - } - - /* consume all events for this or earlier times. Be careful to - allow an event to appear/disappear under our feet */ - while (events->queue->time_of_event < - (event_time + events->nr_ticks_to_process)) - { - sim_event *to_do = events->queue; - sim_event_handler *handler = to_do->handler; - void *data = to_do->data; - events->queue = to_do->next; - update_time_from_event (sd); - ETRACE((_ETRACE, - "event issued at %ld - tag 0x%lx - handler 0x%lx, data 0x%lx%s%s\n", - (long) event_time, - (long) to_do, - (long) handler, - (long) data, - (to_do->trace != NULL) ? ", " : "", - (to_do->trace != NULL) ? to_do->trace : "")); - sim_events_free (sd, to_do); - handler (sd, data); - } - - /* put things back where they belong ready for the next iteration */ - events->watchpoints = events->watchedpoints; - events->watchedpoints = NULL; - if (events->watchpoints != NULL) - events->work_pending = 1; - - /* advance the time */ - SIM_ASSERT (events->time_from_event >= events->nr_ticks_to_process); - SIM_ASSERT (events->queue != NULL); /* always poll event */ - events->time_from_event -= events->nr_ticks_to_process; - - /* this round of processing complete */ - events->nr_ticks_to_process = 0; -} - -#endif diff --git a/sim/common/sim-events.h b/sim/common/sim-events.h deleted file mode 100644 index d910d05..0000000 --- a/sim/common/sim-events.h +++ /dev/null @@ -1,280 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 SIM_EVENTS_H -#define SIM_EVENTS_H - - -/* Notes: - - When scheduling an event, the a delta of zero/one refers to the - timeline as follows: - - epoch 0|1 1|2 2|3 3| - **queue**|--insn--|*queue*|--insn--|*queue*|--insn--|*queue*| - | ^ ^ | ^ ^ - `- +0 ------------ +1 --.. `----- +0 ------------- +1 --.. - - When the queue is initialized, the time is set to zero with a - number of initialization events scheduled. Consequently, as also - illustrated above, the event queue should be processed before the - first instruction. That instruction being executed during tick 1. - - The simulator main loop may take a form similar to: - - if (halt-/restart-setjmp) - { - - .... // Determine who should go next - last-cpu-nr = get-last-cpu-nr (sd); - next-cpu-nr = get-next-cpu-nr (sd); - events-were-last? = (last-cpu-nr >= nr-cpus); - events-were-next? = (next-cpu-nr >= nr-cpus); - - .... // process any outstanding events - sim_events_preprocess (sd, events-were-last?, events-were-next?); - if (events-were-next) - next-cpu-nr = 0; - - .... // prime main loop - - while (1) - { - .... // model one insn of next-cpu-nr .. nr-cpus - if (sim_events_tick (sd)) - sim_events_process (sd); - next-cpu-nr = 0 - } - } - - NB. In the above pseudo code it is assumed that any cpu-nr >= - nr-cpus is a marker for the event queue. */ - - -typedef void sim_event_handler(SIM_DESC sd, void *data); - -typedef struct _sim_event sim_event; - -typedef struct _sim_events sim_events; -struct _sim_events { - int nr_ticks_to_process; - sim_event *queue; - sim_event *watchpoints; - sim_event *watchedpoints; - sim_event *free_list; - /* flag additional work needed */ - volatile int work_pending; - /* the asynchronous event queue */ -#ifndef MAX_NR_SIGNAL_SIM_EVENTS -#define MAX_NR_SIGNAL_SIM_EVENTS 2 -#endif - sim_event *held; - volatile int nr_held; - /* timekeeping */ - unsigned long elapsed_wallclock; - SIM_ELAPSED_TIME resume_wallclock; - signed64 time_of_event; - int time_from_event; - int trace; -}; - - - -/* Install the "events" module. */ - -extern SIM_RC sim_events_install (SIM_DESC sd); - - -/* Schedule an event DELTA_TIME ticks into the future */ - -extern sim_event *sim_events_schedule -(SIM_DESC sd, - signed64 delta_time, - sim_event_handler *handler, - void *data); - -extern sim_event *sim_events_schedule_tracef -(SIM_DESC sd, - signed64 delta_time, - sim_event_handler *handler, - void *data, - const char *fmt, - ...) __attribute__ ((format (printf, 5, 6))); - -extern sim_event *sim_events_schedule_vtracef -(SIM_DESC sd, - signed64 delta_time, - sim_event_handler *handler, - void *data, - const char *fmt, - va_list ap); - - -extern void sim_events_schedule_after_signal -(SIM_DESC sd, - signed64 delta_time, - sim_event_handler *handler, - void *data); - -/* NB: signal level events can't have trace strings as malloc isn't - available */ - - - -/* Schedule an event milli-seconds from NOW. The exact interpretation - of wallclock is host dependant. */ - -extern sim_event *sim_events_watch_clock -(SIM_DESC sd, - unsigned delta_ms_time, - sim_event_handler *handler, - void *data); - - -/* Schedule an event when the test (IS_WITHIN == (VAL >= LB && VAL <= - UB)) of the NR_BYTES value at HOST_ADDR with BYTE_ORDER endian is - true. - - HOST_ADDR: pointer into the host address space. - BYTE_ORDER: 0 - host endian; BIG_ENDIAN; LITTLE_ENDIAN */ - -extern sim_event *sim_events_watch_sim -(SIM_DESC sd, - void *host_addr, - int nr_bytes, - int byte_order, - int is_within, - unsigned64 lb, - unsigned64 ub, - sim_event_handler *handler, - void *data); - - -/* Schedule an event when the test (IS_WITHIN == (VAL >= LB && VAL <= - UB)) of the NR_BYTES value at CORE_ADDR in BYTE_ORDER endian is - true. - - CORE_ADDR/MAP: pointer into the target address space. - BYTE_ORDER: 0 - current target endian; BIG_ENDIAN; LITTLE_ENDIAN */ - -extern sim_event *sim_events_watch_core -(SIM_DESC sd, - address_word core_addr, - unsigned map, - int nr_bytes, - int byte_order, - int is_within, - unsigned64 lb, - unsigned64 ub, - sim_event_handler *handler, - void *data); - -/* Deschedule the specified event */ - -extern void sim_events_deschedule -(SIM_DESC sd, - sim_event *event_to_remove); - - -/* Prepare for main simulator loop. Ensure that the next thing to do - is not event processing. - - If the simulator halted part way through event processing then both - EVENTS_WERE_LAST and EVENTS_WERE_NEXT shall be true. - - If the simulator halted after processing the last cpu, then only - EVENTS_WERE_NEXT shall be true. */ - -INLINE_SIM_EVENTS\ -(void) sim_events_preprocess -(SIM_DESC sd, - int events_were_last, - int events_were_next); - - -/* Progress time. - - Separated into two parts so that the main loop can save its context - before the event queue is processed. When sim_events_tick*() - returns true, any simulation context should be saved and - sim_events_process() called. - - SIM_EVENTS_TICK advances the clock by 1 cycle. - - SIM_EVENTS_TICKN advances the clock by N cycles (1..MAXINT). */ - -INLINE_SIM_EVENTS\ -(int) sim_events_tick -(SIM_DESC sd); - -INLINE_SIM_EVENTS\ -(int) sim_events_tickn -(SIM_DESC sd, - int n); - -INLINE_SIM_EVENTS\ -(void) sim_events_process -(SIM_DESC sd); - - -/* Advance the clock by an additional SLIP cycles at the next call to - sim_events_tick*(). For multiple calls, the effect is - accumulative. */ - -INLINE_SIM_EVENTS\ -(void) sim_events_slip -(SIM_DESC sd, - int slip); - - -/* Progress time such that an event shall occur upon the next call to - sim_events tick */ - -#if 0 -INLINE_SIM_EVENTS\ -(void) sim_events_timewarp -(SIM_DESC sd); -#endif - - -/* local concept of elapsed target time */ - -INLINE_SIM_EVENTS\ -(signed64) sim_events_time -(SIM_DESC sd); - - -/* local concept of elapsed host time (milliseconds) */ - -INLINE_SIM_EVENTS\ -(unsigned long) sim_events_elapsed_time -(SIM_DESC sd); - -/* Returns the time that remains before the event is raised. */ -INLINE_SIM_EVENTS\ -(signed64) sim_events_remain_time -(SIM_DESC sd, sim_event *event); - - -#endif diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c deleted file mode 100644 index d7d8600..0000000 --- a/sim/common/sim-fpu.c +++ /dev/null @@ -1,2566 +0,0 @@ -/* This is a software floating point library which can be used instead - of the floating point routines in libgcc1.c for targets without - hardware floating point. */ - -/* Copyright 1994, 1997, 1998, 2003 Free Software Foundation, Inc. - -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 the -Free Software Foundation; either version 2, or (at your option) any -later version. - -In addition to the permissions in the GNU General Public License, the -Free Software Foundation gives you unlimited permission to link the -compiled version of this file with other programs, and to distribute -those programs without any restriction coming from the use of this -file. (The General Public License restrictions do apply in other -respects; for example, they cover modification of the file, and -distribution when not linked into another program.) - -This file 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; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable - to be covered by the GNU General Public License. - This exception does not however invalidate any other reasons why - the executable file might be covered by the GNU General Public License. */ - -/* This implements IEEE 754 format arithmetic, but does not provide a - mechanism for setting the rounding mode, or for generating or handling - exceptions. - - The original code by Steve Chamberlain, hacked by Mark Eichin and Jim - Wilson, all of Cygnus Support. */ - - -#ifndef SIM_FPU_C -#define SIM_FPU_C - -#include "sim-basics.h" -#include "sim-fpu.h" - -#include "sim-io.h" -#include "sim-assert.h" - - -/* Debugging support. - If digits is -1, then print all digits. */ - -static void -print_bits (unsigned64 x, - int msbit, - int digits, - sim_fpu_print_func print, - void *arg) -{ - unsigned64 bit = LSBIT64 (msbit); - int i = 4; - while (bit && digits) - { - if (i == 0) - print (arg, ","); - - if ((x & bit)) - print (arg, "1"); - else - print (arg, "0"); - bit >>= 1; - - if (digits > 0) digits--; - i = (i + 1) % 4; - } -} - - - -/* Quick and dirty conversion between a host double and host 64bit int */ - -typedef union { - double d; - unsigned64 i; -} sim_fpu_map; - - -/* A packed IEEE floating point number. - - Form is <SIGN:1><BIASEDEXP:NR_EXPBITS><FRAC:NR_FRACBITS> for both - 32 and 64 bit numbers. This number is interpreted as: - - Normalized (0 < BIASEDEXP && BIASEDEXP < EXPMAX): - (sign ? '-' : '+') 1.<FRAC> x 2 ^ (BIASEDEXP - EXPBIAS) - - Denormalized (0 == BIASEDEXP && FRAC != 0): - (sign ? "-" : "+") 0.<FRAC> x 2 ^ (- EXPBIAS) - - Zero (0 == BIASEDEXP && FRAC == 0): - (sign ? "-" : "+") 0.0 - - Infinity (BIASEDEXP == EXPMAX && FRAC == 0): - (sign ? "-" : "+") "infinity" - - SignalingNaN (BIASEDEXP == EXPMAX && FRAC > 0 && FRAC < QUIET_NAN): - SNaN.FRAC - - QuietNaN (BIASEDEXP == EXPMAX && FRAC > 0 && FRAC > QUIET_NAN): - QNaN.FRAC - - */ - -#define NR_EXPBITS (is_double ? 11 : 8) -#define NR_FRACBITS (is_double ? 52 : 23) -#define SIGNBIT (is_double ? MSBIT64 (0) : MSBIT64 (32)) - -#define EXPMAX32 (255) -#define EXMPAX64 (2047) -#define EXPMAX ((unsigned) (is_double ? EXMPAX64 : EXPMAX32)) - -#define EXPBIAS32 (127) -#define EXPBIAS64 (1023) -#define EXPBIAS (is_double ? EXPBIAS64 : EXPBIAS32) - -#define QUIET_NAN LSBIT64 (NR_FRACBITS - 1) - - - -/* An unpacked floating point number. - - When unpacked, the fraction of both a 32 and 64 bit floating point - number is stored using the same format: - - 64 bit - <IMPLICIT_1:1><FRACBITS:52><GUARDS:8><PAD:00> - 32 bit - <IMPLICIT_1:1><FRACBITS:23><GUARDS:7><PAD:30> */ - -#define NR_PAD32 (30) -#define NR_PAD64 (0) -#define NR_PAD (is_double ? NR_PAD64 : NR_PAD32) -#define PADMASK (is_double ? 0 : LSMASK64 (NR_PAD32 - 1, 0)) - -#define NR_GUARDS32 (7 + NR_PAD32) -#define NR_GUARDS64 (8 + NR_PAD64) -#define NR_GUARDS (is_double ? NR_GUARDS64 : NR_GUARDS32) -#define GUARDMASK LSMASK64 (NR_GUARDS - 1, 0) - -#define GUARDMSB LSBIT64 (NR_GUARDS - 1) -#define GUARDLSB LSBIT64 (NR_PAD) -#define GUARDROUND LSMASK64 (NR_GUARDS - 2, 0) - -#define NR_FRAC_GUARD (60) -#define IMPLICIT_1 LSBIT64 (NR_FRAC_GUARD) -#define IMPLICIT_2 LSBIT64 (NR_FRAC_GUARD + 1) -#define IMPLICIT_4 LSBIT64 (NR_FRAC_GUARD + 2) -#define NR_SPARE 2 - -#define FRAC32MASK LSMASK64 (63, NR_FRAC_GUARD - 32 + 1) - -#define NORMAL_EXPMIN (-(EXPBIAS)+1) - -#define NORMAL_EXPMAX32 (EXPBIAS32) -#define NORMAL_EXPMAX64 (EXPBIAS64) -#define NORMAL_EXPMAX (EXPBIAS) - - -/* Integer constants */ - -#define MAX_INT32 ((signed64) LSMASK64 (30, 0)) -#define MAX_UINT32 LSMASK64 (31, 0) -#define MIN_INT32 ((signed64) LSMASK64 (63, 31)) - -#define MAX_INT64 ((signed64) LSMASK64 (62, 0)) -#define MAX_UINT64 LSMASK64 (63, 0) -#define MIN_INT64 ((signed64) LSMASK64 (63, 63)) - -#define MAX_INT (is_64bit ? MAX_INT64 : MAX_INT32) -#define MIN_INT (is_64bit ? MIN_INT64 : MIN_INT32) -#define MAX_UINT (is_64bit ? MAX_UINT64 : MAX_UINT32) -#define NR_INTBITS (is_64bit ? 64 : 32) - -/* Squeese an unpacked sim_fpu struct into a 32/64 bit integer */ -STATIC_INLINE_SIM_FPU (unsigned64) -pack_fpu (const sim_fpu *src, - int is_double) -{ - int sign; - unsigned64 exp; - unsigned64 fraction; - unsigned64 packed; - - switch (src->class) - { - /* create a NaN */ - case sim_fpu_class_qnan: - sign = src->sign; - exp = EXPMAX; - /* force fraction to correct class */ - fraction = src->fraction; - fraction >>= NR_GUARDS; -#ifdef SIM_QUIET_NAN_NEGATED - fraction |= QUIET_NAN - 1; -#else - fraction |= QUIET_NAN; -#endif - break; - case sim_fpu_class_snan: - sign = src->sign; - exp = EXPMAX; - /* force fraction to correct class */ - fraction = src->fraction; - fraction >>= NR_GUARDS; - fraction &= ~QUIET_NAN; - break; - case sim_fpu_class_infinity: - sign = src->sign; - exp = EXPMAX; - fraction = 0; - break; - case sim_fpu_class_zero: - sign = src->sign; - exp = 0; - fraction = 0; - break; - case sim_fpu_class_number: - case sim_fpu_class_denorm: - ASSERT (src->fraction >= IMPLICIT_1); - ASSERT (src->fraction < IMPLICIT_2); - if (src->normal_exp < NORMAL_EXPMIN) - { - /* This number's exponent is too low to fit into the bits - available in the number We'll denormalize the number by - storing zero in the exponent and shift the fraction to - the right to make up for it. */ - int nr_shift = NORMAL_EXPMIN - src->normal_exp; - if (nr_shift > NR_FRACBITS) - { - /* underflow, just make the number zero */ - sign = src->sign; - exp = 0; - fraction = 0; - } - else - { - sign = src->sign; - exp = 0; - /* Shift by the value */ - fraction = src->fraction; - fraction >>= NR_GUARDS; - fraction >>= nr_shift; - } - } - else if (src->normal_exp > NORMAL_EXPMAX) - { - /* Infinity */ - sign = src->sign; - exp = EXPMAX; - fraction = 0; - } - else - { - exp = (src->normal_exp + EXPBIAS); - sign = src->sign; - fraction = src->fraction; - /* FIXME: Need to round according to WITH_SIM_FPU_ROUNDING - or some such */ - /* Round to nearest: If the guard bits are the all zero, but - the first, then we're half way between two numbers, - choose the one which makes the lsb of the answer 0. */ - if ((fraction & GUARDMASK) == GUARDMSB) - { - if ((fraction & (GUARDMSB << 1))) - fraction += (GUARDMSB << 1); - } - else - { - /* Add a one to the guards to force round to nearest */ - fraction += GUARDROUND; - } - if ((fraction & IMPLICIT_2)) /* rounding resulted in carry */ - { - exp += 1; - fraction >>= 1; - } - fraction >>= NR_GUARDS; - /* When exp == EXPMAX (overflow from carry) fraction must - have been made zero */ - ASSERT ((exp == EXPMAX) <= ((fraction & ~IMPLICIT_1) == 0)); - } - break; - default: - abort (); - } - - packed = ((sign ? SIGNBIT : 0) - | (exp << NR_FRACBITS) - | LSMASKED64 (fraction, NR_FRACBITS - 1, 0)); - - /* trace operation */ -#if 0 - if (is_double) - { - } - else - { - printf ("pack_fpu: "); - printf ("-> %c%0lX.%06lX\n", - LSMASKED32 (packed, 31, 31) ? '8' : '0', - (long) LSEXTRACTED32 (packed, 30, 23), - (long) LSEXTRACTED32 (packed, 23 - 1, 0)); - } -#endif - - return packed; -} - - -/* Unpack a 32/64 bit integer into a sim_fpu structure */ -STATIC_INLINE_SIM_FPU (void) -unpack_fpu (sim_fpu *dst, unsigned64 packed, int is_double) -{ - unsigned64 fraction = LSMASKED64 (packed, NR_FRACBITS - 1, 0); - unsigned exp = LSEXTRACTED64 (packed, NR_EXPBITS + NR_FRACBITS - 1, NR_FRACBITS); - int sign = (packed & SIGNBIT) != 0; - - if (exp == 0) - { - /* Hmm. Looks like 0 */ - if (fraction == 0) - { - /* tastes like zero */ - dst->class = sim_fpu_class_zero; - dst->sign = sign; - dst->normal_exp = 0; - } - else - { - /* Zero exponent with non zero fraction - it's denormalized, - so there isn't a leading implicit one - we'll shift it so - it gets one. */ - dst->normal_exp = exp - EXPBIAS + 1; - dst->class = sim_fpu_class_denorm; - dst->sign = sign; - fraction <<= NR_GUARDS; - while (fraction < IMPLICIT_1) - { - fraction <<= 1; - dst->normal_exp--; - } - dst->fraction = fraction; - } - } - else if (exp == EXPMAX) - { - /* Huge exponent*/ - if (fraction == 0) - { - /* Attached to a zero fraction - means infinity */ - dst->class = sim_fpu_class_infinity; - dst->sign = sign; - /* dst->normal_exp = EXPBIAS; */ - /* dst->fraction = 0; */ - } - else - { - int qnan; - - /* Non zero fraction, means NaN */ - dst->sign = sign; - dst->fraction = (fraction << NR_GUARDS); -#ifdef SIM_QUIET_NAN_NEGATED - qnan = (fraction & QUIET_NAN) == 0; -#else - qnan = fraction >= QUIET_NAN; -#endif - if (qnan) - dst->class = sim_fpu_class_qnan; - else - dst->class = sim_fpu_class_snan; - } - } - else - { - /* Nothing strange about this number */ - dst->class = sim_fpu_class_number; - dst->sign = sign; - dst->fraction = ((fraction << NR_GUARDS) | IMPLICIT_1); - dst->normal_exp = exp - EXPBIAS; - } - - /* trace operation */ -#if 0 - if (is_double) - { - } - else - { - printf ("unpack_fpu: %c%02lX.%06lX ->\n", - LSMASKED32 (packed, 31, 31) ? '8' : '0', - (long) LSEXTRACTED32 (packed, 30, 23), - (long) LSEXTRACTED32 (packed, 23 - 1, 0)); - } -#endif - - /* sanity checks */ - { - sim_fpu_map val; - val.i = pack_fpu (dst, 1); - if (is_double) - { - ASSERT (val.i == packed); - } - else - { - unsigned32 val = pack_fpu (dst, 0); - unsigned32 org = packed; - ASSERT (val == org); - } - } -} - - -/* Convert a floating point into an integer */ -STATIC_INLINE_SIM_FPU (int) -fpu2i (signed64 *i, - const sim_fpu *s, - int is_64bit, - sim_fpu_round round) -{ - unsigned64 tmp; - int shift; - int status = 0; - if (sim_fpu_is_zero (s)) - { - *i = 0; - return 0; - } - if (sim_fpu_is_snan (s)) - { - *i = MIN_INT; /* FIXME */ - return sim_fpu_status_invalid_cvi; - } - if (sim_fpu_is_qnan (s)) - { - *i = MIN_INT; /* FIXME */ - return sim_fpu_status_invalid_cvi; - } - /* map infinity onto MAX_INT... */ - if (sim_fpu_is_infinity (s)) - { - *i = s->sign ? MIN_INT : MAX_INT; - return sim_fpu_status_invalid_cvi; - } - /* it is a number, but a small one */ - if (s->normal_exp < 0) - { - *i = 0; - return sim_fpu_status_inexact; - } - /* Is the floating point MIN_INT or just close? */ - if (s->sign && s->normal_exp == (NR_INTBITS - 1)) - { - *i = MIN_INT; - ASSERT (s->fraction >= IMPLICIT_1); - if (s->fraction == IMPLICIT_1) - return 0; /* exact */ - if (is_64bit) /* can't round */ - return sim_fpu_status_invalid_cvi; /* must be overflow */ - /* For a 32bit with MAX_INT, rounding is possible */ - switch (round) - { - case sim_fpu_round_default: - abort (); - case sim_fpu_round_zero: - if ((s->fraction & FRAC32MASK) != IMPLICIT_1) - return sim_fpu_status_invalid_cvi; - else - return sim_fpu_status_inexact; - break; - case sim_fpu_round_near: - { - if ((s->fraction & FRAC32MASK) != IMPLICIT_1) - return sim_fpu_status_invalid_cvi; - else if ((s->fraction & !FRAC32MASK) >= (~FRAC32MASK >> 1)) - return sim_fpu_status_invalid_cvi; - else - return sim_fpu_status_inexact; - } - case sim_fpu_round_up: - if ((s->fraction & FRAC32MASK) == IMPLICIT_1) - return sim_fpu_status_inexact; - else - return sim_fpu_status_invalid_cvi; - case sim_fpu_round_down: - return sim_fpu_status_invalid_cvi; - } - } - /* Would right shifting result in the FRAC being shifted into - (through) the integer's sign bit? */ - if (s->normal_exp > (NR_INTBITS - 2)) - { - *i = s->sign ? MIN_INT : MAX_INT; - return sim_fpu_status_invalid_cvi; - } - /* normal number shift it into place */ - tmp = s->fraction; - shift = (s->normal_exp - (NR_FRAC_GUARD)); - if (shift > 0) - { - tmp <<= shift; - } - else - { - shift = -shift; - if (tmp & ((SIGNED64 (1) << shift) - 1)) - status |= sim_fpu_status_inexact; - tmp >>= shift; - } - *i = s->sign ? (-tmp) : (tmp); - return status; -} - -/* convert an integer into a floating point */ -STATIC_INLINE_SIM_FPU (int) -i2fpu (sim_fpu *f, signed64 i, int is_64bit) -{ - int status = 0; - if (i == 0) - { - f->class = sim_fpu_class_zero; - f->sign = 0; - f->normal_exp = 0; - } - else - { - f->class = sim_fpu_class_number; - f->sign = (i < 0); - f->normal_exp = NR_FRAC_GUARD; - - if (f->sign) - { - /* Special case for minint, since there is no corresponding - +ve integer representation for it */ - if (i == MIN_INT) - { - f->fraction = IMPLICIT_1; - f->normal_exp = NR_INTBITS - 1; - } - else - f->fraction = (-i); - } - else - f->fraction = i; - - if (f->fraction >= IMPLICIT_2) - { - do - { - f->fraction = (f->fraction >> 1) | (f->fraction & 1); - f->normal_exp += 1; - } - while (f->fraction >= IMPLICIT_2); - } - else if (f->fraction < IMPLICIT_1) - { - do - { - f->fraction <<= 1; - f->normal_exp -= 1; - } - while (f->fraction < IMPLICIT_1); - } - } - - /* trace operation */ -#if 0 - { - printf ("i2fpu: 0x%08lX ->\n", (long) i); - } -#endif - - /* sanity check */ - { - signed64 val; - fpu2i (&val, f, is_64bit, sim_fpu_round_zero); - if (i >= MIN_INT32 && i <= MAX_INT32) - { - ASSERT (val == i); - } - } - - return status; -} - - -/* Convert a floating point into an integer */ -STATIC_INLINE_SIM_FPU (int) -fpu2u (unsigned64 *u, const sim_fpu *s, int is_64bit) -{ - const int is_double = 1; - unsigned64 tmp; - int shift; - if (sim_fpu_is_zero (s)) - { - *u = 0; - return 0; - } - if (sim_fpu_is_nan (s)) - { - *u = 0; - return 0; - } - /* it is a negative number */ - if (s->sign) - { - *u = 0; - return 0; - } - /* get reasonable MAX_USI_INT... */ - if (sim_fpu_is_infinity (s)) - { - *u = MAX_UINT; - return 0; - } - /* it is a number, but a small one */ - if (s->normal_exp < 0) - { - *u = 0; - return 0; - } - /* overflow */ - if (s->normal_exp > (NR_INTBITS - 1)) - { - *u = MAX_UINT; - return 0; - } - /* normal number */ - tmp = (s->fraction & ~PADMASK); - shift = (s->normal_exp - (NR_FRACBITS + NR_GUARDS)); - if (shift > 0) - { - tmp <<= shift; - } - else - { - shift = -shift; - tmp >>= shift; - } - *u = tmp; - return 0; -} - -/* Convert an unsigned integer into a floating point */ -STATIC_INLINE_SIM_FPU (int) -u2fpu (sim_fpu *f, unsigned64 u, int is_64bit) -{ - if (u == 0) - { - f->class = sim_fpu_class_zero; - f->sign = 0; - f->normal_exp = 0; - } - else - { - f->class = sim_fpu_class_number; - f->sign = 0; - f->normal_exp = NR_FRAC_GUARD; - f->fraction = u; - - while (f->fraction < IMPLICIT_1) - { - f->fraction <<= 1; - f->normal_exp -= 1; - } - } - return 0; -} - - -/* register <-> sim_fpu */ - -INLINE_SIM_FPU (void) -sim_fpu_32to (sim_fpu *f, unsigned32 s) -{ - unpack_fpu (f, s, 0); -} - - -INLINE_SIM_FPU (void) -sim_fpu_232to (sim_fpu *f, unsigned32 h, unsigned32 l) -{ - unsigned64 s = h; - s = (s << 32) | l; - unpack_fpu (f, s, 1); -} - - -INLINE_SIM_FPU (void) -sim_fpu_64to (sim_fpu *f, unsigned64 s) -{ - unpack_fpu (f, s, 1); -} - - -INLINE_SIM_FPU (void) -sim_fpu_to32 (unsigned32 *s, - const sim_fpu *f) -{ - *s = pack_fpu (f, 0); -} - - -INLINE_SIM_FPU (void) -sim_fpu_to232 (unsigned32 *h, unsigned32 *l, - const sim_fpu *f) -{ - unsigned64 s = pack_fpu (f, 1); - *l = s; - *h = (s >> 32); -} - - -INLINE_SIM_FPU (void) -sim_fpu_to64 (unsigned64 *u, - const sim_fpu *f) -{ - *u = pack_fpu (f, 1); -} - - -INLINE_SIM_FPU (void) -sim_fpu_fractionto (sim_fpu *f, - int sign, - int normal_exp, - unsigned64 fraction, - int precision) -{ - int shift = (NR_FRAC_GUARD - precision); - f->class = sim_fpu_class_number; - f->sign = sign; - f->normal_exp = normal_exp; - /* shift the fraction to where sim-fpu expects it */ - if (shift >= 0) - f->fraction = (fraction << shift); - else - f->fraction = (fraction >> -shift); - f->fraction |= IMPLICIT_1; -} - - -INLINE_SIM_FPU (unsigned64) -sim_fpu_tofraction (const sim_fpu *d, - int precision) -{ - /* we have NR_FRAC_GUARD bits, we want only PRECISION bits */ - int shift = (NR_FRAC_GUARD - precision); - unsigned64 fraction = (d->fraction & ~IMPLICIT_1); - if (shift >= 0) - return fraction >> shift; - else - return fraction << -shift; -} - - -/* Rounding */ - -STATIC_INLINE_SIM_FPU (int) -do_normal_overflow (sim_fpu *f, - int is_double, - sim_fpu_round round) -{ - switch (round) - { - case sim_fpu_round_default: - return 0; - case sim_fpu_round_near: - f->class = sim_fpu_class_infinity; - break; - case sim_fpu_round_up: - if (!f->sign) - f->class = sim_fpu_class_infinity; - break; - case sim_fpu_round_down: - if (f->sign) - f->class = sim_fpu_class_infinity; - break; - case sim_fpu_round_zero: - break; - } - f->normal_exp = NORMAL_EXPMAX; - f->fraction = LSMASK64 (NR_FRAC_GUARD, NR_GUARDS); - return (sim_fpu_status_overflow | sim_fpu_status_inexact); -} - -STATIC_INLINE_SIM_FPU (int) -do_normal_underflow (sim_fpu *f, - int is_double, - sim_fpu_round round) -{ - switch (round) - { - case sim_fpu_round_default: - return 0; - case sim_fpu_round_near: - f->class = sim_fpu_class_zero; - break; - case sim_fpu_round_up: - if (f->sign) - f->class = sim_fpu_class_zero; - break; - case sim_fpu_round_down: - if (!f->sign) - f->class = sim_fpu_class_zero; - break; - case sim_fpu_round_zero: - f->class = sim_fpu_class_zero; - break; - } - f->normal_exp = NORMAL_EXPMIN - NR_FRACBITS; - f->fraction = IMPLICIT_1; - return (sim_fpu_status_inexact | sim_fpu_status_underflow); -} - - - -/* Round a number using NR_GUARDS. - Will return the rounded number or F->FRACTION == 0 when underflow */ - -STATIC_INLINE_SIM_FPU (int) -do_normal_round (sim_fpu *f, - int nr_guards, - sim_fpu_round round) -{ - unsigned64 guardmask = LSMASK64 (nr_guards - 1, 0); - unsigned64 guardmsb = LSBIT64 (nr_guards - 1); - unsigned64 fraclsb = guardmsb << 1; - if ((f->fraction & guardmask)) - { - int status = sim_fpu_status_inexact; - switch (round) - { - case sim_fpu_round_default: - return 0; - case sim_fpu_round_near: - if ((f->fraction & guardmsb)) - { - if ((f->fraction & fraclsb)) - { - status |= sim_fpu_status_rounded; - } - else if ((f->fraction & (guardmask >> 1))) - { - status |= sim_fpu_status_rounded; - } - } - break; - case sim_fpu_round_up: - if (!f->sign) - status |= sim_fpu_status_rounded; - break; - case sim_fpu_round_down: - if (f->sign) - status |= sim_fpu_status_rounded; - break; - case sim_fpu_round_zero: - break; - } - f->fraction &= ~guardmask; - /* round if needed, handle resulting overflow */ - if ((status & sim_fpu_status_rounded)) - { - f->fraction += fraclsb; - if ((f->fraction & IMPLICIT_2)) - { - f->fraction >>= 1; - f->normal_exp += 1; - } - } - return status; - } - else - return 0; -} - - -STATIC_INLINE_SIM_FPU (int) -do_round (sim_fpu *f, - int is_double, - sim_fpu_round round, - sim_fpu_denorm denorm) -{ - switch (f->class) - { - case sim_fpu_class_qnan: - case sim_fpu_class_zero: - case sim_fpu_class_infinity: - return 0; - break; - case sim_fpu_class_snan: - /* Quieten a SignalingNaN */ - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - break; - case sim_fpu_class_number: - case sim_fpu_class_denorm: - { - int status; - ASSERT (f->fraction < IMPLICIT_2); - ASSERT (f->fraction >= IMPLICIT_1); - if (f->normal_exp < NORMAL_EXPMIN) - { - /* This number's exponent is too low to fit into the bits - available in the number. Round off any bits that will be - discarded as a result of denormalization. Edge case is - the implicit bit shifted to GUARD0 and then rounded - up. */ - int shift = NORMAL_EXPMIN - f->normal_exp; - if (shift + NR_GUARDS <= NR_FRAC_GUARD + 1 - && !(denorm & sim_fpu_denorm_zero)) - { - status = do_normal_round (f, shift + NR_GUARDS, round); - if (f->fraction == 0) /* rounding underflowed */ - { - status |= do_normal_underflow (f, is_double, round); - } - else if (f->normal_exp < NORMAL_EXPMIN) /* still underflow? */ - { - status |= sim_fpu_status_denorm; - /* Any loss of precision when denormalizing is - underflow. Some processors check for underflow - before rounding, some after! */ - if (status & sim_fpu_status_inexact) - status |= sim_fpu_status_underflow; - /* Flag that resultant value has been denormalized */ - f->class = sim_fpu_class_denorm; - } - else if ((denorm & sim_fpu_denorm_underflow_inexact)) - { - if ((status & sim_fpu_status_inexact)) - status |= sim_fpu_status_underflow; - } - } - else - { - status = do_normal_underflow (f, is_double, round); - } - } - else if (f->normal_exp > NORMAL_EXPMAX) - { - /* Infinity */ - status = do_normal_overflow (f, is_double, round); - } - else - { - status = do_normal_round (f, NR_GUARDS, round); - if (f->fraction == 0) - /* f->class = sim_fpu_class_zero; */ - status |= do_normal_underflow (f, is_double, round); - else if (f->normal_exp > NORMAL_EXPMAX) - /* oops! rounding caused overflow */ - status |= do_normal_overflow (f, is_double, round); - } - ASSERT ((f->class == sim_fpu_class_number - || f->class == sim_fpu_class_denorm) - <= (f->fraction < IMPLICIT_2 && f->fraction >= IMPLICIT_1)); - return status; - } - } - return 0; -} - -INLINE_SIM_FPU (int) -sim_fpu_round_32 (sim_fpu *f, - sim_fpu_round round, - sim_fpu_denorm denorm) -{ - return do_round (f, 0, round, denorm); -} - -INLINE_SIM_FPU (int) -sim_fpu_round_64 (sim_fpu *f, - sim_fpu_round round, - sim_fpu_denorm denorm) -{ - return do_round (f, 1, round, denorm); -} - - - -/* Arithmetic ops */ - -INLINE_SIM_FPU (int) -sim_fpu_add (sim_fpu *f, - const sim_fpu *l, - const sim_fpu *r) -{ - if (sim_fpu_is_snan (l)) - { - *f = *l; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_snan (r)) - { - *f = *r; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_qnan (l)) - { - *f = *l; - return 0; - } - if (sim_fpu_is_qnan (r)) - { - *f = *r; - return 0; - } - if (sim_fpu_is_infinity (l)) - { - if (sim_fpu_is_infinity (r) - && l->sign != r->sign) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_isi; - } - *f = *l; - return 0; - } - if (sim_fpu_is_infinity (r)) - { - *f = *r; - return 0; - } - if (sim_fpu_is_zero (l)) - { - if (sim_fpu_is_zero (r)) - { - *f = sim_fpu_zero; - f->sign = l->sign & r->sign; - } - else - *f = *r; - return 0; - } - if (sim_fpu_is_zero (r)) - { - *f = *l; - return 0; - } - { - int status = 0; - int shift = l->normal_exp - r->normal_exp; - unsigned64 lfraction; - unsigned64 rfraction; - /* use exp of larger */ - if (shift >= NR_FRAC_GUARD) - { - /* left has much bigger magnitute */ - *f = *l; - return sim_fpu_status_inexact; - } - if (shift <= - NR_FRAC_GUARD) - { - /* right has much bigger magnitute */ - *f = *r; - return sim_fpu_status_inexact; - } - lfraction = l->fraction; - rfraction = r->fraction; - if (shift > 0) - { - f->normal_exp = l->normal_exp; - if (rfraction & LSMASK64 (shift - 1, 0)) - { - status |= sim_fpu_status_inexact; - rfraction |= LSBIT64 (shift); /* stick LSBit */ - } - rfraction >>= shift; - } - else if (shift < 0) - { - f->normal_exp = r->normal_exp; - if (lfraction & LSMASK64 (- shift - 1, 0)) - { - status |= sim_fpu_status_inexact; - lfraction |= LSBIT64 (- shift); /* stick LSBit */ - } - lfraction >>= -shift; - } - else - { - f->normal_exp = r->normal_exp; - } - - /* perform the addition */ - if (l->sign) - lfraction = - lfraction; - if (r->sign) - rfraction = - rfraction; - f->fraction = lfraction + rfraction; - - /* zero? */ - if (f->fraction == 0) - { - *f = sim_fpu_zero; - return 0; - } - - /* sign? */ - f->class = sim_fpu_class_number; - if ((signed64) f->fraction >= 0) - f->sign = 0; - else - { - f->sign = 1; - f->fraction = - f->fraction; - } - - /* normalize it */ - if ((f->fraction & IMPLICIT_2)) - { - f->fraction = (f->fraction >> 1) | (f->fraction & 1); - f->normal_exp ++; - } - else if (f->fraction < IMPLICIT_1) - { - do - { - f->fraction <<= 1; - f->normal_exp --; - } - while (f->fraction < IMPLICIT_1); - } - ASSERT (f->fraction >= IMPLICIT_1 && f->fraction < IMPLICIT_2); - return status; - } -} - - -INLINE_SIM_FPU (int) -sim_fpu_sub (sim_fpu *f, - const sim_fpu *l, - const sim_fpu *r) -{ - if (sim_fpu_is_snan (l)) - { - *f = *l; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_snan (r)) - { - *f = *r; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_qnan (l)) - { - *f = *l; - return 0; - } - if (sim_fpu_is_qnan (r)) - { - *f = *r; - return 0; - } - if (sim_fpu_is_infinity (l)) - { - if (sim_fpu_is_infinity (r) - && l->sign == r->sign) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_isi; - } - *f = *l; - return 0; - } - if (sim_fpu_is_infinity (r)) - { - *f = *r; - f->sign = !r->sign; - return 0; - } - if (sim_fpu_is_zero (l)) - { - if (sim_fpu_is_zero (r)) - { - *f = sim_fpu_zero; - f->sign = l->sign & !r->sign; - } - else - { - *f = *r; - f->sign = !r->sign; - } - return 0; - } - if (sim_fpu_is_zero (r)) - { - *f = *l; - return 0; - } - { - int status = 0; - int shift = l->normal_exp - r->normal_exp; - unsigned64 lfraction; - unsigned64 rfraction; - /* use exp of larger */ - if (shift >= NR_FRAC_GUARD) - { - /* left has much bigger magnitute */ - *f = *l; - return sim_fpu_status_inexact; - } - if (shift <= - NR_FRAC_GUARD) - { - /* right has much bigger magnitute */ - *f = *r; - f->sign = !r->sign; - return sim_fpu_status_inexact; - } - lfraction = l->fraction; - rfraction = r->fraction; - if (shift > 0) - { - f->normal_exp = l->normal_exp; - if (rfraction & LSMASK64 (shift - 1, 0)) - { - status |= sim_fpu_status_inexact; - rfraction |= LSBIT64 (shift); /* stick LSBit */ - } - rfraction >>= shift; - } - else if (shift < 0) - { - f->normal_exp = r->normal_exp; - if (lfraction & LSMASK64 (- shift - 1, 0)) - { - status |= sim_fpu_status_inexact; - lfraction |= LSBIT64 (- shift); /* stick LSBit */ - } - lfraction >>= -shift; - } - else - { - f->normal_exp = r->normal_exp; - } - - /* perform the subtraction */ - if (l->sign) - lfraction = - lfraction; - if (!r->sign) - rfraction = - rfraction; - f->fraction = lfraction + rfraction; - - /* zero? */ - if (f->fraction == 0) - { - *f = sim_fpu_zero; - return 0; - } - - /* sign? */ - f->class = sim_fpu_class_number; - if ((signed64) f->fraction >= 0) - f->sign = 0; - else - { - f->sign = 1; - f->fraction = - f->fraction; - } - - /* normalize it */ - if ((f->fraction & IMPLICIT_2)) - { - f->fraction = (f->fraction >> 1) | (f->fraction & 1); - f->normal_exp ++; - } - else if (f->fraction < IMPLICIT_1) - { - do - { - f->fraction <<= 1; - f->normal_exp --; - } - while (f->fraction < IMPLICIT_1); - } - ASSERT (f->fraction >= IMPLICIT_1 && f->fraction < IMPLICIT_2); - return status; - } -} - - -INLINE_SIM_FPU (int) -sim_fpu_mul (sim_fpu *f, - const sim_fpu *l, - const sim_fpu *r) -{ - if (sim_fpu_is_snan (l)) - { - *f = *l; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_snan (r)) - { - *f = *r; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_qnan (l)) - { - *f = *l; - return 0; - } - if (sim_fpu_is_qnan (r)) - { - *f = *r; - return 0; - } - if (sim_fpu_is_infinity (l)) - { - if (sim_fpu_is_zero (r)) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_imz; - } - *f = *l; - f->sign = l->sign ^ r->sign; - return 0; - } - if (sim_fpu_is_infinity (r)) - { - if (sim_fpu_is_zero (l)) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_imz; - } - *f = *r; - f->sign = l->sign ^ r->sign; - return 0; - } - if (sim_fpu_is_zero (l) || sim_fpu_is_zero (r)) - { - *f = sim_fpu_zero; - f->sign = l->sign ^ r->sign; - return 0; - } - /* Calculate the mantissa by multiplying both 64bit numbers to get a - 128 bit number */ - { - unsigned64 low; - unsigned64 high; - unsigned64 nl = l->fraction & 0xffffffff; - unsigned64 nh = l->fraction >> 32; - unsigned64 ml = r->fraction & 0xffffffff; - unsigned64 mh = r->fraction >>32; - unsigned64 pp_ll = ml * nl; - unsigned64 pp_hl = mh * nl; - unsigned64 pp_lh = ml * nh; - unsigned64 pp_hh = mh * nh; - unsigned64 res2 = 0; - unsigned64 res0 = 0; - unsigned64 ps_hh__ = pp_hl + pp_lh; - if (ps_hh__ < pp_hl) - res2 += UNSIGNED64 (0x100000000); - pp_hl = (ps_hh__ << 32) & UNSIGNED64 (0xffffffff00000000); - res0 = pp_ll + pp_hl; - if (res0 < pp_ll) - res2++; - res2 += ((ps_hh__ >> 32) & 0xffffffff) + pp_hh; - high = res2; - low = res0; - - f->normal_exp = l->normal_exp + r->normal_exp; - f->sign = l->sign ^ r->sign; - f->class = sim_fpu_class_number; - - /* Input is bounded by [1,2) ; [2^60,2^61) - Output is bounded by [1,4) ; [2^120,2^122) */ - - /* Adjust the exponent according to where the decimal point ended - up in the high 64 bit word. In the source the decimal point - was at NR_FRAC_GUARD. */ - f->normal_exp += NR_FRAC_GUARD + 64 - (NR_FRAC_GUARD * 2); - - /* The high word is bounded according to the above. Consequently - it has never overflowed into IMPLICIT_2. */ - ASSERT (high < LSBIT64 (((NR_FRAC_GUARD + 1) * 2) - 64)); - ASSERT (high >= LSBIT64 ((NR_FRAC_GUARD * 2) - 64)); - ASSERT (LSBIT64 (((NR_FRAC_GUARD + 1) * 2) - 64) < IMPLICIT_1); - - /* normalize */ - do - { - f->normal_exp--; - high <<= 1; - if (low & LSBIT64 (63)) - high |= 1; - low <<= 1; - } - while (high < IMPLICIT_1); - - ASSERT (high >= IMPLICIT_1 && high < IMPLICIT_2); - if (low != 0) - { - f->fraction = (high | 1); /* sticky */ - return sim_fpu_status_inexact; - } - else - { - f->fraction = high; - return 0; - } - return 0; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_div (sim_fpu *f, - const sim_fpu *l, - const sim_fpu *r) -{ - if (sim_fpu_is_snan (l)) - { - *f = *l; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_snan (r)) - { - *f = *r; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_qnan (l)) - { - *f = *l; - f->class = sim_fpu_class_qnan; - return 0; - } - if (sim_fpu_is_qnan (r)) - { - *f = *r; - f->class = sim_fpu_class_qnan; - return 0; - } - if (sim_fpu_is_infinity (l)) - { - if (sim_fpu_is_infinity (r)) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_idi; - } - else - { - *f = *l; - f->sign = l->sign ^ r->sign; - return 0; - } - } - if (sim_fpu_is_zero (l)) - { - if (sim_fpu_is_zero (r)) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_zdz; - } - else - { - *f = *l; - f->sign = l->sign ^ r->sign; - return 0; - } - } - if (sim_fpu_is_infinity (r)) - { - *f = sim_fpu_zero; - f->sign = l->sign ^ r->sign; - return 0; - } - if (sim_fpu_is_zero (r)) - { - f->class = sim_fpu_class_infinity; - f->sign = l->sign ^ r->sign; - return sim_fpu_status_invalid_div0; - } - - /* Calculate the mantissa by multiplying both 64bit numbers to get a - 128 bit number */ - { - /* quotient = ( ( numerator / denominator) - x 2^(numerator exponent - denominator exponent) - */ - unsigned64 numerator; - unsigned64 denominator; - unsigned64 quotient; - unsigned64 bit; - - f->class = sim_fpu_class_number; - f->sign = l->sign ^ r->sign; - f->normal_exp = l->normal_exp - r->normal_exp; - - numerator = l->fraction; - denominator = r->fraction; - - /* Fraction will be less than 1.0 */ - if (numerator < denominator) - { - numerator <<= 1; - f->normal_exp--; - } - ASSERT (numerator >= denominator); - - /* Gain extra precision, already used one spare bit */ - numerator <<= NR_SPARE; - denominator <<= NR_SPARE; - - /* Does divide one bit at a time. Optimize??? */ - quotient = 0; - bit = (IMPLICIT_1 << NR_SPARE); - while (bit) - { - if (numerator >= denominator) - { - quotient |= bit; - numerator -= denominator; - } - bit >>= 1; - numerator <<= 1; - } - - /* discard (but save) the extra bits */ - if ((quotient & LSMASK64 (NR_SPARE -1, 0))) - quotient = (quotient >> NR_SPARE) | 1; - else - quotient = (quotient >> NR_SPARE); - - f->fraction = quotient; - ASSERT (f->fraction >= IMPLICIT_1 && f->fraction < IMPLICIT_2); - if (numerator != 0) - { - f->fraction |= 1; /* stick remaining bits */ - return sim_fpu_status_inexact; - } - else - return 0; - } -} - - -INLINE_SIM_FPU (int) -sim_fpu_max (sim_fpu *f, - const sim_fpu *l, - const sim_fpu *r) -{ - if (sim_fpu_is_snan (l)) - { - *f = *l; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_snan (r)) - { - *f = *r; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_qnan (l)) - { - *f = *l; - return 0; - } - if (sim_fpu_is_qnan (r)) - { - *f = *r; - return 0; - } - if (sim_fpu_is_infinity (l)) - { - if (sim_fpu_is_infinity (r) - && l->sign == r->sign) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_isi; - } - if (l->sign) - *f = *r; /* -inf < anything */ - else - *f = *l; /* +inf > anthing */ - return 0; - } - if (sim_fpu_is_infinity (r)) - { - if (r->sign) - *f = *l; /* anything > -inf */ - else - *f = *r; /* anthing < +inf */ - return 0; - } - if (l->sign > r->sign) - { - *f = *r; /* -ve < +ve */ - return 0; - } - if (l->sign < r->sign) - { - *f = *l; /* +ve > -ve */ - return 0; - } - ASSERT (l->sign == r->sign); - if (l->normal_exp > r->normal_exp - || (l->normal_exp == r->normal_exp && - l->fraction > r->fraction)) - { - /* |l| > |r| */ - if (l->sign) - *f = *r; /* -ve < -ve */ - else - *f = *l; /* +ve > +ve */ - return 0; - } - else - { - /* |l| <= |r| */ - if (l->sign) - *f = *l; /* -ve > -ve */ - else - *f = *r; /* +ve < +ve */ - return 0; - } -} - - -INLINE_SIM_FPU (int) -sim_fpu_min (sim_fpu *f, - const sim_fpu *l, - const sim_fpu *r) -{ - if (sim_fpu_is_snan (l)) - { - *f = *l; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_snan (r)) - { - *f = *r; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_qnan (l)) - { - *f = *l; - return 0; - } - if (sim_fpu_is_qnan (r)) - { - *f = *r; - return 0; - } - if (sim_fpu_is_infinity (l)) - { - if (sim_fpu_is_infinity (r) - && l->sign == r->sign) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_isi; - } - if (l->sign) - *f = *l; /* -inf < anything */ - else - *f = *r; /* +inf > anthing */ - return 0; - } - if (sim_fpu_is_infinity (r)) - { - if (r->sign) - *f = *r; /* anything > -inf */ - else - *f = *l; /* anything < +inf */ - return 0; - } - if (l->sign > r->sign) - { - *f = *l; /* -ve < +ve */ - return 0; - } - if (l->sign < r->sign) - { - *f = *r; /* +ve > -ve */ - return 0; - } - ASSERT (l->sign == r->sign); - if (l->normal_exp > r->normal_exp - || (l->normal_exp == r->normal_exp && - l->fraction > r->fraction)) - { - /* |l| > |r| */ - if (l->sign) - *f = *l; /* -ve < -ve */ - else - *f = *r; /* +ve > +ve */ - return 0; - } - else - { - /* |l| <= |r| */ - if (l->sign) - *f = *r; /* -ve > -ve */ - else - *f = *l; /* +ve < +ve */ - return 0; - } -} - - -INLINE_SIM_FPU (int) -sim_fpu_neg (sim_fpu *f, - const sim_fpu *r) -{ - if (sim_fpu_is_snan (r)) - { - *f = *r; - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_qnan (r)) - { - *f = *r; - return 0; - } - *f = *r; - f->sign = !r->sign; - return 0; -} - - -INLINE_SIM_FPU (int) -sim_fpu_abs (sim_fpu *f, - const sim_fpu *r) -{ - *f = *r; - f->sign = 0; - if (sim_fpu_is_snan (r)) - { - f->class = sim_fpu_class_qnan; - return sim_fpu_status_invalid_snan; - } - return 0; -} - - -INLINE_SIM_FPU (int) -sim_fpu_inv (sim_fpu *f, - const sim_fpu *r) -{ - return sim_fpu_div (f, &sim_fpu_one, r); -} - - -INLINE_SIM_FPU (int) -sim_fpu_sqrt (sim_fpu *f, - const sim_fpu *r) -{ - if (sim_fpu_is_snan (r)) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_snan; - } - if (sim_fpu_is_qnan (r)) - { - *f = sim_fpu_qnan; - return 0; - } - if (sim_fpu_is_zero (r)) - { - f->class = sim_fpu_class_zero; - f->sign = r->sign; - f->normal_exp = 0; - return 0; - } - if (sim_fpu_is_infinity (r)) - { - if (r->sign) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_sqrt; - } - else - { - f->class = sim_fpu_class_infinity; - f->sign = 0; - f->sign = 0; - return 0; - } - } - if (r->sign) - { - *f = sim_fpu_qnan; - return sim_fpu_status_invalid_sqrt; - } - - /* @(#)e_sqrt.c 5.1 93/09/24 */ - /* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - - /* __ieee754_sqrt(x) - * Return correctly rounded sqrt. - * ------------------------------------------ - * | Use the hardware sqrt if you have one | - * ------------------------------------------ - * Method: - * Bit by bit method using integer arithmetic. (Slow, but portable) - * 1. Normalization - * Scale x to y in [1,4) with even powers of 2: - * find an integer k such that 1 <= (y=x*2^(2k)) < 4, then - * sqrt(x) = 2^k * sqrt(y) - - - - Since: - - sqrt ( x*2^(2m) ) = sqrt(x).2^m ; m even - - sqrt ( x*2^(2m + 1) ) = sqrt(2.x).2^m ; m odd - - Define: - - y = ((m even) ? x : 2.x) - - Then: - - y in [1, 4) ; [IMPLICIT_1,IMPLICIT_4) - - And: - - sqrt (y) in [1, 2) ; [IMPLICIT_1,IMPLICIT_2) - - - * 2. Bit by bit computation - * Let q = sqrt(y) truncated to i bit after binary point (q = 1), - * i 0 - * i+1 2 - * s = 2*q , and y = 2 * ( y - q ). (1) - * i i i i - * - * To compute q from q , one checks whether - * i+1 i - * - * -(i+1) 2 - * (q + 2 ) <= y. (2) - * i - * -(i+1) - * If (2) is false, then q = q ; otherwise q = q + 2 . - * i+1 i i+1 i - * - * With some algebric manipulation, it is not difficult to see - * that (2) is equivalent to - * -(i+1) - * s + 2 <= y (3) - * i i - * - * The advantage of (3) is that s and y can be computed by - * i i - * the following recurrence formula: - * if (3) is false - * - * s = s , y = y ; (4) - * i+1 i i+1 i - * - - - - NOTE: y = 2*y - - i+1 i - - - * otherwise, - * -i -(i+1) - * s = s + 2 , y = y - s - 2 (5) - * i+1 i i+1 i i - * - - - - -(i+1) - - NOTE: y = 2 (y - s - 2 ) - - i+1 i i - - - * One may easily use induction to prove (4) and (5). - * Note. Since the left hand side of (3) contain only i+2 bits, - * it does not necessary to do a full (53-bit) comparison - * in (3). - * 3. Final rounding - * After generating the 53 bits result, we compute one more bit. - * Together with the remainder, we can decide whether the - * result is exact, bigger than 1/2ulp, or less than 1/2ulp - * (it will never equal to 1/2ulp). - * The rounding mode can be detected by checking whether - * huge + tiny is equal to huge, and whether huge - tiny is - * equal to huge for some floating point number "huge" and "tiny". - * - * Special cases: - * sqrt(+-0) = +-0 ... exact - * sqrt(inf) = inf - * sqrt(-ve) = NaN ... with invalid signal - * sqrt(NaN) = NaN ... with invalid signal for signaling NaN - * - * Other methods : see the appended file at the end of the program below. - *--------------- - */ - - { - /* generate sqrt(x) bit by bit */ - unsigned64 y; - unsigned64 q; - unsigned64 s; - unsigned64 b; - - f->class = sim_fpu_class_number; - f->sign = 0; - y = r->fraction; - f->normal_exp = (r->normal_exp >> 1); /* exp = [exp/2] */ - - /* odd exp, double x to make it even */ - ASSERT (y >= IMPLICIT_1 && y < IMPLICIT_4); - if ((r->normal_exp & 1)) - { - y += y; - } - ASSERT (y >= IMPLICIT_1 && y < (IMPLICIT_2 << 1)); - - /* Let loop determine first value of s (either 1 or 2) */ - b = IMPLICIT_1; - q = 0; - s = 0; - - while (b) - { - unsigned64 t = s + b; - if (t <= y) - { - s |= (b << 1); - y -= t; - q |= b; - } - y <<= 1; - b >>= 1; - } - - ASSERT (q >= IMPLICIT_1 && q < IMPLICIT_2); - f->fraction = q; - if (y != 0) - { - f->fraction |= 1; /* stick remaining bits */ - return sim_fpu_status_inexact; - } - else - return 0; - } -} - - -/* int/long <-> sim_fpu */ - -INLINE_SIM_FPU (int) -sim_fpu_i32to (sim_fpu *f, - signed32 i, - sim_fpu_round round) -{ - i2fpu (f, i, 0); - return 0; -} - -INLINE_SIM_FPU (int) -sim_fpu_u32to (sim_fpu *f, - unsigned32 u, - sim_fpu_round round) -{ - u2fpu (f, u, 0); - return 0; -} - -INLINE_SIM_FPU (int) -sim_fpu_i64to (sim_fpu *f, - signed64 i, - sim_fpu_round round) -{ - i2fpu (f, i, 1); - return 0; -} - -INLINE_SIM_FPU (int) -sim_fpu_u64to (sim_fpu *f, - unsigned64 u, - sim_fpu_round round) -{ - u2fpu (f, u, 1); - return 0; -} - - -INLINE_SIM_FPU (int) -sim_fpu_to32i (signed32 *i, - const sim_fpu *f, - sim_fpu_round round) -{ - signed64 i64; - int status = fpu2i (&i64, f, 0, round); - *i = i64; - return status; -} - -INLINE_SIM_FPU (int) -sim_fpu_to32u (unsigned32 *u, - const sim_fpu *f, - sim_fpu_round round) -{ - unsigned64 u64; - int status = fpu2u (&u64, f, 0); - *u = u64; - return status; -} - -INLINE_SIM_FPU (int) -sim_fpu_to64i (signed64 *i, - const sim_fpu *f, - sim_fpu_round round) -{ - return fpu2i (i, f, 1, round); -} - - -INLINE_SIM_FPU (int) -sim_fpu_to64u (unsigned64 *u, - const sim_fpu *f, - sim_fpu_round round) -{ - return fpu2u (u, f, 1); -} - - - -/* sim_fpu -> host format */ - -#if 0 -INLINE_SIM_FPU (float) -sim_fpu_2f (const sim_fpu *f) -{ - return fval.d; -} -#endif - - -INLINE_SIM_FPU (double) -sim_fpu_2d (const sim_fpu *s) -{ - sim_fpu_map val; - if (sim_fpu_is_snan (s)) - { - /* gag SNaN's */ - sim_fpu n = *s; - n.class = sim_fpu_class_qnan; - val.i = pack_fpu (&n, 1); - } - else - { - val.i = pack_fpu (s, 1); - } - return val.d; -} - - -#if 0 -INLINE_SIM_FPU (void) -sim_fpu_f2 (sim_fpu *f, - float s) -{ - sim_fpu_map val; - val.d = s; - unpack_fpu (f, val.i, 1); -} -#endif - - -INLINE_SIM_FPU (void) -sim_fpu_d2 (sim_fpu *f, - double d) -{ - sim_fpu_map val; - val.d = d; - unpack_fpu (f, val.i, 1); -} - - -/* General */ - -INLINE_SIM_FPU (int) -sim_fpu_is_nan (const sim_fpu *d) -{ - switch (d->class) - { - case sim_fpu_class_qnan: - case sim_fpu_class_snan: - return 1; - default: - return 0; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_is_qnan (const sim_fpu *d) -{ - switch (d->class) - { - case sim_fpu_class_qnan: - return 1; - default: - return 0; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_is_snan (const sim_fpu *d) -{ - switch (d->class) - { - case sim_fpu_class_snan: - return 1; - default: - return 0; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_is_zero (const sim_fpu *d) -{ - switch (d->class) - { - case sim_fpu_class_zero: - return 1; - default: - return 0; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_is_infinity (const sim_fpu *d) -{ - switch (d->class) - { - case sim_fpu_class_infinity: - return 1; - default: - return 0; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_is_number (const sim_fpu *d) -{ - switch (d->class) - { - case sim_fpu_class_denorm: - case sim_fpu_class_number: - return 1; - default: - return 0; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_is_denorm (const sim_fpu *d) -{ - switch (d->class) - { - case sim_fpu_class_denorm: - return 1; - default: - return 0; - } -} - - -INLINE_SIM_FPU (int) -sim_fpu_sign (const sim_fpu *d) -{ - return d->sign; -} - - -INLINE_SIM_FPU (int) -sim_fpu_exp (const sim_fpu *d) -{ - return d->normal_exp; -} - - -INLINE_SIM_FPU (unsigned64) -sim_fpu_fraction (const sim_fpu *d) -{ - return d->fraction; -} - - -INLINE_SIM_FPU (unsigned64) -sim_fpu_guard (const sim_fpu *d, int is_double) -{ - unsigned64 rv; - unsigned64 guardmask = LSMASK64 (NR_GUARDS - 1, 0); - rv = (d->fraction & guardmask) >> NR_PAD; - return rv; -} - - -INLINE_SIM_FPU (int) -sim_fpu_is (const sim_fpu *d) -{ - switch (d->class) - { - case sim_fpu_class_qnan: - return SIM_FPU_IS_QNAN; - case sim_fpu_class_snan: - return SIM_FPU_IS_SNAN; - case sim_fpu_class_infinity: - if (d->sign) - return SIM_FPU_IS_NINF; - else - return SIM_FPU_IS_PINF; - case sim_fpu_class_number: - if (d->sign) - return SIM_FPU_IS_NNUMBER; - else - return SIM_FPU_IS_PNUMBER; - case sim_fpu_class_denorm: - if (d->sign) - return SIM_FPU_IS_NDENORM; - else - return SIM_FPU_IS_PDENORM; - case sim_fpu_class_zero: - if (d->sign) - return SIM_FPU_IS_NZERO; - else - return SIM_FPU_IS_PZERO; - default: - return -1; - abort (); - } -} - -INLINE_SIM_FPU (int) -sim_fpu_cmp (const sim_fpu *l, const sim_fpu *r) -{ - sim_fpu res; - sim_fpu_sub (&res, l, r); - return sim_fpu_is (&res); -} - -INLINE_SIM_FPU (int) -sim_fpu_is_lt (const sim_fpu *l, const sim_fpu *r) -{ - int status; - sim_fpu_lt (&status, l, r); - return status; -} - -INLINE_SIM_FPU (int) -sim_fpu_is_le (const sim_fpu *l, const sim_fpu *r) -{ - int is; - sim_fpu_le (&is, l, r); - return is; -} - -INLINE_SIM_FPU (int) -sim_fpu_is_eq (const sim_fpu *l, const sim_fpu *r) -{ - int is; - sim_fpu_eq (&is, l, r); - return is; -} - -INLINE_SIM_FPU (int) -sim_fpu_is_ne (const sim_fpu *l, const sim_fpu *r) -{ - int is; - sim_fpu_ne (&is, l, r); - return is; -} - -INLINE_SIM_FPU (int) -sim_fpu_is_ge (const sim_fpu *l, const sim_fpu *r) -{ - int is; - sim_fpu_ge (&is, l, r); - return is; -} - -INLINE_SIM_FPU (int) -sim_fpu_is_gt (const sim_fpu *l, const sim_fpu *r) -{ - int is; - sim_fpu_gt (&is, l, r); - return is; -} - - -/* Compare operators */ - -INLINE_SIM_FPU (int) -sim_fpu_lt (int *is, - const sim_fpu *l, - const sim_fpu *r) -{ - if (!sim_fpu_is_nan (l) && !sim_fpu_is_nan (r)) - { - sim_fpu_map lval; - sim_fpu_map rval; - lval.i = pack_fpu (l, 1); - rval.i = pack_fpu (r, 1); - (*is) = (lval.d < rval.d); - return 0; - } - else if (sim_fpu_is_snan (l) || sim_fpu_is_snan (r)) - { - *is = 0; - return sim_fpu_status_invalid_snan; - } - else - { - *is = 0; - return sim_fpu_status_invalid_qnan; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_le (int *is, - const sim_fpu *l, - const sim_fpu *r) -{ - if (!sim_fpu_is_nan (l) && !sim_fpu_is_nan (r)) - { - sim_fpu_map lval; - sim_fpu_map rval; - lval.i = pack_fpu (l, 1); - rval.i = pack_fpu (r, 1); - *is = (lval.d <= rval.d); - return 0; - } - else if (sim_fpu_is_snan (l) || sim_fpu_is_snan (r)) - { - *is = 0; - return sim_fpu_status_invalid_snan; - } - else - { - *is = 0; - return sim_fpu_status_invalid_qnan; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_eq (int *is, - const sim_fpu *l, - const sim_fpu *r) -{ - if (!sim_fpu_is_nan (l) && !sim_fpu_is_nan (r)) - { - sim_fpu_map lval; - sim_fpu_map rval; - lval.i = pack_fpu (l, 1); - rval.i = pack_fpu (r, 1); - (*is) = (lval.d == rval.d); - return 0; - } - else if (sim_fpu_is_snan (l) || sim_fpu_is_snan (r)) - { - *is = 0; - return sim_fpu_status_invalid_snan; - } - else - { - *is = 0; - return sim_fpu_status_invalid_qnan; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_ne (int *is, - const sim_fpu *l, - const sim_fpu *r) -{ - if (!sim_fpu_is_nan (l) && !sim_fpu_is_nan (r)) - { - sim_fpu_map lval; - sim_fpu_map rval; - lval.i = pack_fpu (l, 1); - rval.i = pack_fpu (r, 1); - (*is) = (lval.d != rval.d); - return 0; - } - else if (sim_fpu_is_snan (l) || sim_fpu_is_snan (r)) - { - *is = 0; - return sim_fpu_status_invalid_snan; - } - else - { - *is = 0; - return sim_fpu_status_invalid_qnan; - } -} - -INLINE_SIM_FPU (int) -sim_fpu_ge (int *is, - const sim_fpu *l, - const sim_fpu *r) -{ - return sim_fpu_le (is, r, l); -} - -INLINE_SIM_FPU (int) -sim_fpu_gt (int *is, - const sim_fpu *l, - const sim_fpu *r) -{ - return sim_fpu_lt (is, r, l); -} - - -/* A number of useful constants */ - -#if EXTERN_SIM_FPU_P -const sim_fpu sim_fpu_zero = { - sim_fpu_class_zero, -}; -const sim_fpu sim_fpu_qnan = { - sim_fpu_class_qnan, -}; -const sim_fpu sim_fpu_one = { - sim_fpu_class_number, 0, IMPLICIT_1, 0 -}; -const sim_fpu sim_fpu_two = { - sim_fpu_class_number, 0, IMPLICIT_1, 1 -}; -const sim_fpu sim_fpu_max32 = { - sim_fpu_class_number, 0, LSMASK64 (NR_FRAC_GUARD, NR_GUARDS32), NORMAL_EXPMAX32 -}; -const sim_fpu sim_fpu_max64 = { - sim_fpu_class_number, 0, LSMASK64 (NR_FRAC_GUARD, NR_GUARDS64), NORMAL_EXPMAX64 -}; -#endif - - -/* For debugging */ - -INLINE_SIM_FPU (void) -sim_fpu_print_fpu (const sim_fpu *f, - sim_fpu_print_func *print, - void *arg) -{ - sim_fpu_printn_fpu (f, print, -1, arg); -} - -INLINE_SIM_FPU (void) -sim_fpu_printn_fpu (const sim_fpu *f, - sim_fpu_print_func *print, - int digits, - void *arg) -{ - print (arg, "%s", f->sign ? "-" : "+"); - switch (f->class) - { - case sim_fpu_class_qnan: - print (arg, "0."); - print_bits (f->fraction, NR_FRAC_GUARD - 1, digits, print, arg); - print (arg, "*QuietNaN"); - break; - case sim_fpu_class_snan: - print (arg, "0."); - print_bits (f->fraction, NR_FRAC_GUARD - 1, digits, print, arg); - print (arg, "*SignalNaN"); - break; - case sim_fpu_class_zero: - print (arg, "0.0"); - break; - case sim_fpu_class_infinity: - print (arg, "INF"); - break; - case sim_fpu_class_number: - case sim_fpu_class_denorm: - print (arg, "1."); - print_bits (f->fraction, NR_FRAC_GUARD - 1, digits, print, arg); - print (arg, "*2^%+d", f->normal_exp); - ASSERT (f->fraction >= IMPLICIT_1); - ASSERT (f->fraction < IMPLICIT_2); - } -} - - -INLINE_SIM_FPU (void) -sim_fpu_print_status (int status, - sim_fpu_print_func *print, - void *arg) -{ - int i = 1; - char *prefix = ""; - while (status >= i) - { - switch ((sim_fpu_status) (status & i)) - { - case sim_fpu_status_denorm: - print (arg, "%sD", prefix); - break; - case sim_fpu_status_invalid_snan: - print (arg, "%sSNaN", prefix); - break; - case sim_fpu_status_invalid_qnan: - print (arg, "%sQNaN", prefix); - break; - case sim_fpu_status_invalid_isi: - print (arg, "%sISI", prefix); - break; - case sim_fpu_status_invalid_idi: - print (arg, "%sIDI", prefix); - break; - case sim_fpu_status_invalid_zdz: - print (arg, "%sZDZ", prefix); - break; - case sim_fpu_status_invalid_imz: - print (arg, "%sIMZ", prefix); - break; - case sim_fpu_status_invalid_cvi: - print (arg, "%sCVI", prefix); - break; - case sim_fpu_status_invalid_cmp: - print (arg, "%sCMP", prefix); - break; - case sim_fpu_status_invalid_sqrt: - print (arg, "%sSQRT", prefix); - break; - break; - case sim_fpu_status_inexact: - print (arg, "%sX", prefix); - break; - break; - case sim_fpu_status_overflow: - print (arg, "%sO", prefix); - break; - break; - case sim_fpu_status_underflow: - print (arg, "%sU", prefix); - break; - break; - case sim_fpu_status_invalid_div0: - print (arg, "%s/", prefix); - break; - break; - case sim_fpu_status_rounded: - print (arg, "%sR", prefix); - break; - break; - } - i <<= 1; - prefix = ","; - } -} - -#endif diff --git a/sim/common/sim-fpu.h b/sim/common/sim-fpu.h deleted file mode 100644 index 579fbaa..0000000 --- a/sim/common/sim-fpu.h +++ /dev/null @@ -1,428 +0,0 @@ -/* Simulator Floating-point support. - - Copyright 1997, 1998, 2002, 2003 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 SIM_FPU_H -#define SIM_FPU_H - - - -/* The FPU intermediate type - this object, passed by reference, - should be treated as opaque. - - - Pragmatics - pass struct by ref: - - The alternatives for this object/interface that were considered - were: a packed 64 bit value; an unpacked structure passed by value; - and an unpacked structure passed by reference. - - The packed 64 bit value was rejected because: it limited the - precision of intermediate values; reasonable performance would only - be achieved when the sim_fpu package was in-lined allowing repeated - unpacking operations to be eliminated. - - For unpacked structures (passed by value and reference), the code - quality of GCC-2.7 (on x86) for each alternative was compared. - Needless to say the results, while better than for a packed 64 bit - object, were still poor (GCC had only limited support for the - optimization of references to structure members). Regardless, the - struct-by-ref alternative achieved better results when compiled - with (better speed) and without (better code density) in-lining. - Here's looking forward to an improved GCC optimizer. - - - Pragmatics - avoid host FP hardware: - - FP operations can be implemented by either: the host's floating - point hardware; or by emulating the FP operations using integer - only routines. This is direct tradeoff between speed, portability - and correctness. - - The two principal reasons for selecting portability and correctness - over speed are: - - 1 - Correctness. The assumption that FP correctness wasn't an - issue for code being run on simulators was wrong. Instead of - running FP tolerant (?) code, simulator users instead typically run - very aggressive FP code sequences. The sole purpose of those - sequences being to test the target ISA's FP implementation. - - 2 - Portability. The host FP implementation is not predictable. A - simulator modeling aggressive FP code sequences using the hosts FPU - relies heavily on the correctness of the hosts FP implementation. - It turns out that such trust can be misplaced. The behavior of - host FP implementations when handling edge conditions such as SNaNs - and exceptions varied widely. - - - */ - - -typedef enum -{ - sim_fpu_class_zero, - sim_fpu_class_snan, - sim_fpu_class_qnan, - sim_fpu_class_number, - sim_fpu_class_denorm, - sim_fpu_class_infinity, -} sim_fpu_class; - -typedef struct _sim_fpu { - sim_fpu_class class; - int sign; - unsigned64 fraction; - int normal_exp; -} sim_fpu; - - - -/* Rounding options. - - The value zero (sim_fpu_round_default) for ALU operations indicates - that, when possible, rounding should be avoided. */ - -typedef enum -{ - sim_fpu_round_default = 0, - sim_fpu_round_near = 1, - sim_fpu_round_zero = 2, - sim_fpu_round_up = 3, - sim_fpu_round_down = 4, -} sim_fpu_round; - - -/* Options when handling denormalized numbers. */ - -typedef enum -{ - sim_fpu_denorm_default = 0, - sim_fpu_denorm_underflow_inexact = 1, - sim_fpu_denorm_zero = 2, -} sim_fpu_denorm; - - - -/* Status values returned by FPU operators. - - When checking the result of an FP sequence (ex 32to, add, single, - to32) the caller may either: check the return value of each FP - operator; or form the union (OR) of the returned values and examine - them once at the end. - - FIXME: This facility is still being developed. The choice of - status values returned and their exact meaning may changed in the - future. */ - -typedef enum -{ - sim_fpu_status_invalid_snan = 1, - sim_fpu_status_invalid_qnan = 2, - sim_fpu_status_invalid_isi = 4, /* (inf - inf) */ - sim_fpu_status_invalid_idi = 8, /* (inf / inf) */ - sim_fpu_status_invalid_zdz = 16, /* (0 / 0) */ - sim_fpu_status_invalid_imz = 32, /* (inf * 0) */ - sim_fpu_status_invalid_cvi = 64, /* convert to integer */ - sim_fpu_status_invalid_div0 = 128, /* (X / 0) */ - sim_fpu_status_invalid_cmp = 256, /* compare */ - sim_fpu_status_invalid_sqrt = 512, - sim_fpu_status_rounded = 1024, - sim_fpu_status_inexact = 2048, - sim_fpu_status_overflow = 4096, - sim_fpu_status_underflow = 8192, - sim_fpu_status_denorm = 16384, -} sim_fpu_status; - - - - -/* Directly map between a 32/64 bit register and the sim_fpu internal - type. - - When converting from the 32/64 bit packed format to the sim_fpu - internal type, the operation is exact. - - When converting from the sim_fpu internal type to 32/64 bit packed - format, the operation may result in a loss of precision. The - configuration macro WITH_FPU_CONVERSION controls this. By default, - silent round to nearest is performed. Alternatively, round up, - round down and round to zero can be performed. In a simulator - emulating exact FPU behavior, sim_fpu_round_{32,64} should be - called before packing the sim_fpu value. */ - -INLINE_SIM_FPU (void) sim_fpu_32to (sim_fpu *f, unsigned32 s); -INLINE_SIM_FPU (void) sim_fpu_232to (sim_fpu *f, unsigned32 h, unsigned32 l); -INLINE_SIM_FPU (void) sim_fpu_64to (sim_fpu *f, unsigned64 d); - -INLINE_SIM_FPU (void) sim_fpu_to32 (unsigned32 *s, const sim_fpu *f); -INLINE_SIM_FPU (void) sim_fpu_to232 (unsigned32 *h, unsigned32 *l, const sim_fpu *f); -INLINE_SIM_FPU (void) sim_fpu_to64 (unsigned64 *d, const sim_fpu *f); - - -/* Create a sim_fpu struct using raw information. (FRACTION & LSMASK - (PRECISION-1, 0)) is assumed to contain the fraction part of the - floating-point number. The leading bit LSBIT (PRECISION) is always - implied. The number created can be represented by: - - (SIGN ? "-" : "+") "1." FRACTION{PRECISION-1,0} X 2 ^ NORMAL_EXP> - - You can not specify zero using this function. */ - -INLINE_SIM_FPU (void) sim_fpu_fractionto (sim_fpu *f, int sign, int normal_exp, unsigned64 fraction, int precision); - -/* Reverse operation. If S is a non-zero number, discards the implied - leading one and returns PRECISION fraction bits. No rounding is - performed. */ -INLINE_SIM_FPU (unsigned64) sim_fpu_tofraction (const sim_fpu *s, int precision); - - - -/* Rounding operators. - - Force an intermediate result to an exact 32/64 bit - representation. */ - -INLINE_SIM_FPU (int) sim_fpu_round_32 (sim_fpu *f, - sim_fpu_round round, - sim_fpu_denorm denorm); -INLINE_SIM_FPU (int) sim_fpu_round_64 (sim_fpu *f, - sim_fpu_round round, - sim_fpu_denorm denorm); - - - -/* Arithmetic operators. - - FIXME: In the future, additional arguments ROUNDING and BITSIZE may - be added. */ - -typedef int (sim_fpu_op1) (sim_fpu *f, - const sim_fpu *l); -typedef int (sim_fpu_op2) (sim_fpu *f, - const sim_fpu *l, - const sim_fpu *r); - -INLINE_SIM_FPU (int) sim_fpu_add (sim_fpu *f, - const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_sub (sim_fpu *f, - const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_mul (sim_fpu *f, - const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_div (sim_fpu *f, - const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_max (sim_fpu *f, - const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_min (sim_fpu *f, - const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_neg (sim_fpu *f, - const sim_fpu *a); -INLINE_SIM_FPU (int) sim_fpu_abs (sim_fpu *f, - const sim_fpu *a); -INLINE_SIM_FPU (int) sim_fpu_inv (sim_fpu *f, - const sim_fpu *a); -INLINE_SIM_FPU (int) sim_fpu_sqrt (sim_fpu *f, - const sim_fpu *sqr); - - - -/* Conversion of integer <-> floating point. */ - -INLINE_SIM_FPU (int) sim_fpu_i32to (sim_fpu *f, signed32 i, - sim_fpu_round round); -INLINE_SIM_FPU (int) sim_fpu_u32to (sim_fpu *f, unsigned32 u, - sim_fpu_round round); -INLINE_SIM_FPU (int) sim_fpu_i64to (sim_fpu *f, signed64 i, - sim_fpu_round round); -INLINE_SIM_FPU (int) sim_fpu_u64to (sim_fpu *f, unsigned64 u, - sim_fpu_round round); -#if 0 -INLINE_SIM_FPU (int) sim_fpu_i232to (sim_fpu *f, signed32 h, signed32 l, - sim_fpu_round round); -#endif -#if 0 -INLINE_SIM_FPU (int) sim_fpu_u232to (sim_fpu *f, unsigned32 h, unsigned32 l, - sim_fpu_round round); -#endif - -INLINE_SIM_FPU (int) sim_fpu_to32i (signed32 *i, const sim_fpu *f, - sim_fpu_round round); -INLINE_SIM_FPU (int) sim_fpu_to32u (unsigned32 *u, const sim_fpu *f, - sim_fpu_round round); -INLINE_SIM_FPU (int) sim_fpu_to64i (signed64 *i, const sim_fpu *f, - sim_fpu_round round); -INLINE_SIM_FPU (int) sim_fpu_to64u (unsigned64 *u, const sim_fpu *f, - sim_fpu_round round); -#if 0 -INLINE_SIM_FPU (int) sim_fpu_to232i (signed64 *h, signed64 *l, const sim_fpu *f, - sim_fpu_round round); -#endif -#if 0 -INLINE_SIM_FPU (int) sim_fpu_to232u (unsigned64 *h, unsigned64 *l, const sim_fpu *f, - sim_fpu_round round); -#endif - - -/* Conversion of internal sim_fpu type to host double format. - - For debugging/tracing only. A SNaN is never returned. */ - -/* INLINE_SIM_FPU (float) sim_fpu_2f (const sim_fpu *f); */ -INLINE_SIM_FPU (double) sim_fpu_2d (const sim_fpu *d); - -/* INLINE_SIM_FPU (void) sim_fpu_f2 (sim_fpu *f, float s); */ -INLINE_SIM_FPU (void) sim_fpu_d2 (sim_fpu *f, double d); - - - -/* Specific number classes. - - NB: When either, a 32/64 bit floating points is converted to - internal format, or an internal format number is rounded to 32/64 - bit precision, a special marker is retained that indicates that the - value was normalized. For such numbers both is_number and - is_denorm return true. */ - -INLINE_SIM_FPU (int) sim_fpu_is_nan (const sim_fpu *s); /* 1 => SNaN or QNaN */ -INLINE_SIM_FPU (int) sim_fpu_is_snan (const sim_fpu *s); /* 1 => SNaN */ -INLINE_SIM_FPU (int) sim_fpu_is_qnan (const sim_fpu *s); /* 1 => QNaN */ - -INLINE_SIM_FPU (int) sim_fpu_is_zero (const sim_fpu *s); -INLINE_SIM_FPU (int) sim_fpu_is_infinity (const sim_fpu *s); -INLINE_SIM_FPU (int) sim_fpu_is_number (const sim_fpu *s); /* !zero */ -INLINE_SIM_FPU (int) sim_fpu_is_denorm (const sim_fpu *s); /* !zero */ - - - -/* Floating point fields */ - -INLINE_SIM_FPU (int) sim_fpu_sign (const sim_fpu *s); -INLINE_SIM_FPU (int) sim_fpu_exp (const sim_fpu *s); -INLINE_SIM_FPU (unsigned64) sim_fpu_fraction (const sim_fpu *s); -INLINE_SIM_FPU (unsigned64) sim_fpu_guard (const sim_fpu *s, int is_double); - - - -/* Specific comparison operators - - For NaNs et al., the comparison operators will set IS to zero and - return a nonzero result. */ - -INLINE_SIM_FPU (int) sim_fpu_lt (int *is, const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_le (int *is, const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_eq (int *is, const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_ne (int *is, const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_ge (int *is, const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_gt (int *is, const sim_fpu *l, const sim_fpu *r); - -INLINE_SIM_FPU (int) sim_fpu_is_lt (const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_is_le (const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_is_eq (const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_is_ne (const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_is_ge (const sim_fpu *l, const sim_fpu *r); -INLINE_SIM_FPU (int) sim_fpu_is_gt (const sim_fpu *l, const sim_fpu *r); - - - -/* General number class and comparison operators. - - The result of the comparison is indicated by returning one of the - values below. Efficient emulation of a target FP compare - instruction can be achieved by redefining the values below to match - corresponding target FP status bits. - - For instance. SIM_FPU_QNAN may be redefined to be the bit - `INVALID' while SIM_FPU_NINF might be redefined as the bits - `NEGATIVE | INFINITY | VALID'. */ - -#ifndef SIM_FPU_IS_SNAN -enum { - SIM_FPU_IS_SNAN = 1, /* Noisy not-a-number */ - SIM_FPU_IS_QNAN = 2, /* Quiet not-a-number */ - SIM_FPU_IS_NINF = 3, /* -infinity */ - SIM_FPU_IS_PINF = 4, /* +infinity */ - SIM_FPU_IS_NNUMBER = 5, /* -number - [ -MAX .. -MIN ] */ - SIM_FPU_IS_PNUMBER = 6, /* +number - [ +MIN .. +MAX ] */ - SIM_FPU_IS_NDENORM = 7, /* -denorm - ( MIN .. 0 ) */ - SIM_FPU_IS_PDENORM = 8, /* +denorm - ( 0 .. MIN ) */ - SIM_FPU_IS_NZERO = 9, /* -0 */ - SIM_FPU_IS_PZERO = 10, /* +0 */ -}; -#endif - -INLINE_SIM_FPU (int) sim_fpu_is (const sim_fpu *l); -INLINE_SIM_FPU (int) sim_fpu_cmp (const sim_fpu *l, const sim_fpu *r); - - - -/* A number of useful constants. */ - -extern const sim_fpu sim_fpu_zero; -extern const sim_fpu sim_fpu_one; -extern const sim_fpu sim_fpu_two; -extern const sim_fpu sim_fpu_qnan; -extern const sim_fpu sim_fpu_max32; -extern const sim_fpu sim_fpu_max64; - - -/* Select the applicable functions for the fp_word type */ - -#if WITH_TARGET_FLOATING_POINT_BITSIZE == 32 -#define sim_fpu_tofp sim_fpu_to32 -#define sim_fpu_fpto sim_fpu_32to -#define sim_fpu_round_fp sim_fpu_round_32 -#define sim_fpu_maxfp sim_fpu_max32 -#endif -#if WITH_TARGET_FLOATING_POINT_BITSIZE == 64 -#define sim_fpu_tofp sim_fpu_to64 -#define sim_fpu_fpto sim_fpu_64to -#define sim_fpu_round_fp sim_fpu_round_64 -#define sim_fpu_maxfp sim_fpu_max64 -#endif - - - -/* For debugging */ - -typedef void sim_fpu_print_func (void *, char *, ...); - -/* Print a sim_fpu with full precision. */ -INLINE_SIM_FPU (void) sim_fpu_print_fpu (const sim_fpu *f, - sim_fpu_print_func *print, - void *arg); - -/* Print a sim_fpu with `n' trailing digits. */ -INLINE_SIM_FPU (void) sim_fpu_printn_fpu (const sim_fpu *f, - sim_fpu_print_func *print, - int digits, - void *arg); - -INLINE_SIM_FPU (void) sim_fpu_print_status (int status, - sim_fpu_print_func *print, - void *arg); - -#if H_REVEALS_MODULE_P (SIM_FPU_INLINE) -#include "sim-fpu.c" -#endif - -#endif diff --git a/sim/common/sim-hload.c b/sim/common/sim-hload.c deleted file mode 100644 index 07a608b..0000000 --- a/sim/common/sim-hload.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Generic load for hardware simulator models. - 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. */ - -#include "sim-main.h" -#include "bfd.h" -#include "sim-utils.h" -#include "sim-assert.h" - - -/* Generic implementation of sim_load that works with simulators - modeling a hardware platform. */ - -SIM_RC -sim_load (sd, prog_name, prog_bfd, from_tty) - SIM_DESC sd; - char *prog_name; - struct bfd *prog_bfd; - int from_tty; -{ - bfd *result_bfd; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - if (sim_analyze_program (sd, prog_name, prog_bfd) != SIM_RC_OK) - return SIM_RC_FAIL; - SIM_ASSERT (STATE_PROG_BFD (sd) != NULL); - - /* NOTE: For historical reasons, older hardware simulators - incorrectly write the program sections at LMA interpreted as a - virtual address. This is still accommodated for backward - compatibility reasons. */ - - result_bfd = sim_load_file (sd, STATE_MY_NAME (sd), - STATE_CALLBACK (sd), - prog_name, - STATE_PROG_BFD (sd), - STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG, - STATE_LOAD_AT_LMA_P (sd), - sim_write); - if (result_bfd == NULL) - { - bfd_close (STATE_PROG_BFD (sd)); - STATE_PROG_BFD (sd) = NULL; - return SIM_RC_FAIL; - } - return SIM_RC_OK; -} diff --git a/sim/common/sim-hrw.c b/sim/common/sim-hrw.c deleted file mode 100644 index 9538302..0000000 --- a/sim/common/sim-hrw.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Generic memory read/write for hardware simulator models. - 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. */ - -#include "sim-main.h" -#include "sim-assert.h" - -/* Generic implementation of sim_read that works with simulators - modeling real hardware */ - -int -sim_read (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - return sim_core_read_buffer (sd, NULL, read_map, - buf, mem, length); -} - -int -sim_write (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - return sim_core_write_buffer (sd, NULL, write_map, - buf, mem, length); -} diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c deleted file mode 100644 index 922b8ec..0000000 --- a/sim/common/sim-hw.c +++ /dev/null @@ -1,519 +0,0 @@ -/* Simulator hardware option handling. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Cygnus Support and Andrew Cagney. - -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" -#include "sim-assert.h" -#include "sim-options.h" - -#include "sim-hw.h" - -#include "hw-tree.h" -#include "hw-device.h" -#include "hw-main.h" -#include "hw-base.h" - - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#include <ctype.h> -#include <errno.h> - - -struct sim_hw { - struct hw *tree; - int trace_p; - int info_p; - /* if called from a processor */ - sim_cpu *cpu; - sim_cia cia; -}; - - -struct hw * -sim_hw_parse (struct sim_state *sd, - const char *fmt, - ...) -{ - struct hw *current; - va_list ap; - va_start (ap, fmt); - current = hw_tree_vparse (STATE_HW (sd)->tree, fmt, ap); - va_end (ap); - return current; -} - -struct printer { - struct sim_state *file; - void (*print) (struct sim_state *, const char *, va_list ap); -}; - -static void -do_print (void *file, const char *fmt, ...) -{ - struct printer *p = file; - va_list ap; - va_start (ap, fmt); - p->print (p->file, fmt, ap); - va_end (ap); -} - -void -sim_hw_print (struct sim_state *sd, - void (*print) (struct sim_state *, const char *, va_list ap)) -{ - struct printer p; - p.file = sd; - p.print = print; - hw_tree_print (STATE_HW (sd)->tree, do_print, &p); -} - - - - -/* command line options. */ - -enum { - OPTION_HW_INFO = OPTION_START, - OPTION_HW_TRACE, - OPTION_HW_DEVICE, - OPTION_HW_LIST, - OPTION_HW_FILE, -}; - -static DECLARE_OPTION_HANDLER (hw_option_handler); - -static const OPTION hw_options[] = -{ - { {"hw-info", no_argument, NULL, OPTION_HW_INFO }, - '\0', NULL, "List configurable hw regions", - hw_option_handler }, - { {"info-hw", no_argument, NULL, OPTION_HW_INFO }, - '\0', NULL, NULL, - hw_option_handler }, - - { {"hw-trace", optional_argument, NULL, OPTION_HW_TRACE }, - '\0', "on|off", "Trace all hardware devices", - hw_option_handler }, - { {"trace-hw", optional_argument, NULL, OPTION_HW_TRACE }, - '\0', NULL, NULL, - hw_option_handler }, - - { {"hw-device", required_argument, NULL, OPTION_HW_DEVICE }, - '\0', "DEVICE", "Add the specified device", - hw_option_handler }, - - { {"hw-list", no_argument, NULL, OPTION_HW_LIST }, - '\0', NULL, "List the device tree", - hw_option_handler }, - - { {"hw-file", required_argument, NULL, OPTION_HW_FILE }, - '\0', "FILE", "Add the devices listed in the file", - hw_option_handler }, - - { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } -}; - - - -/* Copied from ../ppc/psim.c:psim_merge_device_file() */ - -static SIM_RC -merge_device_file (struct sim_state *sd, - const char *file_name) -{ - FILE *description; - struct hw *current = STATE_HW (sd)->tree; - int line_nr; - char device_path[1000]; - - /* try opening the file */ - description = fopen (file_name, "r"); - if (description == NULL) - { - perror (file_name); - return SIM_RC_FAIL; - } - - line_nr = 0; - while (fgets (device_path, sizeof(device_path), description)) - { - char *device; - /* check that a complete line was read */ - if (strchr (device_path, '\n') == NULL) - { - fclose (description); - sim_io_eprintf (sd, "%s:%d: line to long", file_name, line_nr); - return SIM_RC_FAIL; - } - *strchr (device_path, '\n') = '\0'; - line_nr++; - /* skip comments ("#" or ";") and blank lines lines */ - for (device = device_path; - *device != '\0' && isspace (*device); - device++); - if (device[0] == '#' - || device[0] == ';' - || device[0] == '\0') - continue; - /* merge any appended lines */ - while (device_path[strlen (device_path) - 1] == '\\') - { - int curlen = strlen (device_path) - 1; - /* zap the `\' at the end of the line */ - device_path[curlen] = '\0'; - /* append the next line */ - if (!fgets (device_path + curlen, - sizeof (device_path) - curlen, - description)) - { - fclose (description); - sim_io_eprintf (sd, "%s:%d: unexpected eof", file_name, line_nr); - return SIM_RC_FAIL; - } - if (strchr(device_path, '\n') == NULL) - { - fclose(description); - sim_io_eprintf (sd, "%s:%d: line to long", file_name, line_nr); - return SIM_RC_FAIL; - } - *strchr(device_path, '\n') = '\0'; - line_nr++; - } - /* parse this line */ - current = hw_tree_parse (current, "%s", device); - } - fclose (description); - return SIM_RC_OK; -} - - -static SIM_RC -hw_option_handler (struct sim_state *sd, sim_cpu *cpu, int opt, - char *arg, int is_command) -{ - switch (opt) - { - - case OPTION_HW_INFO: - { - /* delay info until after the tree is finished */ - STATE_HW (sd)->info_p = 1; - return SIM_RC_OK; - break; - } - - case OPTION_HW_TRACE: - { - if (arg == NULL) - { - STATE_HW (sd)->trace_p = 1; - } - else if (strcmp (arg, "yes") == 0 - || strcmp (arg, "on") == 0) - { - STATE_HW (sd)->trace_p = 1; - } - else if (strcmp (arg, "no") == 0 - || strcmp (arg, "off") == 0) - { - STATE_HW (sd)->trace_p = 0; - } - else - { - sim_io_eprintf (sd, "Option --hw-trace ignored\n"); - /* set tracing on all devices */ - return SIM_RC_FAIL; - } - /* FIXME: Not very nice - see also hw-base.c */ - if (STATE_HW (sd)->trace_p) - hw_tree_parse (STATE_HW (sd)->tree, "/global-trace? true"); - return SIM_RC_OK; - break; - } - - case OPTION_HW_DEVICE: - { - hw_tree_parse (STATE_HW (sd)->tree, arg); - return SIM_RC_OK; - } - - case OPTION_HW_LIST: - { - sim_hw_print (sd, sim_io_vprintf); - return SIM_RC_OK; - } - - case OPTION_HW_FILE: - { - return merge_device_file (sd, arg); - } - - default: - sim_io_eprintf (sd, "Unknown hw option %d\n", opt); - return SIM_RC_FAIL; - - } - - return SIM_RC_FAIL; -} - - -/* "hw" module install handler. - - This is called via sim_module_install to install the "hw" subsystem - into the simulator. */ - -static MODULE_INIT_FN sim_hw_init; -static MODULE_UNINSTALL_FN sim_hw_uninstall; - -SIM_RC -sim_hw_install (struct sim_state *sd) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - sim_add_option_table (sd, NULL, hw_options); - sim_module_add_uninstall_fn (sd, sim_hw_uninstall); - sim_module_add_init_fn (sd, sim_hw_init); - STATE_HW (sd) = ZALLOC (struct sim_hw); - STATE_HW (sd)->tree = hw_tree_create (sd, "core"); - return SIM_RC_OK; -} - - -static SIM_RC -sim_hw_init (struct sim_state *sd) -{ - /* FIXME: anything needed? */ - hw_tree_finish (STATE_HW (sd)->tree); - if (STATE_HW (sd)->info_p) - sim_hw_print (sd, sim_io_vprintf); - return SIM_RC_OK; -} - -/* Uninstall the "hw" subsystem from the simulator. */ - -static void -sim_hw_uninstall (struct sim_state *sd) -{ - /* hw_tree_delete (STATE_HW (sd)->tree); */ - zfree (STATE_HW (sd)); - STATE_HW (sd) = NULL; -} - - - -/* Data transfers to/from the hardware device tree. There are several - cases. */ - - -/* CPU: The simulation is running and the current CPU/CIA - initiates a data transfer. */ - -void -sim_cpu_hw_io_read_buffer (sim_cpu *cpu, - sim_cia cia, - struct hw *hw, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - SIM_DESC sd = CPU_STATE (cpu); - STATE_HW (sd)->cpu = cpu; - STATE_HW (sd)->cia = cia; - if (hw_io_read_buffer (hw, dest, space, addr, nr_bytes) != nr_bytes) - sim_engine_abort (sd, cpu, cia, "broken CPU read"); -} - -void -sim_cpu_hw_io_write_buffer (sim_cpu *cpu, - sim_cia cia, - struct hw *hw, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - SIM_DESC sd = CPU_STATE (cpu); - STATE_HW (sd)->cpu = cpu; - STATE_HW (sd)->cia = cia; - if (hw_io_write_buffer (hw, source, space, addr, nr_bytes) != nr_bytes) - sim_engine_abort (sd, cpu, cia, "broken CPU write"); -} - - - - -/* SYSTEM: A data transfer is being initiated by the system. */ - -unsigned -sim_hw_io_read_buffer (struct sim_state *sd, - struct hw *hw, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - STATE_HW (sd)->cpu = NULL; - return hw_io_read_buffer (hw, dest, space, addr, nr_bytes); -} - -unsigned -sim_hw_io_write_buffer (struct sim_state *sd, - struct hw *hw, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes) -{ - STATE_HW (sd)->cpu = NULL; - return hw_io_write_buffer (hw, source, space, addr, nr_bytes); -} - - - -/* Abort the simulation specifying HW as the reason */ - -void -hw_vabort (struct hw *me, - const char *fmt, - va_list ap) -{ - const char *name; - char *msg; - /* find an identity */ - if (me != NULL && hw_path (me) != NULL && hw_path (me) [0] != '\0') - name = hw_path (me); - else if (me != NULL && hw_name (me) != NULL && hw_name (me)[0] != '\0') - name = hw_name (me); - else if (me != NULL && hw_family (me) != NULL && hw_family (me)[0] != '\0') - name = hw_family (me); - else - name = "device"; - /* construct an updated format string */ - msg = alloca (strlen (name) + strlen (": ") + strlen (fmt) + 1); - strcpy (msg, name); - strcat (msg, ": "); - strcat (msg, fmt); - /* report the problem */ - sim_engine_vabort (hw_system (me), - STATE_HW (hw_system (me))->cpu, - STATE_HW (hw_system (me))->cia, - msg, ap); -} - -void -hw_abort (struct hw *me, - const char *fmt, - ...) -{ - va_list ap; - /* report the problem */ - va_start (ap, fmt); - hw_vabort (me, fmt, ap); - va_end (ap); -} - -void -sim_hw_abort (struct sim_state *sd, - struct hw *me, - const char *fmt, - ...) -{ - va_list ap; - va_start (ap, fmt); - if (me == NULL) - sim_engine_vabort (sd, NULL, NULL_CIA, fmt, ap); - else - hw_vabort (me, fmt, ap); - va_end (ap); -} - - -/* MISC routines to tie HW into the rest of the system */ - -void -hw_halt (struct hw *me, - int reason, - int status) -{ - struct sim_state *sd = hw_system (me); - struct sim_hw *sim = STATE_HW (sd); - sim_engine_halt (sd, sim->cpu, NULL, sim->cia, reason, status); -} - -struct _sim_cpu * -hw_system_cpu (struct hw *me) -{ - return STATE_HW (hw_system (me))->cpu; -} - -void -hw_trace (struct hw *me, - const char *fmt, - ...) -{ - if (hw_trace_p (me)) /* to be sure, to be sure */ - { - va_list ap; - va_start (ap, fmt); - sim_io_eprintf (hw_system (me), "%s: ", hw_path (me)); - sim_io_evprintf (hw_system (me), fmt, ap); - sim_io_eprintf (hw_system (me), "\n"); - va_end (ap); - } -} - - -/* Based on gdb-4.17/sim/ppc/main.c:sim_io_read_stdin() */ - -int -do_hw_poll_read (struct hw *me, - do_hw_poll_read_method *read, - int sim_io_fd, - void *buf, - unsigned sizeof_buf) -{ - int status = read (hw_system (me), sim_io_fd, buf, sizeof_buf); - if (status > 0) - return status; - else if (status == 0 && sizeof_buf == 0) - return 0; - else if (status == 0) - return HW_IO_EOF; - else /* status < 0 */ - { -#ifdef EAGAIN - if (STATE_CALLBACK (hw_system (me))->last_errno == EAGAIN) - return HW_IO_NOT_READY; - else - return HW_IO_EOF; -#else - return HW_IO_EOF; -#endif - } -} diff --git a/sim/common/sim-hw.h b/sim/common/sim-hw.h deleted file mode 100644 index 1bebd18..0000000 --- a/sim/common/sim-hw.h +++ /dev/null @@ -1,98 +0,0 @@ -/* Device definitions. - Copyright (C) 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. */ - -#ifndef SIM_HW_H -#define SIM_HW_H - - -/* Establish this object */ - -SIM_RC sim_hw_install -(struct sim_state *sd); - - -/* Parse a hardware definition */ - -struct hw *sim_hw_parse -(struct sim_state *sd, - const char *fmt, - ...) __attribute__ ((format (printf, 2, 3))); - - -/* Print the hardware tree */ - -void sim_hw_print -(struct sim_state *sd, - void (*print) (struct sim_state *, const char *, va_list ap)); - - -/* Abort the simulation specifying HW as the reason */ - -void sim_hw_abort -(SIM_DESC sd, - struct hw *hw, - const char *fmt, - ...) __attribute__ ((format (printf, 3, 4))); - - - -/* CPU: The simulation is running and the current CPU/CIA - initiates a data transfer. */ - -void sim_cpu_hw_io_read_buffer -(sim_cpu *cpu, - sim_cia cia, - struct hw *hw, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes); - -void sim_cpu_hw_io_write_buffer -(sim_cpu *cpu, - sim_cia cia, - struct hw *hw, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes); - - - -/* SYSTEM: A data transfer is being initiated by the system. */ - -unsigned sim_hw_io_read_buffer -(struct sim_state *sd, - struct hw *hw, - void *dest, - int space, - unsigned_word addr, - unsigned nr_bytes); - -unsigned sim_hw_io_write_buffer -(struct sim_state *sd, - struct hw *hw, - const void *source, - int space, - unsigned_word addr, - unsigned nr_bytes); - - -#endif diff --git a/sim/common/sim-info.c b/sim/common/sim-info.c deleted file mode 100644 index 0083227..0000000 --- a/sim/common/sim-info.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Generic memory read/write for hardware simulator models. - Copyright (C) 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" -#include "sim-assert.h" - -/* Generic implementation of sim_info that works with simulators using - sim-module. */ - -void -sim_info (SIM_DESC sd, int verbose) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - sim_module_info (sd, verbose || STATE_VERBOSE_P (sd)); -} diff --git a/sim/common/sim-inline.c b/sim/common/sim-inline.c deleted file mode 100644 index f226405..0000000 --- a/sim/common/sim-inline.c +++ /dev/null @@ -1,98 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 SIM_INLINE_C -#define SIM_INLINE_C - -#undef SIM_INLINE_P -#define SIM_INLINE_P 1 - -#include "sim-inline.h" -#include "sim-main.h" - - -#if C_REVEALS_MODULE_P (SIM_BITS_INLINE) -#include "sim-bits.c" -#endif - - -#if C_REVEALS_MODULE_P (SIM_CORE_INLINE) -#include "sim-core.c" -#endif - - -#if C_REVEALS_MODULE_P (SIM_ENDIAN_INLINE) -#include "sim-endian.c" -#endif - - -#if C_REVEALS_MODULE_P (SIM_EVENTS_INLINE) -#include "sim-events.c" -#endif - - -#if C_REVEALS_MODULE_P (SIM_FPU_INLINE) -#include "sim-fpu.c" -#endif - - -#if C_REVEALS_MODULE_P (SIM_TYPES_INLINE) -#include "sim-types.c" -#endif - - -#if C_REVEALS_MODULE_P (SIM_MAIN_INLINE) -#include "sim-main.c" -#endif - - -#if C_REVEALS_MODULE_P (ENGINE_INLINE) -/* #include "engine.c" - handled by generator */ -#endif - - -#if C_REVEALS_MODULE_P (ICACHE_INLINE) -/* #include "icache.c" - handled by generator */ -#endif - - -#if C_REVEALS_MODULE_P (IDECODE_INLINE) -/* #include "idecode.c" - handled by generator */ -#endif - - -#if C_REVEALS_MODULE_P (SEMANTICS_INLINE) -/* #include "semantics.c" - handled by generator */ -#endif - - -#if C_REVEALS_MODULE_P (SUPPORT_INLINE) -/* #include "support.c" - handled by generator */ -#endif - - -#undef SIM_INLINE_P -#define SIM_INLINE_P 0 - -#endif diff --git a/sim/common/sim-inline.h b/sim/common/sim-inline.h deleted file mode 100644 index 4e3fdb6..0000000 --- a/sim/common/sim-inline.h +++ /dev/null @@ -1,812 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 SIM_INLINE_H -#define SIM_INLINE_H - - -/* INLINE CODE SELECTION: - - GCC -O3 attempts to inline any function or procedure in scope. The - options below facilitate finer grained control over what is and - what is not inlined. In particular, it allows the selection of - modules for inlining. Doing this allows the compiler to both - eliminate the overhead of function calls and (as a consequence) - also eliminate further dead code. - - On a CISC (x86) I've found that I can achieve an order of magintude - speed improvement (x3-x5). In the case of RISC (sparc) while the - performance gain isn't as great it is still significant. - - Each module is controled by the macro <module>_INLINE which can - have the values described below - - 0 (ZERO) - - Do not inline any thing for the given module - - The following bit fields values can be combined: - - H_REVEALS_MODULE: - C_REVEALS_MODULE: - - Include the C file for the module into the file being - compiled. The actual inlining is controlled separatly. - - While of no apparent benefit, this makes it possible for the - included module, when compiled, to inline its calls to what - would otherwize be external functions. - - {C_,H_} Determines where the module is inlined. A - H_REVEALS_MODULE will be included everywhere. - - INLINE_GLOBALS: - - Make external functions within the module `inline'. Thus if - the module is included into a file being compiled, calls to - the included modules funtions can be eliminated. INLINE_MODULE - implies REVEAL_MODULE. - - INLINE_LOCALS: - - Make internal (static) functions within the module `inline'. - - - CODING STYLE: - - The inline ability is enabled by specifying every data and function - declaration and definition using one of the following methods: - - - GLOBAL INLINE FUNCTIONS: - - Such functions are small and used heavily. Inlining them - will eliminate an unnecessary function call overhead. - - .h: INLINE_OURPKG (void) ourpkg_func - (int x, - int y); - - .c: INLINE_OURPKG (void) - ourpkg_func (int x, - int y) - { - ... - } - - - GLOBAL INLINE VARIABLES: - - This doesn't make much sense. - - - GLOBAL NON-INLINE (EXTERN) FUNCTIONS AND VARIABLES: - - These include functions with varargs parameters. It can - also include large rarely used functions that contribute - little when inlined. - - .h: extern int ourpkg_print - (char *fmt, ...); - extern int a_global_variable; - - .c: #if EXTERN_OURPKG_P - int - ourpkg_print (char *fmt, - ...) - { - ... - } - #endif - #if EXTERN_OURPKG_P - int a_global_variable = 1; - #endif - - - LOCAL (STATIC) FUNCTIONS: - - These can either be marked inline or just static static vis: - - .h: STATIC_INLINE_OURPKG (int) ourpkg_staticf (void); - .c: STATIC_INLINE_OURPKG (int) - ourpkg_staticf (void) - { - .. - } - - .h: STATIC_OURPKG (int) ourpkg_staticf (void); - .c: STATIC_OURPKG (int) - ourpkg_staticf (void) - { - .. - } - - - All .h files: - - - All modules must wrap their .h code in the following: - - #ifndef OURPKG_H - #define OURPKG_H - ... code proper ... - #endif - - In addition, modules that want to allow global inlining must - include the lines (below) at the end of the .h file. (FIXME: - Shouldn't be needed). - - #if H_REVEALS_MODULE_P (OURPKG_INLINE) - #include "ourpkg.c" - #endif - - - All .c files: - - All modules must wrap their .c code in the following - - #ifndef OURPKG_C - #define OURPKG_C - ... code proper ... - #endif - - - NOW IT WORKS: - - 0: - - Since no inlining is defined. All macro's get standard defaults - (extern, static, ...). - - - - H_REVEALS_MODULE (alt includes our): - - - altprog.c defines ALTPROG_C and then includes sim-inline.h. - - In sim-inline.h the expression `` H_REVEALS_MODULE_P - (OURPROG_INLINE) && ! defined (OURPROG_C) && REVEAL_MODULE_P - (OURPROG_INLINE) '' is TRUE so it defines *_OURPROG as static - and EXTERN_OURPROG_P as FALSE. - - altprog.c includes ourprog.h. - - In ourprog.h the expression ``H_REVEALS_MODULE_P - (OURPROG_INLINE)'' is TRUE so it includes ourprog.c. - - Consequently, all the code in ourprog.c is visible and static in - the file altprog.c - - - - H_REVEALS_MODULE (our includes our): - - - ourprog.c defines OURPROG_C and then includes sim-inline.h. - - In sim-inline.h the term `` ! defined (OURPROG_C) '' is FALSE so - it defines *_OURPROG as non-static and EXTERN_OURPROG_P as TRUE. - - ourprog.c includes ourprog.h. - - In ourprog.h the expression ``H_REVEALS_MODULE_P - (OURPROG_INLINE)'' is true so it includes ourprog.c. - - In ourprog.c (second include) the expression defined (OURPROG_C) - and so the body is not re-included. - - Consequently, ourprog.o will contain a non-static copy of all - the exported symbols. - - - - C_REVEALS_MODULE (alt includes our): - - - altprog.c defines ALTPROG_C and then includes sim-inline.c - - sim-inline.c defines C_INLINE_C and then includes sim-inline.h - - In sim-inline.h the expression `` defined (SIM_INLINE) && ! - defined (OURPROG_C) && REVEAL_MODULE_P (OURPROG_INLINE) '' is - true so it defines *_OURPROG as static and EXTERN_OURPROG_P as - FALSE. - - In sim-inline.c the expression ``C_REVEALS_MODULE_P - (OURPROG_INLINE)'' is true so it includes ourprog.c. - - Consequently, all the code in ourprog.c is visible and static in - the file altprog.c. - - - - C_REVEALS_MODULE (our includes our): - - - ourprog.c defines OURPROG_C and then includes sim-inline.c - - sim-inline.c defines C_INLINE_C and then includes sim-inline.h - - In sim-inline.h the term `` ! defined (OURPROG_C) '' is FALSE - so it defines *_OURPROG as non-static and EXTERN_OURPROG_P as - TRUE. - - Consequently, ourprog.o will contain a non-static copy of all - the exported symbols. - - - - REALITY CHECK: - - This is not for the faint hearted. I've seen GCC get up to 500mb - trying to compile what this can create. */ - -#define H_REVEALS_MODULE 1 -#define C_REVEALS_MODULE 2 -#define INLINE_GLOBALS 4 -#define INLINE_LOCALS 8 - -#define REGPARM_MODULE 32 - -#define ALL_H_INLINE (H_REVEALS_MODULE | INLINE_GLOBALS | INLINE_LOCALS) -#define ALL_C_INLINE (C_REVEALS_MODULE | INLINE_GLOBALS | INLINE_LOCALS) - - -/* Default macro to simplify control several of key the inlines */ - -#ifndef DEFAULT_INLINE -#define DEFAULT_INLINE INLINE_LOCALS -#endif - -#define REVEAL_MODULE_P(X) (X & (H_REVEALS_MODULE | C_REVEALS_MODULE)) -#define H_REVEALS_MODULE_P(X) ((X & H_REVEALS_MODULE)) -#define C_REVEALS_MODULE_P(X) ((X & C_REVEALS_MODULE)) - - -#ifndef HAVE_INLINE -#ifdef __GNUC__ -#define HAVE_INLINE -#endif -#endif - - -/* Your compilers inline prefix */ - -#ifndef INLINE -#if defined (__GNUC__) && defined (__OPTIMIZE__) -#define INLINE __inline__ -#else -#define INLINE /*inline*/ -#endif -#endif - -/* ??? Temporary, pending decision to always use extern inline and do a vast - cleanup of inline support. */ -#ifndef INLINE2 -#if defined (__GNUC__) -#define INLINE2 __inline__ -#else -#define INLINE2 /*inline*/ -#endif -#endif - - -/* Your compiler's static inline prefix */ - -#ifndef STATIC_INLINE -#define STATIC_INLINE static INLINE -#endif - - -/* Your compiler's extern inline prefix */ - -#ifndef EXTERN_INLINE -#define EXTERN_INLINE extern INLINE2 -#endif - - -/* Your compiler's no-return reserved word */ - -#ifndef NORETURN -#define NORETURN -#endif - - - -/* Your compilers's unused reserved word */ - -#if !defined (UNUSED) -#if (!defined (__GNUC__) \ - || (__GNUC__ < 2) \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)) -#define UNUSED -#else -#define UNUSED __attribute__((__unused__)) -#endif -#endif - - - - -/* Your compilers nonstandard function call mechanism prefix */ - -#if !defined REGPARM -#if defined (__GNUC__) && (defined (__i386__) || defined (__i486__) || defined (__i586__) || defined (__i686__)) -#if (WITH_REGPARM && WITH_STDCALL) -#define REGPARM __attribute__((__regparm__(WITH_REGPARM),__stdcall__)) -#else -#if (WITH_REGPARM && !WITH_STDCALL) -#define REGPARM __attribute__((__regparm__(WITH_REGPARM))) -#else -#if (!WITH_REGPARM && WITH_STDCALL) -#define REGPARM __attribute__((__stdcall__)) -#endif -#endif -#endif -#endif -#endif - -#if !defined REGPARM -#define REGPARM -#endif - - - -/* ***** - sim-bits and sim-endian are treated differently from the rest - of the modules below. Their default value is ALL_H_INLINE. - The rest are ALL_C_INLINE. Don't blink, you'll miss it! - ***** - */ - -/* sim-bits */ - -#if !defined (SIM_BITS_INLINE) && (DEFAULT_INLINE) -# define SIM_BITS_INLINE (ALL_H_INLINE) -#endif - -#if (SIM_BITS_INLINE & REGPARM_MODULE) -# define REGPARM_SIM_BITS REGPARM -#else -# define REGPARM_SIM_BITS -#endif - -#if ((H_REVEALS_MODULE_P (SIM_BITS_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (SIM_BITS_C) \ - && (REVEAL_MODULE_P (SIM_BITS_INLINE))) -# if (SIM_BITS_INLINE & INLINE_GLOBALS) -# define INLINE_SIM_BITS(TYPE) static INLINE TYPE UNUSED -# define EXTERN_SIM_BITS_P 0 -# else -# define INLINE_SIM_BITS(TYPE) static TYPE UNUSED REGPARM_SIM_BITS -# define EXTERN_SIM_BITS_P 0 -# endif -#else -# define INLINE_SIM_BITS(TYPE) TYPE REGPARM_SIM_BITS -# define EXTERN_SIM_BITS_P 1 -#endif - -#if (SIM_BITS_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_SIM_BITS(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_SIM_BITS(TYPE) static TYPE REGPARM_SIM_BITS -#endif - -#define STATIC_SIM_BITS(TYPE) static TYPE - - - -/* sim-core */ - -#if !defined (SIM_CORE_INLINE) && (DEFAULT_INLINE) -# define SIM_CORE_INLINE ALL_C_INLINE -#endif - -#if (SIM_CORE_INLINE & REGPARM_MODULE) -# define REGPARM_SIM_CORE REGPARM -#else -# define REGPARM_SIM_CORE -#endif - -#if ((H_REVEALS_MODULE_P (SIM_CORE_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (SIM_CORE_C) \ - && (REVEAL_MODULE_P (SIM_CORE_INLINE))) -# if (SIM_CORE_INLINE & INLINE_GLOBALS) -# define INLINE_SIM_CORE(TYPE) static INLINE TYPE UNUSED -# define EXTERN_SIM_CORE_P 0 -#else -# define INLINE_SIM_CORE(TYPE) static TYPE UNUSED REGPARM_SIM_CORE -# define EXTERN_SIM_CORE_P 0 -#endif -#else -# define INLINE_SIM_CORE(TYPE) TYPE REGPARM_SIM_CORE -# define EXTERN_SIM_CORE_P 1 -#endif - -#if (SIM_CORE_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_SIM_CORE(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_SIM_CORE(TYPE) static TYPE REGPARM_SIM_CORE -#endif - -#define STATIC_SIM_CORE(TYPE) static TYPE - - - -/* sim-endian */ - -#if !defined (SIM_ENDIAN_INLINE) && (DEFAULT_INLINE) -# define SIM_ENDIAN_INLINE ALL_H_INLINE -#endif - -#if (SIM_ENDIAN_INLINE & REGPARM_MODULE) -# define REGPARM_SIM_ENDIAN REGPARM -#else -# define REGPARM_SIM_ENDIAN -#endif - -#if ((H_REVEALS_MODULE_P (SIM_ENDIAN_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (SIM_ENDIAN_C) \ - && (REVEAL_MODULE_P (SIM_ENDIAN_INLINE))) -# if (SIM_ENDIAN_INLINE & INLINE_GLOBALS) -# define INLINE_SIM_ENDIAN(TYPE) static INLINE TYPE UNUSED -# define EXTERN_SIM_ENDIAN_P 0 -# else -# define INLINE_SIM_ENDIAN(TYPE) static TYPE UNUSED REGPARM_SIM_ENDIAN -# define EXTERN_SIM_ENDIAN_P 0 -# endif -#else -# define INLINE_SIM_ENDIAN(TYPE) TYPE REGPARM_SIM_ENDIAN -# define EXTERN_SIM_ENDIAN_P 1 -#endif - -#if (SIM_ENDIAN_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_SIM_ENDIAN(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_SIM_ENDIAN(TYPE) static TYPE REGPARM_SIM_ENDIAN -#endif - -#define STATIC_SIM_ENDIAN(TYPE) static TYPE - - - -/* sim-events */ - -#if !defined (SIM_EVENTS_INLINE) && (DEFAULT_INLINE) -# define SIM_EVENTS_INLINE ALL_C_INLINE -#endif - -#if (SIM_EVENTS_INLINE & REGPARM_MODULE) -# define REGPARM_SIM_EVENTS REGPARM -#else -# define REGPARM_SIM_EVENTS -#endif - -#if ((H_REVEALS_MODULE_P (SIM_EVENTS_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (SIM_EVENTS_C) \ - && (REVEAL_MODULE_P (SIM_EVENTS_INLINE))) -# if (SIM_EVENTS_INLINE & INLINE_GLOBALS) -# define INLINE_SIM_EVENTS(TYPE) static INLINE TYPE UNUSED -# define EXTERN_SIM_EVENTS_P 0 -# else -# define INLINE_SIM_EVENTS(TYPE) static TYPE UNUSED REGPARM_SIM_EVENTS -# define EXTERN_SIM_EVENTS_P 0 -# endif -#else -# define INLINE_SIM_EVENTS(TYPE) TYPE REGPARM_SIM_EVENTS -# define EXTERN_SIM_EVENTS_P 1 -#endif - -#if (SIM_EVENTS_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_SIM_EVENTS(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_SIM_EVENTS(TYPE) static TYPE REGPARM_SIM_EVENTS -#endif - -#define STATIC_SIM_EVENTS(TYPE) static TYPE - - - -/* sim-fpu */ - -#if !defined (SIM_FPU_INLINE) && (DEFAULT_INLINE) -# define SIM_FPU_INLINE ALL_C_INLINE -#endif - -#if (SIM_FPU_INLINE & REGPARM_MODULE) -# define REGPARM_SIM_FPU REGPARM -#else -# define REGPARM_SIM_FPU -#endif - -#if ((H_REVEALS_MODULE_P (SIM_FPU_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (SIM_FPU_C) \ - && (REVEAL_MODULE_P (SIM_FPU_INLINE))) -# if (SIM_FPU_INLINE & INLINE_GLOBALS) -# define INLINE_SIM_FPU(TYPE) static INLINE TYPE UNUSED -# define EXTERN_SIM_FPU_P 0 -# else -# define INLINE_SIM_FPU(TYPE) static TYPE UNUSED REGPARM_SIM_FPU -# define EXTERN_SIM_FPU_P 0 -# endif -#else -# define INLINE_SIM_FPU(TYPE) TYPE REGPARM_SIM_FPU -# define EXTERN_SIM_FPU_P 1 -#endif - -#if (SIM_FPU_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_SIM_FPU(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_SIM_FPU(TYPE) static TYPE REGPARM_SIM_FPU -#endif - -#define STATIC_SIM_FPU(TYPE) static TYPE - - - -/* sim-types */ - -#if (SIM_TYPES_INLINE & REGPARM_MODULE) -# define REGPARM_SIM_TYPES REGPARM -#else -# define REGPARM_SIM_TYPES -#endif - -#if ((H_REVEALS_MODULE_P (SIM_TYPES_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (SIM_TYPES_C) \ - && (REVEAL_MODULE_P (SIM_TYPES_INLINE))) -# if (SIM_TYPES_INLINE & INLINE_GLOBALS) -# define INLINE_SIM_TYPES(TYPE) static INLINE TYPE UNUSED -# define EXTERN_SIM_TYPES_P 0 -# else -# define INLINE_SIM_TYPES(TYPE) static TYPE UNUSED REGPARM_SIM_TYPES -# define EXTERN_SIM_TYPES_P 0 -# endif -#else -# define INLINE_SIM_TYPES(TYPE) TYPE REGPARM_SIM_TYPES -# define EXTERN_SIM_TYPES_P 1 -#endif - -#if (SIM_TYPES_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_SIM_TYPES(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_SIM_TYPES(TYPE) static TYPE REGPARM_SIM_TYPES -#endif - -#define STATIC_SIM_TYPES(TYPE) static TYPE - - - -/* sim_main */ - -#if !defined (SIM_MAIN_INLINE) && (DEFAULT_INLINE) -# define SIM_MAIN_INLINE (ALL_C_INLINE) -#endif - -#if (SIM_MAIN_INLINE & REGPARM_MODULE) -# define REGPARM_SIM_MAIN REGPARM -#else -# define REGPARM_SIM_MAIN -#endif - -#if ((H_REVEALS_MODULE_P (SIM_MAIN_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (SIM_MAIN_C) \ - && (REVEAL_MODULE_P (SIM_MAIN_INLINE))) -# if (SIM_MAIN_INLINE & INLINE_GLOBALS) -# define INLINE_SIM_MAIN(TYPE) static INLINE TYPE UNUSED -# define EXTERN_SIM_MAIN_P 0 -# else -# define INLINE_SIM_MAIN(TYPE) static TYPE UNUSED REGPARM_SIM_MAIN -# define EXTERN_SIM_MAIN_P 0 -# endif -#else -# define INLINE_SIM_MAIN(TYPE) TYPE REGPARM_SIM_MAIN -# define EXTERN_SIM_MAIN_P 1 -#endif - -#if (SIM_MAIN_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_SIM_MAIN(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_SIM_MAIN(TYPE) static TYPE REGPARM_SIM_MAIN -#endif - -#define STATIC_SIM_MAIN(TYPE) static TYPE - -/* engine */ - -#if (ENGINE_INLINE & REGPARM_MODULE) -# define REGPARM_ENGINE REGPARM -#else -# define REGPARM_ENGINE -#endif - -#if ((H_REVEALS_MODULE_P (ENGINE_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (ENGINE_C) \ - && (REVEAL_MODULE_P (ENGINE_INLINE))) -# if (ENGINE_INLINE & INLINE_GLOBALS) -# define INLINE_ENGINE(TYPE) static INLINE TYPE UNUSED -# define EXTERN_ENGINE_P 0 -# else -# define INLINE_ENGINE(TYPE) static TYPE UNUSED REGPARM_ENGINE -# define EXTERN_ENGINE_P 0 -# endif -#else -# define INLINE_ENGINE(TYPE) TYPE REGPARM_ENGINE -# define EXTERN_ENGINE_P 1 -#endif - -#if (ENGINE_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_ENGINE(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_ENGINE(TYPE) static TYPE REGPARM_ENGINE -#endif - -#define STATIC_ENGINE(TYPE) static TYPE - - - -/* icache */ - -#if (ICACHE_INLINE & REGPARM_MODULE) -# define REGPARM_ICACHE REGPARM -#else -# define REGPARM_ICACHE -#endif - -#if ((H_REVEALS_MODULE_P (ICACHE_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (ICACHE_C) \ - && (REVEAL_MODULE_P (ICACHE_INLINE))) -# if (ICACHE_INLINE & INLINE_GLOBALS) -# define INLINE_ICACHE(TYPE) static INLINE TYPE UNUSED -# define EXTERN_ICACHE_P 0 -#else -# define INLINE_ICACHE(TYPE) static TYPE UNUSED REGPARM_ICACHE -# define EXTERN_ICACHE_P 0 -#endif -#else -# define INLINE_ICACHE(TYPE) TYPE REGPARM_ICACHE -# define EXTERN_ICACHE_P 1 -#endif - -#if (ICACHE_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_ICACHE(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_ICACHE(TYPE) static TYPE REGPARM_ICACHE -#endif - -#define STATIC_ICACHE(TYPE) static TYPE - - - -/* idecode */ - -#if (IDECODE_INLINE & REGPARM_MODULE) -# define REGPARM_IDECODE REGPARM -#else -# define REGPARM_IDECODE -#endif - -#if ((H_REVEALS_MODULE_P (IDECODE_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (IDECODE_C) \ - && (REVEAL_MODULE_P (IDECODE_INLINE))) -# if (IDECODE_INLINE & INLINE_GLOBALS) -# define INLINE_IDECODE(TYPE) static INLINE TYPE UNUSED -# define EXTERN_IDECODE_P 0 -#else -# define INLINE_IDECODE(TYPE) static TYPE UNUSED REGPARM_IDECODE -# define EXTERN_IDECODE_P 0 -#endif -#else -# define INLINE_IDECODE(TYPE) TYPE REGPARM_IDECODE -# define EXTERN_IDECODE_P 1 -#endif - -#if (IDECODE_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_IDECODE(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_IDECODE(TYPE) static TYPE REGPARM_IDECODE -#endif - -#define STATIC_IDECODE(TYPE) static TYPE - - - -/* semantics */ - -#if (SEMANTICS_INLINE & REGPARM_MODULE) -# define REGPARM_SEMANTICS REGPARM -#else -# define REGPARM_SEMANTICS -#endif - -#if ((H_REVEALS_MODULE_P (SEMANTICS_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (SEMANTICS_C) \ - && (REVEAL_MODULE_P (SEMANTICS_INLINE))) -# if (SEMANTICS_INLINE & INLINE_GLOBALS) -# define INLINE_SEMANTICS(TYPE) static INLINE TYPE UNUSED -# define EXTERN_SEMANTICS_P 0 -#else -# define INLINE_SEMANTICS(TYPE) static TYPE UNUSED REGPARM_SEMANTICS -# define EXTERN_SEMANTICS_P 0 -#endif -#else -# define INLINE_SEMANTICS(TYPE) TYPE REGPARM_SEMANTICS -# define EXTERN_SEMANTICS_P 1 -#endif - -#if EXTERN_SEMANTICS_P -# define EXTERN_SEMANTICS(TYPE) TYPE REGPARM_SEMANTICS -#else -# define EXTERN_SEMANTICS(TYPE) static TYPE UNUSED REGPARM_SEMANTICS -#endif - -#if (SEMANTICS_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_SEMANTICS(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_SEMANTICS(TYPE) static TYPE REGPARM_SEMANTICS -#endif - -#define STATIC_SEMANTICS(TYPE) static TYPE - - - -/* support */ - -#if !defined (SUPPORT_INLINE) && (DEFAULT_INLINE) -# define SUPPORT_INLINE ALL_C_INLINE -#endif - -#if (SUPPORT_INLINE & REGPARM_MODULE) -# define REGPARM_SUPPORT REGPARM -#else -# define REGPARM_SUPPORT -#endif - -#if ((H_REVEALS_MODULE_P (SUPPORT_INLINE) || defined (SIM_INLINE_C)) \ - && !defined (SUPPORT_C) \ - && (REVEAL_MODULE_P (SUPPORT_INLINE))) -# if (SUPPORT_INLINE & INLINE_GLOBALS) -# define INLINE_SUPPORT(TYPE) static INLINE TYPE UNUSED -# define EXTERN_SUPPORT_P 0 -#else -# define INLINE_SUPPORT(TYPE) static TYPE UNUSED REGPARM_SUPPORT -# define EXTERN_SUPPORT_P 0 -#endif -#else -# define INLINE_SUPPORT(TYPE) TYPE REGPARM_SUPPORT -# define EXTERN_SUPPORT_P 1 -#endif - -#if (SUPPORT_INLINE & INLINE_LOCALS) -# define STATIC_INLINE_SUPPORT(TYPE) static INLINE TYPE -#else -# define STATIC_INLINE_SUPPORT(TYPE) static TYPE REGPARM_SUPPORT -#endif - -#define STATIC_SUPPORT(TYPE) static TYPE - - - -#endif diff --git a/sim/common/sim-io.c b/sim/common/sim-io.c deleted file mode 100644 index d1aab44..0000000 --- a/sim/common/sim-io.c +++ /dev/null @@ -1,391 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 "sim-main.h" -#include "sim-io.h" -#include "targ-vals.h" - -#include <errno.h> -#if HAVE_FCNTL_H -#include <fcntl.h> -#endif - -#if HAVE_UNISTD_H -#include <unistd.h> -#endif - -/* Define the rate at which the simulator should poll the host - for a quit. */ -#ifndef POLL_QUIT_INTERVAL -#define POLL_QUIT_INTERVAL 0x10 -#endif - -static int poll_quit_count = POLL_QUIT_INTERVAL; - -/* See the file include/callbacks.h for a description */ - - -int -sim_io_init(SIM_DESC sd) -{ - return STATE_CALLBACK (sd)->init (STATE_CALLBACK (sd)); -} - - -int -sim_io_shutdown(SIM_DESC sd) -{ - return STATE_CALLBACK (sd)->shutdown (STATE_CALLBACK (sd)); -} - - -int -sim_io_unlink(SIM_DESC sd, - const char *f1) -{ - return STATE_CALLBACK (sd)->unlink (STATE_CALLBACK (sd), f1); -} - - -long -sim_io_time(SIM_DESC sd, - long *t) -{ - return STATE_CALLBACK (sd)->time (STATE_CALLBACK (sd), t); -} - - -int -sim_io_system(SIM_DESC sd, const char *s) -{ - return STATE_CALLBACK (sd)->system (STATE_CALLBACK (sd), s); -} - - -int -sim_io_rename(SIM_DESC sd, - const char *f1, - const char *f2) -{ - return STATE_CALLBACK (sd)->rename (STATE_CALLBACK (sd), f1, f2); -} - - -int -sim_io_write_stdout(SIM_DESC sd, - const char *buf, - int len) -{ - switch (CURRENT_STDIO) { - case DO_USE_STDIO: - return STATE_CALLBACK (sd)->write_stdout (STATE_CALLBACK (sd), buf, len); - break; - case DONT_USE_STDIO: - return STATE_CALLBACK (sd)->write (STATE_CALLBACK (sd), 1, buf, len); - break; - default: - sim_io_error (sd, "sim_io_write_stdout: unaccounted switch\n"); - break; - } - return 0; -} - - -void -sim_io_flush_stdout(SIM_DESC sd) -{ - switch (CURRENT_STDIO) { - case DO_USE_STDIO: - STATE_CALLBACK (sd)->flush_stdout (STATE_CALLBACK (sd)); - break; - case DONT_USE_STDIO: - break; - default: - sim_io_error (sd, "sim_io_flush_stdout: unaccounted switch\n"); - break; - } -} - - -int -sim_io_write_stderr(SIM_DESC sd, - const char *buf, - int len) -{ - switch (CURRENT_STDIO) { - case DO_USE_STDIO: - return STATE_CALLBACK (sd)->write_stderr (STATE_CALLBACK (sd), buf, len); - break; - case DONT_USE_STDIO: - return STATE_CALLBACK (sd)->write (STATE_CALLBACK (sd), 2, buf, len); - break; - default: - sim_io_error (sd, "sim_io_write_stderr: unaccounted switch\n"); - break; - } - return 0; -} - - -void -sim_io_flush_stderr(SIM_DESC sd) -{ - switch (CURRENT_STDIO) { - case DO_USE_STDIO: - STATE_CALLBACK (sd)->flush_stderr (STATE_CALLBACK (sd)); - break; - case DONT_USE_STDIO: - break; - default: - sim_io_error (sd, "sim_io_flush_stderr: unaccounted switch\n"); - break; - } -} - - -int -sim_io_write(SIM_DESC sd, - int fd, - const char *buf, - int len) -{ - return STATE_CALLBACK (sd)->write (STATE_CALLBACK (sd), fd, buf, len); -} - - -int -sim_io_read_stdin(SIM_DESC sd, - char *buf, - int len) -{ - switch (CURRENT_STDIO) { - case DO_USE_STDIO: - return STATE_CALLBACK (sd)->read_stdin (STATE_CALLBACK (sd), buf, len); - break; - case DONT_USE_STDIO: - return STATE_CALLBACK (sd)->read (STATE_CALLBACK (sd), 0, buf, len); - break; - default: - sim_io_error (sd, "sim_io_read_stdin: unaccounted switch\n"); - break; - } - return 0; -} - - -int -sim_io_read(SIM_DESC sd, int fd, - char *buf, - int len) -{ - return STATE_CALLBACK (sd)->read (STATE_CALLBACK (sd), fd, buf, len); -} - - -int -sim_io_open(SIM_DESC sd, - const char *name, - int flags) -{ - return STATE_CALLBACK (sd)->open (STATE_CALLBACK (sd), name, flags); -} - - -int -sim_io_lseek(SIM_DESC sd, - int fd, - long off, - int way) -{ - return STATE_CALLBACK (sd)->lseek (STATE_CALLBACK (sd), fd, off, way); -} - - -int -sim_io_isatty(SIM_DESC sd, - int fd) -{ - return STATE_CALLBACK (sd)->isatty (STATE_CALLBACK (sd), fd); -} - - -int -sim_io_get_errno(SIM_DESC sd) -{ - return STATE_CALLBACK (sd)->get_errno (STATE_CALLBACK (sd)); -} - - -int -sim_io_close(SIM_DESC sd, - int fd) -{ - return STATE_CALLBACK (sd)->close (STATE_CALLBACK (sd), fd); -} - - -void -sim_io_printf(SIM_DESC sd, - const char *fmt, - ...) -{ - va_list ap; - va_start(ap, fmt); - STATE_CALLBACK (sd)->vprintf_filtered (STATE_CALLBACK (sd), fmt, ap); - va_end(ap); -} - - -void -sim_io_vprintf(SIM_DESC sd, - const char *fmt, - va_list ap) -{ - STATE_CALLBACK (sd)->vprintf_filtered (STATE_CALLBACK (sd), fmt, ap); -} - - -void -sim_io_eprintf(SIM_DESC sd, - const char *fmt, - ...) -{ - va_list ap; - va_start(ap, fmt); - STATE_CALLBACK (sd)->evprintf_filtered (STATE_CALLBACK (sd), fmt, ap); - va_end(ap); -} - - -void -sim_io_evprintf(SIM_DESC sd, - const char *fmt, - va_list ap) -{ - STATE_CALLBACK (sd)->evprintf_filtered (STATE_CALLBACK (sd), fmt, ap); -} - - -void -sim_io_error(SIM_DESC sd, - const char *fmt, - ...) -{ - if (sd == NULL || STATE_CALLBACK (sd) == NULL) { - va_list ap; - va_start(ap, fmt); - vfprintf (stderr, fmt, ap); - va_end(ap); - fprintf (stderr, "\n"); - abort (); - } - else { - va_list ap; - va_start(ap, fmt); - STATE_CALLBACK (sd)->evprintf_filtered (STATE_CALLBACK (sd), fmt, ap); - va_end(ap); - STATE_CALLBACK (sd)->error (STATE_CALLBACK (sd), ""); - } -} - - -void -sim_io_poll_quit(SIM_DESC sd) -{ - if (STATE_CALLBACK (sd)->poll_quit != NULL && poll_quit_count-- < 0) - { - poll_quit_count = POLL_QUIT_INTERVAL; - if (STATE_CALLBACK (sd)->poll_quit (STATE_CALLBACK (sd))) - sim_stop (sd); - } -} - - -/* Based on gdb-4.17/sim/ppc/main.c:sim_io_read_stdin(). - - FIXME: Should not be calling fcntl() or grubbing around inside of - ->fdmap and ->errno. - - FIXME: Some completly new mechanism for handling the general - problem of asynchronous IO is needed. - - FIXME: This function does not supress the echoing (ECHO) of input. - Consequently polled input is always displayed. - - FIXME: This function does not perform uncooked reads. - Consequently, data will not be read until an EOLN character has - been entered. A cntrl-d may force the early termination of a line */ - - -int -sim_io_poll_read (SIM_DESC sd, - int sim_io_fd, - char *buf, - int sizeof_buf) -{ -#if defined(O_NDELAY) && defined(F_GETFL) && defined(F_SETFL) - int fd = STATE_CALLBACK (sd)->fdmap[sim_io_fd]; - int flags; - int status; - int nr_read; - int result; - STATE_CALLBACK (sd)->last_errno = 0; - /* get the old status */ - flags = fcntl (fd, F_GETFL, 0); - if (flags == -1) - { - perror ("sim_io_poll_read"); - return 0; - } - /* temp, disable blocking IO */ - status = fcntl (fd, F_SETFL, flags | O_NDELAY); - if (status == -1) - { - perror ("sim_io_read_stdin"); - return 0; - } - /* try for input */ - nr_read = read (fd, buf, sizeof_buf); - if (nr_read >= 0) - { - /* printf ("<nr-read=%d>\n", nr_read); */ - result = nr_read; - } - else - { /* nr_read < 0 */ - result = -1; - STATE_CALLBACK (sd)->last_errno = errno; - } - /* return to regular vewing */ - status = fcntl (fd, F_SETFL, flags); - if (status == -1) - { - perror ("sim_io_read_stdin"); - /* return 0; */ - } - return result; -#else - return sim_io_read (sd, sim_io_fd, buf, sizeof_buf); -#endif -} diff --git a/sim/common/sim-io.h b/sim/common/sim-io.h deleted file mode 100644 index 18305df..0000000 --- a/sim/common/sim-io.h +++ /dev/null @@ -1,87 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 SIM_IO_H -#define SIM_IO_H - -/* See the file include/callbacks.h for a description */ - -int sim_io_init (SIM_DESC sd); - -int sim_io_shutdown (SIM_DESC sd); - -int sim_io_unlink (SIM_DESC sd, const char *); - -long sim_io_time (SIM_DESC sd, long *); - -int sim_io_system (SIM_DESC sd, const char *); - -int sim_io_rename (SIM_DESC sd, const char *, const char *); - -int sim_io_write_stdout (SIM_DESC sd, const char *, int); - -void sim_io_flush_stdout (SIM_DESC sd); - -int sim_io_write_stderr (SIM_DESC sd, const char *, int); - -void sim_io_flush_stderr (SIM_DESC sd); - -int sim_io_write (SIM_DESC sd, int, const char *, int); - -int sim_io_read_stdin (SIM_DESC sd, char *, int); - -int sim_io_read (SIM_DESC sd, int, char *, int); - -int sim_io_open (SIM_DESC sd, const char *, int); - -int sim_io_lseek (SIM_DESC sd, int, long, int); - -int sim_io_isatty (SIM_DESC sd, int); - -int sim_io_get_errno (SIM_DESC sd); - -int sim_io_close (SIM_DESC sd, int); - -void sim_io_printf (SIM_DESC sd, - const char *fmt, - ...) __attribute__ ((format (printf, 2, 3))); - -void sim_io_vprintf (SIM_DESC sd, const char *fmt, va_list ap); - -void sim_io_eprintf (SIM_DESC sd, - const char *fmt, - ...) __attribute__ ((format (printf, 2, 3))); - -void sim_io_evprintf (SIM_DESC sd, const char *fmt, va_list ap); - -void sim_io_error (SIM_DESC sd, - const char *fmt, - ...) __attribute__ ((format (printf, 2, 3))); - -void sim_io_poll_quit (SIM_DESC sd); - -/* Returns -1 and sets (host) EAGAIN if not ready. */ -int sim_io_poll_read (SIM_DESC sd, int, char *, int); - -#endif diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c deleted file mode 100644 index 3269952..0000000 --- a/sim/common/sim-load.c +++ /dev/null @@ -1,223 +0,0 @@ -/* Utility to load a file into the simulator. - Copyright (C) 1997, 1998, 2001, 2002, 2004 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. */ - -/* This is a standalone loader, independent of the sim-basic.h machinery, - as it is used by simulators that don't use it [though that doesn't mean - to suggest that they shouldn't :-)]. */ - -#ifdef HAVE_CONFIG_H -#include "cconfig.h" -#endif -#include "ansidecl.h" -#include <stdio.h> /* for NULL */ -#include <stdarg.h> -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#include <time.h> - -#include "sim-basics.h" -#include "bfd.h" -#include "sim-utils.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 *, ...)); -static void report_transfer_performance - PARAMS ((host_callback *, unsigned long, time_t, time_t)); -static void xprintf_bfd_vma PARAMS ((host_callback *, bfd_vma)); - -/* Load program PROG into the simulator using the function DO_LOAD. - If PROG_BFD is non-NULL, the file has already been opened. - If VERBOSE_P is non-zero statistics are printed of each loaded section - and the transfer rate (for consistency with gdb). - If LMA_P is non-zero the program sections are loaded at the LMA - rather than the VMA - If this fails an error message is printed and NULL is returned. - If it succeeds the bfd is returned. - NOTE: For historical reasons, older hardware simulators incorrectly - write the program sections at LMA interpreted as a virtual address. - This is still accommodated for backward compatibility reasons. */ - - -bfd * -sim_load_file (sd, myname, callback, prog, prog_bfd, verbose_p, lma_p, do_write) - SIM_DESC sd; - const char *myname; - host_callback *callback; - char *prog; - bfd *prog_bfd; - int verbose_p; - int lma_p; - sim_write_fn do_write; -{ - asection *s; - /* Record separately as we don't want to close PROG_BFD if it was passed. */ - bfd *result_bfd; - time_t start_time = 0; /* Start and end times of download */ - time_t end_time = 0; - unsigned long data_count = 0; /* Number of bytes transferred to memory */ - int found_loadable_section; - - if (prog_bfd != NULL) - result_bfd = prog_bfd; - else - { - result_bfd = bfd_openr (prog, 0); - if (result_bfd == NULL) - { - eprintf (callback, "%s: can't open \"%s\": %s\n", - myname, prog, bfd_errmsg (bfd_get_error ())); - return NULL; - } - } - - if (!bfd_check_format (result_bfd, bfd_object)) - { - eprintf (callback, "%s: \"%s\" is not an object file: %s\n", - myname, prog, bfd_errmsg (bfd_get_error ())); - /* Only close if we opened it. */ - if (prog_bfd == NULL) - bfd_close (result_bfd); - return NULL; - } - - if (verbose_p) - start_time = time (NULL); - - found_loadable_section = 0; - for (s = result_bfd->sections; s; s = s->next) - { - if (s->flags & SEC_LOAD) - { - bfd_size_type size; - - size = bfd_get_section_size (s); - if (size > 0) - { - char *buffer; - bfd_vma lma; - - buffer = malloc (size); - if (buffer == NULL) - { - eprintf (callback, - "%s: insufficient memory to load \"%s\"\n", - myname, prog); - /* Only close if we opened it. */ - if (prog_bfd == NULL) - bfd_close (result_bfd); - return NULL; - } - if (lma_p) - lma = bfd_section_lma (result_bfd, s); - else - lma = bfd_section_vma (result_bfd, s); - if (verbose_p) - { - xprintf (callback, "Loading section %s, size 0x%lx %s ", - bfd_get_section_name (result_bfd, s), - (unsigned long) size, - (lma_p ? "lma" : "vma")); - xprintf_bfd_vma (callback, lma); - xprintf (callback, "\n"); - } - data_count += size; - bfd_get_section_contents (result_bfd, s, buffer, 0, size); - do_write (sd, lma, buffer, size); - found_loadable_section = 1; - free (buffer); - } - } - } - - if (!found_loadable_section) - { - eprintf (callback, - "%s: no loadable sections \"%s\"\n", - myname, prog); - return NULL; - } - - if (verbose_p) - { - end_time = time (NULL); - xprintf (callback, "Start address "); - xprintf_bfd_vma (callback, bfd_get_start_address (result_bfd)); - xprintf (callback, "\n"); - report_transfer_performance (callback, data_count, start_time, end_time); - } - - bfd_cache_close (result_bfd); - - return result_bfd; -} - -static void -xprintf VPARAMS ((host_callback *callback, const char *fmt, ...)) -{ - va_list ap; - - VA_START (ap, fmt); - - (*callback->vprintf_filtered) (callback, fmt, ap); - - va_end (ap); -} - -static void -eprintf VPARAMS ((host_callback *callback, const char *fmt, ...)) -{ - va_list ap; - - VA_START (ap, fmt); - - (*callback->evprintf_filtered) (callback, fmt, ap); - - va_end (ap); -} - -/* Report how fast the transfer went. */ - -static void -report_transfer_performance (callback, data_count, start_time, end_time) - host_callback *callback; - unsigned long data_count; - time_t start_time, end_time; -{ - xprintf (callback, "Transfer rate: "); - if (end_time != start_time) - xprintf (callback, "%ld bits/sec", - (data_count * 8) / (end_time - start_time)); - else - xprintf (callback, "%ld bits in <1 sec", (data_count * 8)); - xprintf (callback, ".\n"); -} - -/* Print a bfd_vma. - This is intended to handle the vagaries of 32 vs 64 bits, etc. */ - -static void -xprintf_bfd_vma (callback, vma) - host_callback *callback; - bfd_vma vma; -{ - /* FIXME: for now */ - xprintf (callback, "0x%lx", (unsigned long) vma); -} diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c deleted file mode 100644 index d66dc1e..0000000 --- a/sim/common/sim-memopt.c +++ /dev/null @@ -1,582 +0,0 @@ -/* Simulator memory option handling. - Copyright (C) 1996-1999 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 "cconfig.h" - -#include "sim-main.h" -#include "sim-assert.h" -#include "sim-options.h" - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#ifdef HAVE_ERRNO_H -#include <errno.h> -#endif -#ifdef HAVE_FCNTL_H -#include <fcntl.h> -#endif -#ifdef HAVE_SYS_MMAN_H -#include <sys/mman.h> -#endif -#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; -static int fill_byte_flag = 0; - -/* Memory mapping; see OPTION_MEMORY_MAPFILE. */ -static int mmap_next_fd = -1; - -/* Memory command line options. */ - -enum { - OPTION_MEMORY_DELETE = OPTION_START, - OPTION_MEMORY_REGION, - OPTION_MEMORY_SIZE, - OPTION_MEMORY_INFO, - OPTION_MEMORY_ALIAS, - OPTION_MEMORY_CLEAR, - OPTION_MEMORY_FILL, - OPTION_MEMORY_MAPFILE -}; - -static DECLARE_OPTION_HANDLER (memory_option_handler); - -static const OPTION memory_options[] = -{ - { {"memory-delete", required_argument, NULL, OPTION_MEMORY_DELETE }, - '\0', "ADDRESS|all", "Delete memory at ADDRESS (all addresses)", - memory_option_handler }, - { {"delete-memory", required_argument, NULL, OPTION_MEMORY_DELETE }, - '\0', "ADDRESS", NULL, - memory_option_handler }, - - { {"memory-region", required_argument, NULL, OPTION_MEMORY_REGION }, - '\0', "ADDRESS,SIZE[,MODULO]", "Add a memory region", - memory_option_handler }, - - { {"memory-alias", required_argument, NULL, OPTION_MEMORY_ALIAS }, - '\0', "ADDRESS,SIZE{,ADDRESS}", "Add memory shadow", - memory_option_handler }, - - { {"memory-size", required_argument, NULL, OPTION_MEMORY_SIZE }, - '\0', "SIZE", "Add memory at address zero", - memory_option_handler }, - - { {"memory-fill", required_argument, NULL, OPTION_MEMORY_FILL }, - '\0', "VALUE", "Fill subsequently added memory regions", - memory_option_handler }, - - { {"memory-clear", no_argument, NULL, OPTION_MEMORY_CLEAR }, - '\0', NULL, "Clear subsequently added memory regions", - memory_option_handler }, - -#if defined(HAVE_MMAP) && defined(HAVE_MUNMAP) - { {"memory-mapfile", required_argument, NULL, OPTION_MEMORY_MAPFILE }, - '\0', "FILE", "Memory-map next memory region from file", - memory_option_handler }, -#endif - - { {"memory-info", no_argument, NULL, OPTION_MEMORY_INFO }, - '\0', NULL, "List configurable memory regions", - memory_option_handler }, - { {"info-memory", no_argument, NULL, OPTION_MEMORY_INFO }, - '\0', NULL, NULL, - memory_option_handler }, - - { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } -}; - - -static sim_memopt * -do_memopt_add (SIM_DESC sd, - int level, - int space, - address_word addr, - address_word nr_bytes, - unsigned modulo, - sim_memopt **entry, - void *buffer) -{ - void *fill_buffer; - unsigned fill_length; - void *free_buffer; - unsigned long free_length; - - if (buffer != NULL) - { - /* Buffer already given. sim_memory_uninstall will free it. */ - sim_core_attach (sd, NULL, - level, access_read_write_exec, space, - addr, nr_bytes, modulo, NULL, buffer); - - free_buffer = buffer; - free_length = 0; - fill_buffer = buffer; - fill_length = (modulo == 0) ? nr_bytes : modulo; - } - else - { - /* Allocate new well-aligned buffer, just as sim_core_attach(). */ - void *aligned_buffer; - int padding = (addr % sizeof (unsigned64)); - unsigned long bytes = (modulo == 0 ? nr_bytes : modulo) + padding; - - free_buffer = NULL; - free_length = bytes; - -#ifdef HAVE_MMAP - /* Memory map or malloc(). */ - if (mmap_next_fd >= 0) - { - /* Check that given file is big enough. */ - struct stat s; - int rc; - - /* Some kernels will SIGBUS the application if mmap'd file - is not large enough. */ - rc = fstat (mmap_next_fd, &s); - if (rc < 0 || s.st_size < bytes) - { - sim_io_error (sd, - "Error, cannot confirm that mmap file is large enough " - "(>= %ld bytes)\n", bytes); - } - - free_buffer = mmap (0, bytes, PROT_READ|PROT_WRITE, MAP_SHARED, mmap_next_fd, 0); - if (free_buffer == 0 || free_buffer == (char*)-1) /* MAP_FAILED */ - { - sim_io_error (sd, "Error, cannot mmap file (%s).\n", - strerror(errno)); - } - } -#endif - - /* Need heap allocation? */ - if (free_buffer == NULL) - { - /* If filling with non-zero value, do not use clearing allocator. */ - if (fill_byte_flag && fill_byte_value != 0) - free_buffer = xmalloc (bytes); /* don't clear */ - else - free_buffer = zalloc (bytes); /* clear */ - } - - aligned_buffer = (char*) free_buffer + padding; - - sim_core_attach (sd, NULL, - level, access_read_write_exec, space, - addr, nr_bytes, modulo, NULL, aligned_buffer); - - fill_buffer = aligned_buffer; - fill_length = (modulo == 0) ? nr_bytes : modulo; - - /* If we just used a clearing allocator, and are about to fill with - zero, truncate the redundant fill operation. */ - - if (fill_byte_flag && fill_byte_value == 0) - fill_length = 1; /* avoid boundary length=0 case */ - } - - if (fill_byte_flag) - { - ASSERT (fill_buffer != 0); - memset ((char*) fill_buffer, fill_byte_value, fill_length); - } - - while ((*entry) != NULL) - entry = &(*entry)->next; - (*entry) = ZALLOC (sim_memopt); - (*entry)->level = level; - (*entry)->space = space; - (*entry)->addr = addr; - (*entry)->nr_bytes = nr_bytes; - (*entry)->modulo = modulo; - (*entry)->buffer = free_buffer; - - /* Record memory unmapping info. */ - if (mmap_next_fd >= 0) - { - (*entry)->munmap_length = free_length; - close (mmap_next_fd); - mmap_next_fd = -1; - } - else - (*entry)->munmap_length = 0; - - return (*entry); -} - -static SIM_RC -do_memopt_delete (SIM_DESC sd, - int level, - int space, - address_word addr) -{ - sim_memopt **entry = &STATE_MEMOPT (sd); - sim_memopt *alias; - while ((*entry) != NULL - && ((*entry)->level != level - || (*entry)->space != space - || (*entry)->addr != addr)) - entry = &(*entry)->next; - if ((*entry) == NULL) - { - sim_io_eprintf (sd, "Memory at 0x%lx not found, not deleted\n", - (long) addr); - return SIM_RC_FAIL; - } - /* delete any buffer */ - if ((*entry)->buffer != NULL) - { -#ifdef HAVE_MUNMAP - if ((*entry)->munmap_length > 0) - munmap ((*entry)->buffer, (*entry)->munmap_length); - else -#endif - zfree ((*entry)->buffer); - } - - /* delete it and its aliases */ - alias = *entry; - *entry = (*entry)->next; - while (alias != NULL) - { - sim_memopt *dead = alias; - alias = alias->alias; - sim_core_detach (sd, NULL, dead->level, dead->space, dead->addr); - zfree (dead); - } - return SIM_RC_OK; -} - - -static char * -parse_size (char *chp, - address_word *nr_bytes, - unsigned *modulo) -{ - /* <nr_bytes> [ "%" <modulo> ] */ - *nr_bytes = strtoul (chp, &chp, 0); - if (*chp == '%') - { - *modulo = strtoul (chp + 1, &chp, 0); - } - return chp; -} - -static char * -parse_ulong_value (char *chp, - unsigned long *value) -{ - *value = strtoul (chp, &chp, 0); - return chp; -} - -static char * -parse_addr (char *chp, - int *level, - int *space, - address_word *addr) -{ - /* [ <space> ": " ] <addr> [ "@" <level> ] */ - *addr = (unsigned long) strtoul (chp, &chp, 0); - if (*chp == ':') - { - *space = *addr; - *addr = (unsigned long) strtoul (chp + 1, &chp, 0); - } - if (*chp == '@') - { - *level = strtoul (chp + 1, &chp, 0); - } - return chp; -} - - -static SIM_RC -memory_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, - char *arg, int is_command) -{ - switch (opt) - { - - case OPTION_MEMORY_DELETE: - if (strcasecmp (arg, "all") == 0) - { - while (STATE_MEMOPT (sd) != NULL) - do_memopt_delete (sd, - STATE_MEMOPT (sd)->level, - STATE_MEMOPT (sd)->space, - STATE_MEMOPT (sd)->addr); - return SIM_RC_OK; - } - else - { - int level = 0; - int space = 0; - address_word addr = 0; - parse_addr (arg, &level, &space, &addr); - return do_memopt_delete (sd, level, space, addr); - } - - case OPTION_MEMORY_REGION: - { - char *chp = arg; - int level = 0; - int space = 0; - address_word addr = 0; - address_word nr_bytes = 0; - unsigned modulo = 0; - /* parse the arguments */ - chp = parse_addr (chp, &level, &space, &addr); - if (*chp != ',') - { - sim_io_eprintf (sd, "Missing size for memory-region\n"); - return SIM_RC_FAIL; - } - chp = parse_size (chp + 1, &nr_bytes, &modulo); - /* old style */ - if (*chp == ',') - modulo = strtoul (chp + 1, &chp, 0); - /* try to attach/insert it */ - do_memopt_add (sd, level, space, addr, nr_bytes, modulo, - &STATE_MEMOPT (sd), NULL); - return SIM_RC_OK; - } - - case OPTION_MEMORY_ALIAS: - { - char *chp = arg; - int level = 0; - int space = 0; - address_word addr = 0; - address_word nr_bytes = 0; - unsigned modulo = 0; - sim_memopt *entry; - /* parse the arguments */ - chp = parse_addr (chp, &level, &space, &addr); - if (*chp != ',') - { - sim_io_eprintf (sd, "Missing size for memory-region\n"); - return SIM_RC_FAIL; - } - chp = parse_size (chp + 1, &nr_bytes, &modulo); - /* try to attach/insert the main record */ - entry = do_memopt_add (sd, level, space, addr, nr_bytes, modulo, - &STATE_MEMOPT (sd), - NULL); - /* now attach all the aliases */ - while (*chp == ',') - { - int a_level = level; - int a_space = space; - address_word a_addr = addr; - chp = parse_addr (chp + 1, &a_level, &a_space, &a_addr); - do_memopt_add (sd, a_level, a_space, a_addr, nr_bytes, modulo, - &entry->alias, entry->buffer); - } - return SIM_RC_OK; - } - - case OPTION_MEMORY_SIZE: - { - int level = 0; - int space = 0; - address_word addr = 0; - address_word nr_bytes = 0; - unsigned modulo = 0; - /* parse the arguments */ - parse_size (arg, &nr_bytes, &modulo); - /* try to attach/insert it */ - do_memopt_add (sd, level, space, addr, nr_bytes, modulo, - &STATE_MEMOPT (sd), NULL); - return SIM_RC_OK; - } - - case OPTION_MEMORY_CLEAR: - { - fill_byte_value = (unsigned8) 0; - fill_byte_flag = 1; - return SIM_RC_OK; - break; - } - - case OPTION_MEMORY_FILL: - { - unsigned long fill_value; - parse_ulong_value (arg, &fill_value); - if (fill_value > 255) - { - sim_io_eprintf (sd, "Missing fill value between 0 and 255\n"); - return SIM_RC_FAIL; - } - fill_byte_value = (unsigned8) fill_value; - fill_byte_flag = 1; - return SIM_RC_OK; - break; - } - - case OPTION_MEMORY_MAPFILE: - { - if (mmap_next_fd >= 0) - { - sim_io_eprintf (sd, "Duplicate memory-mapfile option\n"); - return SIM_RC_FAIL; - } - - mmap_next_fd = open (arg, O_RDWR); - if (mmap_next_fd < 0) - { - sim_io_eprintf (sd, "Cannot open file `%s': %s\n", - arg, strerror(errno)); - return SIM_RC_FAIL; - } - - return SIM_RC_OK; - } - - case OPTION_MEMORY_INFO: - { - sim_memopt *entry; - sim_io_printf (sd, "Memory maps:\n"); - for (entry = STATE_MEMOPT (sd); entry != NULL; entry = entry->next) - { - sim_memopt *alias; - sim_io_printf (sd, " memory"); - if (entry->alias == NULL) - sim_io_printf (sd, " region "); - else - sim_io_printf (sd, " alias "); - if (entry->space != 0) - sim_io_printf (sd, "0x%lx:", (long) entry->space); - sim_io_printf (sd, "0x%08lx", (long) entry->addr); - if (entry->level != 0) - sim_io_printf (sd, "@0x%lx", (long) entry->level); - sim_io_printf (sd, ",0x%lx", - (long) entry->nr_bytes); - if (entry->modulo != 0) - sim_io_printf (sd, "%%0x%lx", (long) entry->modulo); - for (alias = entry->alias; - alias != NULL; - alias = alias->next) - { - if (alias->space != 0) - sim_io_printf (sd, "0x%lx:", (long) alias->space); - sim_io_printf (sd, ",0x%08lx", (long) alias->addr); - if (alias->level != 0) - sim_io_printf (sd, "@0x%lx", (long) alias->level); - } - sim_io_printf (sd, "\n"); - } - return SIM_RC_OK; - break; - } - - default: - sim_io_eprintf (sd, "Unknown memory option %d\n", opt); - return SIM_RC_FAIL; - - } - - return SIM_RC_FAIL; -} - - -/* "memory" module install handler. - - This is called via sim_module_install to install the "memory" subsystem - into the simulator. */ - -static MODULE_INIT_FN sim_memory_init; -static MODULE_UNINSTALL_FN sim_memory_uninstall; - -SIM_RC -sim_memopt_install (SIM_DESC sd) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - sim_add_option_table (sd, NULL, memory_options); - sim_module_add_uninstall_fn (sd, sim_memory_uninstall); - sim_module_add_init_fn (sd, sim_memory_init); - return SIM_RC_OK; -} - - -/* Uninstall the "memory" subsystem from the simulator. */ - -static void -sim_memory_uninstall (SIM_DESC sd) -{ - sim_memopt **entry = &STATE_MEMOPT (sd); - sim_memopt *alias; - - while ((*entry) != NULL) - { - /* delete any buffer */ - if ((*entry)->buffer != NULL) - { -#ifdef HAVE_MUNMAP - if ((*entry)->munmap_length > 0) - munmap ((*entry)->buffer, (*entry)->munmap_length); - else -#endif - zfree ((*entry)->buffer); - } - - /* delete it and its aliases */ - alias = *entry; - - /* next victim */ - *entry = (*entry)->next; - - while (alias != NULL) - { - sim_memopt *dead = alias; - alias = alias->alias; - sim_core_detach (sd, NULL, dead->level, dead->space, dead->addr); - zfree (dead); - } - } -} - - -static SIM_RC -sim_memory_init (SIM_DESC sd) -{ - /* Reinitialize option modifier flags, in case they were left - over from a previous sim startup event. */ - fill_byte_flag = 0; - mmap_next_fd = -1; - - return SIM_RC_OK; -} diff --git a/sim/common/sim-memopt.h b/sim/common/sim-memopt.h deleted file mode 100644 index cbaad0c..0000000 --- a/sim/common/sim-memopt.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Header file for simulator memory argument handling. - 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 SIM_MEMOPT_H -#define SIM_MEMOPT_H - -/* Provides a command line interface for manipulating the memory core */ - -typedef struct _sim_memopt sim_memopt; -struct _sim_memopt { - int level; - int space; - unsigned_word addr; - unsigned_word nr_bytes; - unsigned modulo; - void *buffer; - unsigned long munmap_length; - sim_memopt *alias; /* linked list */ - sim_memopt *next; -}; - - -/* Install the "memopt" module. */ - -SIM_RC sim_memopt_install (SIM_DESC sd); - - -/* Was there a memory command? */ - -#endif diff --git a/sim/common/sim-model.c b/sim/common/sim-model.c deleted file mode 100644 index 3cfdc15..0000000 --- a/sim/common/sim-model.c +++ /dev/null @@ -1,215 +0,0 @@ -/* Model support. - Copyright (C) 1996, 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" -#include "libiberty.h" -#include "sim-options.h" -#include "sim-io.h" -#include "sim-assert.h" -#include "bfd.h" - -static void model_set (sim_cpu *, const MODEL *); - -static DECLARE_OPTION_HANDLER (model_option_handler); - -static MODULE_INIT_FN sim_model_init; - -#define OPTION_MODEL (OPTION_START + 0) - -static const OPTION model_options[] = { - { {"model", required_argument, NULL, OPTION_MODEL}, - '\0', "MODEL", "Specify model to simulate", - model_option_handler }, - { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } -}; - -static SIM_RC -model_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, - char *arg, int is_command) -{ - switch (opt) - { - case OPTION_MODEL : - { - const MODEL *model = sim_model_lookup (arg); - if (! model) - { - sim_io_eprintf (sd, "unknown model `%s'\n", arg); - return SIM_RC_FAIL; - } - sim_model_set (sd, cpu, model); - break; - } - } - - return SIM_RC_OK; -} - -SIM_RC -sim_model_install (SIM_DESC sd) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - - sim_add_option_table (sd, NULL, model_options); - sim_module_add_init_fn (sd, sim_model_init); - - return SIM_RC_OK; -} - -/* Subroutine of sim_model_set to set the model for one cpu. */ - -static void -model_set (sim_cpu *cpu, const MODEL *model) -{ - CPU_MACH (cpu) = MODEL_MACH (model); - CPU_MODEL (cpu) = model; - (* MACH_INIT_CPU (MODEL_MACH (model))) (cpu); - (* MODEL_INIT (model)) (cpu); -} - -/* Set the current model of CPU to MODEL. - If CPU is NULL, all cpus are set to MODEL. */ - -void -sim_model_set (SIM_DESC sd, sim_cpu *cpu, const MODEL *model) -{ - if (! cpu) - { - int c; - - for (c = 0; c < MAX_NR_PROCESSORS; ++c) - if (STATE_CPU (sd, c)) - model_set (STATE_CPU (sd, c), model); - } - else - { - model_set (cpu, model); - } -} - -/* Look up model named NAME. - Result is pointer to MODEL entry or NULL if not found. */ - -const MODEL * -sim_model_lookup (const char *name) -{ - const MACH **machp; - const MODEL *model; - - for (machp = & sim_machs[0]; *machp != NULL; ++machp) - { - for (model = MACH_MODELS (*machp); MODEL_NAME (model) != NULL; ++model) - { - if (strcmp (MODEL_NAME (model), name) == 0) - return model; - } - } - return NULL; -} - -/* Look up machine named NAME. - Result is pointer to MACH entry or NULL if not found. */ - -const MACH * -sim_mach_lookup (const char *name) -{ - const MACH **machp; - - for (machp = & sim_machs[0]; *machp != NULL; ++machp) - { - if (strcmp (MACH_NAME (*machp), name) == 0) - return *machp; - } - return NULL; -} - -/* Look up a machine via its bfd name. - Result is pointer to MACH entry or NULL if not found. */ - -const MACH * -sim_mach_lookup_bfd_name (const char *name) -{ - const MACH **machp; - - for (machp = & sim_machs[0]; *machp != NULL; ++machp) - { - if (strcmp (MACH_BFD_NAME (*machp), name) == 0) - return *machp; - } - return NULL; -} - -/* Initialize model support. */ - -static SIM_RC -sim_model_init (SIM_DESC sd) -{ - SIM_CPU *cpu; - - /* If both cpu model and state architecture are set, ensure they're - compatible. If only one is set, set the other. If neither are set, - use the default model. STATE_ARCHITECTURE is the bfd_arch_info data - for the selected "mach" (bfd terminology). */ - - /* Only check cpu 0. STATE_ARCHITECTURE is for that one only. */ - /* ??? At present this only supports homogeneous multiprocessors. */ - cpu = STATE_CPU (sd, 0); - - if (! STATE_ARCHITECTURE (sd) - && ! CPU_MACH (cpu)) - { - /* Set the default model. */ - const MODEL *model = sim_model_lookup (WITH_DEFAULT_MODEL); - sim_model_set (sd, NULL, model); - } - - if (STATE_ARCHITECTURE (sd) - && CPU_MACH (cpu)) - { - if (strcmp (STATE_ARCHITECTURE (sd)->printable_name, - MACH_BFD_NAME (CPU_MACH (cpu))) != 0) - { - sim_io_eprintf (sd, "invalid model `%s' for `%s'\n", - MODEL_NAME (CPU_MODEL (cpu)), - STATE_ARCHITECTURE (sd)->printable_name); - return SIM_RC_FAIL; - } - } - else if (STATE_ARCHITECTURE (sd)) - { - /* Use the default model for the selected machine. - The default model is the first one in the list. */ - const MACH *mach = sim_mach_lookup_bfd_name (STATE_ARCHITECTURE (sd)->printable_name); - - if (mach == NULL) - { - sim_io_eprintf (sd, "unsupported machine `%s'\n", - STATE_ARCHITECTURE (sd)->printable_name); - return SIM_RC_FAIL; - } - sim_model_set (sd, NULL, MACH_MODELS (mach)); - } - else - { - STATE_ARCHITECTURE (sd) = bfd_scan_arch (MACH_BFD_NAME (CPU_MACH (cpu))); - } - - return SIM_RC_OK; -} diff --git a/sim/common/sim-model.h b/sim/common/sim-model.h deleted file mode 100644 index 5272815..0000000 --- a/sim/common/sim-model.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Architecture, machine, and model support. - Copyright (C) 1997, 1998, 1999 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. */ - -/* Nomenclature: - architecture = one of sparc, mips, sh, etc. - in the sparc architecture, mach = one of v6, v7, v8, sparclite, etc. - in the v8 mach, model = one of supersparc, etc. -*/ - -/* This file is intended to be included by sim-basics.h. */ - -#ifndef SIM_MODEL_H -#define SIM_MODEL_H - -/* Function unit and instruction timing support. - ??? This is obviously insufficiently general. - It's useful but it needs elaborating upon. */ - -typedef struct { - unsigned char name; /* actually a UNIT_TYPE enum */ - unsigned char issue; - unsigned char done; -} UNIT; - -#ifndef MAX_UNITS -#define MAX_UNITS 1 -#endif - -typedef int (MODEL_FN) (sim_cpu *, void *); - -typedef struct { - /* This is an integer that identifies this insn. - How this works is up to the target. */ - int num; - - /* Function to handle insn-specific profiling. */ - MODEL_FN *model_fn; - - /* Array of function units used by this insn. */ - UNIT units[MAX_UNITS]; -} INSN_TIMING; - -/* Struct to describe various implementation properties of a cpu. - When multiple cpu variants are supported, the sizes of some structs - can vary. */ - -typedef struct { - /* The size of the SIM_CPU struct. */ - int sim_cpu_size; -#define IMP_PROPS_SIM_CPU_SIZE(cpu_props) ((cpu_props)->sim_cpu_size) - /* An SCACHE element can vary in size, depending on the selected cpu. - This is zero if the SCACHE isn't in use for this variant. */ - int scache_elm_size; -#define IMP_PROPS_SCACHE_ELM_SIZE(cpu_props) ((cpu_props)->scache_elm_size) -} MACH_IMP_PROPERTIES; - -/* A machine variant. */ - -typedef struct { - const char *name; -#define MACH_NAME(m) ((m)->name) - /* This is the argument to bfd_scan_arch. */ - const char *bfd_name; -#define MACH_BFD_NAME(m) ((m)->bfd_name) - enum mach_attr num; -#define MACH_NUM(m) ((m)->num) - - int word_bitsize; -#define MACH_WORD_BITSIZE(m) ((m)->word_bitsize) - int addr_bitsize; -#define MACH_ADDR_BITSIZE(m) ((m)->addr_bitsize) - - /* Pointer to null-entry terminated table of models of this mach. - The default is the first one. */ - const struct model *models; -#define MACH_MODELS(m) ((m)->models) - - /* Pointer to the implementation properties of this mach. */ - const MACH_IMP_PROPERTIES *imp_props; -#define MACH_IMP_PROPS(m) ((m)->imp_props) - - /* Called by sim_model_set when the model of a cpu is set. */ - void (* init_cpu) (sim_cpu *); -#define MACH_INIT_CPU(m) ((m)->init_cpu) - - /* Initialize the simulator engine for this cpu. - Used by cgen simulators to initialize the insn descriptor table. */ - void (* prepare_run) (sim_cpu *); -#define MACH_PREPARE_RUN(m) ((m)->prepare_run) -} MACH; - -/* A model (implementation) of a machine. */ - -typedef struct model { - const char *name; -#define MODEL_NAME(m) ((m)->name) - const MACH *mach; -#define MODEL_MACH(m) ((m)->mach) - /* An enum that distinguished the model. */ - int num; -#define MODEL_NUM(m) ((m)->num) - /* Pointer to timing table for this model. */ - const INSN_TIMING *timing; -#define MODEL_TIMING(m) ((m)->timing) - void (* init) (sim_cpu *); -#define MODEL_INIT(m) ((m)->init) -} MODEL; - -/* Tables of supported machines. */ -/* ??? In a simulator of multiple architectures, will need multiple copies of - this. Have an `archs' array that contains a pointer to the machs array - for each (which in turn has a pointer to the models array for each). */ -extern const MACH *sim_machs[]; - -/* Model module handlers. */ -extern MODULE_INSTALL_FN sim_model_install; - -/* Support routines. */ -extern void sim_model_set (SIM_DESC sd_, sim_cpu *cpu_, const MODEL *model_); -extern const MODEL * sim_model_lookup (const char *name_); -extern const MACH * sim_mach_lookup (const char *name_); -extern const MACH * sim_mach_lookup_bfd_name (const char *bfd_name_); - -#endif /* SIM_MODEL_H */ diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c deleted file mode 100644 index 8f01723..0000000 --- a/sim/common/sim-module.c +++ /dev/null @@ -1,398 +0,0 @@ -/* Module support. - - Copyright 1996, 1997, 1998, 2003 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" -#include "sim-io.h" -#include "sim-options.h" -#include "sim-assert.h" - -#if WITH_HW -#include "sim-hw.h" -#endif - -#include "libiberty.h" - -/* List of all modules. */ -static MODULE_INSTALL_FN * const modules[] = { - standard_install, - sim_events_install, -#ifdef SIM_HAVE_MODEL - sim_model_install, -#endif -#if WITH_ENGINE - sim_engine_install, -#endif -#if WITH_TRACE - trace_install, -#endif -#if WITH_PROFILE - profile_install, -#endif - sim_core_install, -#ifndef SIM_HAVE_FLATMEM - /* FIXME: should handle flatmem as well FLATMEM */ - sim_memopt_install, -#endif -#if WITH_WATCHPOINTS - sim_watchpoint_install, -#endif -#if WITH_SCACHE - scache_install, -#endif -#if WITH_HW - sim_hw_install, -#endif - /* Configured in [simulator specific] additional modules. */ -#ifdef MODULE_LIST - MODULE_LIST -#endif - 0 -}; - -/* Functions called from sim_open. */ - -/* Initialize common parts before argument processing. */ - -SIM_RC -sim_pre_argv_init (SIM_DESC sd, const char *myname) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) == NULL); - - STATE_MY_NAME (sd) = myname + strlen (myname); - while (STATE_MY_NAME (sd) > myname && STATE_MY_NAME (sd)[-1] != '/') - --STATE_MY_NAME (sd); - - /* Set the cpu names to default values. */ - { - int i; - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - { - char *name; - asprintf (&name, "cpu%d", i); - CPU_NAME (STATE_CPU (sd, i)) = name; - } - } - - sim_config_default (sd); - - /* Install all configured in modules. */ - if (sim_module_install (sd) != SIM_RC_OK) - return SIM_RC_FAIL; - - return SIM_RC_OK; -} - -/* Initialize common parts after argument processing. */ - -SIM_RC -sim_post_argv_init (SIM_DESC sd) -{ - int i; - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - /* Set the cpu->state backlinks for each cpu. */ - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - { - CPU_STATE (STATE_CPU (sd, i)) = sd; - CPU_INDEX (STATE_CPU (sd, i)) = i; - } - - if (sim_module_init (sd) != SIM_RC_OK) - return SIM_RC_FAIL; - - return SIM_RC_OK; -} - -/* Install all modules. - If this fails, no modules are left installed. */ - -SIM_RC -sim_module_install (SIM_DESC sd) -{ - MODULE_INSTALL_FN * const *modp; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) == NULL); - - STATE_MODULES (sd) = ZALLOC (struct module_list); - for (modp = modules; *modp != NULL; ++modp) - { - if ((*modp) (sd) != SIM_RC_OK) - { - sim_module_uninstall (sd); - SIM_ASSERT (STATE_MODULES (sd) == NULL); - return SIM_RC_FAIL; - } - } - return SIM_RC_OK; -} - -/* Called after all modules have been installed and after argv - has been processed. */ - -SIM_RC -sim_module_init (SIM_DESC sd) -{ - struct module_list *modules = STATE_MODULES (sd); - MODULE_INIT_LIST *modp; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - for (modp = modules->init_list; modp != NULL; modp = modp->next) - { - if ((*modp->fn) (sd) != SIM_RC_OK) - return SIM_RC_FAIL; - } - return SIM_RC_OK; -} - -/* Called when ever the simulator is resumed */ - -SIM_RC -sim_module_resume (SIM_DESC sd) -{ - struct module_list *modules = STATE_MODULES (sd); - MODULE_RESUME_LIST *modp; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - for (modp = modules->resume_list; modp != NULL; modp = modp->next) - { - if ((*modp->fn) (sd) != SIM_RC_OK) - return SIM_RC_FAIL; - } - return SIM_RC_OK; -} - -/* Called when ever the simulator is suspended */ - -SIM_RC -sim_module_suspend (SIM_DESC sd) -{ - struct module_list *modules = STATE_MODULES (sd); - MODULE_SUSPEND_LIST *modp; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - for (modp = modules->suspend_list; modp != NULL; modp = modp->next) - { - if ((*modp->fn) (sd) != SIM_RC_OK) - return SIM_RC_FAIL; - } - return SIM_RC_OK; -} - -/* Uninstall installed modules, called by sim_close. */ - -void -sim_module_uninstall (SIM_DESC sd) -{ - struct module_list *modules = STATE_MODULES (sd); - MODULE_UNINSTALL_LIST *modp; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - /* Uninstall the modules. */ - for (modp = modules->uninstall_list; modp != NULL; modp = modp->next) - (*modp->fn) (sd); - - /* clean-up init list */ - { - MODULE_INIT_LIST *n, *d; - for (d = modules->init_list; d != NULL; d = n) - { - n = d->next; - zfree (d); - } - } - - /* clean-up resume list */ - { - MODULE_RESUME_LIST *n, *d; - for (d = modules->resume_list; d != NULL; d = n) - { - n = d->next; - zfree (d); - } - } - - /* clean-up suspend list */ - { - MODULE_SUSPEND_LIST *n, *d; - for (d = modules->suspend_list; d != NULL; d = n) - { - n = d->next; - zfree (d); - } - } - - /* clean-up uninstall list */ - { - MODULE_UNINSTALL_LIST *n, *d; - for (d = modules->uninstall_list; d != NULL; d = n) - { - n = d->next; - zfree (d); - } - } - - /* clean-up info list */ - { - MODULE_INFO_LIST *n, *d; - for (d = modules->info_list; d != NULL; d = n) - { - n = d->next; - zfree (d); - } - } - - zfree (modules); - STATE_MODULES (sd) = NULL; -} - -/* Called when ever simulator info is needed */ - -void -sim_module_info (SIM_DESC sd, int verbose) -{ - struct module_list *modules = STATE_MODULES (sd); - MODULE_INFO_LIST *modp; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - for (modp = modules->info_list; modp != NULL; modp = modp->next) - { - (*modp->fn) (sd, verbose); - } -} - -/* Add FN to the init handler list. - init in the same order as the install. */ - -void -sim_module_add_init_fn (SIM_DESC sd, MODULE_INIT_FN fn) -{ - struct module_list *modules = STATE_MODULES (sd); - MODULE_INIT_LIST *l = ZALLOC (MODULE_INIT_LIST); - MODULE_INIT_LIST **last; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - last = &modules->init_list; - while (*last != NULL) - last = &((*last)->next); - - l->fn = fn; - l->next = NULL; - *last = l; -} - -/* Add FN to the resume handler list. - resume in the same order as the install. */ - -void -sim_module_add_resume_fn (SIM_DESC sd, MODULE_RESUME_FN fn) -{ - struct module_list *modules = STATE_MODULES (sd); - MODULE_RESUME_LIST *l = ZALLOC (MODULE_RESUME_LIST); - MODULE_RESUME_LIST **last; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - last = &modules->resume_list; - while (*last != NULL) - last = &((*last)->next); - - l->fn = fn; - l->next = NULL; - *last = l; -} - -/* Add FN to the init handler list. - suspend in the reverse order to install. */ - -void -sim_module_add_suspend_fn (SIM_DESC sd, MODULE_SUSPEND_FN fn) -{ - struct module_list *modules = STATE_MODULES (sd); - MODULE_SUSPEND_LIST *l = ZALLOC (MODULE_SUSPEND_LIST); - MODULE_SUSPEND_LIST **last; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - last = &modules->suspend_list; - while (*last != NULL) - last = &((*last)->next); - - l->fn = fn; - l->next = modules->suspend_list; - modules->suspend_list = l; -} - -/* Add FN to the uninstall handler list. - Uninstall in reverse order to install. */ - -void -sim_module_add_uninstall_fn (SIM_DESC sd, MODULE_UNINSTALL_FN fn) -{ - struct module_list *modules = STATE_MODULES (sd); - MODULE_UNINSTALL_LIST *l = ZALLOC (MODULE_UNINSTALL_LIST); - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - l->fn = fn; - l->next = modules->uninstall_list; - modules->uninstall_list = l; -} - -/* Add FN to the info handler list. - Report info in the same order as the install. */ - -void -sim_module_add_info_fn (SIM_DESC sd, MODULE_INFO_FN fn) -{ - struct module_list *modules = STATE_MODULES (sd); - MODULE_INFO_LIST *l = ZALLOC (MODULE_INFO_LIST); - MODULE_INFO_LIST **last; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - SIM_ASSERT (STATE_MODULES (sd) != NULL); - - last = &modules->info_list; - while (*last != NULL) - last = &((*last)->next); - - l->fn = fn; - l->next = NULL; - *last = l; -} diff --git a/sim/common/sim-module.h b/sim/common/sim-module.h deleted file mode 100644 index cbba350..0000000 --- a/sim/common/sim-module.h +++ /dev/null @@ -1,125 +0,0 @@ -/* Module support. - Copyright (C) 1996, 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. */ - -/* This file is intended to be included by sim-base.h. */ - -#ifndef SIM_MODULES_H -#define SIM_MODULES_H - -/* Modules are addons to the simulator that perform a specific function - (e.g. tracing, profiling, memory subsystem, etc.). Some modules are - builtin, and others are added at configure time. The intent is to - provide a uniform framework for all of the pieces that make up the - simulator. - - TODO: Add facilities for saving/restoring state to/from a file. */ - - -/* Various function types. */ - -typedef SIM_RC (MODULE_INSTALL_FN) (SIM_DESC); -typedef SIM_RC (MODULE_INIT_FN) (SIM_DESC); -typedef SIM_RC (MODULE_RESUME_FN) (SIM_DESC); -typedef SIM_RC (MODULE_SUSPEND_FN) (SIM_DESC); -typedef void (MODULE_UNINSTALL_FN) (SIM_DESC); -typedef void (MODULE_INFO_FN) (SIM_DESC, int); - - -/* Lists of installed handlers. */ - -typedef struct module_init_list { - struct module_init_list *next; - MODULE_INIT_FN *fn; -} MODULE_INIT_LIST; - -typedef struct module_resume_list { - struct module_resume_list *next; - MODULE_RESUME_FN *fn; -} MODULE_RESUME_LIST; - -typedef struct module_suspend_list { - struct module_suspend_list *next; - MODULE_SUSPEND_FN *fn; -} MODULE_SUSPEND_LIST; - -typedef struct module_uninstall_list { - struct module_uninstall_list *next; - MODULE_UNINSTALL_FN *fn; -} MODULE_UNINSTALL_LIST; - -typedef struct module_info_list { - struct module_info_list *next; - MODULE_INFO_FN *fn; -} MODULE_INFO_LIST; - - -/* Functions to register module with various handler lists */ - -SIM_RC sim_module_install (SIM_DESC); -void sim_module_uninstall (SIM_DESC); -void sim_module_add_init_fn (SIM_DESC sd, MODULE_INIT_FN fn); -void sim_module_add_resume_fn (SIM_DESC sd, MODULE_RESUME_FN fn); -void sim_module_add_suspend_fn (SIM_DESC sd, MODULE_SUSPEND_FN fn); -void sim_module_add_uninstall_fn (SIM_DESC sd, MODULE_UNINSTALL_FN fn); -void sim_module_add_info_fn (SIM_DESC sd, MODULE_INFO_FN fn); - - -/* Initialize installed modules before argument processing. - Called by sim_open. */ -SIM_RC sim_pre_argv_init (SIM_DESC sd, const char *myname); - -/* Initialize installed modules after argument processing. - Called by sim_open. */ -SIM_RC sim_post_argv_init (SIM_DESC sd); - -/* Re-initialize the module. Called by sim_create_inferior. */ -SIM_RC sim_module_init (SIM_DESC sd); - -/* Suspend/resume modules. Called by sim_run or sim_resume */ -SIM_RC sim_module_suspend (SIM_DESC sd); -SIM_RC sim_module_resume (SIM_DESC sd); - -/* Report general information on module */ -void sim_module_info (SIM_DESC sd, int verbose); - - -/* Module private data */ - -struct module_list { - - /* List of installed module `init' handlers */ - MODULE_INIT_LIST *init_list; - - /* List of installed module `uninstall' handlers. */ - MODULE_UNINSTALL_LIST *uninstall_list; - - /* List of installed module `resume' handlers. */ - MODULE_RESUME_LIST *resume_list; - - /* List of installed module `suspend' handlers. */ - MODULE_SUSPEND_LIST *suspend_list; - - /* List of installed module `info' handlers. */ - MODULE_INFO_LIST *info_list; - -}; - - -#endif /* SIM_MODULES_H */ diff --git a/sim/common/sim-n-bits.h b/sim/common/sim-n-bits.h deleted file mode 100644 index 7c77c83..0000000 --- a/sim/common/sim-n-bits.h +++ /dev/null @@ -1,220 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 N -#error "N must be #defined" -#endif - -#include "symcat.h" - -#if defined(__STDC__) && defined(signed) -/* If signed were defined to be say __signed (ie, some versions of Linux), - then the signedN macro would not work correctly. If we have a standard - compiler, we have signed. */ -#undef signed -#endif - -/* NOTE: See end of file for #undef */ -#define unsignedN XCONCAT2(unsigned,N) -#define signedN XCONCAT2(signed,N) -#define LSMASKn XCONCAT2(LSMASK,N) -#define MSMASKn XCONCAT2(MSMASK,N) -#define LSMASKEDn XCONCAT2(LSMASKED,N) -#define MSMASKEDn XCONCAT2(MSMASKED,N) -#define LSEXTRACTEDn XCONCAT2(LSEXTRACTED,N) -#define MSEXTRACTEDn XCONCAT2(MSEXTRACTED,N) -#define LSINSERTEDn XCONCAT2(LSINSERTED,N) -#define MSINSERTEDn XCONCAT2(MSINSERTED,N) -#define ROTn XCONCAT2(ROT,N) -#define ROTLn XCONCAT2(ROTL,N) -#define ROTRn XCONCAT2(ROTR,N) -#define MSSEXTn XCONCAT2(MSSEXT,N) -#define LSSEXTn XCONCAT2(LSSEXT,N) - -/* TAGS: LSMASKED16 LSMASKED32 LSMASKED64 */ - -INLINE_SIM_BITS\ -(unsignedN) -LSMASKEDn (unsignedN word, - int start, - int stop) -{ - word &= LSMASKn (start, stop); - return word; -} - -/* TAGS: MSMASKED16 MSMASKED32 MSMASKED64 */ - -INLINE_SIM_BITS\ -(unsignedN) -MSMASKEDn (unsignedN word, - int start, - int stop) -{ - word &= MSMASKn (start, stop); - return word; -} - -/* TAGS: LSEXTRACTED16 LSEXTRACTED32 LSEXTRACTED64 */ - -INLINE_SIM_BITS\ -(unsignedN) -LSEXTRACTEDn (unsignedN val, - int start, - int stop) -{ - val <<= (N - 1 - start); /* drop high bits */ - val >>= (N - 1 - start) + (stop); /* drop low bits */ - return val; -} - -/* TAGS: MSEXTRACTED16 MSEXTRACTED32 MSEXTRACTED64 */ - -INLINE_SIM_BITS\ -(unsignedN) -MSEXTRACTEDn (unsignedN val, - int start, - int stop) -{ - val <<= (start); /* drop high bits */ - val >>= (start) + (N - 1 - stop); /* drop low bits */ - return val; -} - -/* TAGS: LSINSERTED16 LSINSERTED32 LSINSERTED64 */ - -INLINE_SIM_BITS\ -(unsignedN) -LSINSERTEDn (unsignedN val, - int start, - int stop) -{ - val <<= stop; - val &= LSMASKn (start, stop); - return val; -} - -/* TAGS: MSINSERTED16 MSINSERTED32 MSINSERTED64 */ - -INLINE_SIM_BITS\ -(unsignedN) -MSINSERTEDn (unsignedN val, - int start, - int stop) -{ - val <<= ((N - 1) - stop); - val &= MSMASKn (start, stop); - return val; -} - -/* TAGS: ROT16 ROT32 ROT64 */ - -INLINE_SIM_BITS\ -(unsignedN) -ROTn (unsignedN val, - int shift) -{ - if (shift > 0) - return ROTRn (val, shift); - else if (shift < 0) - return ROTLn (val, -shift); - else - return val; -} - -/* TAGS: ROTL16 ROTL32 ROTL64 */ - -INLINE_SIM_BITS\ -(unsignedN) -ROTLn (unsignedN val, - int shift) -{ - unsignedN result; - ASSERT (shift <= N); - result = (((val) << (shift)) | ((val) >> ((N)-(shift)))); - return result; -} - -/* TAGS: ROTR16 ROTR32 ROTR64 */ - -INLINE_SIM_BITS\ -(unsignedN) -ROTRn (unsignedN val, - int shift) -{ - unsignedN result; - ASSERT (shift <= N); - result = (((val) >> (shift)) | ((val) << ((N)-(shift)))); - return result; -} - -/* TAGS: LSSEXT16 LSSEXT32 LSSEXT64 */ - -INLINE_SIM_BITS\ -(unsignedN) -LSSEXTn (signedN val, - int sign_bit) -{ - int shift; - /* make the sign-bit most significant and then smear it back into - position */ - ASSERT (sign_bit < N); - shift = ((N - 1) - sign_bit); - val <<= shift; - val >>= shift; - return val; -} - -/* TAGS: MSSEXT16 MSSEXT32 MSSEXT64 */ - -INLINE_SIM_BITS\ -(unsignedN) -MSSEXTn (signedN val, - int sign_bit) -{ - /* make the sign-bit most significant and then smear it back into - position */ - ASSERT (sign_bit < N); - val <<= sign_bit; - val >>= sign_bit; - return val; -} - - -/* NOTE: See start of file for #define */ -#undef LSSEXTn -#undef MSSEXTn -#undef ROTLn -#undef ROTRn -#undef ROTn -#undef LSINSERTEDn -#undef MSINSERTEDn -#undef LSEXTRACTEDn -#undef MSEXTRACTEDn -#undef LSMASKEDn -#undef LSMASKn -#undef MSMASKEDn -#undef MSMASKn -#undef signedN -#undef unsignedN diff --git a/sim/common/sim-n-core.h b/sim/common/sim-n-core.h deleted file mode 100644 index 032569a..0000000 --- a/sim/common/sim-n-core.h +++ /dev/null @@ -1,420 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 N -#error "N must be #defined" -#endif -#ifndef M -#define M N -#endif - -/* N: The number of bytes of data to transfer. - M: The number of bytes in the type used to transfer the data */ - -#if (N > M) -#error "N (nr bytes of data) must be <= M (nr of bytes in data type)" -#endif - - -#include "symcat.h" - -/* NOTE: see end of file for #undef of these macros */ - -#define unsigned_M XCONCAT2(unsigned_,M) - -#define T2H_M XCONCAT2(T2H_,M) -#define H2T_M XCONCAT2(H2T_,M) -#define SWAP_M XCONCAT2(SWAP_,M) - -#define sim_core_read_aligned_N XCONCAT2(sim_core_read_aligned_,N) -#define sim_core_read_unaligned_N XCONCAT2(sim_core_read_unaligned_,N) -#define sim_core_read_misaligned_N XCONCAT2(sim_core_read_misaligned_,N) -#define sim_core_write_aligned_N XCONCAT2(sim_core_write_aligned_,N) -#define sim_core_write_unaligned_N XCONCAT2(sim_core_write_unaligned_,N) -#define sim_core_write_misaligned_N XCONCAT2(sim_core_write_misaligned_,N) -#define sim_core_trace_M XCONCAT2(sim_core_trace_,M) -#define sim_core_dummy_M XCONCAT2(sim_core_dummy_,M) - - -#if (M == N && N > 1) -/* dummy variable used as a return value when nothing else is - available and the compiler is complaining */ -static unsigned_M sim_core_dummy_M; -#endif - - -/* TAGS: sim_core_trace_1 sim_core_trace_2 */ -/* TAGS: sim_core_trace_4 sim_core_trace_8 */ -/* TAGS: sim_core_trace_16 */ - -#if (M == N) -STATIC_SIM_CORE(void) -sim_core_trace_M (sim_cpu *cpu, - sim_cia cia, - int line_nr, - transfer_type type, - unsigned map, - address_word addr, - unsigned_M val, - int nr_bytes) -{ - const char *transfer = (type == read_transfer ? "read" : "write"); - const char *direction = (type == read_transfer ? "->" : "<-"); - - if (TRACE_DEBUG_P (cpu)) - trace_printf (CPU_STATE (cpu), cpu, "sim-n-core.h:%d: ", line_nr); - -#if (M == 16) - trace_printf (CPU_STATE (cpu), cpu, - "%s-%d %s:0x%08lx %s 0x%08lx%08lx%08lx%08lx\n", - transfer, nr_bytes, - map_to_str (map), - (unsigned long) addr, - direction, - (unsigned long) V4_16 (val, 0), - (unsigned long) V4_16 (val, 1), - (unsigned long) V4_16 (val, 2), - (unsigned long) V4_16 (val, 3)); -#endif -#if (M == 8) - trace_printf (CPU_STATE (cpu), cpu, - "%s-%d %s:0x%08lx %s 0x%08lx%08lx\n", - transfer, nr_bytes, - map_to_str (map), - (unsigned long) addr, - direction, - (unsigned long) V4_8 (val, 0), - (unsigned long) V4_8 (val, 1)); -#endif -#if (M == 4) - trace_printf (CPU_STATE (cpu), cpu, - "%s-%d %s:0x%08lx %s 0x%08lx\n", - transfer, - nr_bytes, - map_to_str (map), - (unsigned long) addr, - direction, - (unsigned long) val); -#endif -#if (M == 2) - trace_printf (CPU_STATE (cpu), cpu, - "%s-%d %s:0x%08lx %s 0x%04lx\n", - transfer, - nr_bytes, - map_to_str (map), - (unsigned long) addr, - direction, - (unsigned long) val); -#endif -#if (M == 1) - trace_printf (CPU_STATE (cpu), cpu, - "%s-%d %s:0x%08lx %s 0x%02lx\n", - transfer, - nr_bytes, - map_to_str (map), - (unsigned long) addr, - direction, - (unsigned long) val); -#endif -} -#endif - - -/* TAGS: sim_core_read_aligned_1 sim_core_read_aligned_2 */ -/* TAGS: sim_core_read_aligned_4 sim_core_read_aligned_8 */ -/* TAGS: sim_core_read_aligned_16 */ - -#if (M == N) -INLINE_SIM_CORE(unsigned_M) -sim_core_read_aligned_N(sim_cpu *cpu, - sim_cia cia, - unsigned map, - address_word xaddr) -{ - sim_cpu_core *cpu_core = CPU_CORE (cpu); - sim_core_common *core = &cpu_core->common; - unsigned_M val; - sim_core_mapping *mapping; - address_word addr; -#if WITH_XOR_ENDIAN != 0 - if (WITH_XOR_ENDIAN) - addr = xaddr ^ cpu_core->xor[(N - 1) % WITH_XOR_ENDIAN]; - else -#endif - addr = xaddr; - mapping = sim_core_find_mapping (core, map, addr, N, read_transfer, 1 /*abort*/, cpu, cia); - do - { -#if (WITH_DEVICES) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) - { - unsigned_M data; - if (device_io_read_buffer (mapping->device, &data, mapping->space, addr, N, CPU_STATE (cpu), cpu, cia) != N) - device_error (mapping->device, "internal error - %s - io_read_buffer should not fail", - XSTRING (sim_core_read_aligned_N)); - val = T2H_M (data); - break; - } -#endif -#if (WITH_HW) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) - { - unsigned_M data; - sim_cpu_hw_io_read_buffer (cpu, cia, mapping->device, &data, mapping->space, addr, N); - val = T2H_M (data); - break; - } -#endif - val = T2H_M (*(unsigned_M*) sim_core_translate (mapping, addr)); - } - while (0); - PROFILE_COUNT_CORE (cpu, addr, N, map); - if (TRACE_P (cpu, TRACE_CORE_IDX)) - sim_core_trace_M (cpu, cia, __LINE__, read_transfer, map, addr, val, N); - return val; -} -#endif - -/* TAGS: sim_core_read_unaligned_1 sim_core_read_unaligned_2 */ -/* TAGS: sim_core_read_unaligned_4 sim_core_read_unaligned_8 */ -/* TAGS: sim_core_read_unaligned_16 */ - -#if (M == N && N > 1) -INLINE_SIM_CORE(unsigned_M) -sim_core_read_unaligned_N(sim_cpu *cpu, - sim_cia cia, - unsigned map, - address_word addr) -{ - int alignment = N - 1; - /* if hardwired to forced alignment just do it */ - if (WITH_ALIGNMENT == FORCED_ALIGNMENT) - return sim_core_read_aligned_N (cpu, cia, map, addr & ~alignment); - else if ((addr & alignment) == 0) - return sim_core_read_aligned_N (cpu, cia, map, addr); - else - switch (CURRENT_ALIGNMENT) - { - case STRICT_ALIGNMENT: - SIM_CORE_SIGNAL (CPU_STATE (cpu), cpu, cia, map, N, addr, - read_transfer, sim_core_unaligned_signal); - case NONSTRICT_ALIGNMENT: - { - unsigned_M val; - if (sim_core_xor_read_buffer (CPU_STATE (cpu), cpu, map, &val, addr, N) != N) - SIM_CORE_SIGNAL (CPU_STATE (cpu), cpu, cia, map, N, addr, - read_transfer, sim_core_unaligned_signal); - val = T2H_M(val); - PROFILE_COUNT_CORE (cpu, addr, N, map); - if (TRACE_P (cpu, TRACE_CORE_IDX)) - sim_core_trace_M (cpu, cia, __LINE__, read_transfer, map, addr, val, N); - return val; - } - case FORCED_ALIGNMENT: - return sim_core_read_aligned_N (cpu, cia, map, addr & ~alignment); - case MIXED_ALIGNMENT: - sim_engine_abort (CPU_STATE (cpu), cpu, cia, - "internal error - %s - mixed alignment", - XSTRING (sim_core_read_unaligned_N)); - default: - sim_engine_abort (CPU_STATE (cpu), cpu, cia, - "internal error - %s - bad switch", - XSTRING (sim_core_read_unaligned_N)); - /* to keep some compilers happy, we return a dummy */ - return sim_core_dummy_M; - } -} -#endif - -/* TAGS: sim_core_read_misaligned_3 sim_core_read_misaligned_5 */ -/* TAGS: sim_core_read_misaligned_6 sim_core_read_misaligned_7 */ - -#if (M != N) -INLINE_SIM_CORE(unsigned_M) -sim_core_read_misaligned_N(sim_cpu *cpu, - sim_cia cia, - unsigned map, - address_word addr) -{ - unsigned_M val = 0; - if (sim_core_xor_read_buffer (CPU_STATE (cpu), cpu, map, &val, addr, N) != N) - SIM_CORE_SIGNAL (CPU_STATE (cpu), cpu, cia, map, N, addr, - read_transfer, sim_core_unaligned_signal); - if (CURRENT_HOST_BYTE_ORDER != CURRENT_TARGET_BYTE_ORDER) - val = SWAP_M (val); - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) - val >>= (M - N) * 8; - PROFILE_COUNT_CORE (cpu, addr, N, map); - if (TRACE_P (cpu, TRACE_CORE_IDX)) - sim_core_trace_M (cpu, cia, __LINE__, read_transfer, map, addr, val, N); - return val; -} -#endif - -/* TAGS: sim_core_write_aligned_1 sim_core_write_aligned_2 */ -/* TAGS: sim_core_write_aligned_4 sim_core_write_aligned_8 */ -/* TAGS: sim_core_write_aligned_16 */ - -#if (M == N) -INLINE_SIM_CORE(void) -sim_core_write_aligned_N(sim_cpu *cpu, - sim_cia cia, - unsigned map, - address_word xaddr, - unsigned_M val) -{ - sim_cpu_core *cpu_core = CPU_CORE (cpu); - sim_core_common *core = &cpu_core->common; - sim_core_mapping *mapping; - address_word addr; -#if WITH_XOR_ENDIAN != 0 - if (WITH_XOR_ENDIAN) - addr = xaddr ^ cpu_core->xor[(N - 1) % WITH_XOR_ENDIAN]; - else -#endif - addr = xaddr; - mapping = sim_core_find_mapping (core, map, addr, N, write_transfer, 1 /*abort*/, cpu, cia); - do - { -#if (WITH_DEVICES) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) - { - unsigned_M data = H2T_M (val); - if (device_io_write_buffer (mapping->device, &data, mapping->space, addr, N, CPU_STATE (cpu), cpu, cia) != N) - device_error (mapping->device, "internal error - %s - io_write_buffer should not fail", - XSTRING (sim_core_write_aligned_N)); - break; - } -#endif -#if (WITH_HW) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) - { - unsigned_M data = H2T_M (val); - sim_cpu_hw_io_write_buffer (cpu, cia, mapping->device, &data, mapping->space, addr, N); - break; - } -#endif - *(unsigned_M*) sim_core_translate (mapping, addr) = H2T_M (val); - } - while (0); - PROFILE_COUNT_CORE (cpu, addr, N, map); - if (TRACE_P (cpu, TRACE_CORE_IDX)) - sim_core_trace_M (cpu, cia, __LINE__, write_transfer, map, addr, val, N); -} -#endif - -/* TAGS: sim_core_write_unaligned_1 sim_core_write_unaligned_2 */ -/* TAGS: sim_core_write_unaligned_4 sim_core_write_unaligned_8 */ -/* TAGS: sim_core_write_unaligned_16 */ - -#if (M == N && N > 1) -INLINE_SIM_CORE(void) -sim_core_write_unaligned_N(sim_cpu *cpu, - sim_cia cia, - unsigned map, - address_word addr, - unsigned_M val) -{ - int alignment = N - 1; - /* if hardwired to forced alignment just do it */ - if (WITH_ALIGNMENT == FORCED_ALIGNMENT) - sim_core_write_aligned_N (cpu, cia, map, addr & ~alignment, val); - else if ((addr & alignment) == 0) - sim_core_write_aligned_N (cpu, cia, map, addr, val); - else - switch (CURRENT_ALIGNMENT) - { - case STRICT_ALIGNMENT: - SIM_CORE_SIGNAL (CPU_STATE (cpu), cpu, cia, map, N, addr, - write_transfer, sim_core_unaligned_signal); - break; - case NONSTRICT_ALIGNMENT: - { - unsigned_M data = H2T_M (val); - if (sim_core_xor_write_buffer (CPU_STATE (cpu), cpu, map, &data, addr, N) != N) - SIM_CORE_SIGNAL (CPU_STATE (cpu), cpu, cia, map, N, addr, - write_transfer, sim_core_unaligned_signal); - PROFILE_COUNT_CORE (cpu, addr, N, map); - if (TRACE_P (cpu, TRACE_CORE_IDX)) - sim_core_trace_M (cpu, cia, __LINE__, write_transfer, map, addr, val, N); - break; - } - case FORCED_ALIGNMENT: - sim_core_write_aligned_N (cpu, cia, map, addr & ~alignment, val); - break; - case MIXED_ALIGNMENT: - sim_engine_abort (CPU_STATE (cpu), cpu, cia, - "internal error - %s - mixed alignment", - XSTRING (sim_core_write_unaligned_N)); - break; - default: - sim_engine_abort (CPU_STATE (cpu), cpu, cia, - "internal error - %s - bad switch", - XSTRING (sim_core_write_unaligned_N)); - break; - } -} -#endif - -/* TAGS: sim_core_write_misaligned_3 sim_core_write_misaligned_5 */ -/* TAGS: sim_core_write_misaligned_6 sim_core_write_misaligned_7 */ - -#if (M != N) -INLINE_SIM_CORE(void) -sim_core_write_misaligned_N(sim_cpu *cpu, - sim_cia cia, - unsigned map, - address_word addr, - unsigned_M val) -{ - unsigned_M data = val; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) - data <<= (M - N) * 8; - if (CURRENT_HOST_BYTE_ORDER != CURRENT_TARGET_BYTE_ORDER) - data = SWAP_M (data); - if (sim_core_xor_write_buffer (CPU_STATE (cpu), cpu, map, &data, addr, N) != N) - SIM_CORE_SIGNAL (CPU_STATE (cpu), cpu, cia, map, N, addr, - write_transfer, sim_core_unaligned_signal); - PROFILE_COUNT_CORE (cpu, addr, N, map); - if (TRACE_P (cpu, TRACE_CORE_IDX)) - sim_core_trace_M (cpu, cia, __LINE__, write_transfer, map, addr, val, N); -} -#endif - - -/* NOTE: see start of file for #define of these macros */ -#undef unsigned_M -#undef T2H_M -#undef H2T_M -#undef SWAP_M -#undef sim_core_read_aligned_N -#undef sim_core_read_unaligned_N -#undef sim_core_read_misaligned_N -#undef sim_core_write_aligned_N -#undef sim_core_write_unaligned_N -#undef sim_core_write_misaligned_N -#undef sim_core_trace_M -#undef sim_core_dummy_M -#undef M -#undef N diff --git a/sim/common/sim-n-endian.h b/sim/common/sim-n-endian.h deleted file mode 100644 index 4c2f7b4..0000000 --- a/sim/common/sim-n-endian.h +++ /dev/null @@ -1,172 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 N -#error "N must be #defined" -#endif - -#include "symcat.h" - -/* NOTE: See end of file for #undef */ -#define unsigned_N XCONCAT2(unsigned_,N) -#define endian_t2h_N XCONCAT2(endian_t2h_,N) -#define endian_h2t_N XCONCAT2(endian_h2t_,N) -#define _SWAP_N XCONCAT2(_SWAP_,N) -#define swap_N XCONCAT2(swap_,N) -#define endian_h2be_N XCONCAT2(endian_h2be_,N) -#define endian_be2h_N XCONCAT2(endian_be2h_,N) -#define endian_h2le_N XCONCAT2(endian_h2le_,N) -#define endian_le2h_N XCONCAT2(endian_le2h_,N) -#define offset_N XCONCAT2(offset_,N) - -/* TAGS: endian_t2h_1 endian_t2h_2 endian_t2h_4 endian_t2h_8 endian_t2h_16 */ - -INLINE_SIM_ENDIAN\ -(unsigned_N) -endian_t2h_N(unsigned_N raw_in) -{ - if (CURRENT_TARGET_BYTE_ORDER == CURRENT_HOST_BYTE_ORDER) { - return raw_in; - } - else { - _SWAP_N(return,raw_in); - } -} - -/* TAGS: endian_h2t_1 endian_h2t_2 endian_h2t_4 endian_h2t_8 endian_h2t_16 */ - -INLINE_SIM_ENDIAN\ -(unsigned_N) -endian_h2t_N(unsigned_N raw_in) -{ - if (CURRENT_TARGET_BYTE_ORDER == CURRENT_HOST_BYTE_ORDER) { - return raw_in; - } - else { - _SWAP_N(return,raw_in); - } -} - -/* TAGS: swap_1 swap_2 swap_4 swap_8 swap_16 */ - -INLINE_SIM_ENDIAN\ -(unsigned_N) -swap_N(unsigned_N raw_in) -{ - _SWAP_N(return,raw_in); -} - -/* TAGS: endian_h2be_1 endian_h2be_2 endian_h2be_4 endian_h2be_8 endian_h2be_16 */ - -INLINE_SIM_ENDIAN\ -(unsigned_N) -endian_h2be_N(unsigned_N raw_in) -{ - if (CURRENT_HOST_BYTE_ORDER == BIG_ENDIAN) { - return raw_in; - } - else { - _SWAP_N(return,raw_in); - } -} - -/* TAGS: endian_be2h_1 endian_be2h_2 endian_be2h_4 endian_be2h_8 endian_be2h_16 */ - -INLINE_SIM_ENDIAN\ -(unsigned_N) -endian_be2h_N(unsigned_N raw_in) -{ - if (CURRENT_HOST_BYTE_ORDER == BIG_ENDIAN) { - return raw_in; - } - else { - _SWAP_N(return,raw_in); - } -} - -/* TAGS: endian_h2le_1 endian_h2le_2 endian_h2le_4 endian_h2le_8 endian_h2le_16 */ - -INLINE_SIM_ENDIAN\ -(unsigned_N) -endian_h2le_N(unsigned_N raw_in) -{ - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) { - return raw_in; - } - else { - _SWAP_N(return,raw_in); - } -} - -/* TAGS: endian_le2h_1 endian_le2h_2 endian_le2h_4 endian_le2h_8 endian_le2h_16 */ - -INLINE_SIM_ENDIAN\ -(unsigned_N) -endian_le2h_N(unsigned_N raw_in) -{ - if (CURRENT_HOST_BYTE_ORDER == LITTLE_ENDIAN) { - return raw_in; - } - else { - _SWAP_N(return,raw_in); - } -} - -/* TAGS: offset_1 offset_2 offset_4 offset_8 offset_16 */ - -INLINE_SIM_ENDIAN\ -(void*) -offset_N (unsigned_N *x, - unsigned sizeof_word, - unsigned word) -{ - char *in = (char*)x; - char *out; - unsigned offset = sizeof_word * word; - ASSERT (offset + sizeof_word <= sizeof(unsigned_N)); - ASSERT (word < (sizeof (unsigned_N) / sizeof_word)); - ASSERT ((sizeof (unsigned_N) % sizeof_word) == 0); - if (WITH_HOST_BYTE_ORDER == LITTLE_ENDIAN) - { - out = in + sizeof (unsigned_N) - offset - sizeof_word; - } - else - { - out = in + offset; - } - return out; -} - - -/* NOTE: See start of file for #define */ -#undef unsigned_N -#undef endian_t2h_N -#undef endian_h2t_N -#undef _SWAP_N -#undef swap_N -#undef endian_h2be_N -#undef endian_be2h_N -#undef endian_h2le_N -#undef endian_le2h_N -#undef offset_N diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c deleted file mode 100644 index 397652c..0000000 --- a/sim/common/sim-options.c +++ /dev/null @@ -1,1010 +0,0 @@ -/* Simulator option handling. - Copyright (C) 1996, 1997, 2004 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 -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#include <ctype.h> -#include "libiberty.h" -#include "sim-options.h" -#include "sim-io.h" -#include "sim-assert.h" - -#include "bfd.h" - -/* Add a set of options to the simulator. - TABLE is an array of OPTIONS terminated by a NULL `opt.name' entry. - This is intended to be called by modules in their `install' handler. */ - -SIM_RC -sim_add_option_table (SIM_DESC sd, sim_cpu *cpu, const OPTION *table) -{ - struct option_list *ol = ((struct option_list *) - xmalloc (sizeof (struct option_list))); - - /* Note: The list is constructed in the reverse order we're called so - later calls will override earlier ones (in case that ever happens). - This is the intended behaviour. */ - - if (cpu) - { - ol->next = CPU_OPTIONS (cpu); - ol->options = table; - CPU_OPTIONS (cpu) = ol; - } - else - { - ol->next = STATE_OPTIONS (sd); - ol->options = table; - STATE_OPTIONS (sd) = ol; - } - - return SIM_RC_OK; -} - -/* Standard option table. - Modules may specify additional ones. - The caller of sim_parse_args may also specify additional options - by calling sim_add_option_table first. */ - -static DECLARE_OPTION_HANDLER (standard_option_handler); - -/* FIXME: We shouldn't print in --help output options that aren't usable. - Some fine tuning will be necessary. One can either move less general - options to another table or use a HAVE_FOO macro to ifdef out unavailable - options. */ - -/* ??? One might want to conditionally compile out the entries that - aren't enabled. There's a distinction, however, between options a - simulator can't support and options that haven't been configured in. - Certainly options a simulator can't support shouldn't appear in the - output of --help. Whether the same thing applies to options that haven't - been configured in or not isn't something I can get worked up over. - [Note that conditionally compiling them out might simply involve moving - the option to another table.] - If you decide to conditionally compile them out as well, delete this - comment and add a comment saying that that is the rule. */ - -typedef enum { - OPTION_DEBUG_INSN = OPTION_START, - OPTION_DEBUG_FILE, - OPTION_DO_COMMAND, - OPTION_ARCHITECTURE, - OPTION_TARGET, - OPTION_ARCHITECTURE_INFO, - OPTION_ENVIRONMENT, - OPTION_ALIGNMENT, - OPTION_VERBOSE, -#if defined (SIM_HAVE_BIENDIAN) - OPTION_ENDIAN, -#endif - OPTION_DEBUG, -#ifdef SIM_HAVE_FLATMEM - OPTION_MEM_SIZE, -#endif - OPTION_HELP, -#ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir. */ - OPTION_H8300H, - OPTION_H8300S, - OPTION_H8300SX, -#endif - OPTION_LOAD_LMA, - OPTION_LOAD_VMA, - OPTION_SYSROOT -} STANDARD_OPTIONS; - -static const OPTION standard_options[] = -{ - { {"verbose", no_argument, NULL, OPTION_VERBOSE}, - 'v', NULL, "Verbose output", - standard_option_handler }, - -#if defined (SIM_HAVE_BIENDIAN) /* ??? && WITH_TARGET_BYTE_ORDER == 0 */ - { {"endian", required_argument, NULL, OPTION_ENDIAN}, - 'E', "big|little", "Set endianness", - standard_option_handler }, -#endif - -#ifdef SIM_HAVE_ENVIRONMENT - /* This option isn't supported unless all choices are supported in keeping - with the goal of not printing in --help output things the simulator can't - do [as opposed to things that just haven't been configured in]. */ - { {"environment", required_argument, NULL, OPTION_ENVIRONMENT}, - '\0', "user|virtual|operating", "Set running environment", - standard_option_handler }, -#endif - - { {"alignment", required_argument, NULL, OPTION_ALIGNMENT}, - '\0', "strict|nonstrict|forced", "Set memory access alignment", - standard_option_handler }, - - { {"debug", no_argument, NULL, OPTION_DEBUG}, - 'D', NULL, "Print debugging messages", - standard_option_handler }, - { {"debug-insn", no_argument, NULL, OPTION_DEBUG_INSN}, - '\0', NULL, "Print instruction debugging messages", - standard_option_handler }, - { {"debug-file", required_argument, NULL, OPTION_DEBUG_FILE}, - '\0', "FILE NAME", "Specify debugging output file", - standard_option_handler }, - -#ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir. */ - { {"h8300h", no_argument, NULL, OPTION_H8300H}, - 'h', NULL, "Indicate the CPU is H8/300H", - standard_option_handler }, - { {"h8300s", no_argument, NULL, OPTION_H8300S}, - 'S', NULL, "Indicate the CPU is H8S", - standard_option_handler }, - { {"h8300sx", no_argument, NULL, OPTION_H8300SX}, - 'x', NULL, "Indicate the CPU is H8SX", - standard_option_handler }, -#endif - -#ifdef SIM_HAVE_FLATMEM - { {"mem-size", required_argument, NULL, OPTION_MEM_SIZE}, - 'm', "MEMORY SIZE", "Specify memory size", - standard_option_handler }, -#endif - - { {"do-command", required_argument, NULL, OPTION_DO_COMMAND}, - '\0', "COMMAND", ""/*undocumented*/, - standard_option_handler }, - - { {"help", no_argument, NULL, OPTION_HELP}, - 'H', NULL, "Print help information", - standard_option_handler }, - - { {"architecture", required_argument, NULL, OPTION_ARCHITECTURE}, - '\0', "MACHINE", "Specify the architecture to use", - standard_option_handler }, - { {"architecture-info", no_argument, NULL, OPTION_ARCHITECTURE_INFO}, - '\0', NULL, "List supported architectures", - standard_option_handler }, - { {"info-architecture", no_argument, NULL, OPTION_ARCHITECTURE_INFO}, - '\0', NULL, NULL, - standard_option_handler }, - - { {"target", required_argument, NULL, OPTION_TARGET}, - '\0', "BFDNAME", "Specify the object-code format for the object files", - standard_option_handler }, - -#ifdef SIM_HANDLES_LMA - { {"load-lma", no_argument, NULL, OPTION_LOAD_LMA}, - '\0', NULL, -#if SIM_HANDLES_LMA - "Use VMA or LMA addresses when loading image (default LMA)", -#else - "Use VMA or LMA addresses when loading image (default VMA)", -#endif - standard_option_handler, "load-{lma,vma}" }, - { {"load-vma", no_argument, NULL, OPTION_LOAD_VMA}, - '\0', NULL, "", standard_option_handler, "" }, -#endif - - { {"sysroot", required_argument, NULL, OPTION_SYSROOT}, - '\0', "SYSROOT", - "Root for system calls with absolute file-names and cwd at start", - standard_option_handler }, - - { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } -}; - -static SIM_RC -standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, - char *arg, int is_command) -{ - int i,n; - - switch ((STANDARD_OPTIONS) opt) - { - case OPTION_VERBOSE: - STATE_VERBOSE_P (sd) = 1; - break; - -#ifdef SIM_HAVE_BIENDIAN - case OPTION_ENDIAN: - if (strcmp (arg, "big") == 0) - { - if (WITH_TARGET_BYTE_ORDER == LITTLE_ENDIAN) - { - sim_io_eprintf (sd, "Simulator compiled for little endian only.\n"); - return SIM_RC_FAIL; - } - /* FIXME:wip: Need to set something in STATE_CONFIG. */ - current_target_byte_order = BIG_ENDIAN; - } - else if (strcmp (arg, "little") == 0) - { - if (WITH_TARGET_BYTE_ORDER == BIG_ENDIAN) - { - sim_io_eprintf (sd, "Simulator compiled for big endian only.\n"); - return SIM_RC_FAIL; - } - /* FIXME:wip: Need to set something in STATE_CONFIG. */ - current_target_byte_order = LITTLE_ENDIAN; - } - else - { - sim_io_eprintf (sd, "Invalid endian specification `%s'\n", arg); - return SIM_RC_FAIL; - } - break; -#endif - - case OPTION_ENVIRONMENT: - if (strcmp (arg, "user") == 0) - STATE_ENVIRONMENT (sd) = USER_ENVIRONMENT; - else if (strcmp (arg, "virtual") == 0) - STATE_ENVIRONMENT (sd) = VIRTUAL_ENVIRONMENT; - else if (strcmp (arg, "operating") == 0) - STATE_ENVIRONMENT (sd) = OPERATING_ENVIRONMENT; - else - { - sim_io_eprintf (sd, "Invalid environment specification `%s'\n", arg); - return SIM_RC_FAIL; - } - if (WITH_ENVIRONMENT != ALL_ENVIRONMENT - && WITH_ENVIRONMENT != STATE_ENVIRONMENT (sd)) - { - char *type; - switch (WITH_ENVIRONMENT) - { - case USER_ENVIRONMENT: type = "user"; break; - case VIRTUAL_ENVIRONMENT: type = "virtual"; break; - case OPERATING_ENVIRONMENT: type = "operating"; break; - } - sim_io_eprintf (sd, "Simulator compiled for the %s environment only.\n", - type); - return SIM_RC_FAIL; - } - break; - - case OPTION_ALIGNMENT: - if (strcmp (arg, "strict") == 0) - { - if (WITH_ALIGNMENT == 0 || WITH_ALIGNMENT == STRICT_ALIGNMENT) - { - current_alignment = STRICT_ALIGNMENT; - break; - } - } - else if (strcmp (arg, "nonstrict") == 0) - { - if (WITH_ALIGNMENT == 0 || WITH_ALIGNMENT == NONSTRICT_ALIGNMENT) - { - current_alignment = NONSTRICT_ALIGNMENT; - break; - } - } - else if (strcmp (arg, "forced") == 0) - { - if (WITH_ALIGNMENT == 0 || WITH_ALIGNMENT == FORCED_ALIGNMENT) - { - current_alignment = FORCED_ALIGNMENT; - break; - } - } - else - { - sim_io_eprintf (sd, "Invalid alignment specification `%s'\n", arg); - return SIM_RC_FAIL; - } - switch (WITH_ALIGNMENT) - { - case STRICT_ALIGNMENT: - sim_io_eprintf (sd, "Simulator compiled for strict alignment only.\n"); - break; - case NONSTRICT_ALIGNMENT: - sim_io_eprintf (sd, "Simulator compiled for nonstrict alignment only.\n"); - break; - case FORCED_ALIGNMENT: - sim_io_eprintf (sd, "Simulator compiled for forced alignment only.\n"); - break; - } - return SIM_RC_FAIL; - - case OPTION_DEBUG: - if (! WITH_DEBUG) - sim_io_eprintf (sd, "Debugging not compiled in, `-D' ignored\n"); - else - { - for (n = 0; n < MAX_NR_PROCESSORS; ++n) - for (i = 0; i < MAX_DEBUG_VALUES; ++i) - CPU_DEBUG_FLAGS (STATE_CPU (sd, n))[i] = 1; - } - break; - - case OPTION_DEBUG_INSN : - if (! WITH_DEBUG) - sim_io_eprintf (sd, "Debugging not compiled in, `--debug-insn' ignored\n"); - else - { - for (n = 0; n < MAX_NR_PROCESSORS; ++n) - CPU_DEBUG_FLAGS (STATE_CPU (sd, n))[DEBUG_INSN_IDX] = 1; - } - break; - - case OPTION_DEBUG_FILE : - if (! WITH_DEBUG) - sim_io_eprintf (sd, "Debugging not compiled in, `--debug-file' ignored\n"); - else - { - FILE *f = fopen (arg, "w"); - - if (f == NULL) - { - sim_io_eprintf (sd, "Unable to open debug output file `%s'\n", arg); - return SIM_RC_FAIL; - } - for (n = 0; n < MAX_NR_PROCESSORS; ++n) - CPU_DEBUG_FILE (STATE_CPU (sd, n)) = f; - } - break; - -#ifdef SIM_H8300 /* FIXME: Can be moved to h8300 dir. */ - case OPTION_H8300H: - set_h8300h (bfd_mach_h8300h); - break; - case OPTION_H8300S: - set_h8300h (bfd_mach_h8300s); - break; - case OPTION_H8300SX: - set_h8300h (bfd_mach_h8300sx); - break; -#endif - -#ifdef SIM_HAVE_FLATMEM - case OPTION_MEM_SIZE: - { - unsigned long ul = strtol (arg, NULL, 0); - /* 16384: some minimal amount */ - if (! isdigit (arg[0]) || ul < 16384) - { - sim_io_eprintf (sd, "Invalid memory size `%s'", arg); - return SIM_RC_FAIL; - } - STATE_MEM_SIZE (sd) = ul; - } - break; -#endif - - case OPTION_DO_COMMAND: - sim_do_command (sd, arg); - break; - - case OPTION_ARCHITECTURE: - { - const struct bfd_arch_info *ap = bfd_scan_arch (arg); - if (ap == NULL) - { - sim_io_eprintf (sd, "Architecture `%s' unknown\n", arg); - return SIM_RC_FAIL; - } - STATE_ARCHITECTURE (sd) = ap; - break; - } - - case OPTION_ARCHITECTURE_INFO: - { - const char **list = bfd_arch_list(); - const char **lp; - if (list == NULL) - abort (); - sim_io_printf (sd, "Possible architectures:"); - for (lp = list; *lp != NULL; lp++) - sim_io_printf (sd, " %s", *lp); - sim_io_printf (sd, "\n"); - free (list); - break; - } - - case OPTION_TARGET: - { - STATE_TARGET (sd) = xstrdup (arg); - break; - } - - case OPTION_LOAD_LMA: - { - STATE_LOAD_AT_LMA_P (sd) = 1; - break; - } - - case OPTION_LOAD_VMA: - { - STATE_LOAD_AT_LMA_P (sd) = 0; - break; - } - - case OPTION_HELP: - sim_print_help (sd, is_command); - if (STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE) - exit (0); - /* FIXME: 'twould be nice to do something similar if gdb. */ - break; - - case OPTION_SYSROOT: - /* Don't leak memory in the odd event that there's lots of - --sysroot=... options. */ - if (simulator_sysroot[0] != '\0' && arg[0] != '\0') - free (simulator_sysroot); - simulator_sysroot = xstrdup (arg); - break; - } - - return SIM_RC_OK; -} - -/* Add the standard option list to the simulator. */ - -SIM_RC -standard_install (SIM_DESC sd) -{ - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - if (sim_add_option_table (sd, NULL, standard_options) != SIM_RC_OK) - return SIM_RC_FAIL; -#ifdef SIM_HANDLES_LMA - STATE_LOAD_AT_LMA_P (sd) = SIM_HANDLES_LMA; -#endif - return SIM_RC_OK; -} - -/* Return non-zero if arg is a duplicate argument. - If ARG is NULL, initialize. */ - -#define ARG_HASH_SIZE 97 -#define ARG_HASH(a) ((256 * (unsigned char) a[0] + (unsigned char) a[1]) % ARG_HASH_SIZE) - -static int -dup_arg_p (arg) - char *arg; -{ - int hash; - static char **arg_table = NULL; - - if (arg == NULL) - { - if (arg_table == NULL) - arg_table = (char **) xmalloc (ARG_HASH_SIZE * sizeof (char *)); - memset (arg_table, 0, ARG_HASH_SIZE * sizeof (char *)); - return 0; - } - - hash = ARG_HASH (arg); - while (arg_table[hash] != NULL) - { - if (strcmp (arg, arg_table[hash]) == 0) - return 1; - /* We assume there won't be more than ARG_HASH_SIZE arguments so we - don't check if the table is full. */ - if (++hash == ARG_HASH_SIZE) - hash = 0; - } - arg_table[hash] = arg; - return 0; -} - -/* Called by sim_open to parse the arguments. */ - -SIM_RC -sim_parse_args (sd, argv) - SIM_DESC sd; - char **argv; -{ - int c, i, argc, num_opts; - char *p, *short_options; - /* The `val' option struct entry is dynamically assigned for options that - only come in the long form. ORIG_VAL is used to get the original value - back. */ - int *orig_val; - struct option *lp, *long_options; - const struct option_list *ol; - const OPTION *opt; - OPTION_HANDLER **handlers; - sim_cpu **opt_cpu; - SIM_RC result = SIM_RC_OK; - - /* Count the number of arguments. */ - for (argc = 0; argv[argc] != NULL; ++argc) - continue; - - /* Count the number of options. */ - num_opts = 0; - for (ol = STATE_OPTIONS (sd); ol != NULL; ol = ol->next) - for (opt = ol->options; OPTION_VALID_P (opt); ++opt) - ++num_opts; - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - for (ol = CPU_OPTIONS (STATE_CPU (sd, i)); ol != NULL; ol = ol->next) - for (opt = ol->options; OPTION_VALID_P (opt); ++opt) - ++num_opts; - - /* Initialize duplicate argument checker. */ - (void) dup_arg_p (NULL); - - /* Build the option table for getopt. */ - - long_options = NZALLOC (struct option, num_opts + 1); - lp = long_options; - short_options = NZALLOC (char, num_opts * 3 + 1); - p = short_options; - handlers = NZALLOC (OPTION_HANDLER *, OPTION_START + num_opts); - orig_val = NZALLOC (int, OPTION_START + num_opts); - opt_cpu = NZALLOC (sim_cpu *, OPTION_START + num_opts); - - /* Set '+' as first char so argument permutation isn't done. This - is done to stop getopt_long returning options that appear after - the target program. Such options should be passed unchanged into - the program image. */ - *p++ = '+'; - - for (i = OPTION_START, ol = STATE_OPTIONS (sd); ol != NULL; ol = ol->next) - for (opt = ol->options; OPTION_VALID_P (opt); ++opt) - { - if (dup_arg_p (opt->opt.name)) - continue; - if (opt->shortopt != 0) - { - *p++ = opt->shortopt; - if (opt->opt.has_arg == required_argument) - *p++ = ':'; - else if (opt->opt.has_arg == optional_argument) - { *p++ = ':'; *p++ = ':'; } - handlers[(unsigned char) opt->shortopt] = opt->handler; - if (opt->opt.val != 0) - orig_val[(unsigned char) opt->shortopt] = opt->opt.val; - else - orig_val[(unsigned char) opt->shortopt] = opt->shortopt; - } - if (opt->opt.name != NULL) - { - *lp = opt->opt; - /* Dynamically assign `val' numbers for long options. */ - lp->val = i++; - handlers[lp->val] = opt->handler; - orig_val[lp->val] = opt->opt.val; - opt_cpu[lp->val] = NULL; - ++lp; - } - } - - for (c = 0; c < MAX_NR_PROCESSORS; ++c) - { - sim_cpu *cpu = STATE_CPU (sd, c); - for (ol = CPU_OPTIONS (cpu); ol != NULL; ol = ol->next) - for (opt = ol->options; OPTION_VALID_P (opt); ++opt) - { -#if 0 /* Each option is prepended with --<cpuname>- so this greatly cuts down - on the need for dup_arg_p checking. Maybe in the future it'll be - needed so this is just commented out, and not deleted. */ - if (dup_arg_p (opt->opt.name)) - continue; -#endif - /* Don't allow short versions of cpu specific options for now. */ - if (opt->shortopt != 0) - { - sim_io_eprintf (sd, "internal error, short cpu specific option"); - result = SIM_RC_FAIL; - break; - } - if (opt->opt.name != NULL) - { - char *name; - *lp = opt->opt; - /* Prepend --<cpuname>- to the option. */ - asprintf (&name, "%s-%s", CPU_NAME (cpu), lp->name); - lp->name = name; - /* Dynamically assign `val' numbers for long options. */ - lp->val = i++; - handlers[lp->val] = opt->handler; - orig_val[lp->val] = opt->opt.val; - opt_cpu[lp->val] = cpu; - ++lp; - } - } - } - - /* Terminate the short and long option lists. */ - *p = 0; - lp->name = NULL; - - /* Ensure getopt is initialized. */ - optind = 0; - - while (1) - { - int longind, optc; - - optc = getopt_long (argc, argv, short_options, long_options, &longind); - if (optc == -1) - { - if (STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE) - STATE_PROG_ARGV (sd) = dupargv (argv + optind); - break; - } - if (optc == '?') - { - result = SIM_RC_FAIL; - break; - } - - if ((*handlers[optc]) (sd, opt_cpu[optc], orig_val[optc], optarg, 0/*!is_command*/) == SIM_RC_FAIL) - { - result = SIM_RC_FAIL; - break; - } - } - - zfree (long_options); - zfree (short_options); - zfree (handlers); - zfree (opt_cpu); - zfree (orig_val); - return result; -} - -/* Utility of sim_print_help to print a list of option tables. */ - -static void -print_help (SIM_DESC sd, sim_cpu *cpu, const struct option_list *ol, int is_command) -{ - const OPTION *opt; - - for ( ; ol != NULL; ol = ol->next) - for (opt = ol->options; OPTION_VALID_P (opt); ++opt) - { - const int indent = 30; - int comma, len; - const OPTION *o; - - if (dup_arg_p (opt->opt.name)) - continue; - - if (opt->doc == NULL) - continue; - - if (opt->doc_name != NULL && opt->doc_name [0] == '\0') - continue; - - sim_io_printf (sd, " "); - - comma = 0; - len = 2; - - /* list any short options (aliases) for the current OPT */ - if (!is_command) - { - o = opt; - do - { - if (o->shortopt != '\0') - { - sim_io_printf (sd, "%s-%c", comma ? ", " : "", o->shortopt); - len += (comma ? 2 : 0) + 2; - if (o->arg != NULL) - { - if (o->opt.has_arg == optional_argument) - { - sim_io_printf (sd, "[%s]", o->arg); - len += 1 + strlen (o->arg) + 1; - } - else - { - sim_io_printf (sd, " %s", o->arg); - len += 1 + strlen (o->arg); - } - } - comma = 1; - } - ++o; - } - while (OPTION_VALID_P (o) && o->doc == NULL); - } - - /* list any long options (aliases) for the current OPT */ - o = opt; - do - { - const char *name; - const char *cpu_prefix = cpu ? CPU_NAME (cpu) : NULL; - if (o->doc_name != NULL) - name = o->doc_name; - else - name = o->opt.name; - if (name != NULL) - { - sim_io_printf (sd, "%s%s%s%s%s", - comma ? ", " : "", - is_command ? "" : "--", - cpu ? cpu_prefix : "", - cpu ? "-" : "", - name); - len += ((comma ? 2 : 0) - + (is_command ? 0 : 2) - + strlen (name)); - if (o->arg != NULL) - { - if (o->opt.has_arg == optional_argument) - { - sim_io_printf (sd, "[=%s]", o->arg); - len += 2 + strlen (o->arg) + 1; - } - else - { - sim_io_printf (sd, " %s", o->arg); - len += 1 + strlen (o->arg); - } - } - comma = 1; - } - ++o; - } - while (OPTION_VALID_P (o) && o->doc == NULL); - - if (len >= indent) - { - sim_io_printf (sd, "\n%*s", indent, ""); - } - else - sim_io_printf (sd, "%*s", indent - len, ""); - - /* print the description, word wrap long lines */ - { - const char *chp = opt->doc; - unsigned doc_width = 80 - indent; - while (strlen (chp) >= doc_width) /* some slack */ - { - const char *end = chp + doc_width - 1; - while (end > chp && !isspace (*end)) - end --; - if (end == chp) - end = chp + doc_width - 1; - /* The cast should be ok - its distances between to - points in a string. */ - sim_io_printf (sd, "%.*s\n%*s", (int) (end - chp), chp, indent, - ""); - chp = end; - while (isspace (*chp) && *chp != '\0') - chp++; - } - sim_io_printf (sd, "%s\n", chp); - } - } -} - -/* Print help messages for the options. */ - -void -sim_print_help (sd, is_command) - SIM_DESC sd; - int is_command; -{ - if (STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE) - sim_io_printf (sd, "Usage: %s [options] program [program args]\n", - STATE_MY_NAME (sd)); - - /* Initialize duplicate argument checker. */ - (void) dup_arg_p (NULL); - - if (STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE) - sim_io_printf (sd, "Options:\n"); - else - sim_io_printf (sd, "Commands:\n"); - - print_help (sd, NULL, STATE_OPTIONS (sd), is_command); - sim_io_printf (sd, "\n"); - - /* Print cpu-specific options. */ - { - int i; - - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - { - sim_cpu *cpu = STATE_CPU (sd, i); - if (CPU_OPTIONS (cpu) == NULL) - continue; - sim_io_printf (sd, "CPU %s specific options:\n", CPU_NAME (cpu)); - print_help (sd, cpu, CPU_OPTIONS (cpu), is_command); - sim_io_printf (sd, "\n"); - } - } - - sim_io_printf (sd, "Note: Depending on the simulator configuration some %ss\n", - STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE ? "option" : "command"); - sim_io_printf (sd, " may not be applicable\n"); - - if (STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE) - { - sim_io_printf (sd, "\n"); - sim_io_printf (sd, "program args Arguments to pass to simulated program.\n"); - sim_io_printf (sd, " Note: Very few simulators support this.\n"); - } -} - -/* Utility of sim_args_command to find the closest match for a command. - Commands that have "-" in them can be specified as separate words. - e.g. sim memory-region 0x800000,0x4000 - or sim memory region 0x800000,0x4000 - If CPU is non-null, use its option table list, otherwise use the main one. - *PARGI is where to start looking in ARGV. It is updated to point past - the found option. */ - -static const OPTION * -find_match (SIM_DESC sd, sim_cpu *cpu, char *argv[], int *pargi) -{ - const struct option_list *ol; - const OPTION *opt; - /* most recent option match */ - const OPTION *matching_opt = NULL; - int matching_argi = -1; - - if (cpu) - ol = CPU_OPTIONS (cpu); - else - ol = STATE_OPTIONS (sd); - - /* Skip passed elements specified by *PARGI. */ - argv += *pargi; - - for ( ; ol != NULL; ol = ol->next) - for (opt = ol->options; OPTION_VALID_P (opt); ++opt) - { - int argi = 0; - const char *name = opt->opt.name; - if (name == NULL) - continue; - while (argv [argi] != NULL - && strncmp (name, argv [argi], strlen (argv [argi])) == 0) - { - name = &name [strlen (argv[argi])]; - if (name [0] == '-') - { - /* leading match ...<a-b-c>-d-e-f - continue search */ - name ++; /* skip `-' */ - argi ++; - continue; - } - else if (name [0] == '\0') - { - /* exact match ...<a-b-c-d-e-f> - better than before? */ - if (argi > matching_argi) - { - matching_argi = argi; - matching_opt = opt; - } - break; - } - else - break; - } - } - - *pargi = matching_argi; - return matching_opt; -} - -SIM_RC -sim_args_command (SIM_DESC sd, char *cmd) -{ - /* something to do? */ - if (cmd == NULL) - return SIM_RC_OK; /* FIXME - perhaps help would be better */ - - if (cmd [0] == '-') - { - /* user specified -<opt> ... form? */ - char **argv = buildargv (cmd); - SIM_RC rc = sim_parse_args (sd, argv); - freeargv (argv); - return rc; - } - else - { - char **argv = buildargv (cmd); - const OPTION *matching_opt = NULL; - int matching_argi; - sim_cpu *cpu; - - if (argv [0] == NULL) - return SIM_RC_OK; /* FIXME - perhaps help would be better */ - - /* First check for a cpu selector. */ - { - char *cpu_name = xstrdup (argv[0]); - char *hyphen = strchr (cpu_name, '-'); - if (hyphen) - *hyphen = 0; - cpu = sim_cpu_lookup (sd, cpu_name); - if (cpu) - { - /* If <cpuname>-<command>, point argv[0] at <command>. */ - if (hyphen) - { - matching_argi = 0; - argv[0] += hyphen - cpu_name + 1; - } - else - matching_argi = 1; - matching_opt = find_match (sd, cpu, argv, &matching_argi); - /* If hyphen found restore argv[0]. */ - if (hyphen) - argv[0] -= hyphen - cpu_name + 1; - } - free (cpu_name); - } - - /* If that failed, try the main table. */ - if (matching_opt == NULL) - { - matching_argi = 0; - matching_opt = find_match (sd, NULL, argv, &matching_argi); - } - - if (matching_opt != NULL) - { - switch (matching_opt->opt.has_arg) - { - case no_argument: - if (argv [matching_argi + 1] == NULL) - matching_opt->handler (sd, cpu, matching_opt->opt.val, - NULL, 1/*is_command*/); - else - sim_io_eprintf (sd, "Command `%s' takes no arguments\n", - matching_opt->opt.name); - break; - case optional_argument: - if (argv [matching_argi + 1] == NULL) - matching_opt->handler (sd, cpu, matching_opt->opt.val, - NULL, 1/*is_command*/); - else if (argv [matching_argi + 2] == NULL) - matching_opt->handler (sd, cpu, matching_opt->opt.val, - argv [matching_argi + 1], 1/*is_command*/); - else - sim_io_eprintf (sd, "Command `%s' requires no more than one argument\n", - matching_opt->opt.name); - break; - case required_argument: - if (argv [matching_argi + 1] == NULL) - sim_io_eprintf (sd, "Command `%s' requires an argument\n", - matching_opt->opt.name); - else if (argv [matching_argi + 2] == NULL) - matching_opt->handler (sd, cpu, matching_opt->opt.val, - argv [matching_argi + 1], 1/*is_command*/); - else - sim_io_eprintf (sd, "Command `%s' requires only one argument\n", - matching_opt->opt.name); - } - freeargv (argv); - return SIM_RC_OK; - } - - freeargv (argv); - } - - /* didn't find anything that remotly matched */ - return SIM_RC_FAIL; -} diff --git a/sim/common/sim-options.h b/sim/common/sim-options.h deleted file mode 100644 index 78cad56..0000000 --- a/sim/common/sim-options.h +++ /dev/null @@ -1,149 +0,0 @@ -/* Header file for simulator argument handling. - 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. */ - -#ifndef SIM_OPTIONS_H -#define SIM_OPTIONS_H - -#include "getopt.h" - -/* ARGV option support. - - Options for the standalone simulator are parsed by sim_open since - sim_open handles the large majority of them and it also parses the - options when invoked by gdb [or any external program]. - - For OPTION_HANDLER: arg#2 is the processor to apply to option to - (all if NULL); arg#3 is the option index; arg#4 is the option's - argument, NULL if optional and missing; arg#5 is nonzero if a - command is being interpreted. */ - -typedef SIM_RC (OPTION_HANDLER) PARAMS ((SIM_DESC, sim_cpu *, int, char *, int)); - -/* Declare option handlers with a macro so it's usable on k&r systems. */ -#define DECLARE_OPTION_HANDLER(fn) SIM_RC fn PARAMS ((SIM_DESC, sim_cpu *, int, char *, int)) - -typedef struct { - - /* The long option information. */ - - struct option opt; - - /* The short option with the same meaning ('\0' if none). - - For short options, when OPT.VAL is non-zero, it, instead of - SHORTOPT is passed to HANDLER. - - For example, for the below: - - { {"dc", no_argument, NULL, OPTION_VALUE}, - 'd', NULL, "<<description>>", HANDLER}, - { {NULL, no_argument, NULL, OPTION_VALUE}, - 'e', NULL, "<<description>>", HANDLER}, - - the options --dc, -d and -e all result in OPTION_VALUE being - passed into HANDLER. */ - - char shortopt; - - /* The name of the argument (NULL if none). */ - - const char *arg; - - /* The documentation string. - - If DOC is NULL, this option name is listed as a synonym for the - previous option. - - If DOC and DOC_NAME are the empty string (i.e. ""), this option - is not listed in usage and help messages. - - For example, given the aliased options --dc, --dp and -d, then: - - { {"dc", no_argument, NULL, OPTION_DC}, - 'd', NULL, "<<description>>", HANDLER}, - { {"dp", no_argument, NULL, OPTION_DP}, - '\0', NULL, NULL, HANDLER}, - - will list ``-d, --dc, --dp <<description>>'' */ - - const char *doc; - - /* A function to process the option. */ - - OPTION_HANDLER *handler; - - /* The documentation name. Used when generating usage and help - messages. - - If DOC and DOC_NAME are the empty string (i.e. ""), this option - is not listed in usage and help messages. - - If DOC_NAME is a non-empty string then it, insted of OPT.NAME, is - listed as the name of the option in usage and help messages. - - For example, given the options --set-pc and --set-sp, then: - - { {"set-pc", no_argument, NULL, OPTION_SET_PC}, - '\0', NULL, "<<description>>", HANDLER, "--set-REGNAME" }, - { {"set-sp", no_argument, NULL, OPTION_SET_SP}, - '\0', NULL, "", HANDLER, "" }, - - will list ``--set-REGNAME <<description>>". */ - - const char *doc_name; - -} OPTION; - -/* All options that don't have a short form equivalent begin with this for - `val'. 130 isn't special, just some non-ASCII value to begin at. - Modules needn't worry about collisions here, the code dynamically assigned - the actual numbers used and then passes the original value to the option - handler. */ -#define OPTION_START 130 - -/* Identify valid option in the table */ -#define OPTION_VALID_P(O) ((O)->opt.name != NULL || (O)->shortopt != '\0') - -/* List of options added by various modules. */ -typedef struct option_list { - struct option_list *next; - const OPTION *options; -} OPTION_LIST; - -/* Add a set of options to the simulator. - CPU is the cpu the options apply to or NULL for all cpus. - TABLE is an array of OPTIONS terminated by a NULL `opt.name' entry. */ -SIM_RC sim_add_option_table PARAMS ((SIM_DESC sd, sim_cpu *cpu, const OPTION *table)); - -/* Install handler for the standard options. */ -MODULE_INSTALL_FN standard_install; - -/* Called by sim_open to parse the arguments. */ -SIM_RC sim_parse_args PARAMS ((SIM_DESC sd, char **argv)); - -/* Print help messages for the options. IS_COMMAND is non-zero when - this function is called from the command line interpreter. */ -void sim_print_help PARAMS ((SIM_DESC sd, int is_command)); - -/* Try to parse the command as if it is an option, Only fail when - totally unsuccessful */ -SIM_RC sim_args_command PARAMS ((SIM_DESC sd, char *cmd)); - -#endif /* SIM_OPTIONS_H */ diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c deleted file mode 100644 index 20d7a54..0000000 --- a/sim/common/sim-profile.c +++ /dev/null @@ -1,1274 +0,0 @@ -/* Default profiling support. - Copyright (C) 1996, 1997, 1998, 2000, 2001 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" -#include "sim-io.h" -#include "sim-options.h" -#include "sim-assert.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 -#include <ctype.h> - -#define COMMAS(n) sim_add_commas (comma_buf, sizeof (comma_buf), (n)) - -static MODULE_INIT_FN profile_init; -static MODULE_UNINSTALL_FN profile_uninstall; - -static DECLARE_OPTION_HANDLER (profile_option_handler); - -enum { - OPTION_PROFILE_INSN = OPTION_START, - OPTION_PROFILE_MEMORY, - OPTION_PROFILE_MODEL, - OPTION_PROFILE_FILE, - OPTION_PROFILE_CORE, - OPTION_PROFILE_CPU_FREQUENCY, - OPTION_PROFILE_PC, - OPTION_PROFILE_PC_RANGE, - OPTION_PROFILE_PC_GRANULARITY, - OPTION_PROFILE_RANGE, - OPTION_PROFILE_FUNCTION -}; - -static const OPTION profile_options[] = { - { {"profile", optional_argument, NULL, 'p'}, - 'p', "on|off", "Perform profiling", - profile_option_handler }, - { {"profile-insn", optional_argument, NULL, OPTION_PROFILE_INSN}, - '\0', "on|off", "Perform instruction profiling", - profile_option_handler }, - { {"profile-memory", optional_argument, NULL, OPTION_PROFILE_MEMORY}, - '\0', "on|off", "Perform memory profiling", - profile_option_handler }, - { {"profile-core", optional_argument, NULL, OPTION_PROFILE_CORE}, - '\0', "on|off", "Perform CORE profiling", - profile_option_handler }, - { {"profile-model", optional_argument, NULL, OPTION_PROFILE_MODEL}, - '\0', "on|off", "Perform model profiling", - profile_option_handler }, - { {"profile-cpu-frequency", required_argument, NULL, - OPTION_PROFILE_CPU_FREQUENCY}, - '\0', "CPU FREQUENCY", "Specify the speed of the simulated cpu clock", - profile_option_handler }, - - { {"profile-file", required_argument, NULL, OPTION_PROFILE_FILE}, - '\0', "FILE NAME", "Specify profile output file", - profile_option_handler }, - - { {"profile-pc", optional_argument, NULL, OPTION_PROFILE_PC}, - '\0', "on|off", "Perform PC profiling", - profile_option_handler }, - { {"profile-pc-frequency", required_argument, NULL, 'F'}, - 'F', "PC PROFILE FREQUENCY", "Specified PC profiling frequency", - profile_option_handler }, - { {"profile-pc-size", required_argument, NULL, 'S'}, - 'S', "PC PROFILE SIZE", "Specify PC profiling size", - profile_option_handler }, - { {"profile-pc-granularity", required_argument, NULL, OPTION_PROFILE_PC_GRANULARITY}, - '\0', "PC PROFILE GRANULARITY", "Specify PC profiling sample coverage", - profile_option_handler }, - { {"profile-pc-range", required_argument, NULL, OPTION_PROFILE_PC_RANGE}, - '\0', "BASE,BOUND", "Specify PC profiling address range", - profile_option_handler }, - -#ifdef SIM_HAVE_ADDR_RANGE - { {"profile-range", required_argument, NULL, OPTION_PROFILE_RANGE}, - '\0', "START,END", "Specify range of addresses for instruction and model profiling", - profile_option_handler }, -#if 0 /*wip*/ - { {"profile-function", required_argument, NULL, OPTION_PROFILE_FUNCTION}, - '\0', "FUNCTION", "Specify function to profile", - profile_option_handler }, -#endif -#endif - - { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } -}; - -/* Set/reset the profile options indicated in MASK. */ - -SIM_RC -set_profile_option_mask (SIM_DESC sd, const char *name, int mask, const char *arg) -{ - int profile_nr; - int cpu_nr; - int profile_val = 1; - - if (arg != NULL) - { - if (strcmp (arg, "yes") == 0 - || strcmp (arg, "on") == 0 - || strcmp (arg, "1") == 0) - profile_val = 1; - else if (strcmp (arg, "no") == 0 - || strcmp (arg, "off") == 0 - || strcmp (arg, "0") == 0) - profile_val = 0; - else - { - sim_io_eprintf (sd, "Argument `%s' for `--profile%s' invalid, one of `on', `off', `yes', `no' expected\n", arg, name); - return SIM_RC_FAIL; - } - } - - /* update applicable profile bits */ - for (profile_nr = 0; profile_nr < MAX_PROFILE_VALUES; ++profile_nr) - { - if ((mask & (1 << profile_nr)) == 0) - continue; - -#if 0 /* see sim-trace.c, set flags in STATE here if/when there are any */ - /* Set non-cpu specific values. */ - switch (profile_nr) - { - case ??? : - break; - } -#endif - - /* Set cpu values. */ - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; cpu_nr++) - { - CPU_PROFILE_FLAGS (STATE_CPU (sd, cpu_nr))[profile_nr] = profile_val; - } - } - - /* Re-compute the cpu profile summary. */ - if (profile_val) - { - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; cpu_nr++) - CPU_PROFILE_DATA (STATE_CPU (sd, cpu_nr))->profile_any_p = 1; - } - else - { - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; cpu_nr++) - { - CPU_PROFILE_DATA (STATE_CPU (sd, cpu_nr))->profile_any_p = 0; - for (profile_nr = 0; profile_nr < MAX_PROFILE_VALUES; ++profile_nr) - { - if (CPU_PROFILE_FLAGS (STATE_CPU (sd, cpu_nr))[profile_nr]) - { - CPU_PROFILE_DATA (STATE_CPU (sd, cpu_nr))->profile_any_p = 1; - break; - } - } - } - } - - return SIM_RC_OK; -} - -/* Set one profile option based on its IDX value. - Not static as cgen-scache.c uses it. */ - -SIM_RC -sim_profile_set_option (SIM_DESC sd, const char *name, int idx, const char *arg) -{ - return set_profile_option_mask (sd, name, 1 << idx, arg); -} - -static SIM_RC -parse_frequency (SIM_DESC sd, const char *arg, unsigned long *freq) -{ - const char *ch; - /* First, parse a decimal number. */ - *freq = 0; - ch = arg; - if (isdigit (*arg)) - { - for (/**/; *ch != '\0'; ++ch) - { - if (! isdigit (*ch)) - break; - *freq = *freq * 10 + (*ch - '0'); - } - - /* Accept KHz, MHz or Hz as a suffix. */ - if (tolower (*ch) == 'm') - { - *freq *= 1000000; - ++ch; - } - else if (tolower (*ch) == 'k') - { - *freq *= 1000; - ++ch; - } - - if (tolower (*ch) == 'h') - { - ++ch; - if (tolower (*ch) == 'z') - ++ch; - } - } - - if (*ch != '\0') - { - sim_io_eprintf (sd, "Invalid argument for --profile-cpu-frequency: %s\n", - arg); - *freq = 0; - return SIM_RC_FAIL; - } - - return SIM_RC_OK; -} - -static SIM_RC -profile_option_handler (SIM_DESC sd, - sim_cpu *cpu, - int opt, - char *arg, - int is_command) -{ - int cpu_nr; - - /* FIXME: Need to handle `cpu' arg. */ - - switch (opt) - { - case 'p' : - if (! WITH_PROFILE) - sim_io_eprintf (sd, "Profiling not compiled in, `-p' ignored\n"); - else - return set_profile_option_mask (sd, "profile", PROFILE_USEFUL_MASK, - arg); - break; - - case OPTION_PROFILE_INSN : - if (WITH_PROFILE_INSN_P) - return sim_profile_set_option (sd, "-insn", PROFILE_INSN_IDX, arg); - else - sim_io_eprintf (sd, "Instruction profiling not compiled in, `--profile-insn' ignored\n"); - break; - - case OPTION_PROFILE_MEMORY : - if (WITH_PROFILE_MEMORY_P) - return sim_profile_set_option (sd, "-memory", PROFILE_MEMORY_IDX, arg); - else - sim_io_eprintf (sd, "Memory profiling not compiled in, `--profile-memory' ignored\n"); - break; - - case OPTION_PROFILE_CORE : - if (WITH_PROFILE_CORE_P) - return sim_profile_set_option (sd, "-core", PROFILE_CORE_IDX, arg); - else - sim_io_eprintf (sd, "CORE profiling not compiled in, `--profile-core' ignored\n"); - break; - - case OPTION_PROFILE_MODEL : - if (WITH_PROFILE_MODEL_P) - return sim_profile_set_option (sd, "-model", PROFILE_MODEL_IDX, arg); - else - sim_io_eprintf (sd, "Model profiling not compiled in, `--profile-model' ignored\n"); - break; - - case OPTION_PROFILE_CPU_FREQUENCY : - { - unsigned long val; - SIM_RC rc = parse_frequency (sd, arg, &val); - if (rc == SIM_RC_OK) - { - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - PROFILE_CPU_FREQ (CPU_PROFILE_DATA (STATE_CPU (sd,cpu_nr))) = val; - } - return rc; - } - - case OPTION_PROFILE_FILE : - /* FIXME: Might want this to apply to pc profiling only, - or have two profile file options. */ - if (! WITH_PROFILE) - sim_io_eprintf (sd, "Profiling not compiled in, `--profile-file' ignored\n"); - else - { - FILE *f = fopen (arg, "w"); - - if (f == NULL) - { - sim_io_eprintf (sd, "Unable to open profile output file `%s'\n", arg); - return SIM_RC_FAIL; - } - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - PROFILE_FILE (CPU_PROFILE_DATA (STATE_CPU (sd, cpu_nr))) = f; - } - break; - - case OPTION_PROFILE_PC: - if (WITH_PROFILE_PC_P) - return sim_profile_set_option (sd, "-pc", PROFILE_PC_IDX, arg); - else - sim_io_eprintf (sd, "PC profiling not compiled in, `--profile-pc' ignored\n"); - break; - - case 'F' : - if (WITH_PROFILE_PC_P) - { - /* FIXME: Validate arg. */ - int val = atoi (arg); - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - PROFILE_PC_FREQ (CPU_PROFILE_DATA (STATE_CPU (sd, cpu_nr))) = val; - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - CPU_PROFILE_FLAGS (STATE_CPU (sd, cpu_nr))[PROFILE_PC_IDX] = 1; - } - else - sim_io_eprintf (sd, "PC profiling not compiled in, `--profile-pc-frequency' ignored\n"); - break; - - case 'S' : - if (WITH_PROFILE_PC_P) - { - /* FIXME: Validate arg. */ - int val = atoi (arg); - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - PROFILE_PC_NR_BUCKETS (CPU_PROFILE_DATA (STATE_CPU (sd, cpu_nr))) = val; - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - CPU_PROFILE_FLAGS (STATE_CPU (sd, cpu_nr))[PROFILE_PC_IDX] = 1; - } - else - sim_io_eprintf (sd, "PC profiling not compiled in, `--profile-pc-size' ignored\n"); - break; - - case OPTION_PROFILE_PC_GRANULARITY: - if (WITH_PROFILE_PC_P) - { - int shift; - int val = atoi (arg); - /* check that the granularity is a power of two */ - shift = 0; - while (val > (1 << shift)) - { - shift += 1; - } - if (val != (1 << shift)) - { - sim_io_eprintf (sd, "PC profiling granularity not a power of two\n"); - return SIM_RC_FAIL; - } - if (shift == 0) - { - sim_io_eprintf (sd, "PC profiling granularity too small"); - return SIM_RC_FAIL; - } - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - PROFILE_PC_SHIFT (CPU_PROFILE_DATA (STATE_CPU (sd, cpu_nr))) = shift; - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - CPU_PROFILE_FLAGS (STATE_CPU (sd, cpu_nr))[PROFILE_PC_IDX] = 1; - } - else - sim_io_eprintf (sd, "PC profiling not compiled in, `--profile-pc-granularity' ignored\n"); - break; - - case OPTION_PROFILE_PC_RANGE: - if (WITH_PROFILE_PC_P) - { - /* FIXME: Validate args */ - char *chp = arg; - unsigned long base; - unsigned long bound; - base = strtoul (chp, &chp, 0); - if (*chp != ',') - { - sim_io_eprintf (sd, "--profile-pc-range missing BOUND argument\n"); - return SIM_RC_FAIL; - } - bound = strtoul (chp + 1, NULL, 0); - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - { - PROFILE_PC_START (CPU_PROFILE_DATA (STATE_CPU (sd, cpu_nr))) = base; - PROFILE_PC_END (CPU_PROFILE_DATA (STATE_CPU (sd, cpu_nr))) = bound; - } - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - CPU_PROFILE_FLAGS (STATE_CPU (sd, cpu_nr))[PROFILE_PC_IDX] = 1; - } - else - sim_io_eprintf (sd, "PC profiling not compiled in, `--profile-pc-range' ignored\n"); - break; - -#ifdef SIM_HAVE_ADDR_RANGE - case OPTION_PROFILE_RANGE : - if (WITH_PROFILE) - { - char *chp = arg; - unsigned long start,end; - start = strtoul (chp, &chp, 0); - if (*chp != ',') - { - sim_io_eprintf (sd, "--profile-range missing END argument\n"); - return SIM_RC_FAIL; - } - end = strtoul (chp + 1, NULL, 0); - /* FIXME: Argument validation. */ - if (cpu != NULL) - sim_addr_range_add (PROFILE_RANGE (CPU_PROFILE_DATA (cpu)), - start, end); - else - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - sim_addr_range_add (PROFILE_RANGE (CPU_PROFILE_DATA (STATE_CPU (sd, cpu_nr))), - start, end); - } - else - sim_io_eprintf (sd, "Profiling not compiled in, `--profile-range' ignored\n"); - break; - - case OPTION_PROFILE_FUNCTION : - if (WITH_PROFILE) - { - /*wip: need to compute function range given name*/ - } - else - sim_io_eprintf (sd, "Profiling not compiled in, `--profile-function' ignored\n"); - break; -#endif /* SIM_HAVE_ADDR_RANGE */ - } - - return SIM_RC_OK; -} - -/* PC profiling support */ - -#if WITH_PROFILE_PC_P - -static void -profile_pc_cleanup (SIM_DESC sd) -{ - int n; - for (n = 0; n < MAX_NR_PROCESSORS; n++) - { - sim_cpu *cpu = STATE_CPU (sd, n); - PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); - if (PROFILE_PC_COUNT (data) != NULL) - zfree (PROFILE_PC_COUNT (data)); - PROFILE_PC_COUNT (data) = NULL; - if (PROFILE_PC_EVENT (data) != NULL) - sim_events_deschedule (sd, PROFILE_PC_EVENT (data)); - PROFILE_PC_EVENT (data) = NULL; - } -} - - -static void -profile_pc_uninstall (SIM_DESC sd) -{ - profile_pc_cleanup (sd); -} - -static void -profile_pc_event (SIM_DESC sd, - void *data) -{ - sim_cpu *cpu = (sim_cpu*) data; - PROFILE_DATA *profile = CPU_PROFILE_DATA (cpu); - address_word pc; - unsigned i; - switch (STATE_WATCHPOINTS (sd)->sizeof_pc) - { - case 2: pc = *(unsigned_2*)(STATE_WATCHPOINTS (sd)->pc) ; break; - case 4: pc = *(unsigned_4*)(STATE_WATCHPOINTS (sd)->pc) ; break; - case 8: pc = *(unsigned_8*)(STATE_WATCHPOINTS (sd)->pc) ; break; - default: pc = 0; - } - i = (pc - PROFILE_PC_START (profile)) >> PROFILE_PC_SHIFT (profile); - if (i < PROFILE_PC_NR_BUCKETS (profile)) - PROFILE_PC_COUNT (profile) [i] += 1; /* Overflow? */ - else - PROFILE_PC_COUNT (profile) [PROFILE_PC_NR_BUCKETS (profile)] += 1; - PROFILE_PC_EVENT (profile) = - sim_events_schedule (sd, PROFILE_PC_FREQ (profile), profile_pc_event, cpu); -} - -static SIM_RC -profile_pc_init (SIM_DESC sd) -{ - int n; - profile_pc_cleanup (sd); - for (n = 0; n < MAX_NR_PROCESSORS; n++) - { - sim_cpu *cpu = STATE_CPU (sd, n); - PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); - if (CPU_PROFILE_FLAGS (STATE_CPU (sd, n))[PROFILE_PC_IDX] - && STATE_WATCHPOINTS (sd)->pc != NULL) - { - int bucket_size; - /* fill in the frequency if not specified */ - if (PROFILE_PC_FREQ (data) == 0) - PROFILE_PC_FREQ (data) = 256; - /* fill in the start/end if not specified */ - if (PROFILE_PC_END (data) == 0) - { - PROFILE_PC_START (data) = STATE_TEXT_START (sd); - PROFILE_PC_END (data) = STATE_TEXT_END (sd); - } - /* Compute the number of buckets if not specified. */ - if (PROFILE_PC_NR_BUCKETS (data) == 0) - { - if (PROFILE_PC_BUCKET_SIZE (data) == 0) - PROFILE_PC_NR_BUCKETS (data) = 16; - else - { - if (PROFILE_PC_END (data) == 0) - { - /* nr_buckets = (full-address-range / 2) / (bucket_size / 2) */ - PROFILE_PC_NR_BUCKETS (data) = - ((1 << (STATE_WATCHPOINTS (sd)->sizeof_pc) * (8 - 1)) - / (PROFILE_PC_BUCKET_SIZE (data) / 2)); - } - else - { - PROFILE_PC_NR_BUCKETS (data) = - ((PROFILE_PC_END (data) - - PROFILE_PC_START (data) - + PROFILE_PC_BUCKET_SIZE (data) - 1) - / PROFILE_PC_BUCKET_SIZE (data)); - } - } - } - /* Compute the bucket size if not specified. Ensure that it - is rounded up to the next power of two */ - if (PROFILE_PC_BUCKET_SIZE (data) == 0) - { - if (PROFILE_PC_END (data) == 0) - /* bucket_size = (full-address-range / 2) / (nr_buckets / 2) */ - bucket_size = ((1 << ((STATE_WATCHPOINTS (sd)->sizeof_pc * 8) - 1)) - / (PROFILE_PC_NR_BUCKETS (data) / 2)); - else - bucket_size = ((PROFILE_PC_END (data) - - PROFILE_PC_START (data) - + PROFILE_PC_NR_BUCKETS (data) - 1) - / PROFILE_PC_NR_BUCKETS (data)); - PROFILE_PC_SHIFT (data) = 0; - while (bucket_size > PROFILE_PC_BUCKET_SIZE (data)) - { - PROFILE_PC_SHIFT (data) += 1; - } - } - /* Align the end address with bucket size */ - if (PROFILE_PC_END (data) != 0) - PROFILE_PC_END (data) = (PROFILE_PC_START (data) - + (PROFILE_PC_BUCKET_SIZE (data) - * PROFILE_PC_NR_BUCKETS (data))); - /* create the relevant buffers */ - PROFILE_PC_COUNT (data) = - NZALLOC (unsigned, PROFILE_PC_NR_BUCKETS (data) + 1); - PROFILE_PC_EVENT (data) = - sim_events_schedule (sd, - PROFILE_PC_FREQ (data), - profile_pc_event, - cpu); - } - } - return SIM_RC_OK; -} - -static void -profile_print_pc (sim_cpu *cpu, int verbose) -{ - SIM_DESC sd = CPU_STATE (cpu); - PROFILE_DATA *profile = CPU_PROFILE_DATA (cpu); - char comma_buf[20]; - unsigned max_val; - unsigned total; - unsigned i; - - if (PROFILE_PC_COUNT (profile) == 0) - return; - - sim_io_printf (sd, "Program Counter Statistics:\n\n"); - - /* First pass over data computes various things. */ - max_val = 0; - total = 0; - for (i = 0; i <= PROFILE_PC_NR_BUCKETS (profile); ++i) - { - total += PROFILE_PC_COUNT (profile) [i]; - if (PROFILE_PC_COUNT (profile) [i] > max_val) - max_val = PROFILE_PC_COUNT (profile) [i]; - } - - sim_io_printf (sd, " Total samples: %s\n", - COMMAS (total)); - sim_io_printf (sd, " Granularity: %s bytes per bucket\n", - COMMAS (PROFILE_PC_BUCKET_SIZE (profile))); - sim_io_printf (sd, " Size: %s buckets\n", - COMMAS (PROFILE_PC_NR_BUCKETS (profile))); - sim_io_printf (sd, " Frequency: %s cycles per sample\n", - COMMAS (PROFILE_PC_FREQ (profile))); - - if (PROFILE_PC_END (profile) != 0) - sim_io_printf (sd, " Range: 0x%lx 0x%lx\n", - (long) PROFILE_PC_START (profile), - (long) PROFILE_PC_END (profile)); - - if (verbose && max_val != 0) - { - /* Now we can print the histogram. */ - sim_io_printf (sd, "\n"); - for (i = 0; i <= PROFILE_PC_NR_BUCKETS (profile); ++i) - { - if (PROFILE_PC_COUNT (profile) [i] != 0) - { - sim_io_printf (sd, " "); - if (i == PROFILE_PC_NR_BUCKETS (profile)) - sim_io_printf (sd, "%10s:", "overflow"); - else - sim_io_printf (sd, "0x%08lx:", - (long) (PROFILE_PC_START (profile) - + (i * PROFILE_PC_BUCKET_SIZE (profile)))); - sim_io_printf (sd, " %*s", - max_val < 10000 ? 5 : 10, - COMMAS (PROFILE_PC_COUNT (profile) [i])); - sim_io_printf (sd, " %4.1f", - (PROFILE_PC_COUNT (profile) [i] * 100.0) / total); - sim_io_printf (sd, ": "); - sim_profile_print_bar (sd, PROFILE_HISTOGRAM_WIDTH, - PROFILE_PC_COUNT (profile) [i], - max_val); - sim_io_printf (sd, "\n"); - } - } - } - - /* dump the histogram to the file "gmon.out" using BSD's gprof file - format */ - /* Since a profile data file is in the native format of the host on - which the profile is being, endian issues are not considered in - the code below. */ - /* FIXME: Is this the best place for this code? */ - { - FILE *pf = fopen ("gmon.out", "wb"); - - if (pf == NULL) - sim_io_eprintf (sd, "Failed to open \"gmon.out\" profile file\n"); - else - { - int ok; - /* FIXME: what if the target has a 64 bit PC? */ - unsigned32 header[3]; - unsigned loop; - if (PROFILE_PC_END (profile) != 0) - { - header[0] = PROFILE_PC_START (profile); - header[1] = PROFILE_PC_END (profile); - } - else - { - header[0] = 0; - header[1] = 0; - } - /* size of sample buffer (+ header) */ - header[2] = PROFILE_PC_NR_BUCKETS (profile) * 2 + sizeof (header); - - /* Header must be written out in target byte order. */ - H2T (header[0]); - H2T (header[1]); - H2T (header[2]); - - ok = fwrite (&header, sizeof (header), 1, pf); - for (loop = 0; - ok && (loop < PROFILE_PC_NR_BUCKETS (profile)); - loop++) - { - signed16 sample; - if (PROFILE_PC_COUNT (profile) [loop] >= 0xffff) - sample = 0xffff; - else - sample = PROFILE_PC_COUNT (profile) [loop]; - ok = fwrite (&sample, sizeof (sample), 1, pf); - } - if (ok == 0) - sim_io_eprintf (sd, "Failed to write to \"gmon.out\" profile file\n"); - fclose(pf); - } - } - - sim_io_printf (sd, "\n"); -} - -#endif - -/* Summary printing support. */ - -#if WITH_PROFILE_INSN_P - -static SIM_RC -profile_insn_init (SIM_DESC sd) -{ - int c; - - for (c = 0; c < MAX_NR_PROCESSORS; ++c) - { - sim_cpu *cpu = STATE_CPU (sd, c); - - if (CPU_MAX_INSNS (cpu) > 0) - PROFILE_INSN_COUNT (CPU_PROFILE_DATA (cpu)) = NZALLOC (unsigned int, CPU_MAX_INSNS (cpu)); - } - - return SIM_RC_OK; -} - -static void -profile_print_insn (sim_cpu *cpu, int verbose) -{ - unsigned int i, n, total, max_val, max_name_len; - SIM_DESC sd = CPU_STATE (cpu); - PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); - char comma_buf[20]; - - /* If MAX_INSNS not set, insn profiling isn't supported. */ - if (CPU_MAX_INSNS (cpu) == 0) - return; - - sim_io_printf (sd, "Instruction Statistics"); -#ifdef SIM_HAVE_ADDR_RANGE - if (PROFILE_RANGE (data)->ranges) - sim_io_printf (sd, " (for selected address range(s))"); -#endif - sim_io_printf (sd, "\n\n"); - - /* First pass over data computes various things. */ - max_val = 0; - total = 0; - max_name_len = 0; - for (i = 0; i < CPU_MAX_INSNS (cpu); ++i) - { - const char *name = (*CPU_INSN_NAME (cpu)) (cpu, i); - - if (name == NULL) - continue; - total += PROFILE_INSN_COUNT (data) [i]; - if (PROFILE_INSN_COUNT (data) [i] > max_val) - max_val = PROFILE_INSN_COUNT (data) [i]; - n = strlen (name); - if (n > max_name_len) - max_name_len = n; - } - /* set the total insn count, in case client is being lazy */ - if (! PROFILE_TOTAL_INSN_COUNT (data)) - PROFILE_TOTAL_INSN_COUNT (data) = total; - - sim_io_printf (sd, " Total: %s insns\n", COMMAS (total)); - - if (verbose && max_val != 0) - { - /* Now we can print the histogram. */ - sim_io_printf (sd, "\n"); - for (i = 0; i < CPU_MAX_INSNS (cpu); ++i) - { - const char *name = (*CPU_INSN_NAME (cpu)) (cpu, i); - - if (name == NULL) - continue; - if (PROFILE_INSN_COUNT (data) [i] != 0) - { - sim_io_printf (sd, " %*s: %*s: ", - max_name_len, name, - max_val < 10000 ? 5 : 10, - COMMAS (PROFILE_INSN_COUNT (data) [i])); - sim_profile_print_bar (sd, PROFILE_HISTOGRAM_WIDTH, - PROFILE_INSN_COUNT (data) [i], - max_val); - sim_io_printf (sd, "\n"); - } - } - } - - sim_io_printf (sd, "\n"); -} - -#endif - -#if WITH_PROFILE_MEMORY_P - -static void -profile_print_memory (sim_cpu *cpu, int verbose) -{ - unsigned int i, n; - unsigned int total_read, total_write; - unsigned int max_val, max_name_len; - /* FIXME: Need to add smp support. */ - SIM_DESC sd = CPU_STATE (cpu); - PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); - char comma_buf[20]; - - sim_io_printf (sd, "Memory Access Statistics\n\n"); - - /* First pass over data computes various things. */ - max_val = total_read = total_write = max_name_len = 0; - for (i = 0; i < MODE_TARGET_MAX; ++i) - { - total_read += PROFILE_READ_COUNT (data) [i]; - total_write += PROFILE_WRITE_COUNT (data) [i]; - if (PROFILE_READ_COUNT (data) [i] > max_val) - max_val = PROFILE_READ_COUNT (data) [i]; - if (PROFILE_WRITE_COUNT (data) [i] > max_val) - max_val = PROFILE_WRITE_COUNT (data) [i]; - n = strlen (MODE_NAME (i)); - if (n > max_name_len) - max_name_len = n; - } - - /* One could use PROFILE_LABEL_WIDTH here. I chose not to. */ - sim_io_printf (sd, " Total read: %s accesses\n", - COMMAS (total_read)); - sim_io_printf (sd, " Total write: %s accesses\n", - COMMAS (total_write)); - - if (verbose && max_val != 0) - { - /* FIXME: Need to separate instruction fetches from data fetches - as the former swamps the latter. */ - /* Now we can print the histogram. */ - sim_io_printf (sd, "\n"); - for (i = 0; i < MODE_TARGET_MAX; ++i) - { - if (PROFILE_READ_COUNT (data) [i] != 0) - { - sim_io_printf (sd, " %*s read: %*s: ", - max_name_len, MODE_NAME (i), - max_val < 10000 ? 5 : 10, - COMMAS (PROFILE_READ_COUNT (data) [i])); - sim_profile_print_bar (sd, PROFILE_HISTOGRAM_WIDTH, - PROFILE_READ_COUNT (data) [i], - max_val); - sim_io_printf (sd, "\n"); - } - if (PROFILE_WRITE_COUNT (data) [i] != 0) - { - sim_io_printf (sd, " %*s write: %*s: ", - max_name_len, MODE_NAME (i), - max_val < 10000 ? 5 : 10, - COMMAS (PROFILE_WRITE_COUNT (data) [i])); - sim_profile_print_bar (sd, PROFILE_HISTOGRAM_WIDTH, - PROFILE_WRITE_COUNT (data) [i], - max_val); - sim_io_printf (sd, "\n"); - } - } - } - - sim_io_printf (sd, "\n"); -} - -#endif - -#if WITH_PROFILE_CORE_P - -static void -profile_print_core (sim_cpu *cpu, int verbose) -{ - unsigned int total; - unsigned int max_val; - /* FIXME: Need to add smp support. */ - SIM_DESC sd = CPU_STATE (cpu); - PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); - char comma_buf[20]; - - sim_io_printf (sd, "CORE Statistics\n\n"); - - /* First pass over data computes various things. */ - { - unsigned map; - total = 0; - max_val = 0; - for (map = 0; map < nr_maps; map++) - { - total += PROFILE_CORE_COUNT (data) [map]; - if (PROFILE_CORE_COUNT (data) [map] > max_val) - max_val = PROFILE_CORE_COUNT (data) [map]; - } - } - - /* One could use PROFILE_LABEL_WIDTH here. I chose not to. */ - sim_io_printf (sd, " Total: %s accesses\n", - COMMAS (total)); - - if (verbose && max_val != 0) - { - unsigned map; - /* Now we can print the histogram. */ - sim_io_printf (sd, "\n"); - for (map = 0; map < nr_maps; map++) - { - if (PROFILE_CORE_COUNT (data) [map] != 0) - { - sim_io_printf (sd, "%10s:", map_to_str (map)); - sim_io_printf (sd, "%*s: ", - max_val < 10000 ? 5 : 10, - COMMAS (PROFILE_CORE_COUNT (data) [map])); - sim_profile_print_bar (sd, PROFILE_HISTOGRAM_WIDTH, - PROFILE_CORE_COUNT (data) [map], - max_val); - sim_io_printf (sd, "\n"); - } - } - } - - sim_io_printf (sd, "\n"); -} - -#endif - -#if WITH_PROFILE_MODEL_P - -static void -profile_print_model (sim_cpu *cpu, int verbose) -{ - SIM_DESC sd = CPU_STATE (cpu); - PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); - unsigned long cti_stall_cycles = PROFILE_MODEL_CTI_STALL_CYCLES (data); - unsigned long load_stall_cycles = PROFILE_MODEL_LOAD_STALL_CYCLES (data); - unsigned long total_cycles = PROFILE_MODEL_TOTAL_CYCLES (data); - char comma_buf[20]; - - sim_io_printf (sd, "Model %s Timing Information", - MODEL_NAME (CPU_MODEL (cpu))); -#ifdef SIM_HAVE_ADDR_RANGE - if (PROFILE_RANGE (data)->ranges) - sim_io_printf (sd, " (for selected address range(s))"); -#endif - sim_io_printf (sd, "\n\n"); - sim_io_printf (sd, " %-*s %s\n", - PROFILE_LABEL_WIDTH, "Taken branches:", - COMMAS (PROFILE_MODEL_TAKEN_COUNT (data))); - sim_io_printf (sd, " %-*s %s\n", - PROFILE_LABEL_WIDTH, "Untaken branches:", - COMMAS (PROFILE_MODEL_UNTAKEN_COUNT (data))); - sim_io_printf (sd, " %-*s %s\n", - PROFILE_LABEL_WIDTH, "Cycles stalled due to branches:", - COMMAS (cti_stall_cycles)); - sim_io_printf (sd, " %-*s %s\n", - PROFILE_LABEL_WIDTH, "Cycles stalled due to loads:", - COMMAS (load_stall_cycles)); - sim_io_printf (sd, " %-*s %s\n", - PROFILE_LABEL_WIDTH, "Total cycles (*approximate*):", - COMMAS (total_cycles)); - sim_io_printf (sd, "\n"); -} - -#endif - -void -sim_profile_print_bar (SIM_DESC sd, unsigned int width, - unsigned int val, unsigned int max_val) -{ - unsigned int i, count; - - count = ((double) val / (double) max_val) * (double) width; - - for (i = 0; i < count; ++i) - sim_io_printf (sd, "*"); -} - -/* Print the simulator's execution speed for CPU. */ - -static void -profile_print_speed (sim_cpu *cpu) -{ - SIM_DESC sd = CPU_STATE (cpu); - PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); - unsigned long milliseconds = sim_events_elapsed_time (sd); - unsigned long total = PROFILE_TOTAL_INSN_COUNT (data); - double clock; - double secs; - char comma_buf[20]; - - sim_io_printf (sd, "Simulator Execution Speed\n\n"); - - if (total != 0) - sim_io_printf (sd, " Total instructions: %s\n", COMMAS (total)); - - if (milliseconds < 1000) - sim_io_printf (sd, " Total execution time: < 1 second\n\n"); - else - { - /* The printing of the time rounded to 2 decimal places makes the speed - calculation seem incorrect [even though it is correct]. So round - MILLISECONDS first. This can marginally affect the result, but it's - better that the user not perceive there's a math error. */ - secs = (double) milliseconds / 1000; - secs = ((double) (unsigned long) (secs * 100 + .5)) / 100; - sim_io_printf (sd, " Total execution time : %.2f seconds\n", secs); - /* Don't confuse things with data that isn't useful. - If we ran for less than 2 seconds, only use the data if we - executed more than 100,000 insns. */ - if (secs >= 2 || total >= 100000) - sim_io_printf (sd, " Simulator speed: %s insns/second\n", - COMMAS ((unsigned long) ((double) total / secs))); - } - - /* Print simulated execution time if the cpu frequency has been specified. */ - clock = PROFILE_CPU_FREQ (data); - if (clock != 0) - { - if (clock >= 1000000) - sim_io_printf (sd, " Simulated cpu frequency: %.2f MHz\n", - clock / 1000000); - else - sim_io_printf (sd, " Simulated cpu frequency: %.2f Hz\n", clock); - -#if WITH_PROFILE_MODEL_P - if (PROFILE_FLAGS (data) [PROFILE_MODEL_IDX]) - { - /* The printing of the time rounded to 2 decimal places makes the - speed calculation seem incorrect [even though it is correct]. - So round SECS first. This can marginally affect the result, - but it's better that the user not perceive there's a math - error. */ - secs = PROFILE_MODEL_TOTAL_CYCLES (data) / clock; - secs = ((double) (unsigned long) (secs * 100 + .5)) / 100; - sim_io_printf (sd, " Simulated execution time: %.2f seconds\n", - secs); - } -#endif /* WITH_PROFILE_MODEL_P */ - } -} - -/* Print selected address ranges. */ - -static void -profile_print_addr_ranges (sim_cpu *cpu) -{ - ADDR_SUBRANGE *asr = PROFILE_RANGE (CPU_PROFILE_DATA (cpu))->ranges; - SIM_DESC sd = CPU_STATE (cpu); - - if (asr) - { - sim_io_printf (sd, "Selected address ranges\n\n"); - while (asr != NULL) - { - sim_io_printf (sd, " 0x%lx - 0x%lx\n", - (long) asr->start, (long) asr->end); - asr = asr->next; - } - sim_io_printf (sd, "\n"); - } -} - -/* Top level function to print all summary profile information. - It is [currently] intended that all such data is printed by this function. - I'd rather keep it all in one place for now. To that end, MISC_CPU and - MISC are callbacks used to print any miscellaneous data. - - One might want to add a user option that allows printing by type or by cpu - (i.e. print all insn data for each cpu first, or print data cpu by cpu). - This may be a case of featuritis so it's currently left out. - - Note that results are indented two spaces to distinguish them from - section titles. */ - -static void -profile_info (SIM_DESC sd, int verbose) -{ - int i,c; - int print_title_p = 0; - - /* Only print the title if some data has been collected. */ - /* ??? Why don't we just exit if no data collected? */ - /* FIXME: If the number of processors can be selected on the command line, - then MAX_NR_PROCESSORS will need to take an argument of `sd'. */ - - for (c = 0; c < MAX_NR_PROCESSORS; ++c) - { - sim_cpu *cpu = STATE_CPU (sd, c); - PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); - - for (i = 0; i < MAX_PROFILE_VALUES; ++i) - if (PROFILE_FLAGS (data) [i]) - print_title_p = 1; - /* One could break out early if print_title_p is set. */ - } - if (print_title_p) - sim_io_printf (sd, "Summary profiling results:\n\n"); - - /* Loop, cpu by cpu, printing results. */ - - for (c = 0; c < MAX_NR_PROCESSORS; ++c) - { - sim_cpu *cpu = STATE_CPU (sd, c); - PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); - - if (MAX_NR_PROCESSORS > 1 - && (0 -#if WITH_PROFILE_INSN_P - || PROFILE_FLAGS (data) [PROFILE_INSN_IDX] -#endif -#if WITH_PROFILE_MEMORY_P - || PROFILE_FLAGS (data) [PROFILE_MEMORY_IDX] -#endif -#if WITH_PROFILE_CORE_P - || PROFILE_FLAGS (data) [PROFILE_CORE_IDX] -#endif -#if WITH_PROFILE_MODEL_P - || PROFILE_FLAGS (data) [PROFILE_MODEL_IDX] -#endif -#if WITH_PROFILE_SCACHE_P && WITH_SCACHE - || PROFILE_FLAGS (data) [PROFILE_SCACHE_IDX] -#endif -#if WITH_PROFILE_PC_P - || PROFILE_FLAGS (data) [PROFILE_PC_IDX] -#endif - )) - { - sim_io_printf (sd, "CPU %d\n\n", c); - } - -#ifdef SIM_HAVE_ADDR_RANGE - if (print_title_p - && (PROFILE_INSN_P (cpu) - || PROFILE_MODEL_P (cpu))) - profile_print_addr_ranges (cpu); -#endif - -#if WITH_PROFILE_INSN_P - if (PROFILE_FLAGS (data) [PROFILE_INSN_IDX]) - profile_print_insn (cpu, verbose); -#endif - -#if WITH_PROFILE_MEMORY_P - if (PROFILE_FLAGS (data) [PROFILE_MEMORY_IDX]) - profile_print_memory (cpu, verbose); -#endif - -#if WITH_PROFILE_CORE_P - if (PROFILE_FLAGS (data) [PROFILE_CORE_IDX]) - profile_print_core (cpu, verbose); -#endif - -#if WITH_PROFILE_MODEL_P - if (PROFILE_FLAGS (data) [PROFILE_MODEL_IDX]) - profile_print_model (cpu, verbose); -#endif - -#if WITH_PROFILE_SCACHE_P && WITH_SCACHE - if (PROFILE_FLAGS (data) [PROFILE_SCACHE_IDX]) - scache_print_profile (cpu, verbose); -#endif - -#if WITH_PROFILE_PC_P - if (PROFILE_FLAGS (data) [PROFILE_PC_IDX]) - profile_print_pc (cpu, verbose); -#endif - - /* Print cpu-specific data before the execution speed. */ - if (PROFILE_INFO_CPU_CALLBACK (data) != NULL) - PROFILE_INFO_CPU_CALLBACK (data) (cpu, verbose); - - /* Always try to print execution time and speed. */ - if (verbose - || PROFILE_FLAGS (data) [PROFILE_INSN_IDX]) - profile_print_speed (cpu); - } - - /* Finally print non-cpu specific miscellaneous data. */ - if (STATE_PROFILE_INFO_CALLBACK (sd)) - STATE_PROFILE_INFO_CALLBACK (sd) (sd, verbose); - -} - -/* Install profiling support in the simulator. */ - -SIM_RC -profile_install (SIM_DESC sd) -{ - int i; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - sim_add_option_table (sd, NULL, profile_options); - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - memset (CPU_PROFILE_DATA (STATE_CPU (sd, i)), 0, - sizeof (* CPU_PROFILE_DATA (STATE_CPU (sd, i)))); -#if WITH_PROFILE_INSN_P - sim_module_add_init_fn (sd, profile_insn_init); -#endif -#if WITH_PROFILE_PC_P - sim_module_add_uninstall_fn (sd, profile_pc_uninstall); - sim_module_add_init_fn (sd, profile_pc_init); -#endif - sim_module_add_init_fn (sd, profile_init); - sim_module_add_uninstall_fn (sd, profile_uninstall); - sim_module_add_info_fn (sd, profile_info); - return SIM_RC_OK; -} - -static SIM_RC -profile_init (SIM_DESC sd) -{ -#ifdef SIM_HAVE_ADDR_RANGE - /* Check if a range has been specified without specifying what to - collect. */ - { - int i; - - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - { - sim_cpu *cpu = STATE_CPU (sd, i); - - if (ADDR_RANGE_RANGES (PROFILE_RANGE (CPU_PROFILE_DATA (cpu))) - && ! (PROFILE_INSN_P (cpu) - || PROFILE_MODEL_P (cpu))) - { - sim_io_eprintf_cpu (cpu, "Profiling address range specified without --profile-insn or --profile-model.\n"); - sim_io_eprintf_cpu (cpu, "Address range ignored.\n"); - sim_addr_range_delete (PROFILE_RANGE (CPU_PROFILE_DATA (cpu)), - 0, ~ (address_word) 0); - } - } - } -#endif - - return SIM_RC_OK; -} - -static void -profile_uninstall (SIM_DESC sd) -{ - int i,j; - - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - { - sim_cpu *cpu = STATE_CPU (sd, i); - PROFILE_DATA *data = CPU_PROFILE_DATA (cpu); - - if (PROFILE_FILE (data) != NULL) - { - /* If output from different cpus is going to the same file, - avoid closing the file twice. */ - for (j = 0; j < i; ++j) - if (PROFILE_FILE (CPU_PROFILE_DATA (STATE_CPU (sd, j))) - == PROFILE_FILE (data)) - break; - if (i == j) - fclose (PROFILE_FILE (data)); - } - - if (PROFILE_INSN_COUNT (data) != NULL) - zfree (PROFILE_INSN_COUNT (data)); - } -} diff --git a/sim/common/sim-profile.h b/sim/common/sim-profile.h deleted file mode 100644 index 5936a59..0000000 --- a/sim/common/sim-profile.h +++ /dev/null @@ -1,297 +0,0 @@ -/* Profile header for simulators using common framework. - Copyright (C) 1996, 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. */ - -#ifndef SIM_PROFILE_H -#define SIM_PROFILE_H - -#ifndef WITH_PROFILE -Error, WITH_PROFILE not defined. -#endif - -/* Standard profilable entities. */ - -enum { - /* Profile insn usage. */ - PROFILE_INSN_IDX = 1, - - /* Profile memory usage. */ - PROFILE_MEMORY_IDX, - - /* Profile the cpu model (cycles, etc.). */ - PROFILE_MODEL_IDX, - - /* Profile the simulator's execution cache. */ - PROFILE_SCACHE_IDX, - - /* Profile the PC. */ - PROFILE_PC_IDX, - - /* Profile sim-core.c stuff. */ - /* ??? The difference between this and PROFILE_MEMORY_IDX is ... ? */ - PROFILE_CORE_IDX, - - /* Simulator specific profile bits begin here. */ - PROFILE_NEXT_IDX -}; - -/* Maximum number of profilable entities. */ -#ifndef MAX_PROFILE_VALUES -#define MAX_PROFILE_VALUES 32 -#endif - -/* The -p option only prints useful values. It's easy to type and shouldn't - splat on the screen everything under the sun making nothing easy to - find. */ -#define PROFILE_USEFUL_MASK \ -((1 << PROFILE_INSN_IDX) \ - | (1 << PROFILE_MEMORY_IDX) \ - | (1 << PROFILE_MODEL_IDX) \ - | (1 << PROFILE_CORE_IDX)) - -/* Utility to set profile options. */ -SIM_RC set_profile_option_mask (SIM_DESC sd_, const char *name_, int mask_, - const char *arg_); - -/* Utility to parse a --profile-<foo> option. */ -/* ??? On the one hand all calls could be confined to sim-profile.c, but - on the other hand keeping a module's profiling option with the module's - source is cleaner. */ - -SIM_RC sim_profile_set_option (SIM_DESC sd_, const char *name_, int idx_, - const char *arg_); - -/* Masks so WITH_PROFILE can have symbolic values. - The case choice here is on purpose. The lowercase parts are args to - --with-profile. */ -#define PROFILE_insn (1 << PROFILE_INSN_IDX) -#define PROFILE_memory (1 << PROFILE_MEMORY_IDX) -#define PROFILE_model (1 << PROFILE_MODEL_IDX) -#define PROFILE_scache (1 << PROFILE_SCACHE_IDX) -#define PROFILE_pc (1 << PROFILE_PC_IDX) -#define PROFILE_core (1 << PROFILE_CORE_IDX) - -/* Preprocessor macros to simplify tests of WITH_PROFILE. */ -#define WITH_PROFILE_INSN_P (WITH_PROFILE & PROFILE_insn) -#define WITH_PROFILE_MEMORY_P (WITH_PROFILE & PROFILE_memory) -#define WITH_PROFILE_MODEL_P (WITH_PROFILE & PROFILE_model) -#define WITH_PROFILE_SCACHE_P (WITH_PROFILE & PROFILE_scache) -#define WITH_PROFILE_PC_P (WITH_PROFILE & PROFILE_pc) -#define WITH_PROFILE_CORE_P (WITH_PROFILE & PROFILE_core) - -/* If MAX_TARGET_MODES isn't defined, we can't do memory profiling. - ??? It is intended that this is a temporary occurrence. Normally - MAX_TARGET_MODES is defined. */ -#ifndef MAX_TARGET_MODES -#undef WITH_PROFILE_MEMORY_P -#define WITH_PROFILE_MEMORY_P 0 -#endif - -/* Only build MODEL code when the target simulator has support for it */ -#ifndef SIM_HAVE_MODEL -#undef WITH_PROFILE_MODEL_P -#define WITH_PROFILE_MODEL_P 0 -#endif - -/* Profiling install handler. */ -MODULE_INSTALL_FN profile_install; - -/* Output format macros. */ -#ifndef PROFILE_HISTOGRAM_WIDTH -#define PROFILE_HISTOGRAM_WIDTH 40 -#endif -#ifndef PROFILE_LABEL_WIDTH -#define PROFILE_LABEL_WIDTH 32 -#endif - -/* Callbacks for internal profile_info. - The callbacks may be NULL meaning there isn't one. - Note that results are indented two spaces to distinguish them from - section titles. - If non-NULL, PROFILE_CALLBACK is called to print extra non-cpu related data. - If non-NULL, PROFILE_CPU_CALLBACK is called to print extra cpu related data. - */ - -typedef void (PROFILE_INFO_CALLBACK_FN) (SIM_DESC, int); -struct _sim_cpu; /* forward reference */ -typedef void (PROFILE_INFO_CPU_CALLBACK_FN) (struct _sim_cpu *cpu, int verbose); - - -/* Struct containing most profiling data. - It doesn't contain all profiling data because for example scache data - is kept with the rest of scache support. */ - -typedef struct { - /* Global summary of all the current profiling options. */ - char profile_any_p; - - /* Boolean array of specified profiling flags. */ - char profile_flags[MAX_PROFILE_VALUES]; -#define PROFILE_FLAGS(p) ((p)->profile_flags) - - /* The total insn count is tracked separately. - It is always computed, regardless of insn profiling. */ - unsigned long total_insn_count; -#define PROFILE_TOTAL_INSN_COUNT(p) ((p)->total_insn_count) - - /* CPU frequency. Always accepted, regardless of profiling options. */ - unsigned long cpu_freq; -#define PROFILE_CPU_FREQ(p) ((p)->cpu_freq) - -#if WITH_PROFILE_INSN_P - unsigned int *insn_count; -#define PROFILE_INSN_COUNT(p) ((p)->insn_count) -#endif - -#if WITH_PROFILE_MEMORY_P - unsigned int read_count[MAX_TARGET_MODES]; -#define PROFILE_READ_COUNT(p) ((p)->read_count) - unsigned int write_count[MAX_TARGET_MODES]; -#define PROFILE_WRITE_COUNT(p) ((p)->write_count) -#endif - -#if WITH_PROFILE_CORE_P - /* Count read/write/exec accesses separatly. */ - unsigned int core_count[nr_maps]; -#define PROFILE_CORE_COUNT(p) ((p)->core_count) -#endif - -#if WITH_PROFILE_MODEL_P - /* ??? Quick hack until more elaborate scheme is finished. */ - /* Total cycle count, including stalls. */ - unsigned long total_cycles; -#define PROFILE_MODEL_TOTAL_CYCLES(p) ((p)->total_cycles) - /* Stalls due to branches. */ - unsigned long cti_stall_cycles; -#define PROFILE_MODEL_CTI_STALL_CYCLES(p) ((p)->cti_stall_cycles) - unsigned long load_stall_cycles; -#define PROFILE_MODEL_LOAD_STALL_CYCLES(p) ((p)->load_stall_cycles) - /* Number of cycles the current instruction took. */ - unsigned long cur_insn_cycles; -#define PROFILE_MODEL_CUR_INSN_CYCLES(p) ((p)->cur_insn_cycles) - - /* Taken and not-taken branches (and other cti's). */ - unsigned long taken_count, untaken_count; -#define PROFILE_MODEL_TAKEN_COUNT(p) ((p)->taken_count) -#define PROFILE_MODEL_UNTAKEN_COUNT(p) ((p)->untaken_count) -#endif - -#if WITH_PROFILE_PC_P - /* PC profiling attempts to determine function usage by sampling the PC - every so many instructions. */ - unsigned int profile_pc_freq; -#define PROFILE_PC_FREQ(p) ((p)->profile_pc_freq) - unsigned int profile_pc_nr_buckets; -#define PROFILE_PC_NR_BUCKETS(p) ((p)->profile_pc_nr_buckets) - address_word profile_pc_start; -#define PROFILE_PC_START(p) ((p)->profile_pc_start) - address_word profile_pc_end; -#define PROFILE_PC_END(p) ((p)->profile_pc_end) - unsigned profile_pc_shift; -#define PROFILE_PC_SHIFT(p) ((p)->profile_pc_shift) -#define PROFILE_PC_BUCKET_SIZE(p) (PROFILE_PC_SHIFT (p) ? (1 << PROFILE_PC_SHIFT (p)) : 0) - unsigned *profile_pc_count; -#define PROFILE_PC_COUNT(p) ((p)->profile_pc_count) - sim_event *profile_pc_event; -#define PROFILE_PC_EVENT(p) ((p)->profile_pc_event) -#endif - - /* Profile output goes to this or stderr if NULL. - We can't store `stderr' here as stderr goes through a callback. */ - FILE *profile_file; -#define PROFILE_FILE(p) ((p)->profile_file) - - /* When reporting a profile summary, hook to include per-processor - target specific profile information */ - PROFILE_INFO_CPU_CALLBACK_FN *info_cpu_callback; -#define PROFILE_INFO_CPU_CALLBACK(p) ((p)->info_cpu_callback) - - /* When reporting a profile summary, hook to include common target - specific profile information */ - PROFILE_INFO_CALLBACK_FN *info_callback; -#define STATE_PROFILE_INFO_CALLBACK(sd) \ -(CPU_PROFILE_DATA (STATE_CPU (sd, 0))->info_callback) - - /* Profile range. - ??? Not all cpu's support this. */ - ADDR_RANGE range; -#define PROFILE_RANGE(p) (& (p)->range) -} PROFILE_DATA; - -/* Predicates. */ - -#define CPU_PROFILE_FLAGS(cpu) PROFILE_FLAGS (CPU_PROFILE_DATA (cpu)) - -/* Return non-zero if tracing of IDX is enabled for CPU. */ -#define PROFILE_P(cpu,idx) \ -((WITH_PROFILE & (1 << (idx))) != 0 \ - && CPU_PROFILE_FLAGS (cpu)[idx] != 0) - -/* Non-zero if --profile-<xxxx> was specified for CPU. */ -#define PROFILE_ANY_P(cpu) ((WITH_PROFILE) && (CPU_PROFILE_DATA (cpu)->profile_any_p)) -#define PROFILE_INSN_P(cpu) PROFILE_P (cpu, PROFILE_INSN_IDX) -#define PROFILE_MEMORY_P(cpu) PROFILE_P (cpu, PROFILE_MEMORY_IDX) -#define PROFILE_MODEL_P(cpu) PROFILE_P (cpu, PROFILE_MODEL_IDX) -#define PROFILE_SCACHE_P(cpu) PROFILE_P (cpu, PROFILE_SCACHE_IDX) -#define PROFILE_PC_P(cpu) PROFILE_P (cpu, PROFILE_PC_IDX) -#define PROFILE_CORE_P(cpu) PROFILE_P (cpu, PROFILE_CORE_IDX) - -/* Usage macros. */ - -#if WITH_PROFILE_INSN_P -#define PROFILE_COUNT_INSN(cpu, pc, insn_num) \ -do { \ - if (PROFILE_INSN_P (cpu)) \ - ++ PROFILE_INSN_COUNT (CPU_PROFILE_DATA (cpu)) [insn_num]; \ -} while (0) -#else -#define PROFILE_COUNT_INSN(cpu, pc, insn_num) -#endif /* ! insn */ - -#if WITH_PROFILE_MEMORY_P -#define PROFILE_COUNT_READ(cpu, addr, mode_num) \ -do { \ - if (PROFILE_MEMORY_P (cpu)) \ - ++ PROFILE_READ_COUNT (CPU_PROFILE_DATA (cpu)) [mode_num]; \ -} while (0) -#define PROFILE_COUNT_WRITE(cpu, addr, mode_num) \ -do { \ - if (PROFILE_MEMORY_P (cpu)) \ - ++ PROFILE_WRITE_COUNT (CPU_PROFILE_DATA (cpu)) [mode_num]; \ -} while (0) -#else -#define PROFILE_COUNT_READ(cpu, addr, mode_num) -#define PROFILE_COUNT_WRITE(cpu, addr, mode_num) -#endif /* ! memory */ - -#if WITH_PROFILE_CORE_P -#define PROFILE_COUNT_CORE(cpu, addr, size, map) \ -do { \ - if (PROFILE_CORE_P (cpu)) \ - PROFILE_CORE_COUNT (CPU_PROFILE_DATA (cpu)) [map] += 1; \ -} while (0) -#else -#define PROFILE_COUNT_CORE(cpu, addr, size, map) -#endif /* ! core */ - -/* Misc. utilities. */ - -extern void sim_profile_print_bar (SIM_DESC, unsigned int, unsigned int, unsigned int); - -#endif /* SIM_PROFILE_H */ diff --git a/sim/common/sim-reason.c b/sim/common/sim-reason.c deleted file mode 100644 index 383df02..0000000 --- a/sim/common/sim-reason.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Generic simulator stop_reason. - 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. */ - -#include "sim-main.h" -#include "sim-assert.h" - -/* Generic implementation of sim_stop_reason */ - -void -sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc) -{ - sim_engine *engine = NULL; - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - engine = STATE_ENGINE (sd); - *reason = engine->reason; - switch (*reason) - { - case sim_exited : - *sigrc = engine->sigrc; - break; - case sim_stopped : - case sim_signalled : - *sigrc = sim_signal_to_target (sd, engine->sigrc); - break; - default : - abort (); - } -} diff --git a/sim/common/sim-reg.c b/sim/common/sim-reg.c deleted file mode 100644 index 75cfb0a..0000000 --- a/sim/common/sim-reg.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Generic register read/write. - Copyright (C) 1998 Free Software Foundation, Inc. - Contributed by Cygnus Solutions. - -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" -#include "sim-assert.h" - -/* Generic implementation of sim_fetch_register for simulators using - CPU_REG_FETCH. - The contents of BUF are in target byte order. */ -/* ??? Obviously the interface needs to be extended to handle multiple - cpus. */ - -int -sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length) -{ - SIM_CPU *cpu = STATE_CPU (sd, 0); - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - return (* CPU_REG_FETCH (cpu)) (cpu, rn, buf, length); -} - -/* Generic implementation of sim_store_register for simulators using - CPU_REG_STORE. - The contents of BUF are in target byte order. */ -/* ??? Obviously the interface needs to be extended to handle multiple - cpus. */ - -int -sim_store_register (SIM_DESC sd, int rn, unsigned char *buf, int length) -{ - SIM_CPU *cpu = STATE_CPU (sd, 0); - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - return (* CPU_REG_STORE (cpu)) (cpu, rn, buf, length); -} diff --git a/sim/common/sim-resume.c b/sim/common/sim-resume.c deleted file mode 100644 index d7d61e7..0000000 --- a/sim/common/sim-resume.c +++ /dev/null @@ -1,95 +0,0 @@ -/* Generic simulator resume. - 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. */ - -#include "sim-main.h" -#include "sim-assert.h" - -/* Halt the simulator after just one instruction */ - -static void -has_stepped (SIM_DESC sd, - void *data) -{ - ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - sim_engine_halt (sd, NULL, NULL, NULL_CIA, sim_stopped, SIM_SIGTRAP); -} - - -/* Generic resume - assumes the existance of sim_engine_run */ - -void -sim_resume (SIM_DESC sd, - int step, - int siggnal) -{ - sim_engine *engine = STATE_ENGINE (sd); - jmp_buf buf; - int jmpval; - - ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - - /* we only want to be single stepping the simulator once */ - if (engine->stepper != NULL) - { - sim_events_deschedule (sd, engine->stepper); - engine->stepper = NULL; - } - if (step) - engine->stepper = sim_events_schedule (sd, 1, has_stepped, sd); - - sim_module_resume (sd); - - /* run/resume the simulator */ - engine->jmpbuf = &buf; - jmpval = setjmp (buf); - if (jmpval == sim_engine_start_jmpval - || jmpval == sim_engine_restart_jmpval) - { - 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. 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, sig_to_deliver); - } -#endif - - sim_engine_run (sd, next_cpu_nr, nr_cpus, sig_to_deliver); - } - engine->jmpbuf = NULL; - - sim_module_suspend (sd); -} diff --git a/sim/common/sim-run.c b/sim/common/sim-run.c deleted file mode 100644 index 55f7290..0000000 --- a/sim/common/sim-run.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Generic simulator run. - 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. */ - -#include "sim-main.h" -#include "sim-assert.h" - -/* Generic implementation of sim_engine_run that works within the - sim_engine setjmp/longjmp framework. */ - -#define IMEM XCONCAT - -void -sim_engine_run (SIM_DESC sd, - int next_cpu_nr, /* ignore */ - int nr_cpus, /* ignore */ - int siggnal) /* ignore */ -{ - sim_cia cia; - sim_cpu *cpu; - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - cpu = STATE_CPU (sd, 0); - cia = CIA_GET (cpu); - while (1) - { - instruction_word insn = IMEM32 (cia); - cia = idecode_issue (sd, insn, cia); - /* process any events */ - if (sim_events_tick (sd)) - { - CIA_SET (cpu, cia); - sim_events_process (sd); - } - } -} diff --git a/sim/common/sim-signal.c b/sim/common/sim-signal.c deleted file mode 100644 index 481299c..0000000 --- a/sim/common/sim-signal.c +++ /dev/null @@ -1,135 +0,0 @@ -/* Simulator signal support - Copyright (C) 1997 Free Software Foundation, Inc. - Contributed by Cygnus Support - -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 <signal.h> -#include "sim-main.h" - -/* Convert SIM_SIGFOO to SIGFOO. - What to do when the host doesn't have SIGFOO is handled on a case by case - basis. Generally, in the case of passing a value back to gdb, we want gdb - to not think the process has died (so it can be debugged at the point of - failure). */ - -#ifdef _MSC_VER -#ifndef SIGTRAP -#define SIGTRAP 5 -#endif -#ifndef SIGBUS -#define SIGBUS 10 -#endif -#ifndef SIGQUIT -#define SIGQUIT 3 -#endif -#endif - -int -sim_signal_to_host (SIM_DESC sd, SIM_SIGNAL sig) -{ - switch (sig) - { - case SIM_SIGINT : - return SIGINT; - - case SIM_SIGABRT : - return SIGABRT; - - case SIM_SIGILL : -#ifdef SIGILL - return SIGILL; -#else - return SIGSEGV; -#endif - - case SIM_SIGTRAP : - return SIGTRAP; - - case SIM_SIGBUS : -#ifdef SIGBUS - return SIGBUS; -#else - return SIGSEGV; -#endif - - case SIM_SIGSEGV : - return SIGSEGV; - - case SIM_SIGXCPU : -#ifdef SIGXCPU - return SIGXCPU; -#endif - break; - - case SIM_SIGFPE: -#ifdef SIGFPE - return SIGFPE; -#endif - break; - - case SIM_SIGNONE: - return 0; - break; - } - - sim_io_eprintf (sd, "sim_signal_to_host: unknown signal: %d\n", sig); -#ifdef SIGHUP - return SIGHUP; /* FIXME: Suggestions? */ -#else - return 1; -#endif -} - -enum target_signal -sim_signal_to_target (SIM_DESC sd, SIM_SIGNAL sig) -{ - switch (sig) - { - case SIM_SIGINT : - return TARGET_SIGNAL_INT; - - case SIM_SIGABRT : - return TARGET_SIGNAL_ABRT; - - case SIM_SIGILL : - return TARGET_SIGNAL_ILL; - - case SIM_SIGTRAP : - return TARGET_SIGNAL_TRAP; - - case SIM_SIGBUS : - return TARGET_SIGNAL_BUS; - - case SIM_SIGSEGV : - return TARGET_SIGNAL_SEGV; - - case SIM_SIGXCPU : - return TARGET_SIGNAL_XCPU; - - case SIM_SIGFPE: - return TARGET_SIGNAL_FPE; - break; - - case SIM_SIGNONE: - return TARGET_SIGNAL_0; - break; - } - - sim_io_eprintf (sd, "sim_signal_to_host: unknown signal: %d\n", sig); - return TARGET_SIGNAL_HUP; -} diff --git a/sim/common/sim-signal.h b/sim/common/sim-signal.h deleted file mode 100644 index 8dd0d8f..0000000 --- a/sim/common/sim-signal.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Simulator signal support - Copyright (C) 1997 Free Software Foundation, Inc. - Contributed by Cygnus Support - -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 SIM_SIGNAL_H -#define SIM_SIGNAL_H - -#include "gdb/signals.h" - -/* Signals we use. - This provides a layer between our values and host/target values. */ - -typedef enum { - SIM_SIGNONE = 64, - /* illegal insn */ - SIM_SIGILL, - /* breakpoint */ - SIM_SIGTRAP, - /* misaligned memory access */ - SIM_SIGBUS, - /* tried to read/write memory that's not readable/writable */ - SIM_SIGSEGV, - /* cpu limit exceeded */ - SIM_SIGXCPU, - /* simulation interrupted (sim_stop called) */ - SIM_SIGINT, - /* Floating point or integer divide */ - SIM_SIGFPE, - /* simulation aborted */ - SIM_SIGABRT -} SIM_SIGNAL; - -int sim_signal_to_host (SIM_DESC sd, SIM_SIGNAL); -enum target_signal sim_signal_to_target (SIM_DESC sd, SIM_SIGNAL); - -#endif /* SIM_SIGNAL_H */ diff --git a/sim/common/sim-stop.c b/sim/common/sim-stop.c deleted file mode 100644 index cde9315..0000000 --- a/sim/common/sim-stop.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Generic simulator stop. - 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. */ - -#include "sim-main.h" -#include "sim-assert.h" - -/* Generic implementation of sim_stop. */ - -static void -control_c_simulation (SIM_DESC sd, - void *data) -{ - ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - sim_engine_halt (sd, NULL, NULL, NULL_CIA, sim_stopped, SIM_SIGINT); -} - -int -sim_stop (SIM_DESC sd) -{ - ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - sim_events_schedule_after_signal(sd, - 0 /*NOW*/, - control_c_simulation, - sd /*data*/); - return 1; -} diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c deleted file mode 100644 index ccae100..0000000 --- a/sim/common/sim-trace.c +++ /dev/null @@ -1,1354 +0,0 @@ -/* Simulator tracing/debugging support. - Copyright (C) 1997, 1998, 2001 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" -#include "sim-io.h" -#include "sim-options.h" -#include "sim-fpu.h" - -#include "bfd.h" -#include "libiberty.h" - -#include "sim-assert.h" - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif - -#ifndef SIZE_PHASE -#define SIZE_PHASE 8 -#endif - -#ifndef SIZE_LOCATION -#define SIZE_LOCATION 20 -#endif - -#ifndef SIZE_PC -#define SIZE_PC 6 -#endif - -#ifndef SIZE_LINE_NUMBER -#define SIZE_LINE_NUMBER 4 -#endif - -static MODULE_INIT_FN trace_init; -static MODULE_UNINSTALL_FN trace_uninstall; - -static DECLARE_OPTION_HANDLER (trace_option_handler); - -enum { - OPTION_TRACE_INSN = OPTION_START, - OPTION_TRACE_DECODE, - OPTION_TRACE_EXTRACT, - OPTION_TRACE_LINENUM, - OPTION_TRACE_MEMORY, - OPTION_TRACE_MODEL, - OPTION_TRACE_ALU, - OPTION_TRACE_CORE, - OPTION_TRACE_EVENTS, - OPTION_TRACE_FPU, - OPTION_TRACE_BRANCH, - OPTION_TRACE_SEMANTICS, - OPTION_TRACE_RANGE, - OPTION_TRACE_FUNCTION, - OPTION_TRACE_DEBUG, - OPTION_TRACE_FILE, - OPTION_TRACE_VPU -}; - -static const OPTION trace_options[] = -{ - /* This table is organized to group related instructions together. */ - { {"trace", optional_argument, NULL, 't'}, - 't', "on|off", "Trace useful things", - trace_option_handler }, - { {"trace-insn", optional_argument, NULL, OPTION_TRACE_INSN}, - '\0', "on|off", "Perform instruction tracing", - trace_option_handler }, - { {"trace-decode", optional_argument, NULL, OPTION_TRACE_DECODE}, - '\0', "on|off", "Trace instruction decoding", - trace_option_handler }, - { {"trace-extract", optional_argument, NULL, OPTION_TRACE_EXTRACT}, - '\0', "on|off", "Trace instruction extraction", - trace_option_handler }, - { {"trace-linenum", optional_argument, NULL, OPTION_TRACE_LINENUM}, - '\0', "on|off", "Perform line number tracing (implies --trace-insn)", - trace_option_handler }, - { {"trace-memory", optional_argument, NULL, OPTION_TRACE_MEMORY}, - '\0', "on|off", "Trace memory operations", - trace_option_handler }, - { {"trace-alu", optional_argument, NULL, OPTION_TRACE_ALU}, - '\0', "on|off", "Trace ALU operations", - trace_option_handler }, - { {"trace-fpu", optional_argument, NULL, OPTION_TRACE_FPU}, - '\0', "on|off", "Trace FPU operations", - trace_option_handler }, - { {"trace-vpu", optional_argument, NULL, OPTION_TRACE_VPU}, - '\0', "on|off", "Trace VPU operations", - trace_option_handler }, - { {"trace-branch", optional_argument, NULL, OPTION_TRACE_BRANCH}, - '\0', "on|off", "Trace branching", - trace_option_handler }, - { {"trace-semantics", optional_argument, NULL, OPTION_TRACE_SEMANTICS}, - '\0', "on|off", "Perform ALU, FPU, MEMORY, and BRANCH tracing", - trace_option_handler }, - { {"trace-model", optional_argument, NULL, OPTION_TRACE_MODEL}, - '\0', "on|off", "Include model performance data", - trace_option_handler }, - { {"trace-core", optional_argument, NULL, OPTION_TRACE_CORE}, - '\0', "on|off", "Trace core operations", - trace_option_handler }, - { {"trace-events", optional_argument, NULL, OPTION_TRACE_EVENTS}, - '\0', "on|off", "Trace events", - trace_option_handler }, -#ifdef SIM_HAVE_ADDR_RANGE - { {"trace-range", required_argument, NULL, OPTION_TRACE_RANGE}, - '\0', "START,END", "Specify range of addresses for instruction tracing", - trace_option_handler }, -#if 0 /*wip*/ - { {"trace-function", required_argument, NULL, OPTION_TRACE_FUNCTION}, - '\0', "FUNCTION", "Specify function to trace", - trace_option_handler }, -#endif -#endif - { {"trace-debug", optional_argument, NULL, OPTION_TRACE_DEBUG}, - '\0', "on|off", "Add information useful for debugging the simulator to the tracing output", - trace_option_handler }, - { {"trace-file", required_argument, NULL, OPTION_TRACE_FILE}, - '\0', "FILE NAME", "Specify tracing output file", - trace_option_handler }, - { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } -}; - -/* Set/reset the trace options indicated in MASK. */ - -static SIM_RC -set_trace_option_mask (sd, name, mask, arg) - SIM_DESC sd; - const char *name; - int mask; - const char *arg; -{ - int trace_nr; - int cpu_nr; - int trace_val = 1; - - if (arg != NULL) - { - if (strcmp (arg, "yes") == 0 - || strcmp (arg, "on") == 0 - || strcmp (arg, "1") == 0) - trace_val = 1; - else if (strcmp (arg, "no") == 0 - || strcmp (arg, "off") == 0 - || strcmp (arg, "0") == 0) - trace_val = 0; - else - { - sim_io_eprintf (sd, "Argument `%s' for `--trace%s' invalid, one of `on', `off', `yes', `no' expected\n", arg, name); - return SIM_RC_FAIL; - } - } - - /* update applicable trace bits */ - for (trace_nr = 0; trace_nr < MAX_TRACE_VALUES; ++trace_nr) - { - if ((mask & (1 << trace_nr)) == 0) - continue; - - /* Set non-cpu specific values. */ - switch (trace_nr) - { - case TRACE_EVENTS_IDX: - STATE_EVENTS (sd)->trace = trace_val; - break; - case TRACE_DEBUG_IDX: - STATE_TRACE_FLAGS (sd)[trace_nr] = trace_val; - break; - } - - /* Set cpu values. */ - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; cpu_nr++) - { - CPU_TRACE_FLAGS (STATE_CPU (sd, cpu_nr))[trace_nr] = trace_val; - } - } - - /* Re-compute the cpu trace summary. */ - if (trace_val) - { - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; cpu_nr++) - CPU_TRACE_DATA (STATE_CPU (sd, cpu_nr))->trace_any_p = 1; - } - else - { - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; cpu_nr++) - { - CPU_TRACE_DATA (STATE_CPU (sd, cpu_nr))->trace_any_p = 0; - for (trace_nr = 0; trace_nr < MAX_TRACE_VALUES; ++trace_nr) - { - if (CPU_TRACE_FLAGS (STATE_CPU (sd, cpu_nr))[trace_nr]) - { - CPU_TRACE_DATA (STATE_CPU (sd, cpu_nr))->trace_any_p = 1; - break; - } - } - } - } - - return SIM_RC_OK; -} - -/* Set one trace option based on its IDX value. */ - -static SIM_RC -set_trace_option (sd, name, idx, arg) - SIM_DESC sd; - const char *name; - int idx; - const char *arg; -{ - return set_trace_option_mask (sd, name, 1 << idx, arg); -} - - -static SIM_RC -trace_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, - char *arg, int is_command) -{ - int n; - int cpu_nr; - - switch (opt) - { - case 't' : - if (! WITH_TRACE) - sim_io_eprintf (sd, "Tracing not compiled in, `-t' ignored\n"); - else - return set_trace_option_mask (sd, "trace", TRACE_USEFUL_MASK, arg); - break; - - case OPTION_TRACE_INSN : - if (WITH_TRACE_INSN_P) - return set_trace_option (sd, "-insn", TRACE_INSN_IDX, arg); - else - sim_io_eprintf (sd, "Instruction tracing not compiled in, `--trace-insn' ignored\n"); - break; - - case OPTION_TRACE_DECODE : - if (WITH_TRACE_DECODE_P) - return set_trace_option (sd, "-decode", TRACE_DECODE_IDX, arg); - else - sim_io_eprintf (sd, "Decode tracing not compiled in, `--trace-decode' ignored\n"); - break; - - case OPTION_TRACE_EXTRACT : - if (WITH_TRACE_EXTRACT_P) - return set_trace_option (sd, "-extract", TRACE_EXTRACT_IDX, arg); - else - sim_io_eprintf (sd, "Extract tracing not compiled in, `--trace-extract' ignored\n"); - break; - - case OPTION_TRACE_LINENUM : - if (WITH_TRACE_LINENUM_P && WITH_TRACE_INSN_P) - { - if (set_trace_option (sd, "-linenum", TRACE_LINENUM_IDX, arg) != SIM_RC_OK - || set_trace_option (sd, "-linenum", TRACE_INSN_IDX, arg) != SIM_RC_OK) - return SIM_RC_FAIL; - } - else - sim_io_eprintf (sd, "Line number or instruction tracing not compiled in, `--trace-linenum' ignored\n"); - break; - - case OPTION_TRACE_MEMORY : - if (WITH_TRACE_MEMORY_P) - return set_trace_option (sd, "-memory", TRACE_MEMORY_IDX, arg); - else - sim_io_eprintf (sd, "Memory tracing not compiled in, `--trace-memory' ignored\n"); - break; - - case OPTION_TRACE_MODEL : - if (WITH_TRACE_MODEL_P) - return set_trace_option (sd, "-model", TRACE_MODEL_IDX, arg); - else - sim_io_eprintf (sd, "Model tracing not compiled in, `--trace-model' ignored\n"); - break; - - case OPTION_TRACE_ALU : - if (WITH_TRACE_ALU_P) - return set_trace_option (sd, "-alu", TRACE_ALU_IDX, arg); - else - sim_io_eprintf (sd, "ALU tracing not compiled in, `--trace-alu' ignored\n"); - break; - - case OPTION_TRACE_CORE : - if (WITH_TRACE_CORE_P) - return set_trace_option (sd, "-core", TRACE_CORE_IDX, arg); - else - sim_io_eprintf (sd, "CORE tracing not compiled in, `--trace-core' ignored\n"); - break; - - case OPTION_TRACE_EVENTS : - if (WITH_TRACE_EVENTS_P) - return set_trace_option (sd, "-events", TRACE_EVENTS_IDX, arg); - else - sim_io_eprintf (sd, "EVENTS tracing not compiled in, `--trace-events' ignored\n"); - break; - - case OPTION_TRACE_FPU : - if (WITH_TRACE_FPU_P) - return set_trace_option (sd, "-fpu", TRACE_FPU_IDX, arg); - else - sim_io_eprintf (sd, "FPU tracing not compiled in, `--trace-fpu' ignored\n"); - break; - - case OPTION_TRACE_VPU : - if (WITH_TRACE_VPU_P) - return set_trace_option (sd, "-vpu", TRACE_VPU_IDX, arg); - else - sim_io_eprintf (sd, "VPU tracing not compiled in, `--trace-vpu' ignored\n"); - break; - - case OPTION_TRACE_BRANCH : - if (WITH_TRACE_BRANCH_P) - return set_trace_option (sd, "-branch", TRACE_BRANCH_IDX, arg); - else - sim_io_eprintf (sd, "Branch tracing not compiled in, `--trace-branch' ignored\n"); - break; - - case OPTION_TRACE_SEMANTICS : - if (WITH_TRACE_ALU_P - && WITH_TRACE_FPU_P - && WITH_TRACE_MEMORY_P - && WITH_TRACE_BRANCH_P) - { - if (set_trace_option (sd, "-semantics", TRACE_ALU_IDX, arg) != SIM_RC_OK - || set_trace_option (sd, "-semantics", TRACE_FPU_IDX, arg) != SIM_RC_OK - || set_trace_option (sd, "-semantics", TRACE_VPU_IDX, arg) != SIM_RC_OK - || set_trace_option (sd, "-semantics", TRACE_MEMORY_IDX, arg) != SIM_RC_OK - || set_trace_option (sd, "-semantics", TRACE_BRANCH_IDX, arg) != SIM_RC_OK) - return SIM_RC_FAIL; - } - else - sim_io_eprintf (sd, "Alu, fpu, memory, and/or branch tracing not compiled in, `--trace-semantics' ignored\n"); - break; - -#ifdef SIM_HAVE_ADDR_RANGE - case OPTION_TRACE_RANGE : - if (WITH_TRACE) - { - char *chp = arg; - unsigned long start,end; - start = strtoul (chp, &chp, 0); - if (*chp != ',') - { - sim_io_eprintf (sd, "--trace-range missing END argument\n"); - return SIM_RC_FAIL; - } - end = strtoul (chp + 1, NULL, 0); - /* FIXME: Argument validation. */ - if (cpu != NULL) - sim_addr_range_add (TRACE_RANGE (CPU_PROFILE_DATA (cpu)), - start, end); - else - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; ++cpu_nr) - sim_addr_range_add (TRACE_RANGE (CPU_TRACE_DATA (STATE_CPU (sd, cpu_nr))), - start, end); - } - else - sim_io_eprintf (sd, "Tracing not compiled in, `--trace-range' ignored\n"); - break; - - case OPTION_TRACE_FUNCTION : - if (WITH_TRACE) - { - /*wip: need to compute function range given name*/ - } - else - sim_io_eprintf (sd, "Tracing not compiled in, `--trace-function' ignored\n"); - break; -#endif /* SIM_HAVE_ADDR_RANGE */ - - case OPTION_TRACE_DEBUG : - if (WITH_TRACE_DEBUG_P) - return set_trace_option (sd, "-debug", TRACE_DEBUG_IDX, arg); - else - sim_io_eprintf (sd, "Tracing debug support not compiled in, `--trace-debug' ignored\n"); - break; - - case OPTION_TRACE_FILE : - if (! WITH_TRACE) - sim_io_eprintf (sd, "Tracing not compiled in, `--trace-file' ignored\n"); - else - { - FILE *f = fopen (arg, "w"); - - if (f == NULL) - { - sim_io_eprintf (sd, "Unable to open trace output file `%s'\n", arg); - return SIM_RC_FAIL; - } - for (n = 0; n < MAX_NR_PROCESSORS; ++n) - TRACE_FILE (CPU_TRACE_DATA (STATE_CPU (sd, n))) = f; - TRACE_FILE (STATE_TRACE_DATA (sd)) = f; - } - break; - } - - return SIM_RC_OK; -} - -/* Install tracing support. */ - -SIM_RC -trace_install (SIM_DESC sd) -{ - int i; - - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - - sim_add_option_table (sd, NULL, trace_options); - memset (STATE_TRACE_DATA (sd), 0, sizeof (* STATE_TRACE_DATA (sd))); - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - memset (CPU_TRACE_DATA (STATE_CPU (sd, i)), 0, - sizeof (* CPU_TRACE_DATA (STATE_CPU (sd, i)))); - sim_module_add_init_fn (sd, trace_init); - sim_module_add_uninstall_fn (sd, trace_uninstall); - return SIM_RC_OK; -} - -static SIM_RC -trace_init (SIM_DESC sd) -{ -#ifdef SIM_HAVE_ADDR_RANGE - /* Check if a range has been specified without specifying what to - collect. */ - { - int i; - - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - { - sim_cpu *cpu = STATE_CPU (sd, i); - - if (ADDR_RANGE_RANGES (TRACE_RANGE (CPU_TRACE_DATA (cpu))) - && ! TRACE_INSN_P (cpu)) - { - sim_io_eprintf_cpu (cpu, "Tracing address range specified without --trace-insn.\n"); - sim_io_eprintf_cpu (cpu, "Address range ignored.\n"); - sim_addr_range_delete (TRACE_RANGE (CPU_TRACE_DATA (cpu)), - 0, ~ (address_word) 0); - } - } - } -#endif - - return SIM_RC_OK; -} - -static void -trace_uninstall (SIM_DESC sd) -{ - int i,j; - FILE *sfile = TRACE_FILE (STATE_TRACE_DATA (sd)); - - if (sfile != NULL) - fclose (sfile); - - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - { - FILE *cfile = TRACE_FILE (CPU_TRACE_DATA (STATE_CPU (sd, i))); - if (cfile != NULL && cfile != sfile) - { - /* If output from different cpus is going to the same file, - avoid closing the file twice. */ - for (j = 0; j < i; ++j) - if (TRACE_FILE (CPU_TRACE_DATA (STATE_CPU (sd, j))) == cfile) - break; - if (i == j) - fclose (cfile); - } - } -} - -typedef enum { - trace_fmt_invalid, - trace_fmt_word, - trace_fmt_fp, - trace_fmt_fpu, - trace_fmt_string, - trace_fmt_bool, - trace_fmt_addr, - trace_fmt_instruction_incomplete, -} data_fmt; - -/* compute the nr of trace data units consumed by data */ -static int -save_data_size (TRACE_DATA *data, - long size) -{ - return ((size + sizeof (TRACE_INPUT_DATA (data) [0]) - 1) - / sizeof (TRACE_INPUT_DATA (data) [0])); -} - - -/* Archive DATA into the trace buffer */ -static void -save_data (SIM_DESC sd, - TRACE_DATA *data, - data_fmt fmt, - long size, - void *buf) -{ - int i = TRACE_INPUT_IDX (data); - if (i == sizeof (TRACE_INPUT_FMT (data))) - sim_io_error (sd, "trace buffer overflow"); - TRACE_INPUT_FMT (data) [i] = fmt; - TRACE_INPUT_SIZE (data) [i] = size; - memcpy (&TRACE_INPUT_DATA (data) [i], buf, size); - i += save_data_size (data, size); - TRACE_INPUT_IDX (data) = i; -} - -static void -print_data (SIM_DESC sd, - sim_cpu *cpu, - data_fmt fmt, - long size, - void *data) -{ - switch (fmt) - { - case trace_fmt_instruction_incomplete: - trace_printf (sd, cpu, " (instruction incomplete)"); - break; - case trace_fmt_word: - case trace_fmt_addr: - { - switch (size) - { - case sizeof (unsigned32): - trace_printf (sd, cpu, " 0x%08lx", (long) * (unsigned32*) data); - break; - case sizeof (unsigned64): - trace_printf (sd, cpu, " 0x%08lx%08lx", - (long) ((* (unsigned64*) data) >> 32), - (long) * (unsigned64*) data); - break; - default: - abort (); - } - break; - } - case trace_fmt_bool: - { - SIM_ASSERT (size == sizeof (int)); - trace_printf (sd, cpu, " %-8s", - (* (int*) data) ? "true" : "false"); - break; - } - case trace_fmt_fp: - { - sim_fpu fp; - switch (size) - { - /* FIXME: Assumes sizeof float == 4; sizeof double == 8 */ - case 4: - sim_fpu_32to (&fp, *(unsigned32*)data); - break; - case 8: - sim_fpu_64to (&fp, *(unsigned64*)data); - break; - default: - abort (); - } - trace_printf (sd, cpu, " %8g", sim_fpu_2d (&fp)); - switch (size) - { - case 4: - trace_printf (sd, cpu, " (0x%08lx)", - (long) *(unsigned32*)data); - break; - case 8: - trace_printf (sd, cpu, " (0x%08lx%08lx)", - (long) (*(unsigned64*)data >> 32), - (long) (*(unsigned64*)data)); - break; - default: - abort (); - } - break; - } - case trace_fmt_fpu: - /* FIXME: At present sim_fpu data is stored as a double */ - trace_printf (sd, cpu, " %8g", * (double*) data); - break; - case trace_fmt_string: - trace_printf (sd, cpu, " %-8s", (char*) data); - break; - default: - abort (); - } -} - -static const char * -trace_idx_to_str (int trace_idx) -{ - static char num[8]; - switch (trace_idx) - { - case TRACE_ALU_IDX: return "alu: "; - case TRACE_INSN_IDX: return "insn: "; - case TRACE_DECODE_IDX: return "decode: "; - case TRACE_EXTRACT_IDX: return "extract: "; - case TRACE_MEMORY_IDX: return "memory: "; - case TRACE_CORE_IDX: return "core: "; - case TRACE_EVENTS_IDX: return "events: "; - case TRACE_FPU_IDX: return "fpu: "; - case TRACE_BRANCH_IDX: return "branch: "; - case TRACE_VPU_IDX: return "vpu: "; - default: - sprintf (num, "?%d?", trace_idx); - return num; - } -} - -static void -trace_results (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - int last_input) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int nr_out; - int i; - - /* cross check trace_idx against TRACE_IDX (data)? */ - - /* prefix */ - trace_printf (sd, cpu, "%s %s", - trace_idx_to_str (TRACE_IDX (data)), - TRACE_PREFIX (data)); - TRACE_IDX (data) = 0; - - for (i = 0, nr_out = 0; - i < TRACE_INPUT_IDX (data); - i += save_data_size (data, TRACE_INPUT_SIZE (data) [i]), nr_out++) - { - if (i == last_input) - { - int pad = (strlen (" 0x") + sizeof (unsigned_word) * 2); - int padding = pad * (3 - nr_out); - if (padding < 0) - padding = 0; - padding += strlen (" ::"); - trace_printf (sd, cpu, "%*s", padding, " ::"); - } - print_data (sd, cpu, - TRACE_INPUT_FMT (data) [i], - TRACE_INPUT_SIZE (data) [i], - &TRACE_INPUT_DATA (data) [i]); - } - trace_printf (sd, cpu, "\n"); -} - -void -trace_prefix (SIM_DESC sd, - sim_cpu *cpu, - sim_cia cia, - address_word pc, - int line_p, - const char *filename, - int linenum, - const char *fmt, - ...) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - va_list ap; - char *prefix = TRACE_PREFIX (data); - char *chp; - /* FIXME: The TRACE_PREFIX_WIDTH should be determined at build time using - known information about the disassembled instructions. */ -#ifndef TRACE_PREFIX_WIDTH -#define TRACE_PREFIX_WIDTH 48 -#endif - int width = TRACE_PREFIX_WIDTH; - - /* if the previous trace data wasn't flushed, flush it now with a - note indicating that the trace was incomplete. */ - if (TRACE_IDX (data) != 0) - { - int last_input = TRACE_INPUT_IDX (data); - save_data (sd, data, trace_fmt_instruction_incomplete, 1, ""); - trace_results (sd, cpu, TRACE_IDX (data), last_input); - } - TRACE_IDX (data) = 0; - TRACE_INPUT_IDX (data) = 0; - - /* Create the text prefix for this new instruction: */ - if (!line_p) - { - if (filename) - { - sprintf (prefix, "%s:%-*d 0x%.*lx ", - filename, - SIZE_LINE_NUMBER, linenum, - SIZE_PC, (long) pc); - } - else - { - sprintf (prefix, "0x%.*lx ", - SIZE_PC, (long) pc); - /* Shrink the width by the amount that we didn't print. */ - width -= SIZE_LINE_NUMBER + SIZE_PC + 8; - } - chp = strchr (prefix, '\0'); - va_start (ap, fmt); - vsprintf (chp, fmt, ap); - va_end (ap); - } - else - { - char buf[256]; - buf[0] = 0; - if (STATE_TEXT_SECTION (CPU_STATE (cpu)) - && pc >= STATE_TEXT_START (CPU_STATE (cpu)) - && pc < STATE_TEXT_END (CPU_STATE (cpu))) - { - const char *pc_filename = (const char *)0; - const char *pc_function = (const char *)0; - unsigned int pc_linenum = 0; - bfd *abfd; - asymbol **asymbols; - - abfd = STATE_PROG_BFD (CPU_STATE (cpu)); - asymbols = STATE_PROG_SYMS (CPU_STATE (cpu)); - if (asymbols == NULL) - { - long symsize; - long symbol_count; - - symsize = bfd_get_symtab_upper_bound (abfd); - if (symsize < 0) - { - sim_engine_abort (sd, cpu, cia, "could not read symbols"); - } - asymbols = (asymbol **) xmalloc (symsize); - symbol_count = bfd_canonicalize_symtab (abfd, asymbols); - if (symbol_count < 0) - { - sim_engine_abort (sd, cpu, cia, "could not canonicalize symbols"); - } - STATE_PROG_SYMS (CPU_STATE (cpu)) = asymbols; - } - - if (bfd_find_nearest_line (abfd, - STATE_TEXT_SECTION (CPU_STATE (cpu)), - asymbols, - pc - STATE_TEXT_START (CPU_STATE (cpu)), - &pc_filename, &pc_function, &pc_linenum)) - { - char *p = buf; - if (pc_linenum) - { - sprintf (p, "#%-*d ", SIZE_LINE_NUMBER, pc_linenum); - p += strlen (p); - } - else - { - sprintf (p, "%-*s ", SIZE_LINE_NUMBER+1, "---"); - p += SIZE_LINE_NUMBER+2; - } - - if (pc_function) - { - sprintf (p, "%s ", pc_function); - p += strlen (p); - } - else if (pc_filename) - { - char *q = (char *) strrchr (pc_filename, '/'); - sprintf (p, "%s ", (q) ? q+1 : pc_filename); - p += strlen (p); - } - - if (*p == ' ') - *p = '\0'; - } - } - - sprintf (prefix, "0x%.*x %-*.*s ", - SIZE_PC, (unsigned) pc, - SIZE_LOCATION, SIZE_LOCATION, buf); - chp = strchr (prefix, '\0'); - va_start (ap, fmt); - vsprintf (chp, fmt, ap); - va_end (ap); - } - - /* Pad it out to TRACE_PREFIX_WIDTH. */ - chp = strchr (prefix, '\0'); - if (chp - prefix < width) - { - memset (chp, ' ', width - (chp - prefix)); - chp = &prefix [width]; - *chp = '\0'; - } - strcpy (chp, " -"); - - /* check that we've not over flowed the prefix buffer */ - if (strlen (prefix) >= sizeof (TRACE_PREFIX (data))) - abort (); -} - -void -trace_generic (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - const char *fmt, - ...) -{ - va_list ap; - trace_printf (sd, cpu, "%s %s", - trace_idx_to_str (trace_idx), - TRACE_PREFIX (CPU_TRACE_DATA (cpu))); - va_start (ap, fmt); - trace_vprintf (sd, cpu, fmt, ap); - va_end (ap); - trace_printf (sd, cpu, "\n"); -} - -void -trace_input0 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; -} - -void -trace_input_word1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word d0) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - save_data (sd, data, trace_fmt_word, sizeof (unsigned_word), &d0); -} - -void -trace_input_word2 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word d0, - unsigned_word d1) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - save_data (sd, data, trace_fmt_word, sizeof (unsigned_word), &d0); - save_data (sd, data, trace_fmt_word, sizeof (unsigned_word), &d1); -} - -void -trace_input_word3 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word d0, - unsigned_word d1, - unsigned_word d2) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - save_data (sd, data, trace_fmt_word, sizeof (unsigned_word), &d0); - save_data (sd, data, trace_fmt_word, sizeof (unsigned_word), &d1); - save_data (sd, data, trace_fmt_word, sizeof (unsigned_word), &d2); -} - -void -trace_input_word4 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word d0, - unsigned_word d1, - unsigned_word d2, - unsigned_word d3) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - save_data (sd, data, trace_fmt_word, sizeof (d0), &d0); - save_data (sd, data, trace_fmt_word, sizeof (d1), &d1); - save_data (sd, data, trace_fmt_word, sizeof (d2), &d2); - save_data (sd, data, trace_fmt_word, sizeof (d3), &d3); -} - -void -trace_input_bool1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - int d0) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - save_data (sd, data, trace_fmt_bool, sizeof (d0), &d0); -} - -void -trace_input_addr1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - address_word d0) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - save_data (sd, data, trace_fmt_addr, sizeof (d0), &d0); -} - -void -trace_input_fp1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - fp_word f0) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - save_data (sd, data, trace_fmt_fp, sizeof (fp_word), &f0); -} - -void -trace_input_fp2 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - fp_word f0, - fp_word f1) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - save_data (sd, data, trace_fmt_fp, sizeof (fp_word), &f0); - save_data (sd, data, trace_fmt_fp, sizeof (fp_word), &f1); -} - -void -trace_input_fp3 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - fp_word f0, - fp_word f1, - fp_word f2) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - save_data (sd, data, trace_fmt_fp, sizeof (fp_word), &f0); - save_data (sd, data, trace_fmt_fp, sizeof (fp_word), &f1); - save_data (sd, data, trace_fmt_fp, sizeof (fp_word), &f2); -} - -void -trace_input_fpu1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - sim_fpu *f0) -{ - double d; - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - d = sim_fpu_2d (f0); - save_data (sd, data, trace_fmt_fp, sizeof (double), &d); -} - -void -trace_input_fpu2 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - sim_fpu *f0, - sim_fpu *f1) -{ - double d; - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - d = sim_fpu_2d (f0); - save_data (sd, data, trace_fmt_fp, sizeof (double), &d); - d = sim_fpu_2d (f1); - save_data (sd, data, trace_fmt_fp, sizeof (double), &d); -} - -void -trace_input_fpu3 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - sim_fpu *f0, - sim_fpu *f1, - sim_fpu *f2) -{ - double d; - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - TRACE_IDX (data) = trace_idx; - d = sim_fpu_2d (f0); - save_data (sd, data, trace_fmt_fp, sizeof (double), &d); - d = sim_fpu_2d (f1); - save_data (sd, data, trace_fmt_fp, sizeof (double), &d); - d = sim_fpu_2d (f2); - save_data (sd, data, trace_fmt_fp, sizeof (double), &d); -} - -void -trace_result_word1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word r0) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - save_data (sd, data, trace_fmt_word, sizeof (unsigned_word), &r0); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_result0 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_result_word2 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word r0, - unsigned_word r1) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - save_data (sd, data, trace_fmt_word, sizeof (r0), &r0); - save_data (sd, data, trace_fmt_word, sizeof (r1), &r1); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_result_word4 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word r0, - unsigned_word r1, - unsigned_word r2, - unsigned_word r3) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - save_data (sd, data, trace_fmt_word, sizeof (r0), &r0); - save_data (sd, data, trace_fmt_word, sizeof (r1), &r1); - save_data (sd, data, trace_fmt_word, sizeof (r2), &r2); - save_data (sd, data, trace_fmt_word, sizeof (r3), &r3); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_result_bool1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - int r0) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - save_data (sd, data, trace_fmt_bool, sizeof (r0), &r0); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_result_addr1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - address_word r0) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - save_data (sd, data, trace_fmt_addr, sizeof (r0), &r0); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_result_fp1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - fp_word f0) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - save_data (sd, data, trace_fmt_fp, sizeof (fp_word), &f0); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_result_fp2 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - fp_word f0, - fp_word f1) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - save_data (sd, data, trace_fmt_fp, sizeof (f0), &f0); - save_data (sd, data, trace_fmt_fp, sizeof (f1), &f1); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_result_fpu1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - sim_fpu *f0) -{ - double d; - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - d = sim_fpu_2d (f0); - save_data (sd, data, trace_fmt_fp, sizeof (double), &d); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_result_string1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - char *s0) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - save_data (sd, data, trace_fmt_string, strlen (s0) + 1, s0); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_result_word1_string1 (SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word r0, - char *s0) -{ - TRACE_DATA *data = CPU_TRACE_DATA (cpu); - int last_input; - - /* Append any results to the end of the inputs */ - last_input = TRACE_INPUT_IDX (data); - save_data (sd, data, trace_fmt_word, sizeof (unsigned_word), &r0); - save_data (sd, data, trace_fmt_string, strlen (s0) + 1, s0); - - trace_results (sd, cpu, trace_idx, last_input); -} - -void -trace_vprintf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, va_list ap) -{ - if (cpu != NULL) - { - if (TRACE_FILE (CPU_TRACE_DATA (cpu)) != NULL) - vfprintf (TRACE_FILE (CPU_TRACE_DATA (cpu)), fmt, ap); - else - sim_io_evprintf (sd, fmt, ap); - } - else - { - if (TRACE_FILE (STATE_TRACE_DATA (sd)) != NULL) - vfprintf (TRACE_FILE (STATE_TRACE_DATA (sd)), fmt, ap); - else - sim_io_evprintf (sd, fmt, ap); - } -} - -/* The function trace_one_insn has been replaced by the function pair - trace_prefix() + trace_generic(). It is still used. */ -void -trace_one_insn (SIM_DESC sd, sim_cpu *cpu, address_word pc, - int line_p, const char *filename, int linenum, - const char *phase_wo_colon, const char *fmt, - ...) -{ - va_list ap; - char phase[SIZE_PHASE+2]; - - strncpy (phase, phase_wo_colon, SIZE_PHASE); - strcat (phase, ":"); - - if (!line_p) - { - trace_printf (sd, cpu, "%-*s %s:%-*d 0x%.*lx ", - SIZE_PHASE+1, phase, - filename, - SIZE_LINE_NUMBER, linenum, - SIZE_PC, (long)pc); - va_start (ap, fmt); - trace_vprintf (sd, cpu, fmt, ap); - va_end (ap); - trace_printf (sd, cpu, "\n"); - } - else - { - char buf[256]; - - buf[0] = 0; - if (STATE_TEXT_SECTION (CPU_STATE (cpu)) - && pc >= STATE_TEXT_START (CPU_STATE (cpu)) - && pc < STATE_TEXT_END (CPU_STATE (cpu))) - { - const char *pc_filename = (const char *)0; - const char *pc_function = (const char *)0; - unsigned int pc_linenum = 0; - - if (bfd_find_nearest_line (STATE_PROG_BFD (CPU_STATE (cpu)), - STATE_TEXT_SECTION (CPU_STATE (cpu)), - (struct bfd_symbol **) 0, - pc - STATE_TEXT_START (CPU_STATE (cpu)), - &pc_filename, &pc_function, &pc_linenum)) - { - char *p = buf; - if (pc_linenum) - { - sprintf (p, "#%-*d ", SIZE_LINE_NUMBER, pc_linenum); - p += strlen (p); - } - else - { - sprintf (p, "%-*s ", SIZE_LINE_NUMBER+1, "---"); - p += SIZE_LINE_NUMBER+2; - } - - if (pc_function) - { - sprintf (p, "%s ", pc_function); - p += strlen (p); - } - else if (pc_filename) - { - char *q = (char *) strrchr (pc_filename, '/'); - sprintf (p, "%s ", (q) ? q+1 : pc_filename); - p += strlen (p); - } - - if (*p == ' ') - *p = '\0'; - } - } - - trace_printf (sd, cpu, "%-*s 0x%.*x %-*.*s ", - SIZE_PHASE+1, phase, - SIZE_PC, (unsigned) pc, - SIZE_LOCATION, SIZE_LOCATION, buf); - va_start (ap, fmt); - trace_vprintf (sd, cpu, fmt, ap); - va_end (ap); - trace_printf (sd, cpu, "\n"); - } -} - -void -trace_printf VPARAMS ((SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...)) -{ -#if !defined __STDC__ && !defined ALMOST_STDC - SIM_DESC sd; - sim_cpu *cpu; - const char *fmt; -#endif - va_list ap; - - VA_START (ap, fmt); -#if !defined __STDC__ && !defined ALMOST_STDC - sd = va_arg (ap, SIM_DESC); - cpu = va_arg (ap, sim_cpu *); - fmt = va_arg (ap, const char *); -#endif - - trace_vprintf (sd, cpu, fmt, ap); - - va_end (ap); -} - -void -debug_printf VPARAMS ((sim_cpu *cpu, const char *fmt, ...)) -{ -#if !defined __STDC__ && !defined ALMOST_STDC - sim_cpu *cpu; - const char *fmt; -#endif - va_list ap; - - VA_START (ap, fmt); -#if !defined __STDC__ && !defined ALMOST_STDC - cpu = va_arg (ap, sim_cpu *); - fmt = va_arg (ap, const char *); -#endif - - if (CPU_DEBUG_FILE (cpu) == NULL) - (* STATE_CALLBACK (CPU_STATE (cpu))->evprintf_filtered) - (STATE_CALLBACK (CPU_STATE (cpu)), fmt, ap); - else - vfprintf (CPU_DEBUG_FILE (cpu), fmt, ap); - - va_end (ap); -} diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h deleted file mode 100644 index 53a10f3..0000000 --- a/sim/common/sim-trace.h +++ /dev/null @@ -1,567 +0,0 @@ -/* Simulator tracing/debugging support. - Copyright (C) 1997, 1998, 2001 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. */ - -/* This file is meant to be included by sim-basics.h. */ - -#ifndef SIM_TRACE_H -#define SIM_TRACE_H - -/* Standard traceable entities. */ - -enum { - /* Trace insn execution. */ - TRACE_INSN_IDX = 1, - - /* Trace insn decoding. - ??? This is more of a simulator debugging operation and might best be - moved to --debug-decode. */ - TRACE_DECODE_IDX, - - /* Trace insn extraction. - ??? This is more of a simulator debugging operation and might best be - moved to --debug-extract. */ - TRACE_EXTRACT_IDX, - - /* Trace insn execution but include line numbers. */ - TRACE_LINENUM_IDX, - - /* Trace memory operations. - The difference between this and TRACE_CORE_IDX is (I think) that this - is intended to apply to a higher level. TRACE_CORE_IDX applies to the - low level core operations. */ - TRACE_MEMORY_IDX, - - /* Include model performance data in tracing output. */ - TRACE_MODEL_IDX, - - /* Trace ALU operations. */ - TRACE_ALU_IDX, - - /* Trace memory core operations. */ - TRACE_CORE_IDX, - - /* Trace events. */ - TRACE_EVENTS_IDX, - - /* Trace fpu operations. */ - TRACE_FPU_IDX, - - /* Trace vpu operations. */ - TRACE_VPU_IDX, - - /* Trace branching. */ - TRACE_BRANCH_IDX, - - /* Add information useful for debugging the simulator to trace output. */ - TRACE_DEBUG_IDX, - - /* Simulator specific trace bits begin here. */ - TRACE_NEXT_IDX, - -}; -/* Maximum number of traceable entities. */ -#ifndef MAX_TRACE_VALUES -#define MAX_TRACE_VALUES 32 -#endif - -/* The -t option only prints useful values. It's easy to type and shouldn't - splat on the screen everything under the sun making nothing easy to - find. */ -#define TRACE_USEFUL_MASK \ -((1 << TRACE_INSN_IDX) \ - | (1 << TRACE_LINENUM_IDX) \ - | (1 << TRACE_MEMORY_IDX) \ - | (1 << TRACE_MODEL_IDX)) - -/* Masks so WITH_TRACE can have symbolic values. - The case choice here is on purpose. The lowercase parts are args to - --with-trace. */ -#define TRACE_insn (1 << TRACE_INSN_IDX) -#define TRACE_decode (1 << TRACE_DECODE_IDX) -#define TRACE_extract (1 << TRACE_EXTRACT_IDX) -#define TRACE_linenum (1 << TRACE_LINENUM_IDX) -#define TRACE_memory (1 << TRACE_MEMORY_IDX) -#define TRACE_model (1 << TRACE_MODEL_IDX) -#define TRACE_alu (1 << TRACE_ALU_IDX) -#define TRACE_core (1 << TRACE_CORE_IDX) -#define TRACE_events (1 << TRACE_EVENTS_IDX) -#define TRACE_fpu (1 << TRACE_FPU_IDX) -#define TRACE_vpu (1 << TRACE_VPU_IDX) -#define TRACE_branch (1 << TRACE_BRANCH_IDX) -#define TRACE_debug (1 << TRACE_DEBUG_IDX) - -/* Preprocessor macros to simplify tests of WITH_TRACE. */ -#define WITH_TRACE_INSN_P (WITH_TRACE & TRACE_insn) -#define WITH_TRACE_DECODE_P (WITH_TRACE & TRACE_decode) -#define WITH_TRACE_EXTRACT_P (WITH_TRACE & TRACE_extract) -#define WITH_TRACE_LINENUM_P (WITH_TRACE & TRACE_linenum) -#define WITH_TRACE_MEMORY_P (WITH_TRACE & TRACE_memory) -#define WITH_TRACE_MODEL_P (WITH_TRACE & TRACE_model) -#define WITH_TRACE_ALU_P (WITH_TRACE & TRACE_alu) -#define WITH_TRACE_CORE_P (WITH_TRACE & TRACE_core) -#define WITH_TRACE_EVENTS_P (WITH_TRACE & TRACE_events) -#define WITH_TRACE_FPU_P (WITH_TRACE & TRACE_fpu) -#define WITH_TRACE_VPU_P (WITH_TRACE & TRACE_vpu) -#define WITH_TRACE_BRANCH_P (WITH_TRACE & TRACE_branch) -#define WITH_TRACE_DEBUG_P (WITH_TRACE & TRACE_debug) - -/* Tracing install handler. */ -MODULE_INSTALL_FN trace_install; - -/* Struct containing all system and cpu trace data. - - System trace data is stored with the associated module. - System and cpu tracing must share the same space of bitmasks as they - are arguments to --with-trace. One could have --with-trace and - --with-cpu-trace or some such but that's an over-complication at this point - in time. Also, there may be occasions where system and cpu tracing may - wish to share a name. */ - -typedef struct _trace_data { - - /* Global summary of all the current trace options */ - char trace_any_p; - - /* Boolean array of specified tracing flags. */ - /* ??? It's not clear that using an array vs a bit mask is faster. - Consider the case where one wants to test whether any of several bits - are set. */ - char trace_flags[MAX_TRACE_VALUES]; -#define TRACE_FLAGS(t) ((t)->trace_flags) - - /* Tracing output goes to this or stderr if NULL. - We can't store `stderr' here as stderr goes through a callback. */ - FILE *trace_file; -#define TRACE_FILE(t) ((t)->trace_file) - - /* Buffer to store the prefix to be printed before any trace line. */ - char trace_prefix[256]; -#define TRACE_PREFIX(t) ((t)->trace_prefix) - - /* Buffer to save the inputs for the current instruction. Use a - union to force the buffer into correct alignment */ - union { - unsigned8 i8; - unsigned16 i16; - unsigned32 i32; - unsigned64 i64; - } trace_input_data[16]; - unsigned8 trace_input_fmt[16]; - unsigned8 trace_input_size[16]; - int trace_input_idx; -#define TRACE_INPUT_DATA(t) ((t)->trace_input_data) -#define TRACE_INPUT_FMT(t) ((t)->trace_input_fmt) -#define TRACE_INPUT_SIZE(t) ((t)->trace_input_size) -#define TRACE_INPUT_IDX(t) ((t)->trace_input_idx) - - /* Category of trace being performed */ - int trace_idx; -#define TRACE_IDX(t) ((t)->trace_idx) - - /* Trace range. - ??? Not all cpu's support this. */ - ADDR_RANGE range; -#define TRACE_RANGE(t) (& (t)->range) -} TRACE_DATA; - -/* System tracing support. */ - -#define STATE_TRACE_FLAGS(sd) TRACE_FLAGS (STATE_TRACE_DATA (sd)) - -/* Return non-zero if tracing of IDX is enabled for non-cpu specific - components. The "S" in "STRACE" refers to "System". */ -#define STRACE_P(sd,idx) \ -((WITH_TRACE & (1 << (idx))) != 0 \ - && STATE_TRACE_FLAGS (sd)[idx] != 0) - -/* Non-zero if --trace-<xxxx> was specified for SD. */ -#define STRACE_DEBUG_P(sd) STRACE_P (sd, TRACE_DEBUG_IDX) - -/* CPU tracing support. */ - -#define CPU_TRACE_FLAGS(cpu) TRACE_FLAGS (CPU_TRACE_DATA (cpu)) - -/* Return non-zero if tracing of IDX is enabled for CPU. */ -#define TRACE_P(cpu,idx) \ -((WITH_TRACE & (1 << (idx))) != 0 \ - && CPU_TRACE_FLAGS (cpu)[idx] != 0) - -/* Non-zero if --trace-<xxxx> was specified for CPU. */ -#define TRACE_ANY_P(cpu) ((WITH_TRACE) && (CPU_TRACE_DATA (cpu)->trace_any_p)) -#define TRACE_INSN_P(cpu) TRACE_P (cpu, TRACE_INSN_IDX) -#define TRACE_DECODE_P(cpu) TRACE_P (cpu, TRACE_DECODE_IDX) -#define TRACE_EXTRACT_P(cpu) TRACE_P (cpu, TRACE_EXTRACT_IDX) -#define TRACE_LINENUM_P(cpu) TRACE_P (cpu, TRACE_LINENUM_IDX) -#define TRACE_MEMORY_P(cpu) TRACE_P (cpu, TRACE_MEMORY_IDX) -#define TRACE_MODEL_P(cpu) TRACE_P (cpu, TRACE_MODEL_IDX) -#define TRACE_ALU_P(cpu) TRACE_P (cpu, TRACE_ALU_IDX) -#define TRACE_CORE_P(cpu) TRACE_P (cpu, TRACE_CORE_IDX) -#define TRACE_EVENTS_P(cpu) TRACE_P (cpu, TRACE_EVENTS_IDX) -#define TRACE_FPU_P(cpu) TRACE_P (cpu, TRACE_FPU_IDX) -#define TRACE_VPU_P(cpu) TRACE_P (cpu, TRACE_VPU_IDX) -#define TRACE_BRANCH_P(cpu) TRACE_P (cpu, TRACE_BRANCH_IDX) -#define TRACE_DEBUG_P(cpu) TRACE_P (cpu, TRACE_DEBUG_IDX) - -/* Tracing functions. */ - -/* Prime the trace buffers ready for any trace output. - Must be called prior to any other trace operation */ -extern void trace_prefix PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - sim_cia cia, - address_word pc, - int print_linenum_p, - const char *file_name, - int line_nr, - const char *fmt, - ...)) - __attribute__((format (printf, 8, 9))); - -/* Generic trace print, assumes trace_prefix() has been called */ - -extern void trace_generic PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - const char *fmt, - ...)) - __attribute__((format (printf, 4, 5))); - -/* Trace a varying number of word sized inputs/outputs. trace_result* - must be called to close the trace operation. */ - -extern void trace_input0 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx)); - -extern void trace_input_word1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word d0)); - -extern void trace_input_word2 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word d0, - unsigned_word d1)); - -extern void trace_input_word3 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word d0, - unsigned_word d1, - unsigned_word d2)); - -extern void trace_input_word4 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word d0, - unsigned_word d1, - unsigned_word d2, - unsigned_word d3)); - -extern void trace_input_addr1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - address_word d0)); - -extern void trace_input_bool1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - int d0)); - -extern void trace_input_fp1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - fp_word f0)); - -extern void trace_input_fp2 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - fp_word f0, - fp_word f1)); - -extern void trace_input_fp3 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - fp_word f0, - fp_word f1, - fp_word f2)); - -extern void trace_input_fpu1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - struct _sim_fpu *f0)); - -extern void trace_input_fpu2 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - struct _sim_fpu *f0, - struct _sim_fpu *f1)); - -extern void trace_input_fpu3 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - struct _sim_fpu *f0, - struct _sim_fpu *f1, - struct _sim_fpu *f2)); - -/* Other trace_input{_<fmt><nr-inputs>} functions can go here */ - -extern void trace_result0 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx)); - -extern void trace_result_word1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word r0)); - -extern void trace_result_word2 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word r0, - unsigned_word r1)); - -extern void trace_result_word4 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word r0, - unsigned_word r1, - unsigned_word r2, - unsigned_word r3)); - -extern void trace_result_bool1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - int r0)); - -extern void trace_result_addr1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - address_word r0)); - -extern void trace_result_fp1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - fp_word f0)); - -extern void trace_result_fp2 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - fp_word f0, - fp_word f1)); - -extern void trace_result_fpu1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - struct _sim_fpu *f0)); - -extern void trace_result_string1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - char *str0)); - -extern void trace_result_word1_string1 PARAMS ((SIM_DESC sd, - sim_cpu *cpu, - int trace_idx, - unsigned_word r0, - char *s0)); - -/* Other trace_result{_<type><nr-results>} */ - - -/* Macros for tracing ALU instructions */ - -#define TRACE_ALU_INPUT0() \ -do { \ - if (TRACE_ALU_P (CPU)) \ - trace_input0 (SD, CPU, TRACE_ALU_IDX); \ -} while (0) - -#define TRACE_ALU_INPUT1(V0) \ -do { \ - if (TRACE_ALU_P (CPU)) \ - trace_input_word1 (SD, CPU, TRACE_ALU_IDX, (V0)); \ -} while (0) - -#define TRACE_ALU_INPUT2(V0,V1) \ -do { \ - if (TRACE_ALU_P (CPU)) \ - trace_input_word2 (SD, CPU, TRACE_ALU_IDX, (V0), (V1)); \ -} while (0) - -#define TRACE_ALU_INPUT3(V0,V1,V2) \ -do { \ - if (TRACE_ALU_P (CPU)) \ - trace_input_word3 (SD, CPU, TRACE_ALU_IDX, (V0), (V1), (V2)); \ -} while (0) - -#define TRACE_ALU_INPUT4(V0,V1,V2,V3) \ -do { \ - if (TRACE_ALU_P (CPU)) \ - trace_input_word4 (SD, CPU, TRACE_ALU_IDX, (V0), (V1), (V2), (V3)); \ -} while (0) - -#define TRACE_ALU_RESULT(R0) TRACE_ALU_RESULT1(R0) - -#define TRACE_ALU_RESULT0() \ -do { \ - if (TRACE_ALU_P (CPU)) \ - trace_result0 (SD, CPU, TRACE_ALU_IDX); \ -} while (0) - -#define TRACE_ALU_RESULT1(R0) \ -do { \ - if (TRACE_ALU_P (CPU)) \ - trace_result_word1 (SD, CPU, TRACE_ALU_IDX, (R0)); \ -} while (0) - -#define TRACE_ALU_RESULT2(R0,R1) \ -do { \ - if (TRACE_ALU_P (CPU)) \ - trace_result_word2 (SD, CPU, TRACE_ALU_IDX, (R0), (R1)); \ -} while (0) - -#define TRACE_ALU_RESULT4(R0,R1,R2,R3) \ -do { \ - if (TRACE_ALU_P (CPU)) \ - trace_result_word4 (SD, CPU, TRACE_ALU_IDX, (R0), (R1), (R2), (R3)); \ -} while (0) - -/* Macros for tracing inputs to comparative branch instructions. */ - -#define TRACE_BRANCH_INPUT1(V0) \ -do { \ - if (TRACE_BRANCH_P (CPU)) \ - trace_input_word1 (SD, CPU, TRACE_BRANCH_IDX, (V0)); \ -} while (0) - -#define TRACE_BRANCH_INPUT2(V0,V1) \ -do { \ - if (TRACE_BRANCH_P (CPU)) \ - trace_input_word2 (SD, CPU, TRACE_BRANCH_IDX, (V0), (V1)); \ -} while (0) - -/* Macros for tracing FPU instructions */ - -#define TRACE_FP_INPUT0() \ -do { \ - if (TRACE_FPU_P (CPU)) \ - trace_input0 (SD, CPU, TRACE_FPU_IDX); \ -} while (0) - -#define TRACE_FP_INPUT1(V0) \ -do { \ - if (TRACE_FPU_P (CPU)) \ - trace_input_fp1 (SD, CPU, TRACE_FPU_IDX, (V0)); \ -} while (0) - -#define TRACE_FP_INPUT2(V0,V1) \ -do { \ - if (TRACE_FPU_P (CPU)) \ - trace_input_fp2 (SD, CPU, TRACE_FPU_IDX, (V0), (V1)); \ -} while (0) - -#define TRACE_FP_INPUT3(V0,V1,V2) \ -do { \ - if (TRACE_FPU_P (CPU)) \ - trace_input_fp3 (SD, CPU, TRACE_FPU_IDX, (V0), (V1), (V2)); \ -} while (0) - -#define TRACE_FP_INPUT_WORD1(V0) \ -do { \ - if (TRACE_FPU_P (CPU)) \ - trace_input_word1 (SD, CPU, TRACE_FPU_IDX, (V0)); \ -} while (0) - -#define TRACE_FP_RESULT(R0) \ -do { \ - if (TRACE_FPU_P (CPU)) \ - trace_result_fp1 (SD, CPU, TRACE_FPU_IDX, (R0)); \ -} while (0) - -#define TRACE_FP_RESULT2(R0,R1) \ -do { \ - if (TRACE_FPU_P (CPU)) \ - trace_result_fp2 (SD, CPU, TRACE_FPU_IDX, (R0), (R1)); \ -} while (0) - -#define TRACE_FP_RESULT_BOOL(R0) \ -do { \ - if (TRACE_FPU_P (CPU)) \ - trace_result_bool1 (SD, CPU, TRACE_FPU_IDX, (R0)); \ -} while (0) - -#define TRACE_FP_RESULT_WORD(R0) \ -do { \ - if (TRACE_FPU_P (CPU)) \ - trace_result_word1 (SD, CPU, TRACE_FPU_IDX, (R0)); \ -} while (0) - - -/* Macros for tracing branches */ - -#define TRACE_BRANCH_INPUT(COND) \ -do { \ - if (TRACE_BRANCH_P (CPU)) \ - trace_input_bool1 (SD, CPU, TRACE_BRANCH_IDX, (COND)); \ -} while (0) - -#define TRACE_BRANCH_RESULT(DEST) \ -do { \ - if (TRACE_BRANCH_P (CPU)) \ - trace_result_addr1 (SD, CPU, TRACE_BRANCH_IDX, (DEST)); \ -} while (0) - - -/* The function trace_one_insn has been replaced by the function pair - trace_prefix() + trace_generic() */ -extern void trace_one_insn PARAMS ((SIM_DESC sd, - sim_cpu * cpu, - address_word cia, - int print_linenum_p, - const char *file_name, - int line_nr, - const char *unit, - const char *fmt, - ...)) - __attribute__((format (printf, 8, 9))); - -extern void trace_printf PARAMS ((SIM_DESC, sim_cpu *, const char *, ...)) - __attribute__((format (printf, 3, 4))); - -extern void trace_vprintf PARAMS ((SIM_DESC, sim_cpu *, const char *, va_list)); - -/* Debug support. - This is included here because there isn't enough of it to justify - a sim-debug.h. */ - -/* Return non-zero if debugging of IDX for CPU is enabled. */ -#define DEBUG_P(cpu, idx) \ -((WITH_DEBUG & (1 << (idx))) != 0 \ - && CPU_DEBUG_FLAGS (cpu)[idx] != 0) - -/* Non-zero if "--debug-insn" specified. */ -#define DEBUG_INSN_P(cpu) DEBUG_P (cpu, DEBUG_INSN_IDX) - -extern void debug_printf PARAMS ((sim_cpu *, const char *, ...)) - __attribute__((format (printf, 2, 3))); - -#endif /* SIM_TRACE_H */ diff --git a/sim/common/sim-types.h b/sim/common/sim-types.h deleted file mode 100644 index b03e394..0000000 --- a/sim/common/sim-types.h +++ /dev/null @@ -1,210 +0,0 @@ -/* The common simulator framework for GDB, the GNU Debugger. - - Copyright 2002, 2005 Free Software Foundation, Inc. - - Contributed by Andrew Cagney and Red Hat. - - 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 SIM_TYPES_H -/* #define SIM_TYPES_H */ - -/* INTEGER QUANTITIES: - - TYPES: - - signed* signed type of the given size - unsigned* The corresponding insigned type - - SIZES - - *NN Size based on the number of bits - *_NN Size according to the number of bytes - *_word Size based on the target architecture's word - word size (32/64 bits) - *_cell Size based on the target architecture's - IEEE 1275 cell size (almost always 32 bits) - -*/ - - -#if !defined (SIM_TYPES_H) && defined (__GNUC__) -#define SIM_TYPES_H - -/* bit based */ - -#define UNSIGNED32(X) ((unsigned32) X##UL) -#define UNSIGNED64(X) ((unsigned64) X##ULL) - -#define SIGNED32(X) ((signed32) X##L) -#define SIGNED64(X) ((signed64) X##LL) - -typedef signed int signed8 __attribute__ ((__mode__ (__QI__))); -typedef signed int signed16 __attribute__ ((__mode__ (__HI__))); -typedef signed int signed32 __attribute__ ((__mode__ (__SI__))); -typedef signed int signed64 __attribute__ ((__mode__ (__DI__))); - -typedef unsigned int unsigned8 __attribute__ ((__mode__ (__QI__))); -typedef unsigned int unsigned16 __attribute__ ((__mode__ (__HI__))); -typedef unsigned int unsigned32 __attribute__ ((__mode__ (__SI__))); -typedef unsigned int unsigned64 __attribute__ ((__mode__ (__DI__))); - -typedef struct { unsigned64 a[2]; } unsigned128; -typedef struct { signed64 a[2]; } signed128; - -#endif - - -#if !defined (SIM_TYPES_H) && defined (_MSC_VER) -#define SIM_TYPES_H - -/* bit based */ - -#define UNSIGNED32(X) (X##ui32) -#define UNSIGNED64(X) (X##ui64) - -#define SIGNED32(X) (X##i32) -#define SIGNED64(X) (X##i64) - -typedef signed char signed8; -typedef signed short signed16; -typedef signed int signed32; -typedef signed __int64 signed64; - -typedef unsigned int unsigned8; -typedef unsigned int unsigned16; -typedef unsigned int unsigned32; -typedef unsigned __int64 unsigned64; - -typedef struct { unsigned64 a[2]; } unsigned128; -typedef struct { signed64 a[2]; } signed128; - -#endif /* _MSC_VER */ - - -#if !defined (SIM_TYPES_H) -#define SIM_TYPES_H - -/* bit based */ - -#define UNSIGNED32(X) (X##UL) -#define UNSIGNED64(X) (X##ULL) - -#define SIGNED32(X) (X##L) -#define SIGNED64(X) (X##LL) - -typedef signed char signed8; -typedef signed short signed16; -#if defined (__ALPHA__) -typedef signed int signed32; -typedef signed long signed64; -#else -typedef signed long signed32; -typedef signed long long signed64; -#endif - -typedef unsigned char unsigned8; -typedef unsigned short unsigned16; -#if defined (__ALPHA__) -typedef unsigned int unsigned32; -typedef unsigned long unsigned64; -#else -typedef unsigned long unsigned32; -typedef unsigned long long unsigned64; -#endif - -typedef struct { unsigned64 a[2]; } unsigned128; -typedef struct { signed64 a[2]; } signed128; - -#endif - - -/* byte based */ - -typedef signed8 signed_1; -typedef signed16 signed_2; -typedef signed32 signed_4; -typedef signed64 signed_8; -typedef signed128 signed_16; - -typedef unsigned8 unsigned_1; -typedef unsigned16 unsigned_2; -typedef unsigned32 unsigned_4; -typedef unsigned64 unsigned_8; -typedef unsigned128 unsigned_16; - - -/* for general work, the following are defined */ -/* unsigned: >= 32 bits */ -/* signed: >= 32 bits */ -/* long: >= 32 bits, sign undefined */ -/* int: small indicator */ - -/* target architecture based */ -#if (WITH_TARGET_WORD_BITSIZE == 64) -typedef unsigned64 unsigned_word; -typedef signed64 signed_word; -#endif -#if (WITH_TARGET_WORD_BITSIZE == 32) -typedef unsigned32 unsigned_word; -typedef signed32 signed_word; -#endif -#if (WITH_TARGET_WORD_BITSIZE == 16) -typedef unsigned16 unsigned_word; -typedef signed16 signed_word; -#endif - - -/* Other instructions */ -#if (WITH_TARGET_ADDRESS_BITSIZE == 64) -typedef unsigned64 unsigned_address; -typedef signed64 signed_address; -#endif -#if (WITH_TARGET_ADDRESS_BITSIZE == 32) -typedef unsigned32 unsigned_address; -typedef signed32 signed_address; -#endif -#if (WITH_TARGET_ADDRESS_BITSIZE == 16) -typedef unsigned16 unsigned_address; -typedef signed16 signed_address; -#endif -typedef unsigned_address address_word; - - -/* IEEE 1275 cell size */ -#if (WITH_TARGET_CELL_BITSIZE == 64) -typedef unsigned64 unsigned_cell; -typedef signed64 signed_cell; -#endif -#if (WITH_TARGET_CELL_BITSIZE == 32) -typedef unsigned32 unsigned_cell; -typedef signed32 signed_cell; -#endif -typedef signed_cell cell_word; /* cells are normally signed */ - - -/* Floating point registers */ -#if (WITH_TARGET_FLOATING_POINT_BITSIZE == 64) -typedef unsigned64 fp_word; -#endif -#if (WITH_TARGET_FLOATING_POINT_BITSIZE == 32) -typedef unsigned32 fp_word; -#endif - -#endif diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c deleted file mode 100644 index 66b0641..0000000 --- a/sim/common/sim-utils.c +++ /dev/null @@ -1,413 +0,0 @@ -/* Miscellaneous simulator utilities. - 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" -#include "sim-assert.h" - -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif - -#ifdef HAVE_TIME_H -#include <time.h> -#endif - -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> /* needed by sys/resource.h */ -#endif - -#ifdef HAVE_SYS_RESOURCE_H -#include <sys/resource.h> -#endif - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#include "libiberty.h" -#include "bfd.h" -#include "sim-utils.h" - -/* Global pointer to all state data. - Set by sim_resume. */ -struct sim_state *current_state; - -/* Allocate zero filled memory with xmalloc - xmalloc aborts of the - allocation fails. */ - -void * -zalloc (unsigned long size) -{ - void *memory = (void *) xmalloc (size); - memset (memory, 0, size); - return memory; -} - -void -zfree (void *data) -{ - free (data); -} - -/* Allocate a sim_state struct. */ - -SIM_DESC -sim_state_alloc (SIM_OPEN_KIND kind, - host_callback *callback) -{ - SIM_DESC sd = ZALLOC (struct sim_state); - - STATE_MAGIC (sd) = SIM_MAGIC_NUMBER; - STATE_CALLBACK (sd) = callback; - STATE_OPEN_KIND (sd) = kind; - -#if 0 - { - int cpu_nr; - - /* Initialize the back link from the cpu struct to the state struct. */ - /* ??? I can envision a design where the state struct contains an array - of pointers to cpu structs, rather than an array of structs themselves. - Implementing this is trickier as one may not know what to allocate until - one has parsed the args. Parsing the args twice wouldn't be unreasonable, - IMHO. If the state struct ever does contain an array of pointers then we - can't do this here. - ??? See also sim_post_argv_init*/ - for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; cpu_nr++) - { - CPU_STATE (STATE_CPU (sd, cpu_nr)) = sd; - CPU_INDEX (STATE_CPU (sd, cpu_nr)) = cpu_nr; - } - } -#endif - -#ifdef SIM_STATE_INIT - SIM_STATE_INIT (sd); -#endif - - return sd; -} - -/* Free a sim_state struct. */ - -void -sim_state_free (SIM_DESC sd) -{ - ASSERT (sd->base.magic == SIM_MAGIC_NUMBER); - -#ifdef SIM_STATE_FREE - SIM_STATE_FREE (sd); -#endif - - zfree (sd); -} - -/* Return a pointer to the cpu data for CPU_NAME, or NULL if not found. */ - -sim_cpu * -sim_cpu_lookup (SIM_DESC sd, const char *cpu_name) -{ - int i; - - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - if (strcmp (cpu_name, CPU_NAME (STATE_CPU (sd, i))) == 0) - return STATE_CPU (sd, i); - return NULL; -} - -/* Return the prefix to use for a CPU specific message (typically an - error message). */ - -const char * -sim_cpu_msg_prefix (sim_cpu *cpu) -{ -#if MAX_NR_PROCESSORS == 1 - return ""; -#else - static char *prefix; - - if (prefix == NULL) - { - int maxlen = 0; - for (i = 0; i < MAX_NR_PROCESSORS; ++i) - { - int len = strlen (CPU_NAME (STATE_CPU (sd, i))); - if (len > maxlen) - maxlen = len; - } - prefix = (char *) xmalloc (maxlen + 5); - } - sprintf (prefix, "%s: ", CPU_NAME (cpu)); - return prefix; -#endif -} - -/* Cover fn to sim_io_eprintf. */ - -void -sim_io_eprintf_cpu (sim_cpu *cpu, const char *fmt, ...) -{ - SIM_DESC sd = CPU_STATE (cpu); - va_list ap; - - va_start (ap, fmt); - sim_io_eprintf (sd, sim_cpu_msg_prefix (cpu)); - sim_io_evprintf (sd, fmt, ap); - va_end (ap); -} - -/* Turn VALUE into a string with commas. */ - -char * -sim_add_commas (char *buf, int sizeof_buf, unsigned long value) -{ - int comma = 3; - char *endbuf = buf + sizeof_buf - 1; - - *--endbuf = '\0'; - do { - if (comma-- == 0) - { - *--endbuf = ','; - comma = 2; - } - - *--endbuf = (value % 10) + '0'; - } while ((value /= 10) != 0); - - return endbuf; -} - -/* Analyze PROG_NAME/PROG_BFD and set these fields in the state struct: - STATE_ARCHITECTURE, if not set already and can be determined from the bfd - STATE_PROG_BFD - STATE_START_ADDR - STATE_TEXT_SECTION - STATE_TEXT_START - STATE_TEXT_END - - PROG_NAME is the file name of the executable or NULL. - PROG_BFD is its bfd or NULL. - - If both PROG_NAME and PROG_BFD are NULL, this function returns immediately. - If PROG_BFD is not NULL, PROG_NAME is ignored. - - Implicit inputs: STATE_MY_NAME(sd), STATE_TARGET(sd), - STATE_ARCHITECTURE(sd). - - A new bfd is created so the app isn't required to keep its copy of the - bfd open. */ - -SIM_RC -sim_analyze_program (sd, prog_name, prog_bfd) - SIM_DESC sd; - char *prog_name; - bfd *prog_bfd; -{ - asection *s; - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - - if (prog_bfd != NULL) - { - if (prog_bfd == STATE_PROG_BFD (sd)) - /* already analyzed */ - return SIM_RC_OK; - else - /* duplicate needed, save the name of the file to be re-opened */ - prog_name = bfd_get_filename (prog_bfd); - } - - /* do we need to duplicate anything? */ - if (prog_name == NULL) - return SIM_RC_OK; - - /* open a new copy of the prog_bfd */ - prog_bfd = bfd_openr (prog_name, STATE_TARGET (sd)); - if (prog_bfd == NULL) - { - sim_io_eprintf (sd, "%s: can't open \"%s\": %s\n", - STATE_MY_NAME (sd), - prog_name, - bfd_errmsg (bfd_get_error ())); - return SIM_RC_FAIL; - } - if (!bfd_check_format (prog_bfd, bfd_object)) - { - sim_io_eprintf (sd, "%s: \"%s\" is not an object file: %s\n", - STATE_MY_NAME (sd), - prog_name, - bfd_errmsg (bfd_get_error ())); - bfd_close (prog_bfd); - return SIM_RC_FAIL; - } - if (STATE_ARCHITECTURE (sd) != NULL) - bfd_set_arch_info (prog_bfd, STATE_ARCHITECTURE (sd)); - else - { - if (bfd_get_arch (prog_bfd) != bfd_arch_unknown - && bfd_get_arch (prog_bfd) != bfd_arch_obscure) - { - STATE_ARCHITECTURE (sd) = bfd_get_arch_info (prog_bfd); - } - } - - /* update the sim structure */ - if (STATE_PROG_BFD (sd) != NULL) - bfd_close (STATE_PROG_BFD (sd)); - STATE_PROG_BFD (sd) = prog_bfd; - STATE_START_ADDR (sd) = bfd_get_start_address (prog_bfd); - - for (s = prog_bfd->sections; s; s = s->next) - if (strcmp (bfd_get_section_name (prog_bfd, s), ".text") == 0) - { - STATE_TEXT_SECTION (sd) = s; - STATE_TEXT_START (sd) = bfd_get_section_vma (prog_bfd, s); - STATE_TEXT_END (sd) = STATE_TEXT_START (sd) + bfd_section_size (prog_bfd, s); - break; - } - - bfd_cache_close (prog_bfd); - - return SIM_RC_OK; -} - -/* Simulator timing support. */ - -/* Called before sim_elapsed_time_since to get a reference point. */ - -SIM_ELAPSED_TIME -sim_elapsed_time_get () -{ -#ifdef HAVE_GETRUSAGE - struct rusage mytime; - if (getrusage (RUSAGE_SELF, &mytime) == 0) - return 1 + (SIM_ELAPSED_TIME) (((double) mytime.ru_utime.tv_sec * 1000) + (((double) mytime.ru_utime.tv_usec + 500) / 1000)); - return 1; -#else -#ifdef HAVE_TIME - return 1 + (SIM_ELAPSED_TIME) time ((time_t) 0); -#else - return 1; -#endif -#endif -} - -/* Return the elapsed time in milliseconds since START. - The actual time may be cpu usage (preferred) or wall clock. */ - -unsigned long -sim_elapsed_time_since (start) - SIM_ELAPSED_TIME start; -{ -#ifdef HAVE_GETRUSAGE - return sim_elapsed_time_get () - start; -#else -#ifdef HAVE_TIME - return (sim_elapsed_time_get () - start) * 1000; -#else - return 0; -#endif -#endif -} - - - -/* do_command but with printf style formatting of the arguments */ -void -sim_do_commandf (SIM_DESC sd, - const char *fmt, - ...) -{ - va_list ap; - char *buf; - va_start (ap, fmt); - vasprintf (&buf, fmt, ap); - sim_do_command (sd, buf); - va_end (ap); - free (buf); -} - - -/* sim-basics.h defines a number of enumerations, convert each of them - to a string representation */ -const char * -map_to_str (unsigned map) -{ - switch (map) - { - case read_map: return "read"; - case write_map: return "write"; - case exec_map: return "exec"; - case io_map: return "io"; - default: - { - static char str[10]; - sprintf (str, "(%ld)", (long) map); - return str; - } - } -} - -const char * -access_to_str (unsigned access) -{ - switch (access) - { - case access_invalid: return "invalid"; - case access_read: return "read"; - case access_write: return "write"; - case access_exec: return "exec"; - case access_io: return "io"; - case access_read_write: return "read_write"; - case access_read_exec: return "read_exec"; - case access_write_exec: return "write_exec"; - case access_read_write_exec: return "read_write_exec"; - case access_read_io: return "read_io"; - case access_write_io: return "write_io"; - case access_read_write_io: return "read_write_io"; - case access_exec_io: return "exec_io"; - case access_read_exec_io: return "read_exec_io"; - case access_write_exec_io: return "write_exec_io"; - case access_read_write_exec_io: return "read_write_exec_io"; - default: - { - static char str[10]; - sprintf (str, "(%ld)", (long) access); - return str; - } - } -} - -const char * -transfer_to_str (unsigned transfer) -{ - switch (transfer) - { - case read_transfer: return "read"; - case write_transfer: return "write"; - default: return "(error)"; - } -} - - diff --git a/sim/common/sim-utils.h b/sim/common/sim-utils.h deleted file mode 100644 index 661ac70..0000000 --- a/sim/common/sim-utils.h +++ /dev/null @@ -1,90 +0,0 @@ -/* Miscellaneous simulator utilities. - 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 SIM_UTILS_H -#define SIM_UTILS_H - -/* Memory management with an allocator that clears memory before use. */ - -void *zalloc (unsigned long size); - -#define ZALLOC(TYPE) (TYPE*)zalloc(sizeof (TYPE)) -#define NZALLOC(TYPE,N) (TYPE*)zalloc(sizeof (TYPE) * (N)) - -void zfree(void*); - -/* Turn VALUE into a string with commas. */ -char *sim_add_commas (char *, int, unsigned long); - -/* Utilities for elapsed time reporting. */ - -/* Opaque type, known only inside sim_elapsed_time_foo fns. Externally - it is known to never have the value zero. */ -typedef unsigned long SIM_ELAPSED_TIME; - - -/* Get reference point for future call to sim_time_elapsed. */ -SIM_ELAPSED_TIME sim_elapsed_time_get (void); - -/* Elapsed time in milliseconds since START. */ -unsigned long sim_elapsed_time_since (SIM_ELAPSED_TIME start); - -/* Utilities for manipulating the load image. */ - -SIM_RC sim_analyze_program (SIM_DESC sd, char *prog_name, - struct bfd *prog_bfd); - -/* Load program PROG into the simulator using the function DO_LOAD. - If PROG_BFD is non-NULL, the file has already been opened. - If VERBOSE_P is non-zero statistics are printed of each loaded section - and the transfer rate (for consistency with gdb). - If LMA_P is non-zero the program sections are loaded at the LMA - rather than the VMA - If this fails an error message is printed and NULL is returned. - If it succeeds the bfd is returned. - NOTE: For historical reasons, older hardware simulators incorrectly - write the program sections at LMA interpreted as a virtual address. - This is still accommodated for backward compatibility reasons. */ - -typedef int sim_write_fn PARAMS ((SIM_DESC sd, SIM_ADDR mem, - unsigned char *buf, int length)); -struct bfd *sim_load_file (SIM_DESC sd, const char *myname, - host_callback *callback, char *prog, - struct bfd *prog_bfd, int verbose_p, - int lma_p, sim_write_fn do_load); - -/* Internal version of sim_do_command, include formatting */ -void sim_do_commandf (SIM_DESC sd, const char *fmt, ...); - - -/* These are defined in callback.c as cover functions to the vprintf - callbacks. */ - -void sim_cb_printf (host_callback *, const char *, ...); -void sim_cb_eprintf (host_callback *, const char *, ...); - - -/* sim-basics.h defines a number of enumerations, convert each of them - to a string representation */ -const char *map_to_str (unsigned map); -const char *access_to_str (unsigned access); -const char *transfer_to_str (unsigned transfer); - -#endif diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c deleted file mode 100644 index 75c9ad1..0000000 --- a/sim/common/sim-watch.c +++ /dev/null @@ -1,458 +0,0 @@ -/* Generic simulator watchpoint support. - 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. */ - -#include "sim-main.h" -#include "sim-options.h" - -#include "sim-assert.h" - -#include <ctype.h> - -#ifdef HAVE_STRING_H -#include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif - -enum { - OPTION_WATCH_DELETE = OPTION_START, - - OPTION_WATCH_INFO, - OPTION_WATCH_CLOCK, - OPTION_WATCH_CYCLES, - OPTION_WATCH_PC, - - OPTION_WATCH_OP, -}; - - -/* Break an option number into its op/int-nr */ -static watchpoint_type -option_to_type (SIM_DESC sd, - int option) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - watchpoint_type type = ((option - OPTION_WATCH_OP) - / (watch->nr_interrupts + 1)); - SIM_ASSERT (type >= 0 && type < nr_watchpoint_types); - return type; -} - -static int -option_to_interrupt_nr (SIM_DESC sd, - int option) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - int interrupt_nr = ((option - OPTION_WATCH_OP) - % (watch->nr_interrupts + 1)); - return interrupt_nr; -} - -static int -type_to_option (SIM_DESC sd, - watchpoint_type type, - int interrupt_nr) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - return ((type * (watch->nr_interrupts + 1)) - + interrupt_nr - + OPTION_WATCH_OP); -} - - -/* Delete one or more watchpoints. Fail if no watchpoints were found */ - -static SIM_RC -do_watchpoint_delete (SIM_DESC sd, - int ident, - watchpoint_type type) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - sim_watch_point **entry = &watch->points; - SIM_RC status = SIM_RC_FAIL; - while ((*entry) != NULL) - { - if ((*entry)->ident == ident - || (*entry)->type == type) - { - sim_watch_point *dead = (*entry); - (*entry) = (*entry)->next; - sim_events_deschedule (sd, dead->event); - zfree (dead); - status = SIM_RC_OK; - } - else - entry = &(*entry)->next; - } - return status; -} - -static char * -watchpoint_type_to_str (SIM_DESC sd, - watchpoint_type type) -{ - switch (type) - { - case pc_watchpoint: - return "pc"; - case clock_watchpoint: - return "clock"; - case cycles_watchpoint: - return "cycles"; - case invalid_watchpoint: - case nr_watchpoint_types: - return "(invalid-type)"; - } - return NULL; -} - -static char * -interrupt_nr_to_str (SIM_DESC sd, - int interrupt_nr) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - if (interrupt_nr < 0) - return "(invalid-interrupt)"; - else if (interrupt_nr >= watch->nr_interrupts) - return "breakpoint"; - else - return watch->interrupt_names[interrupt_nr]; -} - - -static void -do_watchpoint_info (SIM_DESC sd) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - sim_watch_point *point; - sim_io_printf (sd, "Watchpoints:\n"); - for (point = watch->points; point != NULL; point = point->next) - { - sim_io_printf (sd, "%3d: watch %s %s ", - point->ident, - watchpoint_type_to_str (sd, point->type), - interrupt_nr_to_str (sd, point->interrupt_nr)); - if (point->is_periodic) - sim_io_printf (sd, "+"); - if (!point->is_within) - sim_io_printf (sd, "!"); - sim_io_printf (sd, "0x%lx", point->arg0); - if (point->arg1 != point->arg0) - sim_io_printf (sd, ",0x%lx", point->arg1); - sim_io_printf (sd, "\n"); - } -} - - - -static sim_event_handler handle_watchpoint; - -static SIM_RC -schedule_watchpoint (SIM_DESC sd, - sim_watch_point *point) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - switch (point->type) - { - case pc_watchpoint: - point->event = sim_events_watch_sim (sd, - watch->pc, - watch->sizeof_pc, - 0/* host-endian */, - point->is_within, - point->arg0, point->arg1, - /* PC in arg0..arg1 */ - handle_watchpoint, - point); - return SIM_RC_OK; - case clock_watchpoint: - point->event = sim_events_watch_clock (sd, - point->arg0, /* ms time */ - handle_watchpoint, - point); - return SIM_RC_OK; - case cycles_watchpoint: - point->event = sim_events_schedule (sd, - point->arg0, /* time */ - handle_watchpoint, - point); - return SIM_RC_OK; - default: - sim_engine_abort (sd, NULL, NULL_CIA, - "handle_watchpoint - internal error - bad switch"); - return SIM_RC_FAIL; - } - return SIM_RC_OK; -} - - -static void -handle_watchpoint (SIM_DESC sd, void *data) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - sim_watch_point *point = (sim_watch_point *) data; - int interrupt_nr = point->interrupt_nr; - - if (point->is_periodic) - /* reschedule this event before processing it */ - schedule_watchpoint (sd, point); - else - do_watchpoint_delete (sd, point->ident, invalid_watchpoint); - - if (point->interrupt_nr == watch->nr_interrupts) - sim_engine_halt (sd, NULL, NULL, NULL_CIA, sim_stopped, SIM_SIGINT); - else - watch->interrupt_handler (sd, &watch->interrupt_names[interrupt_nr]); -} - - -static SIM_RC -do_watchpoint_create (SIM_DESC sd, - watchpoint_type type, - int opt, - char *arg) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - sim_watch_point **point; - - /* create the watchpoint */ - point = &watch->points; - while ((*point) != NULL) - point = &(*point)->next; - (*point) = ZALLOC (sim_watch_point); - - /* fill in the details */ - (*point)->ident = ++(watch->last_point_nr); - (*point)->type = option_to_type (sd, opt); - (*point)->interrupt_nr = option_to_interrupt_nr (sd, opt); - /* prefixes to arg - +== periodic, !==not or outside */ - (*point)->is_within = 1; - while (1) - { - if (arg[0] == '+') - (*point)->is_periodic = 1; - else if (arg[0] == '!') - (*point)->is_within = 0; - else - break; - arg++; - } - - (*point)->arg0 = strtoul (arg, &arg, 0); - if (arg[0] == ',') - (*point)->arg0 = strtoul (arg, NULL, 0); - else - (*point)->arg1 = (*point)->arg0; - - /* schedule it */ - schedule_watchpoint (sd, (*point)); - - return SIM_RC_OK; -} - - -static SIM_RC -watchpoint_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, - char *arg, int is_command) -{ - if (opt >= OPTION_WATCH_OP) - return do_watchpoint_create (sd, clock_watchpoint, opt, arg); - else - switch (opt) - { - - case OPTION_WATCH_DELETE: - if (isdigit ((int) arg[0])) - { - int ident = strtol (arg, NULL, 0); - if (do_watchpoint_delete (sd, ident, invalid_watchpoint) - != SIM_RC_OK) - { - sim_io_eprintf (sd, "Watchpoint %d not found\n", ident); - return SIM_RC_FAIL; - } - return SIM_RC_OK; - } - else if (strcasecmp (arg, "all") == 0) - { - watchpoint_type type; - for (type = invalid_watchpoint + 1; - type < nr_watchpoint_types; - type++) - { - do_watchpoint_delete (sd, 0, type); - } - return SIM_RC_OK; - } - else if (strcasecmp (arg, "pc") == 0) - { - if (do_watchpoint_delete (sd, 0, pc_watchpoint) - != SIM_RC_OK) - { - sim_io_eprintf (sd, "No PC watchpoints found\n"); - return SIM_RC_FAIL; - } - return SIM_RC_OK; - } - else if (strcasecmp (arg, "clock") == 0) - { - if (do_watchpoint_delete (sd, 0, clock_watchpoint) != SIM_RC_OK) - { - sim_io_eprintf (sd, "No CLOCK watchpoints found\n"); - return SIM_RC_FAIL; - } - return SIM_RC_OK; - } - else if (strcasecmp (arg, "cycles") == 0) - { - if (do_watchpoint_delete (sd, 0, cycles_watchpoint) != SIM_RC_OK) - { - sim_io_eprintf (sd, "No CYCLES watchpoints found\n"); - return SIM_RC_FAIL; - } - return SIM_RC_OK; - } - sim_io_eprintf (sd, "Unknown watchpoint type `%s'\n", arg); - return SIM_RC_FAIL; - - case OPTION_WATCH_INFO: - { - do_watchpoint_info (sd); - return SIM_RC_OK; - } - - default: - sim_io_eprintf (sd, "Unknown watch option %d\n", opt); - return SIM_RC_FAIL; - - } - -} - - -static SIM_RC -sim_watchpoint_init (SIM_DESC sd) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - sim_watch_point *point; - /* NOTE: Do not need to de-schedule any previous watchpoints as - sim-events has already done this */ - /* schedule any watchpoints enabled by command line options */ - for (point = watch->points; point != NULL; point = point->next) - { - schedule_watchpoint (sd, point); - } - return SIM_RC_OK; -} - - -static const OPTION watchpoint_options[] = -{ - { {"watch-delete", required_argument, NULL, OPTION_WATCH_DELETE }, - '\0', "IDENT|all|pc|cycles|clock", "Delete a watchpoint", - watchpoint_option_handler }, - - { {"watch-info", no_argument, NULL, OPTION_WATCH_INFO }, - '\0', NULL, "List scheduled watchpoints", - watchpoint_option_handler }, - - { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } -}; - -static char *default_interrupt_names[] = { "int", 0, }; - - - -SIM_RC -sim_watchpoint_install (SIM_DESC sd) -{ - sim_watchpoints *watch = STATE_WATCHPOINTS (sd); - SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - /* the basic command set */ - sim_module_add_init_fn (sd, sim_watchpoint_init); - sim_add_option_table (sd, NULL, watchpoint_options); - /* fill in some details */ - if (watch->interrupt_names == NULL) - watch->interrupt_names = default_interrupt_names; - watch->nr_interrupts = 0; - while (watch->interrupt_names[watch->nr_interrupts] != NULL) - watch->nr_interrupts++; - /* generate more advansed commands */ - { - OPTION *int_options = NZALLOC (OPTION, 1 + (watch->nr_interrupts + 1) * nr_watchpoint_types); - int interrupt_nr; - for (interrupt_nr = 0; interrupt_nr <= watch->nr_interrupts; interrupt_nr++) - { - watchpoint_type type; - for (type = 0; type < nr_watchpoint_types; type++) - { - char *name; - int nr = interrupt_nr * nr_watchpoint_types + type; - OPTION *option = &int_options[nr]; - asprintf (&name, "watch-%s-%s", - watchpoint_type_to_str (sd, type), - interrupt_nr_to_str (sd, interrupt_nr)); - option->opt.name = name; - option->opt.has_arg = required_argument; - option->opt.val = type_to_option (sd, type, interrupt_nr); - option->doc = ""; - option->doc_name = ""; - option->handler = watchpoint_option_handler; - } - } - /* adjust first few entries so that they contain real - documentation, the first entry includes a list of actions. */ - { - char *prefix = - "Watch the simulator, take ACTION in COUNT cycles (`+' for every COUNT cycles), ACTION is"; - char *doc; - int len = strlen (prefix) + 1; - for (interrupt_nr = 0; interrupt_nr <= watch->nr_interrupts; interrupt_nr++) - len += strlen (interrupt_nr_to_str (sd, interrupt_nr)) + 1; - doc = NZALLOC (char, len); - strcpy (doc, prefix); - for (interrupt_nr = 0; interrupt_nr <= watch->nr_interrupts; interrupt_nr++) - { - strcat (doc, " "); - strcat (doc, interrupt_nr_to_str (sd, interrupt_nr)); - } - int_options[0].doc_name = "watch-cycles-ACTION"; - int_options[0].arg = "[+]COUNT"; - int_options[0].doc = doc; - } - int_options[1].doc_name = "watch-pc-ACTION"; - int_options[1].arg = "[!]ADDRESS"; - int_options[1].doc = - "Watch the PC, take ACTION when matches ADDRESS (in range ADDRESS,ADDRESS), `!' negates test"; - int_options[2].doc_name = "watch-clock-ACTION"; - int_options[2].arg = "[+]MILLISECONDS"; - int_options[2].doc = - "Watch the clock, take ACTION after MILLISECONDS (`+' for every MILLISECONDS)"; - - sim_add_option_table (sd, NULL, int_options); - } - return SIM_RC_OK; -} diff --git a/sim/common/sim-watch.h b/sim/common/sim-watch.h deleted file mode 100644 index ad920d3..0000000 --- a/sim/common/sim-watch.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Simulator watchpoint support. - 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 SIM_WATCH_H -#define SIM_WATCH_H - -typedef enum { - invalid_watchpoint = -1, - pc_watchpoint, - clock_watchpoint, - cycles_watchpoint, - nr_watchpoint_types, -} watchpoint_type; - -typedef struct _sim_watch_point sim_watch_point; -struct _sim_watch_point { - int ident; - watchpoint_type type; - int interrupt_nr; /* == nr_interrupts -> breakpoint */ - int is_periodic; - int is_within; - unsigned long arg0; - unsigned long arg1; - sim_event *event; - sim_watch_point *next; -}; - - -typedef struct _sim_watchpoints { - - /* Pointer into the host's data structures specifying the - address/size of the program-counter */ - /* FIXME: In the future this shall be generalized so that any of the - N processors M registers can be watched */ - void *pc; - int sizeof_pc; - - /* Pointer to the handler for interrupt watchpoints */ - /* FIXME: can this be done better? */ - /* NOTE: For the DATA arg, the handler is passed a (char**) pointer - that is an offset into the INTERRUPT_NAMES vector. Use - arithmetic to determine the interrupt-nr. */ - sim_event_handler *interrupt_handler; - - /* Pointer to a null terminated list of interrupt names */ - /* FIXME: can this be done better? Look at the PPC's interrupt - mechanism and table for a rough idea of where it will go next */ - int nr_interrupts; - char **interrupt_names; - - /* active watchpoints */ - int last_point_nr; - sim_watch_point *points; - -} sim_watchpoints; - -/* Watch install handler. */ -MODULE_INSTALL_FN sim_watchpoint_install; - -#endif /* SIM_WATCH_H */ diff --git a/sim/common/syscall.c b/sim/common/syscall.c deleted file mode 100644 index 452fa79..0000000 --- a/sim/common/syscall.c +++ /dev/null @@ -1,633 +0,0 @@ -/* Remote target system call support. - Copyright 1997, 1998, 2002, 2004 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 GAS; see the file COPYING. If not, write to the Free Software - Foundation, 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. K&R C must be - supported. */ - -#ifdef HAVE_CONFIG_H -#include "cconfig.h" -#endif -#include "ansidecl.h" -#include "libiberty.h" -#include <stdarg.h> -#include <stdio.h> -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#ifdef HAVE_STRING_H -#include <string.h> -#elif defined (HAVE_STRINGS_H) -#include <strings.h> -#endif -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#include <errno.h> -#include <fcntl.h> -#include <time.h> -#include <sys/types.h> -#include <sys/stat.h> -#include "gdb/callback.h" -#include "targ-vals.h" - -#ifndef ENOSYS -#define ENOSYS EINVAL -#endif -#ifndef ENAMETOOLONG -#define ENAMETOOLONG EINVAL -#endif - -/* Maximum length of a path name. */ -#ifndef MAX_PATH_LEN -#define MAX_PATH_LEN 1024 -#endif - -/* When doing file read/writes, do this many bytes at a time. */ -#define FILE_XFR_SIZE 4096 - -/* FIXME: for now, need to consider target word size. */ -#define TWORD long -#define TADDR unsigned long - -/* Path to be prepended to syscalls with absolute paths, and to be - chdir:ed at startup, if not empty. */ -char *simulator_sysroot = ""; - -/* Utility of cb_syscall to fetch a path name or other string from the target. - The result is 0 for success or a host errno value. */ - -static int -get_string (cb, sc, buf, buflen, addr) - host_callback *cb; - CB_SYSCALL *sc; - char *buf; - int buflen; - TADDR addr; -{ - char *p, *pend; - - for (p = buf, pend = buf + buflen; p < pend; ++p, ++addr) - { - /* No, it isn't expected that this would cause one transaction with - the remote target for each byte. The target could send the - path name along with the syscall request, and cache the file - name somewhere (or otherwise tweak this as desired). */ - unsigned int count = (*sc->read_mem) (cb, sc, addr, p, 1); - - if (count != 1) - return EINVAL; - if (*p == 0) - break; - } - if (p == pend) - return ENAMETOOLONG; - return 0; -} - -/* Utility of cb_syscall to fetch a path name. - The buffer is malloc'd and the address is stored in BUFP. - The result is that of get_string, but prepended with - simulator_sysroot if the string starts with '/'. - If an error occurs, no buffer is left malloc'd. */ - -static int -get_path (cb, sc, addr, bufp) - host_callback *cb; - CB_SYSCALL *sc; - TADDR addr; - char **bufp; -{ - char *buf = xmalloc (MAX_PATH_LEN); - int result; - int sysroot_len = strlen (simulator_sysroot); - - result = get_string (cb, sc, buf, MAX_PATH_LEN - sysroot_len, addr); - if (result == 0) - { - /* Prepend absolute paths with simulator_sysroot. Relative paths - are supposed to be relative to a chdir within that path, but at - this point unknown where. */ - if (simulator_sysroot[0] != '\0' && *buf == '/') - { - /* Considering expected rareness of syscalls with absolute - file paths (compared to relative file paths and insn - execution), it does not seem worthwhile to rearrange things - to get rid of the string moves here; we'd need at least an - extra call to check the initial '/' in the path. */ - memmove (buf + sysroot_len, buf, sysroot_len); - memcpy (buf, simulator_sysroot, sysroot_len); - } - - *bufp = buf; - } - else - free (buf); - return result; -} - -/* Perform a system call on behalf of the target. */ - -CB_RC -cb_syscall (cb, sc) - host_callback *cb; - CB_SYSCALL *sc; -{ - TWORD result = 0, errcode = 0; - - if (sc->magic != CB_SYSCALL_MAGIC) - abort (); - - switch (cb_target_to_host_syscall (cb, sc->func)) - { -#if 0 /* FIXME: wip */ - case CB_SYS_argvlen : - { - /* Compute how much space is required to store the argv,envp - strings so that the program can allocate the space and then - call SYS_argv to fetch the values. */ - int addr_size = cb->addr_size; - int argc,envc,arglen,envlen; - const char **argv = cb->init_argv; - const char **envp = cb->init_envp; - - argc = arglen = 0; - if (argv) - { - for ( ; argv[argc]; ++argc) - arglen += strlen (argv[argc]) + 1; - } - envc = envlen = 0; - if (envp) - { - for ( ; envp[envc]; ++envc) - envlen += strlen (envp[envc]) + 1; - } - result = arglen + envlen; - break; - } - - case CB_SYS_argv : - { - /* Pointer to target's buffer. */ - TADDR tbuf = sc->arg1; - /* Buffer size. */ - int bufsize = sc->arg2; - /* Q is the target address of where all the strings go. */ - TADDR q; - int word_size = cb->word_size; - int i,argc,envc,len; - const char **argv = cb->init_argv; - const char **envp = cb->init_envp; - - argc = 0; - if (argv) - { - for ( ; argv[argc]; ++argc) - { - int len = strlen (argv[argc]); - int written = (*sc->write_mem) (cb, sc, tbuf, argv[argc], len + 1); - if (written != len) - { - result = -1; - errcode = EINVAL; - goto FinishSyscall; - } - tbuf = len + 1; - } - } - if ((*sc->write_mem) (cb, sc, tbuf, "", 1) != 1) - { - result = -1; - errcode = EINVAL; - goto FinishSyscall; - } - tbuf++; - envc = 0; - if (envp) - { - for ( ; envp[envc]; ++envc) - { - int len = strlen (envp[envc]); - int written = (*sc->write_mem) (cb, sc, tbuf, envp[envc], len + 1); - if (written != len) - { - result = -1; - errcode = EINVAL; - goto FinishSyscall; - } - tbuf = len + 1; - } - } - if ((*sc->write_mem) (cb, sc, tbuf, "", 1) != 1) - { - result = -1; - errcode = EINVAL; - goto FinishSyscall; - } - result = argc; - sc->result2 = envc; - break; - } -#endif /* wip */ - - case CB_SYS_exit : - /* Caller must catch and handle. */ - break; - - case CB_SYS_open : - { - char *path; - - errcode = get_path (cb, sc, sc->arg1, &path); - if (errcode != 0) - { - result = -1; - goto FinishSyscall; - } - result = (*cb->open) (cb, path, sc->arg2 /*, sc->arg3*/); - free (path); - if (result < 0) - goto ErrorFinish; - } - break; - - case CB_SYS_close : - result = (*cb->close) (cb, sc->arg1); - if (result < 0) - goto ErrorFinish; - break; - - case CB_SYS_read : - { - /* ??? Perfect handling of error conditions may require only one - call to cb->read. One can't assume all the data is - contiguously stored in host memory so that would require - malloc'ing/free'ing the space. Maybe later. */ - char buf[FILE_XFR_SIZE]; - int fd = sc->arg1; - TADDR addr = sc->arg2; - size_t count = sc->arg3; - size_t bytes_read = 0; - int bytes_written; - - while (count > 0) - { - if (fd == 0) - result = (int) (*cb->read_stdin) (cb, buf, - (count < FILE_XFR_SIZE - ? count : FILE_XFR_SIZE)); - else - result = (int) (*cb->read) (cb, fd, buf, - (count < FILE_XFR_SIZE - ? count : FILE_XFR_SIZE)); - if (result == -1) - goto ErrorFinish; - if (result == 0) /* EOF */ - break; - bytes_written = (*sc->write_mem) (cb, sc, addr, buf, result); - if (bytes_written != result) - { - result = -1; - errcode = EINVAL; - goto FinishSyscall; - } - bytes_read += result; - count -= result; - addr += result; - /* If this is a short read, don't go back for more */ - if (result != FILE_XFR_SIZE) - break; - } - result = bytes_read; - } - break; - - case CB_SYS_write : - { - /* ??? Perfect handling of error conditions may require only one - call to cb->write. One can't assume all the data is - contiguously stored in host memory so that would require - malloc'ing/free'ing the space. Maybe later. */ - char buf[FILE_XFR_SIZE]; - int fd = sc->arg1; - TADDR addr = sc->arg2; - size_t count = sc->arg3; - int bytes_read; - size_t bytes_written = 0; - - while (count > 0) - { - int bytes_to_read = count < FILE_XFR_SIZE ? count : FILE_XFR_SIZE; - bytes_read = (*sc->read_mem) (cb, sc, addr, buf, bytes_to_read); - if (bytes_read != bytes_to_read) - { - result = -1; - errcode = EINVAL; - goto FinishSyscall; - } - if (fd == 1) - { - result = (int) (*cb->write_stdout) (cb, buf, bytes_read); - (*cb->flush_stdout) (cb); - } - else if (fd == 2) - { - result = (int) (*cb->write_stderr) (cb, buf, bytes_read); - (*cb->flush_stderr) (cb); - } - else - result = (int) (*cb->write) (cb, fd, buf, bytes_read); - if (result == -1) - goto ErrorFinish; - bytes_written += result; - count -= result; - addr += result; - } - result = bytes_written; - } - break; - - case CB_SYS_lseek : - { - int fd = sc->arg1; - unsigned long offset = sc->arg2; - int whence = sc->arg3; - - result = (*cb->lseek) (cb, fd, offset, whence); - if (result < 0) - goto ErrorFinish; - } - break; - - case CB_SYS_unlink : - { - char *path; - - errcode = get_path (cb, sc, sc->arg1, &path); - if (errcode != 0) - { - result = -1; - goto FinishSyscall; - } - result = (*cb->unlink) (cb, path); - free (path); - if (result < 0) - goto ErrorFinish; - } - break; - - case CB_SYS_truncate : - { - char *path; - long len = sc->arg2; - - errcode = get_path (cb, sc, sc->arg1, &path); - if (errcode != 0) - { - result = -1; - errcode = EFAULT; - goto FinishSyscall; - } - result = (*cb->truncate) (cb, path, len); - free (path); - if (result < 0) - goto ErrorFinish; - } - break; - - case CB_SYS_ftruncate : - { - int fd = sc->arg1; - long len = sc->arg2; - - result = (*cb->ftruncate) (cb, fd, len); - if (result < 0) - goto ErrorFinish; - } - break; - - case CB_SYS_rename : - { - char *path1, *path2; - - errcode = get_path (cb, sc, sc->arg1, &path1); - if (errcode != 0) - { - result = -1; - errcode = EFAULT; - goto FinishSyscall; - } - errcode = get_path (cb, sc, sc->arg2, &path2); - if (errcode != 0) - { - result = -1; - errcode = EFAULT; - free (path1); - goto FinishSyscall; - } - result = (*cb->rename) (cb, path1, path2); - free (path1); - free (path2); - if (result < 0) - goto ErrorFinish; - } - break; - - case CB_SYS_stat : - { - char *path,*buf; - int buflen; - struct stat statbuf; - TADDR addr = sc->arg2; - - errcode = get_path (cb, sc, sc->arg1, &path); - if (errcode != 0) - { - result = -1; - goto FinishSyscall; - } - result = (*cb->stat) (cb, path, &statbuf); - free (path); - if (result < 0) - goto ErrorFinish; - buflen = cb_host_to_target_stat (cb, NULL, NULL); - buf = xmalloc (buflen); - if (cb_host_to_target_stat (cb, &statbuf, buf) != buflen) - { - /* The translation failed. This is due to an internal - host program error, not the target's fault. */ - free (buf); - errcode = ENOSYS; - result = -1; - goto FinishSyscall; - } - if ((*sc->write_mem) (cb, sc, addr, buf, buflen) != buflen) - { - free (buf); - errcode = EINVAL; - result = -1; - goto FinishSyscall; - } - free (buf); - } - break; - - case CB_SYS_fstat : - { - char *buf; - int buflen; - struct stat statbuf; - TADDR addr = sc->arg2; - - result = (*cb->fstat) (cb, sc->arg1, &statbuf); - if (result < 0) - goto ErrorFinish; - buflen = cb_host_to_target_stat (cb, NULL, NULL); - buf = xmalloc (buflen); - if (cb_host_to_target_stat (cb, &statbuf, buf) != buflen) - { - /* The translation failed. This is due to an internal - host program error, not the target's fault. */ - free (buf); - errcode = ENOSYS; - result = -1; - goto FinishSyscall; - } - if ((*sc->write_mem) (cb, sc, addr, buf, buflen) != buflen) - { - free (buf); - errcode = EINVAL; - result = -1; - goto FinishSyscall; - } - free (buf); - } - break; - - case CB_SYS_lstat : - { - char *path, *buf; - int buflen; - struct stat statbuf; - TADDR addr = sc->arg2; - - errcode = get_path (cb, sc, sc->arg1, &path); - if (errcode != 0) - { - result = -1; - goto FinishSyscall; - } - result = (*cb->lstat) (cb, path, &statbuf); - free (path); - if (result < 0) - goto ErrorFinish; - - buflen = cb_host_to_target_stat (cb, NULL, NULL); - buf = xmalloc (buflen); - if (cb_host_to_target_stat (cb, &statbuf, buf) != buflen) - { - /* The translation failed. This is due to an internal - host program error, not the target's fault. - Unfortunately, it's hard to test this case, so there's no - test-case for this execution path. */ - free (buf); - errcode = ENOSYS; - result = -1; - goto FinishSyscall; - } - - if ((*sc->write_mem) (cb, sc, addr, buf, buflen) != buflen) - { - free (buf); - errcode = EINVAL; - result = -1; - goto FinishSyscall; - } - - free (buf); - } - break; - - case CB_SYS_pipe : - { - int p[2]; - char *target_p = xcalloc (1, cb->target_sizeof_int * 2); - - result = (*cb->pipe) (cb, p); - if (result != 0) - goto ErrorFinish; - - cb_store_target_endian (cb, target_p, cb->target_sizeof_int, p[0]); - cb_store_target_endian (cb, target_p + cb->target_sizeof_int, - cb->target_sizeof_int, p[1]); - if ((*sc->write_mem) (cb, sc, sc->arg1, target_p, - cb->target_sizeof_int * 2) - != cb->target_sizeof_int * 2) - { - /* Close the pipe fd:s. */ - (*cb->close) (cb, p[0]); - (*cb->close) (cb, p[1]); - errcode = EFAULT; - result = -1; - } - - free (target_p); - } - break; - - case CB_SYS_time : - { - /* FIXME: May wish to change CB_SYS_time to something else. - We might also want gettimeofday or times, but if system calls - can be built on others, we can keep the number we have to support - here down. */ - time_t t = (*cb->time) (cb, (time_t *) 0); - result = t; - /* It is up to target code to process the argument to time(). */ - } - break; - - case CB_SYS_chdir : - case CB_SYS_chmod : - case CB_SYS_utime : - /* fall through for now */ - - default : - result = -1; - errcode = ENOSYS; - break; - } - - FinishSyscall: - sc->result = result; - if (errcode == 0) - sc->errcode = 0; - else - sc->errcode = cb_host_to_target_errno (cb, errcode); - return CB_RC_OK; - - ErrorFinish: - sc->result = result; - sc->errcode = (*cb->get_errno) (cb); - return CB_RC_OK; -} diff --git a/sim/common/tconfig.in b/sim/common/tconfig.in deleted file mode 100644 index fd8b5be..0000000 --- a/sim/common/tconfig.in +++ /dev/null @@ -1,19 +0,0 @@ -/* Default target configuration file. - To override this, create file `tconfig.in' in the simulator's - source directory. */ - -/* Define this if the simulator supports profiling. - See the mips simulator for an example. - This enables the `-p foo' and `-s bar' options. - The target is required to provide sim_set_profile{,_size}. */ -/* #define SIM_HAVE_PROFILE */ - -/* Define this if the simulator uses an instruction cache. - See the h8/300 simulator for an example. - This enables the `-c size' option to set the size of the cache. - The target is required to provide sim_set_simcache_size. */ -/* #define SIM_HAVE_SIMCACHE */ - -/* Define this if the target cpu is bi-endian - and the simulator supports it. */ -/* #define SIM_HAVE_BIENDIAN */ |