Compare commits

...

2 Commits

Author SHA1 Message Date
Andrew Cagney
f060829e7f Index: bfd/ChangeLog
2004-01-21  Andrew Cagney  <cagney@redhat.com>

	* bfdio.c: Update copyright.  Include "bfdio.h".
	(real_ftell, real_fseek): New functions.
	(bfd_tell): Use real_ftell, change return-type to file_ptr.
	(bfd_seek): Use real_ftell and real_fseek.  Change type of
	file_position to a file_ptr.
	* cache.c: Update copyright.  Include "bfdio.h".
	(close_one): Use real_ftell.
	(bfd_cache_lookup_worker): Use real_fseek, use ufile_ptr in cast.
	* bfd-in.h: Update copyright.
	(file_ptr, ufile_ptr): Specify type using @BFD_FILE_PTR@.
	(bfd_tell): Make return-type "file_ptr".
	* bfd-in2.h: Re-generate.
	* configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
	fseeko and fseeko64.
	* config.in, configure: Re-generate.
	* libbfd-in.h: Update copyright.
	(real_ftell, real_fseek): Declare.
	* libbfd.h: Re-generate.
	* elf.c (offset_vma_page_alignment): New function.
	(assign_file_positions_for_segments): Replace broken modulo code
	with offset_vma_page_alignment.
	(assign_file_positions_except_relocs): Ditto.

Index: gdb/testsuite/ChangeLog
2004-01-22  Andrew Cagney  <cagney@redhat.com>

	* gdb.base/bigcore.exp: New file.
	* gdb.base/bigcore.c: New file.
2004-01-22 17:03:45 +00:00
nobody
a5dd37ab65 This commit was manufactured by cvs2svn to create branch
'cagney_bigcore-20040122-branch'.

Sprout from master 2004-01-22 00:00:02 UTC gdbadmin <gdbadmin@sourceware.org> '*** empty log message ***'
Cherrypick from cygnus 2000-02-22 15:59:20 UTC Ian Lance Taylor <ian@airs.com> 'import libiberty from egcs':
    COPYING
    COPYING.LIB
    README
    bfd/PORTING
    bfd/TODO
    bfd/cf-m68klynx.c
    bfd/coff-svm68k.c
    bfd/coff-u68k.c
    bfd/configure.com
    bfd/doc/doc.str
    bfd/doc/makefile.vms
    bfd/elf64.c
    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/vaxult.h
    bfd/hosts/vaxult2.h
    bfd/makefile.vms
    bfd/mpw-config.in
    bfd/mpw-make.sed
    bfd/stamp-h.in
    binutils/configure.com
    binutils/mac-binutils.r
    binutils/makefile.vms-in
    binutils/mpw-config.in
    binutils/mpw-make.sed
    binutils/ranlib.sh
    binutils/sanity.sh
    binutils/stamp-h.in
    binutils/testsuite/binutils-all/bintest.s
    binutils/testsuite/binutils-all/hppa/addendbug.s
    binutils/testsuite/config/hppa.sed
    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
    etc/configure
    etc/configure.in
    gas/config-gas.com
    gas/config/e-mipsecoff.c
    gas/config/e-mipself.c
    gas/config/obj-multi.c
    gas/config/tc-generic.c
    gas/config/te-dynix.h
    gas/config/te-epoc-pe.h
    gas/config/te-linux.h
    gas/config/te-lnews.h
    gas/config/te-lynx.h
    gas/config/te-mach.h
    gas/config/te-riscix.h
    gas/config/te-svr4.h
    gas/config/vms-a-conf.h
    gas/doc/c-d30v.texi
    gas/gdbinit.in
    gas/link.cmd
    gas/mac-as.r
    gas/mpw-config.in
    gas/stamp-h.in
    gas/testsuite/gas/all/align.d
    gas/testsuite/gas/all/align.s
    gas/testsuite/gas/all/cofftag.s
    gas/testsuite/gas/all/comment.s
    gas/testsuite/gas/all/diff1.s
    gas/testsuite/gas/all/float.s
    gas/testsuite/gas/all/itbl
    gas/testsuite/gas/all/itbl.s
    gas/testsuite/gas/all/p1480.s
    gas/testsuite/gas/all/p2425.s
    gas/testsuite/gas/all/struct.d
    gas/testsuite/gas/all/struct.s
    gas/testsuite/gas/all/x930509.s
    gas/testsuite/gas/arc/alias.d
    gas/testsuite/gas/arc/alias.s
    gas/testsuite/gas/arc/branch.d
    gas/testsuite/gas/arc/branch.s
    gas/testsuite/gas/arc/flag.s
    gas/testsuite/gas/arc/insn3.d
    gas/testsuite/gas/arc/insn3.s
    gas/testsuite/gas/arc/math.d
    gas/testsuite/gas/arc/math.s
    gas/testsuite/gas/arc/sshift.d
    gas/testsuite/gas/arc/sshift.s
    gas/testsuite/gas/arm/arm3.s
    gas/testsuite/gas/arm/immed.s
    gas/testsuite/gas/arm/le-fpconst.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.s
    gas/testsuite/gas/d30v/d30.exp
    gas/testsuite/gas/d30v/guard-debug.s
    gas/testsuite/gas/d30v/guard.d
    gas/testsuite/gas/d30v/guard.s
    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/fr30/allinsn.d
    gas/testsuite/gas/fr30/allinsn.exp
    gas/testsuite/gas/fr30/allinsn.s
    gas/testsuite/gas/fr30/fr30.exp
    gas/testsuite/gas/h8300/addsub.s
    gas/testsuite/gas/h8300/addsubh.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/cbranch.s
    gas/testsuite/gas/h8300/cbranchh.s
    gas/testsuite/gas/h8300/cbranchs.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/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/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/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/hppa/README
    gas/testsuite/gas/hppa/basic/weird.s
    gas/testsuite/gas/hppa/parse/appbug.s
    gas/testsuite/gas/hppa/parse/nosubspace.s
    gas/testsuite/gas/hppa/parse/spacebug.s
    gas/testsuite/gas/hppa/parse/ssbug.s
    gas/testsuite/gas/hppa/reloc/reduce2.s
    gas/testsuite/gas/hppa/unsorted/align3.s
    gas/testsuite/gas/hppa/unsorted/align4.s
    gas/testsuite/gas/hppa/unsorted/globalbug.s
    gas/testsuite/gas/hppa/unsorted/ss_align.s
    gas/testsuite/gas/i386/inval.l
    gas/testsuite/gas/i386/inval.s
    gas/testsuite/gas/i386/opcode.s
    gas/testsuite/gas/ieee-fp/x930509a.s
    gas/testsuite/gas/m32r/allinsn.exp
    gas/testsuite/gas/m32r/allinsn.s
    gas/testsuite/gas/m32r/fslot.d
    gas/testsuite/gas/m32r/fslot.s
    gas/testsuite/gas/m32r/high-1.s
    gas/testsuite/gas/m32r/outofrange.s
    gas/testsuite/gas/m32r/relax-1.s
    gas/testsuite/gas/m32r/uppercase.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/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/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/pic1.s
    gas/testsuite/gas/m68k/t2.d
    gas/testsuite/gas/m68k/t2.s
    gas/testsuite/gas/m88k/init.s
    gas/testsuite/gas/macros/err.s
    gas/testsuite/gas/macros/semi.d
    gas/testsuite/gas/macros/semi.s
    gas/testsuite/gas/macros/test1.d
    gas/testsuite/gas/macros/test1.s
    gas/testsuite/gas/mcore/allinsn.exp
    gas/testsuite/gas/mcore/allinsn.s
    gas/testsuite/gas/mips/abs.s
    gas/testsuite/gas/mips/add.s
    gas/testsuite/gas/mips/and.s
    gas/testsuite/gas/mips/break20.s
    gas/testsuite/gas/mips/div.s
    gas/testsuite/gas/mips/dli.s
    gas/testsuite/gas/mips/itbl
    gas/testsuite/gas/mips/itbl.s
    gas/testsuite/gas/mips/jal.s
    gas/testsuite/gas/mips/la-empic.s
    gas/testsuite/gas/mips/lb-pic.s
    gas/testsuite/gas/mips/lb.s
    gas/testsuite/gas/mips/ld-pic.s
    gas/testsuite/gas/mips/ld.s
    gas/testsuite/gas/mips/li.s
    gas/testsuite/gas/mips/lifloat.s
    gas/testsuite/gas/mips/lineno.s
    gas/testsuite/gas/mips/mips16.s
    gas/testsuite/gas/mips/mul.s
    gas/testsuite/gas/mips/sb.s
    gas/testsuite/gas/mips/trap20.s
    gas/testsuite/gas/mips/trunc.s
    gas/testsuite/gas/mips/uld.s
    gas/testsuite/gas/mips/ulh-pic.s
    gas/testsuite/gas/mips/ulh.s
    gas/testsuite/gas/mips/ulw.s
    gas/testsuite/gas/mips/usd.s
    gas/testsuite/gas/mips/ush.s
    gas/testsuite/gas/mips/usw.s
    gas/testsuite/gas/mn10200/add.s
    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/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/movbu.s
    gas/testsuite/gas/mn10300/movhu.s
    gas/testsuite/gas/mn10300/movm.s
    gas/testsuite/gas/mn10300/muldiv.s
    gas/testsuite/gas/mn10300/other.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.s
    gas/testsuite/gas/mri/for.s
    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.s
    gas/testsuite/gas/mri/repeat.s
    gas/testsuite/gas/mri/semi.d
    gas/testsuite/gas/mri/semi.s
    gas/testsuite/gas/mri/while.s
    gas/testsuite/gas/ppc/astest.d
    gas/testsuite/gas/ppc/astest.s
    gas/testsuite/gas/ppc/simpshft.d
    gas/testsuite/gas/sh/fp.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/prefetch.s
    gas/testsuite/gas/sparc/rdpr.s
    gas/testsuite/gas/sparc/reloc64.s
    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/wrpr.s
    gas/testsuite/gas/sun4/addend.d
    gas/testsuite/gas/sun4/addend.exp
    gas/testsuite/gas/sun4/addend.s
    gas/testsuite/gas/template
    gas/testsuite/gas/tic80/add.d
    gas/testsuite/gas/tic80/add.lst
    gas/testsuite/gas/tic80/add.s
    gas/testsuite/gas/tic80/align.d
    gas/testsuite/gas/tic80/align.lst
    gas/testsuite/gas/tic80/align.s
    gas/testsuite/gas/tic80/bitnum.d
    gas/testsuite/gas/tic80/bitnum.lst
    gas/testsuite/gas/tic80/bitnum.s
    gas/testsuite/gas/tic80/ccode.d
    gas/testsuite/gas/tic80/ccode.lst
    gas/testsuite/gas/tic80/ccode.s
    gas/testsuite/gas/tic80/cregops.d
    gas/testsuite/gas/tic80/cregops.lst
    gas/testsuite/gas/tic80/cregops.s
    gas/testsuite/gas/tic80/endmask.d
    gas/testsuite/gas/tic80/endmask.lst
    gas/testsuite/gas/tic80/endmask.s
    gas/testsuite/gas/tic80/float.d
    gas/testsuite/gas/tic80/float.lst
    gas/testsuite/gas/tic80/float.s
    gas/testsuite/gas/tic80/regops.d
    gas/testsuite/gas/tic80/regops.lst
    gas/testsuite/gas/tic80/regops.s
    gas/testsuite/gas/tic80/regops2.d
    gas/testsuite/gas/tic80/regops2.lst
    gas/testsuite/gas/tic80/regops2.s
    gas/testsuite/gas/tic80/regops3.d
    gas/testsuite/gas/tic80/regops3.lst
    gas/testsuite/gas/tic80/regops3.s
    gas/testsuite/gas/tic80/regops4.d
    gas/testsuite/gas/tic80/regops4.lst
    gas/testsuite/gas/tic80/regops4.s
    gas/testsuite/gas/tic80/relocs1.c
    gas/testsuite/gas/tic80/relocs1.d
    gas/testsuite/gas/tic80/relocs1.lst
    gas/testsuite/gas/tic80/relocs1.s
    gas/testsuite/gas/tic80/relocs1b.d
    gas/testsuite/gas/tic80/relocs2.c
    gas/testsuite/gas/tic80/relocs2.d
    gas/testsuite/gas/tic80/relocs2.lst
    gas/testsuite/gas/tic80/relocs2.s
    gas/testsuite/gas/tic80/relocs2b.d
    gas/testsuite/gas/tic80/tic80.exp
    gas/testsuite/gas/v850/arith.s
    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/vtable/entry0.d
    gas/testsuite/gas/vtable/entry1.d
    gas/testsuite/gas/vtable/inherit0.d
    gas/testsuite/gas/vtable/inherit1.l
    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-dg.exp
    gas/testsuite/lib/run
    gas/vmsconf.sh
    gprof/.gdbinit
    gprof/TEST
    gprof/bsd_callg_bl.m
    gprof/cg_dfn.h
    gprof/flat_bl.m
    gprof/fsf_callg_bl.m
    gprof/stamp-h.in
    gprof/utils.h
    include/aout/hp.h
    include/aout/hppa.h
    include/coff/sym.h
    include/coff/symconst.h
    include/fopen-bin.h
    include/fopen-same.h
    include/fopen-vms.h
    include/gdbm.h
    include/mpw/ChangeLog
    include/mpw/README
    include/mpw/dir.h
    include/mpw/dirent.h
    include/mpw/fcntl.h
    include/mpw/grp.h
    include/mpw/mpw.h
    include/mpw/pwd.h
    include/mpw/stat.h
    include/mpw/sys/file.h
    include/mpw/sys/param.h
    include/mpw/sys/resource.h
    include/mpw/sys/stat.h
    include/mpw/sys/time.h
    include/mpw/sys/types.h
    include/mpw/utime.h
    include/mpw/varargs.h
    include/nlm/ppc-ext.h
    include/opcode/mn10200.h
    include/opcode/tahoe.h
    include/opcode/tic30.h
    ld/TODO
    ld/emulparams/README
    ld/emulparams/a29k.sh
    ld/emulparams/alpha.sh
    ld/emulparams/arcelf.sh
    ld/emulparams/armaoutb.sh
    ld/emulparams/armaoutl.sh
    ld/emulparams/armcoff.sh
    ld/emulparams/coff_sparc.sh
    ld/emulparams/d30v_e.sh
    ld/emulparams/d30v_o.sh
    ld/emulparams/d30velf.sh
    ld/emulparams/delta68.sh
    ld/emulparams/ebmon29k.sh
    ld/emulparams/h8300.sh
    ld/emulparams/h8300h.sh
    ld/emulparams/h8300s.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/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/i386msdos.sh
    ld/emulparams/i386nbsd.sh
    ld/emulparams/m68k4knbsd.sh
    ld/emulparams/m68kaout.sh
    ld/emulparams/m68kaux.sh
    ld/emulparams/m68klinux.sh
    ld/emulparams/m68klynx.sh
    ld/emulparams/m68knbsd.sh
    ld/emulparams/m68kpsos.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/news.sh
    ld/emulparams/pc532macha.sh
    ld/emulparams/ppcnw.sh
    ld/emulparams/riscix.sh
    ld/emulparams/sa29200.sh
    ld/emulparams/sparcaout.sh
    ld/emulparams/sparclinux.sh
    ld/emulparams/sparclynx.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/tic80coff.sh
    ld/emulparams/vsta.sh
    ld/emulparams/w65.sh
    ld/emulparams/z8001.sh
    ld/emulparams/z8002.sh
    ld/emultempl/README
    ld/mac-ld.r
    ld/mpw-config.in
    ld/mpw-make.sed
    ld/scripttempl/README
    ld/scripttempl/a29k.sc
    ld/scripttempl/alpha.sc
    ld/scripttempl/aout.sc
    ld/scripttempl/delta68.sc
    ld/scripttempl/ebmon29k.sc
    ld/scripttempl/hppaelf.sc
    ld/scripttempl/i386coff.sc
    ld/scripttempl/i386lynx.sc
    ld/scripttempl/i386msdos.sc
    ld/scripttempl/i960.sc
    ld/scripttempl/m68kaux.sc
    ld/scripttempl/m68kcoff.sc
    ld/scripttempl/m68klynx.sc
    ld/scripttempl/m88kbcs.sc
    ld/scripttempl/mips.sc
    ld/scripttempl/mipsbsd.sc
    ld/scripttempl/ppcpe.sc
    ld/scripttempl/psos.sc
    ld/scripttempl/riscix.sc
    ld/scripttempl/sa29200.sc
    ld/scripttempl/sparccoff.sc
    ld/scripttempl/sparclynx.sc
    ld/scripttempl/st2000.sc
    ld/scripttempl/tic30aout.sc
    ld/scripttempl/tic30coff.sc
    ld/scripttempl/tic80coff.sc
    ld/scripttempl/vanilla.sc
    ld/stamp-h.in
    ld/testsuite/ld-cdtest/cdtest-bar.cc
    ld/testsuite/ld-cdtest/cdtest-foo.h
    ld/testsuite/ld-cdtest/cdtest.dat
    ld/testsuite/ld-checks/script
    ld/testsuite/ld-elfvers/vers1.dsym
    ld/testsuite/ld-elfvers/vers1.sym
    ld/testsuite/ld-elfvers/vers13.asym
    ld/testsuite/ld-elfvers/vers15.dsym
    ld/testsuite/ld-elfvers/vers15.sym
    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/vers2.dsym
    ld/testsuite/ld-elfvers/vers2.map
    ld/testsuite/ld-elfvers/vers3.dsym
    ld/testsuite/ld-elfvers/vers4.sym
    ld/testsuite/ld-elfvers/vers4a.dsym
    ld/testsuite/ld-elfvers/vers4a.sym
    ld/testsuite/ld-elfvers/vers5.c
    ld/testsuite/ld-elfvers/vers6.dsym
    ld/testsuite/ld-elfvers/vers6.sym
    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/vers8.c
    ld/testsuite/ld-elfvers/vers9.dsym
    ld/testsuite/ld-elfvers/vers9.sym
    ld/testsuite/ld-empic/relax.t
    ld/testsuite/ld-empic/relax1.c
    ld/testsuite/ld-empic/relax2.c
    ld/testsuite/ld-empic/relax3.c
    ld/testsuite/ld-empic/relax4.c
    ld/testsuite/ld-empic/run.c
    ld/testsuite/ld-empic/runtest1.c
    ld/testsuite/ld-empic/runtest2.c
    ld/testsuite/ld-empic/runtesti.s
    ld/testsuite/ld-scripts/cross1.c
    ld/testsuite/ld-scripts/cross2.c
    ld/testsuite/ld-scripts/cross3.c
    ld/testsuite/ld-scripts/defined.s
    ld/testsuite/ld-scripts/defined.t
    ld/testsuite/ld-scripts/phdrs.s
    ld/testsuite/ld-scripts/script.s
    ld/testsuite/ld-scripts/script.t
    ld/testsuite/ld-scripts/scriptm.t
    ld/testsuite/ld-scripts/sizeof.s
    ld/testsuite/ld-scripts/sizeof.t
    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-sh/sh1.s
    ld/testsuite/ld-sh/sh2.c
    ld/testsuite/ld-sh/start.s
    ld/testsuite/ld-shared/sh2.c
    ld/testsuite/ld-shared/shared.dat
    ld/testsuite/ld-shared/sun4.dat
    ld/testsuite/ld-shared/xcoff.dat
    ld/testsuite/ld-srec/sr1.c
    ld/testsuite/ld-srec/sr2.c
    ld/testsuite/ld-undefined/undefined.c
    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
    libiberty/config.h-vms
    libiberty/config/mh-aix
    libiberty/config/mh-cxux7
    libiberty/config/mh-fbsd21
    libiberty/config/mh-windows
    libiberty/makefile.vms
    libiberty/mpw-config.in
    libiberty/mpw-make.sed
    libiberty/mpw.c
    libiberty/msdos.c
    libiberty/vmsbuild.com
    makefile.vms
    move-if-change
    mpw-README
    mpw-build.in
    mpw-config.in
    mpw-configure
    mpw-install
    opcodes/makefile.vms
    opcodes/mpw-config.in
    opcodes/mpw-make.sed
    opcodes/stamp-h.in
    setup.com
    ylwrap
Cherrypick from FSF 2002-08-23 22:02:32 UTC Elena Zannoni <ezannoni@kwikemart.cygnus.com> 'import of readline-4.3':
    readline/USAGE
    readline/examples/excallback.c
Delete:
    gdb/windows-nat.c
    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.in
    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/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
2004-01-22 00:00:03 +00:00
439 changed files with 682 additions and 56764 deletions

View File

@@ -1,3 +1,28 @@
2004-01-21 Andrew Cagney <cagney@redhat.com>
* bfdio.c: Update copyright. Include "bfdio.h".
(real_ftell, real_fseek): New functions.
(bfd_tell): Use real_ftell, change return-type to file_ptr.
(bfd_seek): Use real_ftell and real_fseek. Change type of
file_position to a file_ptr.
* cache.c: Update copyright. Include "bfdio.h".
(close_one): Use real_ftell.
(bfd_cache_lookup_worker): Use real_fseek, use ufile_ptr in cast.
* bfd-in.h: Update copyright.
(file_ptr, ufile_ptr): Specify type using @BFD_FILE_PTR@.
(bfd_tell): Make return-type "file_ptr".
* bfd-in2.h: Re-generate.
* configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
fseeko and fseeko64.
* config.in, configure: Re-generate.
* libbfd-in.h: Update copyright.
(real_ftell, real_fseek): Declare.
* libbfd.h: Re-generate.
* elf.c (offset_vma_page_alignment): New function.
(assign_file_positions_for_segments): Replace broken modulo code
with offset_vma_page_alignment.
(assign_file_positions_except_relocs): Ditto.
2004-01-21 Tom Rix <tcrix@worldnet.att.net>
* reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.

View File

@@ -1,7 +1,7 @@
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -160,16 +160,10 @@ typedef unsigned long bfd_size_type;
#endif /* not BFD64 */
/* A pointer to a position in a file. */
/* FIXME: This should be using off_t from <sys/types.h>.
For now, try to avoid breaking stuff by not including <sys/types.h> here.
This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
Probably the best long-term answer is to avoid using file_ptr AND off_t
in this header file, and to handle this in the BFD implementation
rather than in its interface. */
/* typedef off_t file_ptr; */
typedef bfd_signed_vma file_ptr;
typedef bfd_vma ufile_ptr;
/* An offset into a file. BFD always uses the largest possible offset
based on the build time availability of fseek, fseeko, or fseeko64. */
typedef @bfd_file_ptr@ file_ptr;
typedef unsigned @bfd_file_ptr@ ufile_ptr;
extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
@@ -456,7 +450,7 @@ extern void bfd_hash_traverse
extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
extern int bfd_seek (bfd *, file_ptr, int);
extern ufile_ptr bfd_tell (bfd *);
extern file_ptr bfd_tell (bfd *);
extern int bfd_flush (bfd *);
extern int bfd_stat (bfd *, struct stat *);

View File

@@ -8,7 +8,7 @@
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -167,16 +167,10 @@ typedef unsigned long bfd_size_type;
#endif /* not BFD64 */
/* A pointer to a position in a file. */
/* FIXME: This should be using off_t from <sys/types.h>.
For now, try to avoid breaking stuff by not including <sys/types.h> here.
This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
Probably the best long-term answer is to avoid using file_ptr AND off_t
in this header file, and to handle this in the BFD implementation
rather than in its interface. */
/* typedef off_t file_ptr; */
typedef bfd_signed_vma file_ptr;
typedef bfd_vma ufile_ptr;
/* An offset into a file. BFD always uses the largest possible offset
based on the build time availability of fseek, fseeko, or fseeko64. */
typedef @bfd_file_ptr@ file_ptr;
typedef unsigned @bfd_file_ptr@ ufile_ptr;
extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
@@ -463,7 +457,7 @@ extern void bfd_hash_traverse
extern bfd_size_type bfd_bread (void *, bfd_size_type, bfd *);
extern bfd_size_type bfd_bwrite (const void *, bfd_size_type, bfd *);
extern int bfd_seek (bfd *, file_ptr, int);
extern ufile_ptr bfd_tell (bfd *);
extern file_ptr bfd_tell (bfd *);
extern int bfd_flush (bfd *);
extern int bfd_stat (bfd *, struct stat *);

View File

@@ -1,6 +1,8 @@
/* Low-level I/O routines for BFDs.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -36,6 +38,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define S_IXOTH 0001 /* Execute by others. */
#endif
file_ptr
real_ftell (FILE *file)
{
#if defined (HAVE_FTELLO64)
return ftello64 (file);
#elif defined (HAVE_FTELLO)
return ftello (file);
#else
return ftell (file);
#endif
}
int
real_fseek (FILE *file, file_ptr offset, int whence)
{
#if defined (HAVE_FTELLO64)
return fseeko64 (file, offset, whence);
#elif defined (HAVE_FTELLO)
return fseeko (file, offset, whence);
#else
return fseek (file, offset, whence);
#endif
}
/* Note that archive entries don't have streams; they share their parent's.
This allows someone to play with the iostream behind BFD's back.
@@ -162,7 +188,7 @@ bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd)
return nwrote;
}
bfd_vma
file_ptr
bfd_tell (bfd *abfd)
{
file_ptr ptr;
@@ -170,7 +196,7 @@ bfd_tell (bfd *abfd)
if ((abfd->flags & BFD_IN_MEMORY) != 0)
return abfd->where;
ptr = ftell (bfd_cache_lookup (abfd));
ptr = real_ftell (bfd_cache_lookup (abfd));
if (abfd->my_archive)
ptr -= abfd->origin;
@@ -217,7 +243,7 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
{
int result;
FILE *f;
long file_position;
file_ptr file_position;
/* For the time being, a BFD may not seek to it's end. The problem
is that we don't easily have a way to recognize the end of an
element in an archive. */
@@ -278,7 +304,7 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
tripping the abort, we can probably safely disable this code,
so that the real optimizations happen. */
file_ptr where_am_i_now;
where_am_i_now = ftell (bfd_cache_lookup (abfd));
where_am_i_now = real_ftell (bfd_cache_lookup (abfd));
if (abfd->my_archive)
where_am_i_now -= abfd->origin;
if (where_am_i_now != abfd->where)
@@ -307,7 +333,7 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
if (direction == SEEK_SET && abfd->my_archive != NULL)
file_position += abfd->origin;
result = fseek (f, file_position, direction);
result = real_fseek (f, file_position, direction);
if (result != 0)
{
int hold_errno = errno;

View File

@@ -1,6 +1,8 @@
/* BFD library -- caching of file descriptors.
Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002,
2003, 2004 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
@@ -155,7 +157,7 @@ close_one (void)
return TRUE;
}
kill->where = ftell ((FILE *) kill->iostream);
kill->where = real_ftell ((FILE *) kill->iostream);
return bfd_cache_delete (kill);
}
@@ -354,9 +356,9 @@ bfd_cache_lookup_worker (bfd *abfd)
{
if (bfd_open_file (abfd) == NULL)
return NULL;
if (abfd->where != (unsigned long) abfd->where)
if (abfd->where != (ufile_ptr) abfd->where)
return NULL;
if (fseek ((FILE *) abfd->iostream, (long) abfd->where, SEEK_SET) != 0)
if (real_fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0)
return NULL;
}

View File

@@ -61,6 +61,18 @@
/* Define if you have the fdopen function. */
#undef HAVE_FDOPEN
/* Define if you have the fseeko function. */
#undef HAVE_FSEEKO
/* Define if you have the fseeko64 function. */
#undef HAVE_FSEEKO64
/* Define if you have the ftello function. */
#undef HAVE_FTELLO
/* Define if you have the ftello64 function. */
#undef HAVE_FTELLO64
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
@@ -190,6 +202,12 @@
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* The number of bytes in type long long */
#undef SIZEOF_LONG_LONG
/* The number of bytes in type long */
#undef SIZEOF_LONG
/* Use b modifier when opening binary files? */
#undef USE_BINARY_FOPEN
@@ -262,6 +280,9 @@
/* Name of host specific header file to include in trad-core.c. */
#undef TRAD_HEADER
/* The number of bytes in type off_t */
#undef SIZEOF_OFF_T
/* Use mmap if it's available? */
#undef USE_MMAP

144
bfd/configure vendored
View File

@@ -6619,6 +6619,124 @@ esac
# Determine the host dependant file_ptr a.k.a. off_t type. In order
# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
# Hopefully a reasonable assumption since fseeko et.al. should be
# upward compatible.
for ac_func in ftello ftello64 fseeko fseeko64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6631: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6636 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:6659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking file_ptr type""... $ac_c" 1>&6
echo "configure:6684: checking file_ptr type" >&5
bfd_file_ptr="long"
bfd_ufile_ptr="unsigned long"
if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
echo $ac_n "checking size of off_t""... $ac_c" 1>&6
echo "configure:6689: checking size of off_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
#line 6695 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
int main() {
switch (0) case 0: case (sizeof (off_t) == $ac_size):;
; return 0; }
EOF
if { (eval echo configure:6705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_off_t=$ac_size
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test x$ac_cv_sizeof_off_t != x ; then break; fi
done
fi
if test x$ac_cv_sizeof_off_t = x ; then
{ echo "configure: error: cannot determine a size for off_t" 1>&2; exit 1; }
fi
echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
EOF
if test "x${ac_cv_sizeof_off_t}" = "x8"; then
bfd_file_ptr=BFD_HOST_64_BIT
bfd_ufile_ptr=BFD_HOST_U_64_BIT
fi
fi
if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes; then
bfd_file_ptr=BFD_HOST_64_BIT
bfd_ufile_ptr=BFD_HOST_U_64_BIT
fi
echo "$ac_t""$bfd_file_ptr" 1>&6
tdefaults=""
test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
@@ -6631,17 +6749,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6635: checking for $ac_hdr" >&5
echo "configure:6753: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6640 "configure"
#line 6758 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6670,12 +6788,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6674: checking for $ac_func" >&5
echo "configure:6792: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6679 "configure"
#line 6797 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6698,7 +6816,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:6702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6723,7 +6841,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:6727: checking for working mmap" >&5
echo "configure:6845: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6731,7 +6849,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
#line 6735 "configure"
#line 6853 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6871,7 +6989,7 @@ main()
}
EOF
if { (eval echo configure:6875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:6993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -6896,12 +7014,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6900: checking for $ac_func" >&5
echo "configure:7018: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6905 "configure"
#line 7023 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6924,7 +7042,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:6928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:7046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7174,6 +7292,8 @@ s%@all_backends@%$all_backends%g
s%@bfd_backends@%$bfd_backends%g
s%@bfd_machines@%$bfd_machines%g
s%@bfd_default_target_size@%$bfd_default_target_size%g
s%@bfd_file_ptr@%$bfd_file_ptr%g
s%@bfd_ufile_ptr@%$bfd_ufile_ptr%g
s%@tdefaults@%$tdefaults%g
CEOF

View File

@@ -917,6 +917,31 @@ AC_SUBST(bfd_backends)
AC_SUBST(bfd_machines)
AC_SUBST(bfd_default_target_size)
# Determine the host dependant file_ptr a.k.a. off_t type. In order
# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and
# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long.
# Hopefully a reasonable assumption since fseeko et.al. should be
# upward compatible.
AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64)
AC_MSG_CHECKING([file_ptr type])
bfd_file_ptr="long"
bfd_ufile_ptr="unsigned long"
if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
AC_COMPILE_CHECK_SIZEOF(off_t)
if test "x${ac_cv_sizeof_off_t}" = "x8"; then
bfd_file_ptr=BFD_HOST_64_BIT
bfd_ufile_ptr=BFD_HOST_U_64_BIT
fi
fi
if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes; then
bfd_file_ptr=BFD_HOST_64_BIT
bfd_ufile_ptr=BFD_HOST_U_64_BIT
fi
AC_MSG_RESULT($bfd_file_ptr)
AC_SUBST(bfd_file_ptr)
AC_SUBST(bfd_ufile_ptr)
tdefaults=""
test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"

View File

@@ -3571,6 +3571,34 @@ elf_sort_sections (const void *arg1, const void *arg2)
return sec1->target_index - sec2->target_index;
}
/* Ian Lance Taylor writes:
We shouldn't be using % with a negative signed number. That's just
not good. We have to make sure either that the number is not
negative, or that the number has an unsigned type. When the types
are all the same size they wind up as unsigned. When file_ptr is a
larger signed type, the arithmetic winds up as signed long long,
which is wrong.
What we're trying to say here is something like ``increase OFF by
the least amount that will cause it to be equal to the VMA modulo
the page size.'' */
/* In other words, something like:
vma_offset = m->sections[0]->vma % bed->maxpagesize;
off_offset = off % bed->maxpagesize;
if (vma_offset < off_offset)
adjustment = vma_offset + bed->maxpagesize - off_offset;
else
adjustment = vma_offset - off_offset;
this can be colapsed into the expression below. */
static file_ptr
offset_vma_page_adjustment (bfd_vma vma, ufile_ptr off, bfd_vma maxpagesize)
{
return ((vma - off) % maxpagesize);
}
/* Assign file positions to the sections based on the mapping from
sections to segments. This function also sets up some fields in
the file header, and writes out the program headers. */
@@ -3698,7 +3726,8 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
&& (m->sections[0]->flags & SEC_ALLOC) != 0)
{
if ((abfd->flags & D_PAGED) != 0)
off += (m->sections[0]->vma - off) % bed->maxpagesize;
off += offset_vma_page_adjustment (m->sections[0]->vma, off,
bed->maxpagesize);
else
{
bfd_size_type align;
@@ -3713,7 +3742,8 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
align = secalign;
}
off += (m->sections[0]->vma - off) % (1 << align);
off += offset_vma_page_adjustment (m->sections[0]->vma, off,
1 << align);
}
}
@@ -3875,9 +3905,11 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
not have the SEC_LOAD case just above, and then
this was necessary, but now I'm not sure. */
if ((abfd->flags & D_PAGED) != 0)
adjust = (sec->vma - voff) % bed->maxpagesize;
adjust = offset_vma_page_adjustment (sec->vma, voff,
bed->maxpagesize);
else
adjust = (sec->vma - voff) % align;
adjust = offset_vma_page_adjustment (sec->vma, voff,
align);
}
else
adjust = 0;
@@ -4211,9 +4243,11 @@ assign_file_positions_except_relocs (bfd *abfd,
? "*unknown*"
: hdr->bfd_section->name)));
if ((abfd->flags & D_PAGED) != 0)
off += (hdr->sh_addr - off) % bed->maxpagesize;
off += offset_vma_page_adjustment (hdr->sh_addr, off,
bed->maxpagesize);
else
off += (hdr->sh_addr - off) % hdr->sh_addralign;
off += offset_vma_page_adjustment (hdr->sh_addr, off,
hdr->sh_addralign);
off = _bfd_elf_assign_file_position_for_section (hdr, off,
FALSE);
}

View File

@@ -1,8 +1,9 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -594,6 +595,11 @@ extern void _bfd_abort
#undef abort
#define abort() _bfd_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
/* Manipulate a system FILE but using BFD's "file_ptr", rather than
the system "off_t" or "off64_t", as the offset. */
extern file_ptr real_ftell (FILE *file);
extern int real_fseek (FILE *file, file_ptr offset, int whence);
FILE * bfd_cache_lookup_worker
(bfd *);

View File

@@ -5,9 +5,10 @@
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -599,6 +600,11 @@ extern void _bfd_abort
#undef abort
#define abort() _bfd_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)
/* Manipulate a system FILE but using BFD's "file_ptr", rather than
the system "off_t" or "off64_t", as the offset. */
extern file_ptr real_ftell (FILE *file);
extern int real_fseek (FILE *file, file_ptr offset, int whence);
FILE * bfd_cache_lookup_worker
(bfd *);

View File

@@ -1,3 +1,8 @@
2004-01-22 Andrew Cagney <cagney@redhat.com>
* gdb.base/bigcore.exp: New file.
* gdb.base/bigcore.c: New file.
2004-01-20 Nick Roberts <nick@nick.uklinux.net>
* gdb.mi/mi-stack.exp (test_stack_locals_listing): Test for

View File

@@ -0,0 +1,192 @@
/* This testcase is part of GDB, the GNU debugger.
Copyright 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 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Please email any bugs, comments, and/or additions to this file to:
bug-gdb@prep.ai.mit.edu */
#include <unistd.h>
#include <stdlib.h>
#include <sys/resource.h>
/* Print routines:
The following are so that printf et.al. can be avoided. Those
might try to use malloc() and that, for this code, would be a
disaster. */
#define printf do not use
const char digit[] = "0123456789abcdefghijklmnopqrstuvwxyz";
static void
print_char (char c)
{
write (1, &c, sizeof (c));
}
static void
print_unsigned (unsigned long u)
{
if (u >= 10)
print_unsigned (u / 10);
print_char (digit[u % 10]);
}
static void
print_hex (unsigned long u)
{
if (u >= 16)
print_hex (u / 16);
print_char (digit[u % 16]);
}
static void
print_string (const char *s)
{
for (; (*s) != '\0'; s++)
print_char ((*s));
}
static void
print_address (const void *a)
{
print_string ("0x");
print_hex ((unsigned long) a);
}
/* Print the current values of RESOURCE. */
static void
print_rlimit (int resource)
{
struct rlimit rl;
getrlimit (resource, &rl);
print_string ("cur=0x");
print_hex (rl.rlim_cur);
print_string (" max=0x");
print_hex (rl.rlim_max);
}
static void
maximize_rlimit (int resource, const char *prefix)
{
struct rlimit rl;
print_string (" ");
print_string (prefix);
print_string (": ");
print_rlimit (resource);
getrlimit (resource, &rl);
rl.rlim_cur = rl.rlim_max;
setrlimit (resource, &rl);
print_string (" -> ");
print_rlimit (resource);
print_string ("\n");
}
struct list
{
struct list *next;
size_t size;
};
/* Put the "heap" pointer in the BSS section. That way it is more
likely that the variable will occur early in the core file (an
address before the heap) and hence more likely that GDB will at
least get its value right. */
static struct list *heap;
static struct list *stack;
int
main ()
{
size_t max_chunk_size;
/* Try to expand all the resource limits beyond the point of sanity
- we're after the biggest possible core file. */
print_string ("Maximize resource limits ...\n");
#ifdef RLIMIT_CORE
maximize_rlimit (RLIMIT_CORE, "core");
#endif
#ifdef RLIMIT_DATA
maximize_rlimit (RLIMIT_DATA, "data");
#endif
#ifdef RLIMIT_STACK
maximize_rlimit (RLIMIT_STACK, "stack");
#endif
#ifdef RLIMIT_AS
maximize_rlimit (RLIMIT_AS, "stack");
#endif
/* Compute an initial chunk size. The math is dodgy but it works
for the moment. Perhaphs there's a constant around somewhere. */
{
size_t tmp;
for (tmp = 1; tmp > 0; tmp <<= 1)
max_chunk_size = tmp;
}
/* Allocate as much memory as possible creating a linked list of
each section. The linking ensures that some, but not all, the
memory is allocated. NB: Some kernels handle this efficiently -
only allocating and writing out referenced pages leaving holes in
the file for unreferend pages - while others handle this poorly -
writing out all pages including those that wern't referenced. */
print_string ("Alocating the entire heap ...\n");
{
/* Create a linked list of memory chunks. Start with
MAX_CHUNK_SIZE blocks of memory and then try allocating smaller
and smaller amounts until all (well at least most) memory has
been allocated. */
size_t chunk_size = max_chunk_size;
heap = NULL;
while (chunk_size >= sizeof (struct list))
{
while (1)
{
struct list *chunk = malloc (chunk_size);
if (chunk == NULL)
{
if (heap != NULL && heap->size == chunk_size)
print_string ("\n");
break;
}
if (heap == NULL || heap->size != chunk_size)
{
print_string (" ");
print_unsigned (chunk_size);
print_string (" bytes @ ");
}
else
print_string (", ");
chunk->size = chunk_size;
chunk->next = heap;
print_address (chunk);
heap = chunk;
}
chunk_size >>= 1;
}
}
/* Push everything out to disk. */
print_string ("Dump core ....\n");
*(char*)0 = 0;
}

View File

@@ -0,0 +1,172 @@
# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 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 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
# This file is based on corefile.exp which was written by Fred
# Fish. (fnf@cygnus.com)
if $tracelevel then {
strace $tracelevel
}
set prms_id 0
set bug_id 0
# are we on a target board
if ![isnative] then {
return
}
set testfile "bigcore"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
set corefile ${objdir}/${subdir}/${testfile}.corefile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
# Create a core file named "TESTFILE.corefile" rather than just
# "core", to avoid problems with sys admin types that like to
# regularly prune all files named "core" from the system.
# Some systems append "core" to the name of the program; others append
# the name of the program to "core"; still others (like Linux, as of
# May 2003) create cores named "core.PID". In the latter case, we
# could have many core files lying around, and it may be difficult to
# tell which one is ours, so let's run the program in a subdirectory.
set found 0
set coredir "${objdir}/${subdir}/coredir.[getpid]"
file mkdir $coredir
catch "system \"(cd ${coredir}; ${binfile}; true) >/dev/null 2>&1\""
set names [glob -nocomplain -directory $coredir *core*]
if {[llength $names] == 1} {
set file [file join $coredir [lindex $names 0]]
remote_exec build "mv $file $corefile"
set found 1
}
# Try to clean up after ourselves.
remote_file build delete [file join $coredir coremmap.data]
remote_exec build "rmdir $coredir"
if { $found == 0 } {
warning "can't generate a core file - core tests suppressed - check ulimit -c"
return 0
}
# Run GDB on the bigcore program up-to where it will dump core.
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_test "set print sevenbit-strings" "" \
"set print sevenbit-strings; ${testfile}"
gdb_test "set width 0" "" \
"set width 0; ${testfile}"
if { ![runto_main] } then {
gdb_suppress_tests;
}
set print_core_line [gdb_get_line_number "Dump core"]
gdb_test "tbreak $print_core_line"
gdb_test continue ".*print_string.*"
gdb_test next ".*0 = 0.*"
# Traverse bigcore's linked list, saving each chunk's address. I
# don't know why but expect_out didn't work with gdb_test_multiple.
set heap ""
set test "extract heap"
set lim 0
send_gdb "print heap\n"
gdb_expect {
-re " = \\(struct list \\*\\) 0x0.*$gdb_prompt $" {
pass "$test"
}
-re " = \\(struct list \\*\\) (0x\[0-9a-f\]*).*$gdb_prompt $" {
set heap [concat $heap $expect_out(1,string)]
if { $lim > 100 } {
fail "$test (limit $lim exceeded)"
} else {
incr lim
send_gdb "print $.next\n"
exp_continue
}
}
-re ".*$gdb_prompt $" {
fail "$test (entry $lim)"
}
timeout {
fail "$test (timeout)"
}
}
# Now load up that core file
set test "load corefile"
gdb_test_multiple "core $corefile" "$test" {
-re "A program is being debugged already. Kill it. .y or n. " {
send_gdb "y\n"
exp_continue
}
-re "Core was generated by.*$gdb_prompt $" {
pass "$test"
}
}
# Finally, re-traverse bigcore's linked list, checking each chunk's
# address against the executable. Don't use gdb_test_multiple as want
# only one pass/fail.
set test "check heap"
set lim 0
set ok 1
send_gdb "print heap\n"
while { $ok } {
gdb_expect {
-re " = \\(struct list \\*\\) 0x0.*$gdb_prompt $" {
set ok 0
if { $lim == [llength $heap] } {
pass "$test"
} else {
fail "$test (short list)"
}
}
-re " = \\(struct list \\*\\) [lindex $heap $lim].*$gdb_prompt $" {
incr lim
if { $lim > 100 } {
set ok 0
fail "$test (limit $lim exceeded)"
} else {
send_gdb "print \$.next\n"
}
}
-re ".*$gdb_prompt $" {
set ok 0
setup_kfail i*86-*-linux* gdb/1509
fail "$test (address [lindex $heap $lim])"
}
timeout {
set ok 0
fail "$test (timeout)"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,374 +0,0 @@
Fri Feb 21 19:49:45 2003 J"orn Rennecke <joern.rennecke@superh.com>
* sem-media-switch.c, sem-media.c: Regenerate.
2002-06-24 Richard Sandiford <rsandifo@redhat.com>
* sh64.c: Update path of "callback.h".
2002-06-20 Elena Zannoni <ezannoni@redhat.com>
* sh64.c: Include correct file for register numbers.
Fri May 17 14:27:41 2002 J"orn Rennecke <joern.rennecke@superh.com>
* sim-if.c (sh64_disassemble_insn): Use print_insn_sh instead of
print_insn_shl.
2001-07-05 Ben Elliston <bje@redhat.com>
* Makefile.in (stamp-arch): Use $(CGEN_CPU_DIR).
(stamp-desc): Likewise.
(stamp-cpu): Likewise.
(stamp-defs-compact): Likewise.
(stamp-defs-media): Likewise.
(stamp-decode-compact): Likewise.
(stamp-decode-media): Likewise.
2001-03-30 Ben Elliston <bje@redhat.com>
* sim-if.c (sim_open): Set sh64_idesc_{media,compact} to NULL.
* sh64-sim.h (sh64_idesc_{compact,media}): Declare extern.
* sh64.c (sh64_idesc_{compact,media}): Make non-static.
2001-01-30 Ben Elliston <bje@redhat.com>
* sh64.c (SYS_argc, SYS_argn, SYS_argnlen): Define.
(trap_handler): Implement these syscalls.
(count_argc): New function.
2001-01-24 Alexandre Oliva <aoliva@redhat.com>
* sh64.c (trap_handler): Implement time.
* sh64.c (fetch_str): New function.
(trap_handler): Re-implement write, and implement lseek, read,
open and close.
2001-01-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh64.c (sh64_fetch_register): When fetching the PC, return the
PC value and set the LSB according to the current ISA.
2001-01-18 Ben Elliston <bje@redhat.com>
* sh64.c (trap_handler): Use sim_engine_halt to indicate a program
has terminated, not exit!
2001-01-12 Ben Elliston <bje@redhat.com>
* sh64.c (sh64_fcnvds): Re-implement.
* sh64.c: Include "bfd.h".
(trap_handler): New function. Consolidate function bodies of
sh64_trapa and sh64_compact_trapa.
(sh64_trapa): Use it.
(sh64_compact_trapa): Likewise.
2001-01-11 Ben Elliston <bje@redhat.com>
* sem-media.c, sem-media-switch.c: Regenerate.
* sem-compact.c, sem-compact-switch.c: Likewise.
* sh64.c (sh64_trapa): Adhere to SH64 sys call conventions.
* cpu.h, sh-desc.c, sh-desc.h, sh-opc.h: Regenerate.
* decode-media.c, decode-media.h, defs-media.h: Likewise.
* sem-compact.c, sem-compact-switch.c: Likewise.
* sem-media.c, sem-media-switch.c: Likewise.
2001-01-10 Ben Elliston <bje@redhat.com>
* sim-main.h (CIA_SET): Encode the current instruction set mode
when setting the cia.
2001-01-08 Ben Elliston <bje@redhat.com>
* sh64.c (sh64_store_register): Do not set insn set mode--allow
sh64_h_pc_set() to do it.
(shmedia_init_cpu): Do not initialise the insn set mode--let the
loader set it based on bit 0 of the executable's starting address.
(shcompact_init_cpu): Likewise.
* mloop-compact.c (sh64_compact_pbb_begin): Emit a warning message
about malformed programs which have illegal insns in delay slots.
(sh64_compact_pbb_cti_chain): Examine the least significant bit of
the new pc, not the current instruction set mode to determine if
the next pbb in the chain will consist of SHmedia instructions.
* mloop-media.c (sh64_media_pbb_cti_chain): Likewise for SHcompact
switches. Set bit 0 when setting the pc for the next SHmedia pbb.
* cpu.c, cpu.h: Regenerate.
* sem-compact.c, sem-compact-switch.c: Likewise.
* sem-media.c, sem-media-switch.c: Likewise.
* sh64.c (sh64_compact_trapa): Use sim_io_write_{stdout,error}(),
not stdio functions to emit output when executing write traps.
2001-01-07 Alexandre Oliva <aoliva@redhat.com>
* sh64.c (sh64_compact_trapa): Support writing to stderr. Flush
output stream after each (compound) write.
2001-01-06 Ben Elliston <bje@redhat.com>
* sem-media.c, sem-media-switch.c: Regenerate.
2001-01-04 Ben Elliston <bje@redhat.com>
* sem-compact.c, sem-compact-switch.c: Regenerate.
* cpu.h: Regenerate.
2001-01-03 Ben Elliston <bje@redhat.com>
* cpu.c, cpu.h: Regenerate.
* sem-media.c, sem-media-switch.c: Likewise.
2001-01-02 Ben Elliston <bje@redhat.com>
* sim-if.c (sh64_disassemble_insn): Set arch and mach fields using
BFD primitives.
* sem-compact.c, sem-compact-switch.c: Regenerate.
2000-12-30 Alexandre Oliva <aoliva@redhat.com>
* sh64.c (sh64_nsb): Re-implement correctly.
2000-12-26 Alexandre Oliva <aoliva@redhat.com>
* sh64.c (sh64_nsb): Re-implement.
2000-12-27 Ben Elliston <bje@redhat.com>
* cpu.c, cpu.h: Regenerate.
* sem-compact.c, sem-compact-switch.c: Likewise.
* sem-media.c, sem-media-switch.c: Likewise.
* sh-desc.c: Likewise.
2000-12-26 Ben Elliston <bje@redhat.com>
* mloop-compact.in, mloop-media.in: Remove.
* mloop-compact.c, mloop-media.c: New files.
* eng-compact.c, eng-media.c: Likewise.
* Makefile.in (mloop-compact.c): Remove target.
(stamp-mloop-compact): Likewise.
(mloop-media.c): Likewise.
(stamp-mloop-media): Likewise.
(sh64-clean): Update.
(stamp-mloop): Remove.
2000-12-23 Ben Elliston <bje@redhat.com>
* sh64.c (sh64_prepare_run): Rename from shmedia_prepare_run.
(shcompact_prepare_run): Remove.
(sh2_mach, sh3_mach, sh3e_mach, sh4_mach, sh5_mach): Update.
2000-12-22 Ben Elliston <bje@redhat.com>
* sh64.c (sh64_idesc_media, sh64_idesc_compact): New variables.
(sh64_dump): Remove.
(sh64_engine_run_full): Only compute idesc tables once.
(sh64_engine_run_fast): Likewise.
(shmedia_prepare_run): Do nothing.
(shcompact_prepare_run): Likewise.
* sem-compact.c, sem-compact-switch.c: Regenerate.
* sem-media.c, sem-media-switch.c: Likewise.
2000-12-19 Ben Elliston <bje@redhat.com>
* sem-media.c, sem-media-switch.c: Regenerate.
2000-12-15 Ben Elliston <bje@redhat.com>
* sh64.c (sh64_store_register): When storing a new PC, set ISA
mode based on the value of bit 0.
* sh64.c: Include "sim-sh64.h" for GDB interfacing.
(sh64_fetch_register): Implement.
(sh64_store_register): Likewise.
* sh64-sim.h (sh64_fmacs): Declare.
(sh64_ftrcdl, sh64_ftrcdq, sh64_ftrcsl): Likewise.
* sem-media.c, sem-media-switch.c: Regenerate.
2000-12-13 Ben Elliston <bje@redhat.com>
* sh64-sim.h (sh64_compact_trapa): Renamed from sh64_trapa.
(sh64_trapa): Renamed from sh64_trap.
* sh64.c (sh64_trapa): Call sh64_compact_trapa for handling.
Apply renaming described above.
* decode-media.c, decode-media.h, defs-media.h: Regenerate.
* sem-media.c sem-media-switch.c: Likewise.
* sh-desc.c, sh-desc.h, sh-opc.h: Likewise.
2000-12-12 Ben Elliston <bje@redhat.com>
* cpu.c, cpu.h, sh-desc.c: Regenerate.
* sem-media.c, sem-media-switch.c: Likewise.
* sem-compact.c, sem-compact-switch.c: Likewise.
* sh64-sim.h (sh64_ftrvs): Declare.
* sh64.c (sh64_ftrvs): Bug fixes.
* sh64.c (sh64_fcmpgtd): Fix order of arguments to sim_fpu_is_gt.
(sh64_fcmpgts): Likewise.
2000-12-11 Ben Elliston <bje@redhat.com>
* decode-media.c, decode-media.h: Regenerate.
* defs-media.h: Likewise.
* sem-media.c, sem-media-switch.c: Likewise.
* sh-desc.c: Likewise.
2000-12-08 Ben Elliston <bje@redhat.com>
* decode-media.c, decode-media.h: Regenerate.
* defs-media.h: Likewise.
* sem-media.c, sem-media-switch.c: Likewise.
2000-12-07 Ben Elliston <bje@redhat.com>
* decode-media.c, decode-media.h: Regenerate.
* sem-media.c, sem-media-switch.c: Likewise.
* defs-media.h: Regenete.
* decode-compact.c, decode-media.c: Likewise.
2000-12-06 Ben Elliston <bje@redhat.com>
* sh64.c (sh64_fcmpund): Return a BI.
(sh64_fcmpuns): Likewise.
(sh64_nsb): Treat source value as unsigned.
(sh64_compact_model_insn_before): New function.
(sh64_media_model_insn_before): Likewise.
(sh64_compact_model_insn_after): Likewise.
(sh64_media_model_insn_after): Likewise.
(sh_models): Use sh5_mach for "sh5".
* sh64-sim.h: Add missing function prototypes.
* cpu.c, cpu.h, defs-media.h, sh-desc.c: Regenerate.
* decode-media.c, decode-media.h: Likewise.
* sem-media.c, sem-media-switch.c: Likewise.
2000-12-05 Ben Elliston <bje@redhat.com>
* mloop-compact.in, mloop-media.in: Use @prefix@.
* Makefile.in (stamp-mloop-compact): Pass -outfile-suffix option
to make generated files safe in the presence of parallel makes.
(stamp-mloop-media): Likewise.
* decode-media.c, defs-media.h: Regenerate.
2000-12-04 Ben Elliston <bje@redhat.com>
* sh64-sim.h: Add function prototypes from sh64.c.
* Makefile.in (SH64_OBJS): Add ISA variant objects.
(SIM_EXTRA_DEPS): Do not depend on opcodes headers.
(SH64_INCLUDE_DEPS): Update for ISA variants.
(stamp-mloop-compact, stamp-mloop-media): New targets.
(decode-compact.o, sem-compact.o): New rules.
(decode-media.o, sem-media.o): Likewise.
(sh64-clean): Update.
(stamp-all, stamp-mloop, stamp-decode, stamp-defs): New targets.
(stamp-desc, stamp-cpu): Likewise.
(stamp-defs-compact, stamp-defs-media): Likewise.
(stamp-decode-compact, stamp-decode-media): Likewise.
* defs-compact.h, defs-media.h: Regenerate.
2000-12-03 Ben Elliston <bje@redhat.com>
* sh64-sim.h (sh64_fcmpeqd, sh64_fcmpeqs): Declare.
(sh64_fcmpged, sh64_fcmpges): Likewise.
(sh64_fcmpgtd, sh64_fcmpgts): Likewise.
* sh64.c (sh64_endian): New function.
(sh64_fcmpeqd, sh64_fcmpeqs): Return a BI.
(sh64_fcmpged, sh64_fcmpges): Likewise.
(sh64_fcmpgtd, sh64_fcmpgts): Likewise.
(sh64_trap): Implement a basic syscall facility.
(sh64_trapa): Exit with return code in R5, not 0.
(sh64_model_sh5_u_exec): Remove.
(sh64_engine_run_full): New function.
(sh64_engine_run_fast): Likewise.
(shmedia_prepare_run): Likewise.
(shcompact_prepare_run): Likewise.
(sh64_get_idata): Likewise.
(sh64_init_cpu): Likewise.
(shmedia_init_cpu): Likewise.
(shcompact_init_cpu): Likewise.
(sh64_model_init): Likewise.
(sh_models): Define.
(sh5_imp_properties): Likewise.
(sh2_mach, sh3_mach, sh4_mach, sh5_mach): Define.
* sem-compact.c, sem-compact-switch.c: Regenerate.
2000-12-01 Ben Elliston <bje@redhat.com>
* sh64-sim.h (sh64_endian): Declare.
* sim-main.h (sim_cia): Use UDI, not USI.
(WITH_PROFILE_MODEL_P): Remove.
* sim-if.c (sim_sh64_disassemble_insn): Remove.
(sh64_disassemble_insn): New function.
(sim_open): Use as this CPU's disassembler.
* eng.h: New file.
* decode.h (WITH_PROFILE_MODEL_P): Undefine.
* decode-compact.c, decode-media.c: Regenerate.
* defs-compact.h, defs-media.h: Likewise.
* sem-compact.c, sem-compact-switch.c: Likewise.
* sh-desc.c, sh-desc.h: Likewise.
* cpu.c, cpu.h, cpuall.h: Likewise.
2000-11-30 Ben Elliston <bje@redhat.com>
* arch.c, sh-desc.c, sh-desc.h: Regenerate.
* tconfig.in (SIM_HAVE_BIENDIAN): Define.
* configure.in (SIM_AC_OPTION_BIGENDIAN): Do not hard-wire a
target byte order, but default to big endian.
* configure: Regenerate.
2000-11-27 Ben Elliston <bje@redhat.com>
* sim-main.h (WITH_PROFILE_MODEL_P): Define.
* sh64-sim.h (ISM_COMPACT, ISM_MEDIA): New enums.
* sh-desc.c, sh-desc.h: Regenerate.
* arch.c, cpu.h, cpuall.h: Regenerate.
* decode.h (WITH_PROFILE_MODEL_P): Remove.
* mloop-compact.in, mloop-media.in: New files.
* decode.h: Likewise.
2000-11-26 Ben Elliston <bje@redhat.com>
* sem-compact.c, sem-compact-switch.c: Generate.
* sem-media.c, sem-media-switch.c: Likewise.
2000-11-25 Ben Elliston <bje@redhat.com>
* sh-desc.c, sh-desc.h, sh-opc.h: Generate.
* arch.c, arch.h, cpuall.h, cpu.c, cpu.h: Generate.
* decode-compact.c, decode-compact.h: Likewise.
* decode-media.c, decode-media.h: Likewise.
* sh64-sim.h: New file.
* sim-main.h: Likewise.
2000-11-22 Ben Elliston <bje@redhat.com>
* sim-if.c: New file.
* sh64.c: Likewise.
2000-11-16 Ben Elliston <bje@redhat.com>
* config.in: New file.
* tconfig.in: Likewise.
* configure.in: Likewise.
* configure: Generate.
* Makefile.in: New file.

View File

@@ -1,153 +0,0 @@
# Makefile template for Configure for the SH64 simulator
# Copyright (C) 2000 Free Software Foundation, Inc.
# Contributed by Red Hat, 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.
## COMMON_PRE_CONFIG_FRAG
SH64_OBJS = sh64.o cpu.o sh-desc.o \
decode-compact.o sem-compact.o mloop-compact.o \
decode-media.o sem-media.o mloop-media.o
CONFIG_DEVICES = dv-sockser.o
CONFIG_DEVICES =
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
sim-cpu.o \
sim-hload.o \
sim-hrw.o \
sim-model.o \
sim-reg.o \
cgen-utils.o cgen-trace.o cgen-scache.o \
cgen-run.o sim-reason.o sim-engine.o sim-stop.o \
sim-if.o arch.o \
$(SH64_OBJS) \
$(CONFIG_DEVICES)
# Extra headers included by sim-main.h.
SIM_EXTRA_DEPS = \
$(CGEN_INCLUDE_DEPS) \
arch.h cpuall.h sh64-sim.h
SIM_EXTRA_CFLAGS =
SIM_RUN_OBJS = nrun.o
SIM_EXTRA_CLEAN = sh64-clean
## COMMON_POST_CONFIG_FRAG
arch = sh
sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(srcdir)/../common/sim-core.h
arch.o: arch.c $(SIM_MAIN_DEPS)
devices.o: devices.c $(SIM_MAIN_DEPS)
# SH64 objs
SH64_INCLUDE_DEPS = \
$(CGEN_MAIN_CPU_DEPS) \
cpu.h decode.h \
decode-compact.h eng-compact.h defs-compact.h \
decode-media.h eng-media.h defs-media.h
sh64.o: sh64.c $(SH64_INCLUDE_DEPS)
mloop-compact.o: mloop-compact.c sem-compact-switch.c $(SH64_INCLUDE_DEPS)
$(CC) -c $(srcdir)/mloop-compact.c $(ALL_CFLAGS) -DWANT_ISA_COMPACT
mloop-media.o: mloop-media.c sem-media-switch.c $(SH64_INCLUDE_DEPS)
$(CC) -c $(srcdir)/mloop-media.c $(ALL_CFLAGS) -DWANT_ISA_MEDIA
cpu.o: cpu.c $(SH64_INCLUDE_DEPS)
decode-compact.o: decode-compact.c $(SH64_INCLUDE_DEPS)
$(CC) -c $(srcdir)/decode-compact.c $(ALL_CFLAGS) -DWANT_ISA_COMPACT
sem-compact.o: sem-compact.c $(SH64_INCLUDE_DEPS)
$(CC) -c $(srcdir)/sem-compact.c $(ALL_CFLAGS) -DWANT_ISA_COMPACT
decode-media.o: decode-media.c $(SH64_INCLUDE_DEPS)
$(CC) -c $(srcdir)/decode-media.c $(ALL_CFLAGS) -DWANT_ISA_MEDIA
sem-media.o: sem-media.c $(SH64_INCLUDE_DEPS)
$(CC) -c $(srcdir)/sem-media.c $(ALL_CFLAGS) -DWANT_ISA_MEDIA
sh64-clean:
rm -f tmp-*
rm -f stamp-defs-{compact,media}
rm -f stamp-arch stamp-desc stamp-cpu stamp-decode-{compact,media}
# cgen support, enable with --enable-cgen-maint
CGEN_MAINT = ; @true
# The following line is commented in or out depending upon --enable-cgen-maint.
@CGEN_MAINT@CGEN_MAINT =
.PHONY: stamp-all stamp-decode stamp-defs
stamp-all: stamp-arch stamp-desc stamp-cpu stamp-decode stamp-defs
stamp-decode: stamp-decode-compact stamp-decode-media
stamp-defs: stamp-defs-compact stamp-defs-media
stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-media.cpu $(CGEN_CPU_DIR)/sh64-compact.cpu Makefile
$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=all isa=compact,media \
FLAGS="with-scache"
touch $@
arch.h arch.c cpuall.h: $(CGEN_MAINT) stamp-arch
@true
stamp-desc: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-compact.cpu $(CGEN_CPU_DIR)/sh64-media.cpu Makefile
$(MAKE) cgen-desc $(CGEN_FLAGS_TO_PASS) cpu=sh64 mach=all isa=compact,media
touch $@
desc.h: $(CGEN_MAINT) stamp-desc
@true
stamp-cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-compact.cpu $(CGEN_CPU_DIR)/sh64-media.cpu Makefile
$(MAKE) cgen-cpu $(CGEN_FLAGS_TO_PASS) \
cpu=sh64 mach=sh4,sh5 isa=compact,media FLAGS="with-multiple-isa with-scache"
rm -f $(srcdir)/model.c
touch $@
cpu.h: $(CGEN_MAINT) stamp-cpu
@true
stamp-defs-compact: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-compact.cpu Makefile
$(MAKE) cgen-defs $(CGEN_FLAGS_TO_PASS) \
cpu=sh64 mach=sh5 isa=compact FLAGS="with-scache" SUFFIX="-compact"
touch $@
defs-compact.h: $(CGEN_MAINT) stamp-defs-compact
@true
stamp-defs-media: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-media.cpu Makefile
$(MAKE) cgen-defs $(CGEN_FLAGS_TO_PASS) \
cpu=sh64 mach=sh5 isa=media FLAGS="with-scache" SUFFIX="-media"
touch $@
defs-media.h: $(CGEN_MAINT) stamp-defs-media
stamp-decode-compact: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-compact.cpu Makefile
$(MAKE) cgen-decode $(CGEN_FLAGS_TO_PASS) \
cpu=sh64 mach=sh5 isa=compact FLAGS="with-scache" SUFFIX="-compact" EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
touch $@
sem-compact.c sem-compact-switch.c decode-compact.c decode-compact.h: $(CGEN_MAINT) stamp-compact
@true
stamp-decode-media: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/sh.cpu $(CGEN_CPU_DIR)/sh.opc $(CGEN_CPU_DIR)/sh64-media.cpu Makefile
$(MAKE) cgen-decode $(CGEN_FLAGS_TO_PASS) \
cpu=sh64 mach=sh5 isa=media FLAGS="with-scache" SUFFIX="-media" EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
touch $@
sem-media.c sem-media-switch.c decode-media.c decode-media.h: $(CGEN_MAINT) stamp-media
@true

View File

@@ -1,47 +0,0 @@
/* Simulator support for sh.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU Simulators.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "sim-main.h"
#include "bfd.h"
const MACH *sim_machs[] =
{
#ifdef HAVE_CPU_SH64
& sh2_mach,
#endif
#ifdef HAVE_CPU_SH64
& sh3_mach,
#endif
#ifdef HAVE_CPU_SH64
& sh3e_mach,
#endif
#ifdef HAVE_CPU_SH64
& sh4_mach,
#endif
#ifdef HAVE_CPU_SH64
& sh5_mach,
#endif
0
};

View File

@@ -1,44 +0,0 @@
/* Simulator header for sh.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 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 SH_ARCH_H
#define SH_ARCH_H
#define TARGET_BIG_ENDIAN 1
/* Enum declaration for model types. */
typedef enum model_type {
MODEL_SH5, MODEL_MAX
} MODEL_TYPE;
#define MAX_MODELS ((int) MODEL_MAX)
/* Enum declaration for unit types. */
typedef enum unit_type {
UNIT_NONE, UNIT_SH5_U_EXEC, UNIT_MAX
} UNIT_TYPE;
#define MAX_UNITS (1)
#endif /* SH_ARCH_H */

View File

@@ -1,177 +0,0 @@
/* config.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* Define as 1 if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
/* Define if you have the __argz_next function. */
#undef HAVE___ARGZ_NEXT
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define if you have the __setfpucw function. */
#undef HAVE___SETFPUCW
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the getrusage function. */
#undef HAVE_GETRUSAGE
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the setenv function. */
#undef HAVE_SETENV
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
/* Define if you have the time function. */
#undef HAVE_TIME
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <fpu_control.h> header file. */
#undef HAVE_FPU_CONTROL_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
/* Define if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <time.h> header file. */
#undef HAVE_TIME_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the <values.h> header file. */
#undef HAVE_VALUES_H
/* Define if you have the nsl library (-lnsl). */
#undef HAVE_LIBNSL
/* Define if you have the socket library (-lsocket). */
#undef HAVE_LIBSOCKET

4340
sim/sh64/configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
SIM_AC_COMMON
SIM_AC_OPTION_ENDIAN([], BIG_ENDIAN)
SIM_AC_OPTION_ALIGNMENT(STRICT_ALIGNMENT)
SIM_AC_OPTION_HOSTENDIAN
SIM_AC_OPTION_SCACHE(16384)
SIM_AC_OPTION_DEFAULT_MODEL(sh5)
SIM_AC_OPTION_ENVIRONMENT
SIM_AC_OPTION_INLINE()
SIM_AC_OPTION_CGEN_MAINT
SIM_AC_OUTPUT

View File

@@ -1,533 +0,0 @@
/* Misc. support for CPU family sh64.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU Simulators.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#define WANT_CPU sh64
#define WANT_CPU_SH64
#include "sim-main.h"
#include "cgen-ops.h"
/* Get the value of h-pc. */
UDI
sh64_h_pc_get (SIM_CPU *current_cpu)
{
return GET_H_PC ();
}
/* Set a value for h-pc. */
void
sh64_h_pc_set (SIM_CPU *current_cpu, UDI newval)
{
SET_H_PC (newval);
}
/* Get the value of h-gr. */
DI
sh64_h_gr_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_GR (regno);
}
/* Set a value for h-gr. */
void
sh64_h_gr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
{
SET_H_GR (regno, newval);
}
/* Get the value of h-grc. */
SI
sh64_h_grc_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_GRC (regno);
}
/* Set a value for h-grc. */
void
sh64_h_grc_set (SIM_CPU *current_cpu, UINT regno, SI newval)
{
SET_H_GRC (regno, newval);
}
/* Get the value of h-cr. */
DI
sh64_h_cr_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_CR (regno);
}
/* Set a value for h-cr. */
void
sh64_h_cr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
{
SET_H_CR (regno, newval);
}
/* Get the value of h-sr. */
SI
sh64_h_sr_get (SIM_CPU *current_cpu)
{
return CPU (h_sr);
}
/* Set a value for h-sr. */
void
sh64_h_sr_set (SIM_CPU *current_cpu, SI newval)
{
CPU (h_sr) = newval;
}
/* Get the value of h-fpscr. */
SI
sh64_h_fpscr_get (SIM_CPU *current_cpu)
{
return CPU (h_fpscr);
}
/* Set a value for h-fpscr. */
void
sh64_h_fpscr_set (SIM_CPU *current_cpu, SI newval)
{
CPU (h_fpscr) = newval;
}
/* Get the value of h-frbit. */
BI
sh64_h_frbit_get (SIM_CPU *current_cpu)
{
return GET_H_FRBIT ();
}
/* Set a value for h-frbit. */
void
sh64_h_frbit_set (SIM_CPU *current_cpu, BI newval)
{
SET_H_FRBIT (newval);
}
/* Get the value of h-szbit. */
BI
sh64_h_szbit_get (SIM_CPU *current_cpu)
{
return GET_H_SZBIT ();
}
/* Set a value for h-szbit. */
void
sh64_h_szbit_set (SIM_CPU *current_cpu, BI newval)
{
SET_H_SZBIT (newval);
}
/* Get the value of h-prbit. */
BI
sh64_h_prbit_get (SIM_CPU *current_cpu)
{
return GET_H_PRBIT ();
}
/* Set a value for h-prbit. */
void
sh64_h_prbit_set (SIM_CPU *current_cpu, BI newval)
{
SET_H_PRBIT (newval);
}
/* Get the value of h-sbit. */
BI
sh64_h_sbit_get (SIM_CPU *current_cpu)
{
return GET_H_SBIT ();
}
/* Set a value for h-sbit. */
void
sh64_h_sbit_set (SIM_CPU *current_cpu, BI newval)
{
SET_H_SBIT (newval);
}
/* Get the value of h-mbit. */
BI
sh64_h_mbit_get (SIM_CPU *current_cpu)
{
return GET_H_MBIT ();
}
/* Set a value for h-mbit. */
void
sh64_h_mbit_set (SIM_CPU *current_cpu, BI newval)
{
SET_H_MBIT (newval);
}
/* Get the value of h-qbit. */
BI
sh64_h_qbit_get (SIM_CPU *current_cpu)
{
return GET_H_QBIT ();
}
/* Set a value for h-qbit. */
void
sh64_h_qbit_set (SIM_CPU *current_cpu, BI newval)
{
SET_H_QBIT (newval);
}
/* Get the value of h-fr. */
SF
sh64_h_fr_get (SIM_CPU *current_cpu, UINT regno)
{
return CPU (h_fr[regno]);
}
/* Set a value for h-fr. */
void
sh64_h_fr_set (SIM_CPU *current_cpu, UINT regno, SF newval)
{
CPU (h_fr[regno]) = newval;
}
/* Get the value of h-fp. */
DF
sh64_h_fp_get (SIM_CPU *current_cpu, UINT regno)
{
return CPU (h_fp[regno]);
}
/* Set a value for h-fp. */
void
sh64_h_fp_set (SIM_CPU *current_cpu, UINT regno, DF newval)
{
CPU (h_fp[regno]) = newval;
}
/* Get the value of h-fv. */
SF
sh64_h_fv_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_FV (regno);
}
/* Set a value for h-fv. */
void
sh64_h_fv_set (SIM_CPU *current_cpu, UINT regno, SF newval)
{
SET_H_FV (regno, newval);
}
/* Get the value of h-fmtx. */
SF
sh64_h_fmtx_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_FMTX (regno);
}
/* Set a value for h-fmtx. */
void
sh64_h_fmtx_set (SIM_CPU *current_cpu, UINT regno, SF newval)
{
SET_H_FMTX (regno, newval);
}
/* Get the value of h-dr. */
DF
sh64_h_dr_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_DR (regno);
}
/* Set a value for h-dr. */
void
sh64_h_dr_set (SIM_CPU *current_cpu, UINT regno, DF newval)
{
SET_H_DR (regno, newval);
}
/* Get the value of h-tr. */
DI
sh64_h_tr_get (SIM_CPU *current_cpu, UINT regno)
{
return CPU (h_tr[regno]);
}
/* Set a value for h-tr. */
void
sh64_h_tr_set (SIM_CPU *current_cpu, UINT regno, DI newval)
{
CPU (h_tr[regno]) = newval;
}
/* Get the value of h-endian. */
BI
sh64_h_endian_get (SIM_CPU *current_cpu)
{
return GET_H_ENDIAN ();
}
/* Set a value for h-endian. */
void
sh64_h_endian_set (SIM_CPU *current_cpu, BI newval)
{
SET_H_ENDIAN (newval);
}
/* Get the value of h-ism. */
BI
sh64_h_ism_get (SIM_CPU *current_cpu)
{
return GET_H_ISM ();
}
/* Set a value for h-ism. */
void
sh64_h_ism_set (SIM_CPU *current_cpu, BI newval)
{
SET_H_ISM (newval);
}
/* Get the value of h-frc. */
SF
sh64_h_frc_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_FRC (regno);
}
/* Set a value for h-frc. */
void
sh64_h_frc_set (SIM_CPU *current_cpu, UINT regno, SF newval)
{
SET_H_FRC (regno, newval);
}
/* Get the value of h-drc. */
DF
sh64_h_drc_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_DRC (regno);
}
/* Set a value for h-drc. */
void
sh64_h_drc_set (SIM_CPU *current_cpu, UINT regno, DF newval)
{
SET_H_DRC (regno, newval);
}
/* Get the value of h-xf. */
SF
sh64_h_xf_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_XF (regno);
}
/* Set a value for h-xf. */
void
sh64_h_xf_set (SIM_CPU *current_cpu, UINT regno, SF newval)
{
SET_H_XF (regno, newval);
}
/* Get the value of h-xd. */
DF
sh64_h_xd_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_XD (regno);
}
/* Set a value for h-xd. */
void
sh64_h_xd_set (SIM_CPU *current_cpu, UINT regno, DF newval)
{
SET_H_XD (regno, newval);
}
/* Get the value of h-fvc. */
SF
sh64_h_fvc_get (SIM_CPU *current_cpu, UINT regno)
{
return GET_H_FVC (regno);
}
/* Set a value for h-fvc. */
void
sh64_h_fvc_set (SIM_CPU *current_cpu, UINT regno, SF newval)
{
SET_H_FVC (regno, newval);
}
/* Get the value of h-fpccr. */
SI
sh64_h_fpccr_get (SIM_CPU *current_cpu)
{
return GET_H_FPCCR ();
}
/* Set a value for h-fpccr. */
void
sh64_h_fpccr_set (SIM_CPU *current_cpu, SI newval)
{
SET_H_FPCCR (newval);
}
/* Get the value of h-gbr. */
SI
sh64_h_gbr_get (SIM_CPU *current_cpu)
{
return GET_H_GBR ();
}
/* Set a value for h-gbr. */
void
sh64_h_gbr_set (SIM_CPU *current_cpu, SI newval)
{
SET_H_GBR (newval);
}
/* Get the value of h-pr. */
SI
sh64_h_pr_get (SIM_CPU *current_cpu)
{
return GET_H_PR ();
}
/* Set a value for h-pr. */
void
sh64_h_pr_set (SIM_CPU *current_cpu, SI newval)
{
SET_H_PR (newval);
}
/* Get the value of h-macl. */
SI
sh64_h_macl_get (SIM_CPU *current_cpu)
{
return GET_H_MACL ();
}
/* Set a value for h-macl. */
void
sh64_h_macl_set (SIM_CPU *current_cpu, SI newval)
{
SET_H_MACL (newval);
}
/* Get the value of h-mach. */
SI
sh64_h_mach_get (SIM_CPU *current_cpu)
{
return GET_H_MACH ();
}
/* Set a value for h-mach. */
void
sh64_h_mach_set (SIM_CPU *current_cpu, SI newval)
{
SET_H_MACH (newval);
}
/* Get the value of h-tbit. */
BI
sh64_h_tbit_get (SIM_CPU *current_cpu)
{
return GET_H_TBIT ();
}
/* Set a value for h-tbit. */
void
sh64_h_tbit_set (SIM_CPU *current_cpu, BI newval)
{
SET_H_TBIT (newval);
}
/* Record trace results for INSN. */
void
sh64_record_trace_results (SIM_CPU *current_cpu, CGEN_INSN *insn,
int *indices, TRACE_RECORD *tr)
{
}

View File

@@ -1,302 +0,0 @@
/* CPU family header for sh64.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU Simulators.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef CPU_SH64_H
#define CPU_SH64_H
/* Maximum number of instructions that are fetched at a time.
This is for LIW type instructions sets (e.g. m32r). */
#define MAX_LIW_INSNS 1
/* Maximum number of instructions that can be executed in parallel. */
#define MAX_PARALLEL_INSNS 1
/* CPU state information. */
typedef struct {
/* Hardware elements. */
struct {
/* Program counter */
UDI h_pc;
#define GET_H_PC() CPU (h_pc)
#define SET_H_PC(x) \
do { \
{\
CPU (h_ism) = ANDDI ((x), 1);\
CPU (h_pc) = ANDDI ((x), INVDI (1));\
}\
;} while (0)
/* General purpose integer registers */
DI h_gr[64];
#define GET_H_GR(index) ((((index) == (63))) ? (0) : (CPU (h_gr[index])))
#define SET_H_GR(index, x) \
do { \
if ((((index)) != (63))) {\
CPU (h_gr[(index)]) = (x);\
} else {\
((void) 0); /*nop*/\
}\
;} while (0)
/* Control registers */
DI h_cr[64];
#define GET_H_CR(index) ((((index) == (0))) ? (ZEXTSIDI (CPU (h_sr))) : (CPU (h_cr[index])))
#define SET_H_CR(index, x) \
do { \
if ((((index)) == (0))) {\
CPU (h_sr) = (x);\
} else {\
CPU (h_cr[(index)]) = (x);\
}\
;} while (0)
/* Status register */
SI h_sr;
#define GET_H_SR() CPU (h_sr)
#define SET_H_SR(x) (CPU (h_sr) = (x))
/* Floating point status and control register */
SI h_fpscr;
#define GET_H_FPSCR() CPU (h_fpscr)
#define SET_H_FPSCR(x) (CPU (h_fpscr) = (x))
/* Single precision floating point registers */
SF h_fr[64];
#define GET_H_FR(a1) CPU (h_fr)[a1]
#define SET_H_FR(a1, x) (CPU (h_fr)[a1] = (x))
/* Single precision floating point register pairs */
DF h_fp[32];
#define GET_H_FP(a1) CPU (h_fp)[a1]
#define SET_H_FP(a1, x) (CPU (h_fp)[a1] = (x))
/* Branch target registers */
DI h_tr[8];
#define GET_H_TR(a1) CPU (h_tr)[a1]
#define SET_H_TR(a1, x) (CPU (h_tr)[a1] = (x))
/* Current instruction set mode */
BI h_ism;
#define GET_H_ISM() CPU (h_ism)
#define SET_H_ISM(x) \
do { \
cgen_rtx_error (current_cpu, "cannot set ism directly");\
;} while (0)
} hardware;
#define CPU_CGEN_HW(cpu) (& (cpu)->cpu_data.hardware)
} SH64_CPU_DATA;
/* Virtual regs. */
#define GET_H_GRC(index) ANDDI (CPU (h_gr[index]), ZEXTSIDI (0xffffffff))
#define SET_H_GRC(index, x) \
do { \
CPU (h_gr[(index)]) = EXTSIDI ((x));\
;} while (0)
#define GET_H_FRBIT() ANDSI (SRLSI (CPU (h_sr), 14), 1)
#define SET_H_FRBIT(x) \
do { \
CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (14))))), SLLSI ((x), 14));\
;} while (0)
#define GET_H_SZBIT() ANDSI (SRLSI (CPU (h_sr), 13), 1)
#define SET_H_SZBIT(x) \
do { \
CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (13))))), SLLSI ((x), 13));\
;} while (0)
#define GET_H_PRBIT() ANDSI (SRLSI (CPU (h_sr), 12), 1)
#define SET_H_PRBIT(x) \
do { \
CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (12))))), SLLSI ((x), 12));\
;} while (0)
#define GET_H_SBIT() ANDSI (SRLSI (CPU (h_sr), 1), 1)
#define SET_H_SBIT(x) \
do { \
CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (2))), SLLSI ((x), 1));\
;} while (0)
#define GET_H_MBIT() ANDSI (SRLSI (CPU (h_sr), 9), 1)
#define SET_H_MBIT(x) \
do { \
CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (9))))), SLLSI ((x), 9));\
;} while (0)
#define GET_H_QBIT() ANDSI (SRLSI (CPU (h_sr), 8), 1)
#define SET_H_QBIT(x) \
do { \
CPU (h_sr) = ORSI (ANDSI (CPU (h_sr), (~ (((1) << (8))))), SLLSI ((x), 8));\
;} while (0)
#define GET_H_FV(index) CPU (h_fr[MULQI (ANDQI (index, 15), 4)])
#define SET_H_FV(index, x) \
do { \
CPU (h_fr[MULQI (ANDQI ((index), 15), 4)]) = (x);\
;} while (0)
#define GET_H_FMTX(index) CPU (h_fr[MULQI (ANDQI (index, 3), 16)])
#define SET_H_FMTX(index, x) \
do { \
CPU (h_fr[MULQI (ANDQI ((index), 3), 16)]) = (x);\
;} while (0)
#define GET_H_DR(index) SUBWORDDIDF (ORDI (SLLDI (ZEXTSIDI (SUBWORDSFSI (CPU (h_fr[index]))), 32), ZEXTSIDI (SUBWORDSFSI (CPU (h_fr[((index) + (1))])))))
#define SET_H_DR(index, x) \
do { \
{\
CPU (h_fr[(index)]) = SUBWORDSISF (SUBWORDDFSI ((x), 0));\
CPU (h_fr[(((index)) + (1))]) = SUBWORDSISF (SUBWORDDFSI ((x), 1));\
}\
;} while (0)
#define GET_H_ENDIAN() sh64_endian (current_cpu)
#define SET_H_ENDIAN(x) \
do { \
cgen_rtx_error (current_cpu, "cannot alter target byte order mid-program");\
;} while (0)
#define GET_H_FRC(index) CPU (h_fr[((((16) * (GET_H_FRBIT ()))) + (index))])
#define SET_H_FRC(index, x) \
do { \
CPU (h_fr[((((16) * (GET_H_FRBIT ()))) + ((index)))]) = (x);\
;} while (0)
#define GET_H_DRC(index) GET_H_DR (((((16) * (GET_H_FRBIT ()))) + (index)))
#define SET_H_DRC(index, x) \
do { \
SET_H_DR (((((16) * (GET_H_FRBIT ()))) + ((index))), (x));\
;} while (0)
#define GET_H_XF(index) CPU (h_fr[((((16) * (NOTBI (GET_H_FRBIT ())))) + (index))])
#define SET_H_XF(index, x) \
do { \
CPU (h_fr[((((16) * (NOTBI (GET_H_FRBIT ())))) + ((index)))]) = (x);\
;} while (0)
#define GET_H_XD(index) GET_H_DR (((((16) * (NOTBI (GET_H_FRBIT ())))) + (index)))
#define SET_H_XD(index, x) \
do { \
SET_H_DR (((((16) * (NOTBI (GET_H_FRBIT ())))) + ((index))), (x));\
;} while (0)
#define GET_H_FVC(index) CPU (h_fr[((((16) * (GET_H_FRBIT ()))) + (index))])
#define SET_H_FVC(index, x) \
do { \
CPU (h_fr[((((16) * (GET_H_FRBIT ()))) + ((index)))]) = (x);\
;} while (0)
#define GET_H_FPCCR() ORSI (ORSI (ORSI (CPU (h_fpscr), SLLSI (GET_H_PRBIT (), 19)), SLLSI (GET_H_SZBIT (), 20)), SLLSI (GET_H_FRBIT (), 21))
#define SET_H_FPCCR(x) \
do { \
{\
CPU (h_fpscr) = (x);\
SET_H_PRBIT (ANDSI (SRLSI ((x), 19), 1));\
SET_H_SZBIT (ANDSI (SRLSI ((x), 20), 1));\
SET_H_FRBIT (ANDSI (SRLSI ((x), 21), 1));\
}\
;} while (0)
#define GET_H_GBR() SUBWORDDISI (CPU (h_gr[((UINT) 16)]), 1)
#define SET_H_GBR(x) \
do { \
CPU (h_gr[((UINT) 16)]) = EXTSIDI ((x));\
;} while (0)
#define GET_H_PR() SUBWORDDISI (CPU (h_gr[((UINT) 18)]), 1)
#define SET_H_PR(x) \
do { \
CPU (h_gr[((UINT) 18)]) = EXTSIDI ((x));\
;} while (0)
#define GET_H_MACL() SUBWORDDISI (CPU (h_gr[((UINT) 17)]), 1)
#define SET_H_MACL(x) \
do { \
CPU (h_gr[((UINT) 17)]) = ORDI (SLLDI (ZEXTSIDI (SUBWORDDISI (CPU (h_gr[((UINT) 17)]), 0)), 32), ZEXTSIDI ((x)));\
;} while (0)
#define GET_H_MACH() SUBWORDDISI (CPU (h_gr[((UINT) 17)]), 0)
#define SET_H_MACH(x) \
do { \
CPU (h_gr[((UINT) 17)]) = ORDI (SLLDI (ZEXTSIDI ((x)), 32), ZEXTSIDI (SUBWORDDISI (CPU (h_gr[((UINT) 17)]), 1)));\
;} while (0)
#define GET_H_TBIT() ANDBI (CPU (h_gr[((UINT) 19)]), 1)
#define SET_H_TBIT(x) \
do { \
CPU (h_gr[((UINT) 19)]) = ORDI (ANDDI (CPU (h_gr[((UINT) 19)]), INVDI (1)), ZEXTBIDI ((x)));\
;} while (0)
/* Cover fns for register access. */
UDI sh64_h_pc_get (SIM_CPU *);
void sh64_h_pc_set (SIM_CPU *, UDI);
DI sh64_h_gr_get (SIM_CPU *, UINT);
void sh64_h_gr_set (SIM_CPU *, UINT, DI);
SI sh64_h_grc_get (SIM_CPU *, UINT);
void sh64_h_grc_set (SIM_CPU *, UINT, SI);
DI sh64_h_cr_get (SIM_CPU *, UINT);
void sh64_h_cr_set (SIM_CPU *, UINT, DI);
SI sh64_h_sr_get (SIM_CPU *);
void sh64_h_sr_set (SIM_CPU *, SI);
SI sh64_h_fpscr_get (SIM_CPU *);
void sh64_h_fpscr_set (SIM_CPU *, SI);
BI sh64_h_frbit_get (SIM_CPU *);
void sh64_h_frbit_set (SIM_CPU *, BI);
BI sh64_h_szbit_get (SIM_CPU *);
void sh64_h_szbit_set (SIM_CPU *, BI);
BI sh64_h_prbit_get (SIM_CPU *);
void sh64_h_prbit_set (SIM_CPU *, BI);
BI sh64_h_sbit_get (SIM_CPU *);
void sh64_h_sbit_set (SIM_CPU *, BI);
BI sh64_h_mbit_get (SIM_CPU *);
void sh64_h_mbit_set (SIM_CPU *, BI);
BI sh64_h_qbit_get (SIM_CPU *);
void sh64_h_qbit_set (SIM_CPU *, BI);
SF sh64_h_fr_get (SIM_CPU *, UINT);
void sh64_h_fr_set (SIM_CPU *, UINT, SF);
DF sh64_h_fp_get (SIM_CPU *, UINT);
void sh64_h_fp_set (SIM_CPU *, UINT, DF);
SF sh64_h_fv_get (SIM_CPU *, UINT);
void sh64_h_fv_set (SIM_CPU *, UINT, SF);
SF sh64_h_fmtx_get (SIM_CPU *, UINT);
void sh64_h_fmtx_set (SIM_CPU *, UINT, SF);
DF sh64_h_dr_get (SIM_CPU *, UINT);
void sh64_h_dr_set (SIM_CPU *, UINT, DF);
DI sh64_h_tr_get (SIM_CPU *, UINT);
void sh64_h_tr_set (SIM_CPU *, UINT, DI);
BI sh64_h_endian_get (SIM_CPU *);
void sh64_h_endian_set (SIM_CPU *, BI);
BI sh64_h_ism_get (SIM_CPU *);
void sh64_h_ism_set (SIM_CPU *, BI);
SF sh64_h_frc_get (SIM_CPU *, UINT);
void sh64_h_frc_set (SIM_CPU *, UINT, SF);
DF sh64_h_drc_get (SIM_CPU *, UINT);
void sh64_h_drc_set (SIM_CPU *, UINT, DF);
SF sh64_h_xf_get (SIM_CPU *, UINT);
void sh64_h_xf_set (SIM_CPU *, UINT, SF);
DF sh64_h_xd_get (SIM_CPU *, UINT);
void sh64_h_xd_set (SIM_CPU *, UINT, DF);
SF sh64_h_fvc_get (SIM_CPU *, UINT);
void sh64_h_fvc_set (SIM_CPU *, UINT, SF);
SI sh64_h_fpccr_get (SIM_CPU *);
void sh64_h_fpccr_set (SIM_CPU *, SI);
SI sh64_h_gbr_get (SIM_CPU *);
void sh64_h_gbr_set (SIM_CPU *, SI);
SI sh64_h_pr_get (SIM_CPU *);
void sh64_h_pr_set (SIM_CPU *, SI);
SI sh64_h_macl_get (SIM_CPU *);
void sh64_h_macl_set (SIM_CPU *, SI);
SI sh64_h_mach_get (SIM_CPU *);
void sh64_h_mach_set (SIM_CPU *, SI);
BI sh64_h_tbit_get (SIM_CPU *);
void sh64_h_tbit_set (SIM_CPU *, BI);
/* These must be hand-written. */
extern CPUREG_FETCH_FN sh64_fetch_register;
extern CPUREG_STORE_FN sh64_store_register;
typedef struct {
int empty;
} MODEL_SH5_DATA;
/* Collection of various things for the trace handler to use. */
typedef struct trace_record {
IADDR pc;
/* FIXME:wip */
} TRACE_RECORD;
#endif /* CPU_SH64_H */

View File

@@ -1,70 +0,0 @@
/* Simulator CPU header for sh.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 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 SH_CPUALL_H
#define SH_CPUALL_H
/* Include files for each cpu family. */
#ifdef WANT_CPU_SH64
#include "eng.h"
#include "cgen-engine.h"
#include "cpu.h"
#include "decode.h"
#endif
extern const MACH sh2_mach;
extern const MACH sh3_mach;
extern const MACH sh3e_mach;
extern const MACH sh4_mach;
extern const MACH sh5_mach;
#ifndef WANT_CPU
/* The ARGBUF struct. */
struct argbuf {
/* These are the baseclass definitions. */
IADDR addr;
const IDESC *idesc;
char trace_p;
char profile_p;
/* ??? Temporary hack for skip insns. */
char skip_count;
char unused;
/* cpu specific data follows */
};
#endif
#ifndef WANT_CPU
/* A cached insn.
??? SCACHE used to contain more than just argbuf. We could delete the
type entirely and always just use ARGBUF, but for future concerns and as
a level of abstraction it is left in. */
struct scache {
struct argbuf argbuf;
};
#endif
#endif /* SH_CPUALL_H */

File diff suppressed because it is too large Load Diff

View File

@@ -1,128 +0,0 @@
/* Decode header for sh64_compact.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 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 SH64_COMPACT_DECODE_H
#define SH64_COMPACT_DECODE_H
extern const IDESC *sh64_compact_decode (SIM_CPU *, IADDR,
CGEN_INSN_INT, CGEN_INSN_INT,
ARGBUF *);
extern void sh64_compact_init_idesc_table (SIM_CPU *);
extern void sh64_compact_sem_init_idesc_table (SIM_CPU *);
extern void sh64_compact_semf_init_idesc_table (SIM_CPU *);
/* Enum declaration for instructions in cpu family sh64. */
typedef enum sh64_compact_insn_type {
SH64_COMPACT_INSN_X_INVALID, SH64_COMPACT_INSN_X_AFTER, SH64_COMPACT_INSN_X_BEFORE, SH64_COMPACT_INSN_X_CTI_CHAIN
, SH64_COMPACT_INSN_X_CHAIN, SH64_COMPACT_INSN_X_BEGIN, SH64_COMPACT_INSN_ADD_COMPACT, SH64_COMPACT_INSN_ADDI_COMPACT
, SH64_COMPACT_INSN_ADDC_COMPACT, SH64_COMPACT_INSN_ADDV_COMPACT, SH64_COMPACT_INSN_AND_COMPACT, SH64_COMPACT_INSN_ANDI_COMPACT
, SH64_COMPACT_INSN_ANDB_COMPACT, SH64_COMPACT_INSN_BF_COMPACT, SH64_COMPACT_INSN_BFS_COMPACT, SH64_COMPACT_INSN_BRA_COMPACT
, SH64_COMPACT_INSN_BRAF_COMPACT, SH64_COMPACT_INSN_BRK_COMPACT, SH64_COMPACT_INSN_BSR_COMPACT, SH64_COMPACT_INSN_BSRF_COMPACT
, SH64_COMPACT_INSN_BT_COMPACT, SH64_COMPACT_INSN_BTS_COMPACT, SH64_COMPACT_INSN_CLRMAC_COMPACT, SH64_COMPACT_INSN_CLRS_COMPACT
, SH64_COMPACT_INSN_CLRT_COMPACT, SH64_COMPACT_INSN_CMPEQ_COMPACT, SH64_COMPACT_INSN_CMPEQI_COMPACT, SH64_COMPACT_INSN_CMPGE_COMPACT
, SH64_COMPACT_INSN_CMPGT_COMPACT, SH64_COMPACT_INSN_CMPHI_COMPACT, SH64_COMPACT_INSN_CMPHS_COMPACT, SH64_COMPACT_INSN_CMPPL_COMPACT
, SH64_COMPACT_INSN_CMPPZ_COMPACT, SH64_COMPACT_INSN_CMPSTR_COMPACT, SH64_COMPACT_INSN_DIV0S_COMPACT, SH64_COMPACT_INSN_DIV0U_COMPACT
, SH64_COMPACT_INSN_DIV1_COMPACT, SH64_COMPACT_INSN_DMULSL_COMPACT, SH64_COMPACT_INSN_DMULUL_COMPACT, SH64_COMPACT_INSN_DT_COMPACT
, SH64_COMPACT_INSN_EXTSB_COMPACT, SH64_COMPACT_INSN_EXTSW_COMPACT, SH64_COMPACT_INSN_EXTUB_COMPACT, SH64_COMPACT_INSN_EXTUW_COMPACT
, SH64_COMPACT_INSN_FABS_COMPACT, SH64_COMPACT_INSN_FADD_COMPACT, SH64_COMPACT_INSN_FCMPEQ_COMPACT, SH64_COMPACT_INSN_FCMPGT_COMPACT
, SH64_COMPACT_INSN_FCNVDS_COMPACT, SH64_COMPACT_INSN_FCNVSD_COMPACT, SH64_COMPACT_INSN_FDIV_COMPACT, SH64_COMPACT_INSN_FIPR_COMPACT
, SH64_COMPACT_INSN_FLDS_COMPACT, SH64_COMPACT_INSN_FLDI0_COMPACT, SH64_COMPACT_INSN_FLDI1_COMPACT, SH64_COMPACT_INSN_FLOAT_COMPACT
, SH64_COMPACT_INSN_FMAC_COMPACT, SH64_COMPACT_INSN_FMOV1_COMPACT, SH64_COMPACT_INSN_FMOV2_COMPACT, SH64_COMPACT_INSN_FMOV3_COMPACT
, SH64_COMPACT_INSN_FMOV4_COMPACT, SH64_COMPACT_INSN_FMOV5_COMPACT, SH64_COMPACT_INSN_FMOV6_COMPACT, SH64_COMPACT_INSN_FMOV7_COMPACT
, SH64_COMPACT_INSN_FMUL_COMPACT, SH64_COMPACT_INSN_FNEG_COMPACT, SH64_COMPACT_INSN_FRCHG_COMPACT, SH64_COMPACT_INSN_FSCHG_COMPACT
, SH64_COMPACT_INSN_FSQRT_COMPACT, SH64_COMPACT_INSN_FSTS_COMPACT, SH64_COMPACT_INSN_FSUB_COMPACT, SH64_COMPACT_INSN_FTRC_COMPACT
, SH64_COMPACT_INSN_FTRV_COMPACT, SH64_COMPACT_INSN_JMP_COMPACT, SH64_COMPACT_INSN_JSR_COMPACT, SH64_COMPACT_INSN_LDC_COMPACT
, SH64_COMPACT_INSN_LDCL_COMPACT, SH64_COMPACT_INSN_LDS_FPSCR_COMPACT, SH64_COMPACT_INSN_LDSL_FPSCR_COMPACT, SH64_COMPACT_INSN_LDS_FPUL_COMPACT
, SH64_COMPACT_INSN_LDSL_FPUL_COMPACT, SH64_COMPACT_INSN_LDS_MACH_COMPACT, SH64_COMPACT_INSN_LDSL_MACH_COMPACT, SH64_COMPACT_INSN_LDS_MACL_COMPACT
, SH64_COMPACT_INSN_LDSL_MACL_COMPACT, SH64_COMPACT_INSN_LDS_PR_COMPACT, SH64_COMPACT_INSN_LDSL_PR_COMPACT, SH64_COMPACT_INSN_MACL_COMPACT
, SH64_COMPACT_INSN_MACW_COMPACT, SH64_COMPACT_INSN_MOV_COMPACT, SH64_COMPACT_INSN_MOVI_COMPACT, SH64_COMPACT_INSN_MOVB1_COMPACT
, SH64_COMPACT_INSN_MOVB2_COMPACT, SH64_COMPACT_INSN_MOVB3_COMPACT, SH64_COMPACT_INSN_MOVB4_COMPACT, SH64_COMPACT_INSN_MOVB5_COMPACT
, SH64_COMPACT_INSN_MOVB6_COMPACT, SH64_COMPACT_INSN_MOVB7_COMPACT, SH64_COMPACT_INSN_MOVB8_COMPACT, SH64_COMPACT_INSN_MOVB9_COMPACT
, SH64_COMPACT_INSN_MOVB10_COMPACT, SH64_COMPACT_INSN_MOVL1_COMPACT, SH64_COMPACT_INSN_MOVL2_COMPACT, SH64_COMPACT_INSN_MOVL3_COMPACT
, SH64_COMPACT_INSN_MOVL4_COMPACT, SH64_COMPACT_INSN_MOVL5_COMPACT, SH64_COMPACT_INSN_MOVL6_COMPACT, SH64_COMPACT_INSN_MOVL7_COMPACT
, SH64_COMPACT_INSN_MOVL8_COMPACT, SH64_COMPACT_INSN_MOVL9_COMPACT, SH64_COMPACT_INSN_MOVL10_COMPACT, SH64_COMPACT_INSN_MOVL11_COMPACT
, SH64_COMPACT_INSN_MOVW1_COMPACT, SH64_COMPACT_INSN_MOVW2_COMPACT, SH64_COMPACT_INSN_MOVW3_COMPACT, SH64_COMPACT_INSN_MOVW4_COMPACT
, SH64_COMPACT_INSN_MOVW5_COMPACT, SH64_COMPACT_INSN_MOVW6_COMPACT, SH64_COMPACT_INSN_MOVW7_COMPACT, SH64_COMPACT_INSN_MOVW8_COMPACT
, SH64_COMPACT_INSN_MOVW9_COMPACT, SH64_COMPACT_INSN_MOVW10_COMPACT, SH64_COMPACT_INSN_MOVW11_COMPACT, SH64_COMPACT_INSN_MOVA_COMPACT
, SH64_COMPACT_INSN_MOVCAL_COMPACT, SH64_COMPACT_INSN_MOVT_COMPACT, SH64_COMPACT_INSN_MULL_COMPACT, SH64_COMPACT_INSN_MULSW_COMPACT
, SH64_COMPACT_INSN_MULUW_COMPACT, SH64_COMPACT_INSN_NEG_COMPACT, SH64_COMPACT_INSN_NEGC_COMPACT, SH64_COMPACT_INSN_NOP_COMPACT
, SH64_COMPACT_INSN_NOT_COMPACT, SH64_COMPACT_INSN_OCBI_COMPACT, SH64_COMPACT_INSN_OCBP_COMPACT, SH64_COMPACT_INSN_OCBWB_COMPACT
, SH64_COMPACT_INSN_OR_COMPACT, SH64_COMPACT_INSN_ORI_COMPACT, SH64_COMPACT_INSN_ORB_COMPACT, SH64_COMPACT_INSN_PREF_COMPACT
, SH64_COMPACT_INSN_ROTCL_COMPACT, SH64_COMPACT_INSN_ROTCR_COMPACT, SH64_COMPACT_INSN_ROTL_COMPACT, SH64_COMPACT_INSN_ROTR_COMPACT
, SH64_COMPACT_INSN_RTS_COMPACT, SH64_COMPACT_INSN_SETS_COMPACT, SH64_COMPACT_INSN_SETT_COMPACT, SH64_COMPACT_INSN_SHAD_COMPACT
, SH64_COMPACT_INSN_SHAL_COMPACT, SH64_COMPACT_INSN_SHAR_COMPACT, SH64_COMPACT_INSN_SHLD_COMPACT, SH64_COMPACT_INSN_SHLL_COMPACT
, SH64_COMPACT_INSN_SHLL2_COMPACT, SH64_COMPACT_INSN_SHLL8_COMPACT, SH64_COMPACT_INSN_SHLL16_COMPACT, SH64_COMPACT_INSN_SHLR_COMPACT
, SH64_COMPACT_INSN_SHLR2_COMPACT, SH64_COMPACT_INSN_SHLR8_COMPACT, SH64_COMPACT_INSN_SHLR16_COMPACT, SH64_COMPACT_INSN_STC_GBR_COMPACT
, SH64_COMPACT_INSN_STCL_GBR_COMPACT, SH64_COMPACT_INSN_STS_FPSCR_COMPACT, SH64_COMPACT_INSN_STSL_FPSCR_COMPACT, SH64_COMPACT_INSN_STS_FPUL_COMPACT
, SH64_COMPACT_INSN_STSL_FPUL_COMPACT, SH64_COMPACT_INSN_STS_MACH_COMPACT, SH64_COMPACT_INSN_STSL_MACH_COMPACT, SH64_COMPACT_INSN_STS_MACL_COMPACT
, SH64_COMPACT_INSN_STSL_MACL_COMPACT, SH64_COMPACT_INSN_STS_PR_COMPACT, SH64_COMPACT_INSN_STSL_PR_COMPACT, SH64_COMPACT_INSN_SUB_COMPACT
, SH64_COMPACT_INSN_SUBC_COMPACT, SH64_COMPACT_INSN_SUBV_COMPACT, SH64_COMPACT_INSN_SWAPB_COMPACT, SH64_COMPACT_INSN_SWAPW_COMPACT
, SH64_COMPACT_INSN_TASB_COMPACT, SH64_COMPACT_INSN_TRAPA_COMPACT, SH64_COMPACT_INSN_TST_COMPACT, SH64_COMPACT_INSN_TSTI_COMPACT
, SH64_COMPACT_INSN_TSTB_COMPACT, SH64_COMPACT_INSN_XOR_COMPACT, SH64_COMPACT_INSN_XORI_COMPACT, SH64_COMPACT_INSN_XORB_COMPACT
, SH64_COMPACT_INSN_XTRCT_COMPACT, SH64_COMPACT_INSN_MAX
} SH64_COMPACT_INSN_TYPE;
/* Enum declaration for semantic formats in cpu family sh64. */
typedef enum sh64_compact_sfmt_type {
SH64_COMPACT_SFMT_EMPTY, SH64_COMPACT_SFMT_ADD_COMPACT, SH64_COMPACT_SFMT_ADDI_COMPACT, SH64_COMPACT_SFMT_ADDC_COMPACT
, SH64_COMPACT_SFMT_ADDV_COMPACT, SH64_COMPACT_SFMT_AND_COMPACT, SH64_COMPACT_SFMT_ANDI_COMPACT, SH64_COMPACT_SFMT_ANDB_COMPACT
, SH64_COMPACT_SFMT_BF_COMPACT, SH64_COMPACT_SFMT_BRA_COMPACT, SH64_COMPACT_SFMT_BRAF_COMPACT, SH64_COMPACT_SFMT_BRK_COMPACT
, SH64_COMPACT_SFMT_BSR_COMPACT, SH64_COMPACT_SFMT_BSRF_COMPACT, SH64_COMPACT_SFMT_CLRMAC_COMPACT, SH64_COMPACT_SFMT_CLRS_COMPACT
, SH64_COMPACT_SFMT_CLRT_COMPACT, SH64_COMPACT_SFMT_CMPEQ_COMPACT, SH64_COMPACT_SFMT_CMPEQI_COMPACT, SH64_COMPACT_SFMT_CMPPL_COMPACT
, SH64_COMPACT_SFMT_DIV0S_COMPACT, SH64_COMPACT_SFMT_DIV0U_COMPACT, SH64_COMPACT_SFMT_DIV1_COMPACT, SH64_COMPACT_SFMT_DMULSL_COMPACT
, SH64_COMPACT_SFMT_DT_COMPACT, SH64_COMPACT_SFMT_EXTSB_COMPACT, SH64_COMPACT_SFMT_FABS_COMPACT, SH64_COMPACT_SFMT_FADD_COMPACT
, SH64_COMPACT_SFMT_FCMPEQ_COMPACT, SH64_COMPACT_SFMT_FCNVDS_COMPACT, SH64_COMPACT_SFMT_FCNVSD_COMPACT, SH64_COMPACT_SFMT_FIPR_COMPACT
, SH64_COMPACT_SFMT_FLDS_COMPACT, SH64_COMPACT_SFMT_FLDI0_COMPACT, SH64_COMPACT_SFMT_FLOAT_COMPACT, SH64_COMPACT_SFMT_FMAC_COMPACT
, SH64_COMPACT_SFMT_FMOV1_COMPACT, SH64_COMPACT_SFMT_FMOV2_COMPACT, SH64_COMPACT_SFMT_FMOV3_COMPACT, SH64_COMPACT_SFMT_FMOV4_COMPACT
, SH64_COMPACT_SFMT_FMOV5_COMPACT, SH64_COMPACT_SFMT_FMOV6_COMPACT, SH64_COMPACT_SFMT_FMOV7_COMPACT, SH64_COMPACT_SFMT_FRCHG_COMPACT
, SH64_COMPACT_SFMT_FSCHG_COMPACT, SH64_COMPACT_SFMT_FSTS_COMPACT, SH64_COMPACT_SFMT_FTRC_COMPACT, SH64_COMPACT_SFMT_FTRV_COMPACT
, SH64_COMPACT_SFMT_JMP_COMPACT, SH64_COMPACT_SFMT_LDC_COMPACT, SH64_COMPACT_SFMT_LDCL_COMPACT, SH64_COMPACT_SFMT_LDS_FPSCR_COMPACT
, SH64_COMPACT_SFMT_LDSL_FPSCR_COMPACT, SH64_COMPACT_SFMT_LDS_FPUL_COMPACT, SH64_COMPACT_SFMT_LDSL_FPUL_COMPACT, SH64_COMPACT_SFMT_LDS_MACH_COMPACT
, SH64_COMPACT_SFMT_LDSL_MACH_COMPACT, SH64_COMPACT_SFMT_LDS_MACL_COMPACT, SH64_COMPACT_SFMT_LDSL_MACL_COMPACT, SH64_COMPACT_SFMT_LDS_PR_COMPACT
, SH64_COMPACT_SFMT_LDSL_PR_COMPACT, SH64_COMPACT_SFMT_MACL_COMPACT, SH64_COMPACT_SFMT_MACW_COMPACT, SH64_COMPACT_SFMT_MOV_COMPACT
, SH64_COMPACT_SFMT_MOVI_COMPACT, SH64_COMPACT_SFMT_MOVB1_COMPACT, SH64_COMPACT_SFMT_MOVB2_COMPACT, SH64_COMPACT_SFMT_MOVB3_COMPACT
, SH64_COMPACT_SFMT_MOVB4_COMPACT, SH64_COMPACT_SFMT_MOVB5_COMPACT, SH64_COMPACT_SFMT_MOVB6_COMPACT, SH64_COMPACT_SFMT_MOVB7_COMPACT
, SH64_COMPACT_SFMT_MOVB8_COMPACT, SH64_COMPACT_SFMT_MOVB9_COMPACT, SH64_COMPACT_SFMT_MOVB10_COMPACT, SH64_COMPACT_SFMT_MOVL4_COMPACT
, SH64_COMPACT_SFMT_MOVL5_COMPACT, SH64_COMPACT_SFMT_MOVL7_COMPACT, SH64_COMPACT_SFMT_MOVL9_COMPACT, SH64_COMPACT_SFMT_MOVL10_COMPACT
, SH64_COMPACT_SFMT_MOVL11_COMPACT, SH64_COMPACT_SFMT_MOVW4_COMPACT, SH64_COMPACT_SFMT_MOVW5_COMPACT, SH64_COMPACT_SFMT_MOVW9_COMPACT
, SH64_COMPACT_SFMT_MOVW10_COMPACT, SH64_COMPACT_SFMT_MOVW11_COMPACT, SH64_COMPACT_SFMT_MOVA_COMPACT, SH64_COMPACT_SFMT_MOVCAL_COMPACT
, SH64_COMPACT_SFMT_MOVT_COMPACT, SH64_COMPACT_SFMT_MULL_COMPACT, SH64_COMPACT_SFMT_NEGC_COMPACT, SH64_COMPACT_SFMT_NOP_COMPACT
, SH64_COMPACT_SFMT_ROTCL_COMPACT, SH64_COMPACT_SFMT_RTS_COMPACT, SH64_COMPACT_SFMT_SHAD_COMPACT, SH64_COMPACT_SFMT_SHLL2_COMPACT
, SH64_COMPACT_SFMT_STC_GBR_COMPACT, SH64_COMPACT_SFMT_STCL_GBR_COMPACT, SH64_COMPACT_SFMT_STS_FPSCR_COMPACT, SH64_COMPACT_SFMT_STSL_FPSCR_COMPACT
, SH64_COMPACT_SFMT_STS_FPUL_COMPACT, SH64_COMPACT_SFMT_STSL_FPUL_COMPACT, SH64_COMPACT_SFMT_STS_MACH_COMPACT, SH64_COMPACT_SFMT_STSL_MACH_COMPACT
, SH64_COMPACT_SFMT_STS_MACL_COMPACT, SH64_COMPACT_SFMT_STSL_MACL_COMPACT, SH64_COMPACT_SFMT_STS_PR_COMPACT, SH64_COMPACT_SFMT_STSL_PR_COMPACT
, SH64_COMPACT_SFMT_TASB_COMPACT, SH64_COMPACT_SFMT_TRAPA_COMPACT, SH64_COMPACT_SFMT_TSTI_COMPACT, SH64_COMPACT_SFMT_TSTB_COMPACT
, SH64_COMPACT_SFMT_XORI_COMPACT
} SH64_COMPACT_SFMT_TYPE;
/* Function unit handlers (user written). */
extern int sh64_model_sh5_u_exec (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/);
/* Profiling before/after handlers (user written) */
extern void sh64_model_insn_before (SIM_CPU *, int /*first_p*/);
extern void sh64_model_insn_after (SIM_CPU *, int /*last_p*/, int /*cycles*/);
#endif /* SH64_COMPACT_DECODE_H */

File diff suppressed because one or more lines are too long

View File

@@ -1,122 +0,0 @@
/* Decode header for sh64_media.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 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 SH64_MEDIA_DECODE_H
#define SH64_MEDIA_DECODE_H
extern const IDESC *sh64_media_decode (SIM_CPU *, IADDR,
CGEN_INSN_INT, CGEN_INSN_INT,
ARGBUF *);
extern void sh64_media_init_idesc_table (SIM_CPU *);
extern void sh64_media_sem_init_idesc_table (SIM_CPU *);
extern void sh64_media_semf_init_idesc_table (SIM_CPU *);
/* Enum declaration for instructions in cpu family sh64. */
typedef enum sh64_media_insn_type {
SH64_MEDIA_INSN_X_INVALID, SH64_MEDIA_INSN_X_AFTER, SH64_MEDIA_INSN_X_BEFORE, SH64_MEDIA_INSN_X_CTI_CHAIN
, SH64_MEDIA_INSN_X_CHAIN, SH64_MEDIA_INSN_X_BEGIN, SH64_MEDIA_INSN_ADD, SH64_MEDIA_INSN_ADDL
, SH64_MEDIA_INSN_ADDI, SH64_MEDIA_INSN_ADDIL, SH64_MEDIA_INSN_ADDZL, SH64_MEDIA_INSN_ALLOCO
, SH64_MEDIA_INSN_AND, SH64_MEDIA_INSN_ANDC, SH64_MEDIA_INSN_ANDI, SH64_MEDIA_INSN_BEQ
, SH64_MEDIA_INSN_BEQI, SH64_MEDIA_INSN_BGE, SH64_MEDIA_INSN_BGEU, SH64_MEDIA_INSN_BGT
, SH64_MEDIA_INSN_BGTU, SH64_MEDIA_INSN_BLINK, SH64_MEDIA_INSN_BNE, SH64_MEDIA_INSN_BNEI
, SH64_MEDIA_INSN_BRK, SH64_MEDIA_INSN_BYTEREV, SH64_MEDIA_INSN_CMPEQ, SH64_MEDIA_INSN_CMPGT
, SH64_MEDIA_INSN_CMPGTU, SH64_MEDIA_INSN_CMVEQ, SH64_MEDIA_INSN_CMVNE, SH64_MEDIA_INSN_FABSD
, SH64_MEDIA_INSN_FABSS, SH64_MEDIA_INSN_FADDD, SH64_MEDIA_INSN_FADDS, SH64_MEDIA_INSN_FCMPEQD
, SH64_MEDIA_INSN_FCMPEQS, SH64_MEDIA_INSN_FCMPGED, SH64_MEDIA_INSN_FCMPGES, SH64_MEDIA_INSN_FCMPGTD
, SH64_MEDIA_INSN_FCMPGTS, SH64_MEDIA_INSN_FCMPUND, SH64_MEDIA_INSN_FCMPUNS, SH64_MEDIA_INSN_FCNVDS
, SH64_MEDIA_INSN_FCNVSD, SH64_MEDIA_INSN_FDIVD, SH64_MEDIA_INSN_FDIVS, SH64_MEDIA_INSN_FGETSCR
, SH64_MEDIA_INSN_FIPRS, SH64_MEDIA_INSN_FLDD, SH64_MEDIA_INSN_FLDP, SH64_MEDIA_INSN_FLDS
, SH64_MEDIA_INSN_FLDXD, SH64_MEDIA_INSN_FLDXP, SH64_MEDIA_INSN_FLDXS, SH64_MEDIA_INSN_FLOATLD
, SH64_MEDIA_INSN_FLOATLS, SH64_MEDIA_INSN_FLOATQD, SH64_MEDIA_INSN_FLOATQS, SH64_MEDIA_INSN_FMACS
, SH64_MEDIA_INSN_FMOVD, SH64_MEDIA_INSN_FMOVDQ, SH64_MEDIA_INSN_FMOVLS, SH64_MEDIA_INSN_FMOVQD
, SH64_MEDIA_INSN_FMOVS, SH64_MEDIA_INSN_FMOVSL, SH64_MEDIA_INSN_FMULD, SH64_MEDIA_INSN_FMULS
, SH64_MEDIA_INSN_FNEGD, SH64_MEDIA_INSN_FNEGS, SH64_MEDIA_INSN_FPUTSCR, SH64_MEDIA_INSN_FSQRTD
, SH64_MEDIA_INSN_FSQRTS, SH64_MEDIA_INSN_FSTD, SH64_MEDIA_INSN_FSTP, SH64_MEDIA_INSN_FSTS
, SH64_MEDIA_INSN_FSTXD, SH64_MEDIA_INSN_FSTXP, SH64_MEDIA_INSN_FSTXS, SH64_MEDIA_INSN_FSUBD
, SH64_MEDIA_INSN_FSUBS, SH64_MEDIA_INSN_FTRCDL, SH64_MEDIA_INSN_FTRCSL, SH64_MEDIA_INSN_FTRCDQ
, SH64_MEDIA_INSN_FTRCSQ, SH64_MEDIA_INSN_FTRVS, SH64_MEDIA_INSN_GETCFG, SH64_MEDIA_INSN_GETCON
, SH64_MEDIA_INSN_GETTR, SH64_MEDIA_INSN_ICBI, SH64_MEDIA_INSN_LDB, SH64_MEDIA_INSN_LDL
, SH64_MEDIA_INSN_LDQ, SH64_MEDIA_INSN_LDUB, SH64_MEDIA_INSN_LDUW, SH64_MEDIA_INSN_LDW
, SH64_MEDIA_INSN_LDHIL, SH64_MEDIA_INSN_LDHIQ, SH64_MEDIA_INSN_LDLOL, SH64_MEDIA_INSN_LDLOQ
, SH64_MEDIA_INSN_LDXB, SH64_MEDIA_INSN_LDXL, SH64_MEDIA_INSN_LDXQ, SH64_MEDIA_INSN_LDXUB
, SH64_MEDIA_INSN_LDXUW, SH64_MEDIA_INSN_LDXW, SH64_MEDIA_INSN_MABSL, SH64_MEDIA_INSN_MABSW
, SH64_MEDIA_INSN_MADDL, SH64_MEDIA_INSN_MADDW, SH64_MEDIA_INSN_MADDSL, SH64_MEDIA_INSN_MADDSUB
, SH64_MEDIA_INSN_MADDSW, SH64_MEDIA_INSN_MCMPEQB, SH64_MEDIA_INSN_MCMPEQL, SH64_MEDIA_INSN_MCMPEQW
, SH64_MEDIA_INSN_MCMPGTL, SH64_MEDIA_INSN_MCMPGTUB, SH64_MEDIA_INSN_MCMPGTW, SH64_MEDIA_INSN_MCMV
, SH64_MEDIA_INSN_MCNVSLW, SH64_MEDIA_INSN_MCNVSWB, SH64_MEDIA_INSN_MCNVSWUB, SH64_MEDIA_INSN_MEXTR1
, SH64_MEDIA_INSN_MEXTR2, SH64_MEDIA_INSN_MEXTR3, SH64_MEDIA_INSN_MEXTR4, SH64_MEDIA_INSN_MEXTR5
, SH64_MEDIA_INSN_MEXTR6, SH64_MEDIA_INSN_MEXTR7, SH64_MEDIA_INSN_MMACFXWL, SH64_MEDIA_INSN_MMACNFX_WL
, SH64_MEDIA_INSN_MMULL, SH64_MEDIA_INSN_MMULW, SH64_MEDIA_INSN_MMULFXL, SH64_MEDIA_INSN_MMULFXW
, SH64_MEDIA_INSN_MMULFXRPW, SH64_MEDIA_INSN_MMULHIWL, SH64_MEDIA_INSN_MMULLOWL, SH64_MEDIA_INSN_MMULSUMWQ
, SH64_MEDIA_INSN_MOVI, SH64_MEDIA_INSN_MPERMW, SH64_MEDIA_INSN_MSADUBQ, SH64_MEDIA_INSN_MSHALDSL
, SH64_MEDIA_INSN_MSHALDSW, SH64_MEDIA_INSN_MSHARDL, SH64_MEDIA_INSN_MSHARDW, SH64_MEDIA_INSN_MSHARDSQ
, SH64_MEDIA_INSN_MSHFHIB, SH64_MEDIA_INSN_MSHFHIL, SH64_MEDIA_INSN_MSHFHIW, SH64_MEDIA_INSN_MSHFLOB
, SH64_MEDIA_INSN_MSHFLOL, SH64_MEDIA_INSN_MSHFLOW, SH64_MEDIA_INSN_MSHLLDL, SH64_MEDIA_INSN_MSHLLDW
, SH64_MEDIA_INSN_MSHLRDL, SH64_MEDIA_INSN_MSHLRDW, SH64_MEDIA_INSN_MSUBL, SH64_MEDIA_INSN_MSUBW
, SH64_MEDIA_INSN_MSUBSL, SH64_MEDIA_INSN_MSUBSUB, SH64_MEDIA_INSN_MSUBSW, SH64_MEDIA_INSN_MULSL
, SH64_MEDIA_INSN_MULUL, SH64_MEDIA_INSN_NOP, SH64_MEDIA_INSN_NSB, SH64_MEDIA_INSN_OCBI
, SH64_MEDIA_INSN_OCBP, SH64_MEDIA_INSN_OCBWB, SH64_MEDIA_INSN_OR, SH64_MEDIA_INSN_ORI
, SH64_MEDIA_INSN_PREFI, SH64_MEDIA_INSN_PTA, SH64_MEDIA_INSN_PTABS, SH64_MEDIA_INSN_PTB
, SH64_MEDIA_INSN_PTREL, SH64_MEDIA_INSN_PUTCFG, SH64_MEDIA_INSN_PUTCON, SH64_MEDIA_INSN_RTE
, SH64_MEDIA_INSN_SHARD, SH64_MEDIA_INSN_SHARDL, SH64_MEDIA_INSN_SHARI, SH64_MEDIA_INSN_SHARIL
, SH64_MEDIA_INSN_SHLLD, SH64_MEDIA_INSN_SHLLDL, SH64_MEDIA_INSN_SHLLI, SH64_MEDIA_INSN_SHLLIL
, SH64_MEDIA_INSN_SHLRD, SH64_MEDIA_INSN_SHLRDL, SH64_MEDIA_INSN_SHLRI, SH64_MEDIA_INSN_SHLRIL
, SH64_MEDIA_INSN_SHORI, SH64_MEDIA_INSN_SLEEP, SH64_MEDIA_INSN_STB, SH64_MEDIA_INSN_STL
, SH64_MEDIA_INSN_STQ, SH64_MEDIA_INSN_STW, SH64_MEDIA_INSN_STHIL, SH64_MEDIA_INSN_STHIQ
, SH64_MEDIA_INSN_STLOL, SH64_MEDIA_INSN_STLOQ, SH64_MEDIA_INSN_STXB, SH64_MEDIA_INSN_STXL
, SH64_MEDIA_INSN_STXQ, SH64_MEDIA_INSN_STXW, SH64_MEDIA_INSN_SUB, SH64_MEDIA_INSN_SUBL
, SH64_MEDIA_INSN_SWAPQ, SH64_MEDIA_INSN_SYNCI, SH64_MEDIA_INSN_SYNCO, SH64_MEDIA_INSN_TRAPA
, SH64_MEDIA_INSN_XOR, SH64_MEDIA_INSN_XORI, SH64_MEDIA_INSN_MAX
} SH64_MEDIA_INSN_TYPE;
/* Enum declaration for semantic formats in cpu family sh64. */
typedef enum sh64_media_sfmt_type {
SH64_MEDIA_SFMT_EMPTY, SH64_MEDIA_SFMT_ADD, SH64_MEDIA_SFMT_ADDI, SH64_MEDIA_SFMT_ALLOCO
, SH64_MEDIA_SFMT_BEQ, SH64_MEDIA_SFMT_BEQI, SH64_MEDIA_SFMT_BLINK, SH64_MEDIA_SFMT_BRK
, SH64_MEDIA_SFMT_BYTEREV, SH64_MEDIA_SFMT_CMVEQ, SH64_MEDIA_SFMT_FABSD, SH64_MEDIA_SFMT_FABSS
, SH64_MEDIA_SFMT_FADDD, SH64_MEDIA_SFMT_FADDS, SH64_MEDIA_SFMT_FCMPEQD, SH64_MEDIA_SFMT_FCMPEQS
, SH64_MEDIA_SFMT_FCNVDS, SH64_MEDIA_SFMT_FCNVSD, SH64_MEDIA_SFMT_FIPRS, SH64_MEDIA_SFMT_FLDD
, SH64_MEDIA_SFMT_FLDP, SH64_MEDIA_SFMT_FLDS, SH64_MEDIA_SFMT_FLDXD, SH64_MEDIA_SFMT_FLDXP
, SH64_MEDIA_SFMT_FLDXS, SH64_MEDIA_SFMT_FMACS, SH64_MEDIA_SFMT_FMOVDQ, SH64_MEDIA_SFMT_FMOVLS
, SH64_MEDIA_SFMT_FMOVQD, SH64_MEDIA_SFMT_FMOVSL, SH64_MEDIA_SFMT_FSTD, SH64_MEDIA_SFMT_FSTP
, SH64_MEDIA_SFMT_FSTS, SH64_MEDIA_SFMT_FSTXD, SH64_MEDIA_SFMT_FSTXP, SH64_MEDIA_SFMT_FSTXS
, SH64_MEDIA_SFMT_FTRVS, SH64_MEDIA_SFMT_GETCON, SH64_MEDIA_SFMT_GETTR, SH64_MEDIA_SFMT_LDB
, SH64_MEDIA_SFMT_LDL, SH64_MEDIA_SFMT_LDQ, SH64_MEDIA_SFMT_LDUW, SH64_MEDIA_SFMT_LDXB
, SH64_MEDIA_SFMT_MCMV, SH64_MEDIA_SFMT_MOVI, SH64_MEDIA_SFMT_MPERMW, SH64_MEDIA_SFMT_ORI
, SH64_MEDIA_SFMT_PTA, SH64_MEDIA_SFMT_PTABS, SH64_MEDIA_SFMT_PTREL, SH64_MEDIA_SFMT_PUTCON
, SH64_MEDIA_SFMT_SHARI, SH64_MEDIA_SFMT_SHARIL, SH64_MEDIA_SFMT_SHORI, SH64_MEDIA_SFMT_STB
, SH64_MEDIA_SFMT_STL, SH64_MEDIA_SFMT_STQ, SH64_MEDIA_SFMT_STW, SH64_MEDIA_SFMT_STHIL
, SH64_MEDIA_SFMT_STXB, SH64_MEDIA_SFMT_SWAPQ, SH64_MEDIA_SFMT_TRAPA, SH64_MEDIA_SFMT_XORI
} SH64_MEDIA_SFMT_TYPE;
/* Function unit handlers (user written). */
extern int sh64_model_sh5_u_exec (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/);
/* Profiling before/after handlers (user written) */
extern void sh64_model_insn_before (SIM_CPU *, int /*first_p*/);
extern void sh64_model_insn_after (SIM_CPU *, int /*last_p*/, int /*cycles*/);
#endif /* SH64_MEDIA_DECODE_H */

View File

@@ -1,16 +0,0 @@
#ifndef DECODE_H
#define DECODE_H
#undef WITH_PROFILE_MODEL_P
#ifdef WANT_ISA_COMPACT
#include "decode-compact.h"
#include "defs-compact.h"
#endif /* WANT_ISA_COMPACT */
#ifdef WANT_ISA_MEDIA
#include "decode-media.h"
#include "defs-media.h"
#endif /* WANT_ISA_MEDIA */
#endif /* DECODE_H */

View File

@@ -1,424 +0,0 @@
/* ISA definitions header for compact.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 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 DEFS_SH64_COMPACT_H
#define DEFS_SH64_COMPACT_H
/* Instruction argument buffer. */
union sem_fields {
struct { /* no operands */
int empty;
} fmt_empty;
struct { /* */
SI f_dn;
} sfmt_fcnvds_compact;
struct { /* */
IADDR i_disp12;
} sfmt_bra_compact;
struct { /* */
IADDR i_disp8;
} sfmt_bf_compact;
struct { /* */
SI f_imm4x2;
UINT f_rm;
} sfmt_movw11_compact;
struct { /* */
SI f_imm8x2;
UINT f_rn;
} sfmt_movw10_compact;
struct { /* */
SI f_imm4x2;
UINT f_rn;
} sfmt_movw5_compact;
struct { /* */
SI f_imm8x4;
UINT f_rn;
} sfmt_movl10_compact;
struct { /* */
UINT f_imm4;
UINT f_rm;
} sfmt_movb5_compact;
struct { /* */
SI f_vm;
SI f_vn;
} sfmt_fipr_compact;
struct { /* */
UINT f_imm8;
UINT f_rn;
} sfmt_addi_compact;
struct { /* */
SI f_imm4x4;
UINT f_rm;
UINT f_rn;
} sfmt_movl5_compact;
#if WITH_SCACHE_PBB
/* Writeback handler. */
struct {
/* Pointer to argbuf entry for insn whose results need writing back. */
const struct argbuf *abuf;
} write;
/* x-before handler */
struct {
/*const SCACHE *insns[MAX_PARALLEL_INSNS];*/
int first_p;
} before;
/* x-after handler */
struct {
int empty;
} after;
/* This entry is used to terminate each pbb. */
struct {
/* Number of insns in pbb. */
int insn_count;
/* Next pbb to execute. */
SCACHE *next;
SCACHE *branch_target;
} chain;
#endif
};
/* The ARGBUF struct. */
struct argbuf {
/* These are the baseclass definitions. */
IADDR addr;
const IDESC *idesc;
char trace_p;
char profile_p;
/* ??? Temporary hack for skip insns. */
char skip_count;
char unused;
/* cpu specific data follows */
union sem semantic;
int written;
union sem_fields fields;
};
/* A cached insn.
??? SCACHE used to contain more than just argbuf. We could delete the
type entirely and always just use ARGBUF, but for future concerns and as
a level of abstraction it is left in. */
struct scache {
struct argbuf argbuf;
};
/* Macros to simplify extraction, reading and semantic code.
These define and assign the local vars that contain the insn's fields. */
#define EXTRACT_IFMT_EMPTY_VARS \
unsigned int length;
#define EXTRACT_IFMT_EMPTY_CODE \
length = 0; \
#define EXTRACT_IFMT_ADD_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_rm; \
UINT f_sub4; \
unsigned int length;
#define EXTRACT_IFMT_ADD_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
#define EXTRACT_IFMT_ADDI_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_imm8; \
unsigned int length;
#define EXTRACT_IFMT_ADDI_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
#define EXTRACT_IFMT_AND_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_rm; \
UINT f_sub4; \
unsigned int length;
#define EXTRACT_IFMT_AND_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
#define EXTRACT_IFMT_ANDI_COMPACT_VARS \
UINT f_op8; \
UINT f_imm8; \
unsigned int length;
#define EXTRACT_IFMT_ANDI_COMPACT_CODE \
length = 2; \
f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
#define EXTRACT_IFMT_ANDB_COMPACT_VARS \
UINT f_op8; \
UINT f_imm8; \
unsigned int length;
#define EXTRACT_IFMT_ANDB_COMPACT_CODE \
length = 2; \
f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
f_imm8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
#define EXTRACT_IFMT_BF_COMPACT_VARS \
UINT f_op8; \
SI f_disp8; \
unsigned int length;
#define EXTRACT_IFMT_BF_COMPACT_CODE \
length = 2; \
f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
f_disp8 = ((((EXTRACT_LSB0_INT (insn, 16, 7, 8)) << (1))) + (((pc) + (4)))); \
#define EXTRACT_IFMT_BRA_COMPACT_VARS \
UINT f_op4; \
SI f_disp12; \
unsigned int length;
#define EXTRACT_IFMT_BRA_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_disp12 = ((((EXTRACT_LSB0_INT (insn, 16, 11, 12)) << (1))) + (((pc) + (4)))); \
#define EXTRACT_IFMT_BRAF_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_sub8; \
unsigned int length;
#define EXTRACT_IFMT_BRAF_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
#define EXTRACT_IFMT_BRK_COMPACT_VARS \
UINT f_op16; \
unsigned int length;
#define EXTRACT_IFMT_BRK_COMPACT_CODE \
length = 2; \
f_op16 = EXTRACT_LSB0_UINT (insn, 16, 15, 16); \
#define EXTRACT_IFMT_FABS_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_sub8; \
unsigned int length;
#define EXTRACT_IFMT_FABS_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
#define EXTRACT_IFMT_FADD_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_rm; \
UINT f_sub4; \
unsigned int length;
#define EXTRACT_IFMT_FADD_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
#define EXTRACT_IFMT_FCNVDS_COMPACT_VARS \
UINT f_op4; \
SI f_dn; \
UINT f_8_1; \
UINT f_sub8; \
unsigned int length;
#define EXTRACT_IFMT_FCNVDS_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_dn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 3)) << (1)); \
f_8_1 = EXTRACT_LSB0_UINT (insn, 16, 8, 1); \
f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
#define EXTRACT_IFMT_FIPR_COMPACT_VARS \
UINT f_op4; \
SI f_vn; \
SI f_vm; \
UINT f_sub8; \
unsigned int length;
#define EXTRACT_IFMT_FIPR_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_vn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 2)) << (2)); \
f_vm = ((EXTRACT_LSB0_UINT (insn, 16, 9, 2)) << (2)); \
f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
#define EXTRACT_IFMT_FLDS_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_sub8; \
unsigned int length;
#define EXTRACT_IFMT_FLDS_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_sub8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8); \
#define EXTRACT_IFMT_FMAC_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_rm; \
UINT f_sub4; \
unsigned int length;
#define EXTRACT_IFMT_FMAC_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
#define EXTRACT_IFMT_FMOV2_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_rm; \
UINT f_sub4; \
unsigned int length;
#define EXTRACT_IFMT_FMOV2_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
#define EXTRACT_IFMT_FMOV5_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_rm; \
UINT f_sub4; \
unsigned int length;
#define EXTRACT_IFMT_FMOV5_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
f_sub4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
#define EXTRACT_IFMT_FTRV_COMPACT_VARS \
UINT f_op4; \
SI f_vn; \
UINT f_sub10; \
unsigned int length;
#define EXTRACT_IFMT_FTRV_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_vn = ((EXTRACT_LSB0_UINT (insn, 16, 11, 2)) << (2)); \
f_sub10 = EXTRACT_LSB0_UINT (insn, 16, 9, 10); \
#define EXTRACT_IFMT_MOVB5_COMPACT_VARS \
UINT f_op8; \
UINT f_rm; \
UINT f_imm4; \
unsigned int length;
#define EXTRACT_IFMT_MOVB5_COMPACT_CODE \
length = 2; \
f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
f_imm4 = EXTRACT_LSB0_UINT (insn, 16, 3, 4); \
#define EXTRACT_IFMT_MOVL4_COMPACT_VARS \
UINT f_op8; \
SI f_imm8x4; \
unsigned int length;
#define EXTRACT_IFMT_MOVL4_COMPACT_CODE \
length = 2; \
f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
f_imm8x4 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2)); \
#define EXTRACT_IFMT_MOVL5_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
UINT f_rm; \
SI f_imm4x4; \
unsigned int length;
#define EXTRACT_IFMT_MOVL5_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
f_imm4x4 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (2)); \
#define EXTRACT_IFMT_MOVL10_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
SI f_imm8x4; \
unsigned int length;
#define EXTRACT_IFMT_MOVL10_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_imm8x4 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2)); \
#define EXTRACT_IFMT_MOVW4_COMPACT_VARS \
UINT f_op8; \
SI f_imm8x2; \
unsigned int length;
#define EXTRACT_IFMT_MOVW4_COMPACT_CODE \
length = 2; \
f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
f_imm8x2 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (1)); \
#define EXTRACT_IFMT_MOVW5_COMPACT_VARS \
UINT f_op8; \
UINT f_rn; \
SI f_imm4x2; \
unsigned int length;
#define EXTRACT_IFMT_MOVW5_COMPACT_CODE \
length = 2; \
f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_imm4x2 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (1)); \
#define EXTRACT_IFMT_MOVW10_COMPACT_VARS \
UINT f_op4; \
UINT f_rn; \
SI f_imm8x2; \
unsigned int length;
#define EXTRACT_IFMT_MOVW10_COMPACT_CODE \
length = 2; \
f_op4 = EXTRACT_LSB0_UINT (insn, 16, 15, 4); \
f_rn = EXTRACT_LSB0_UINT (insn, 16, 11, 4); \
f_imm8x2 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (1)); \
#define EXTRACT_IFMT_MOVW11_COMPACT_VARS \
UINT f_op8; \
UINT f_rm; \
SI f_imm4x2; \
unsigned int length;
#define EXTRACT_IFMT_MOVW11_COMPACT_CODE \
length = 2; \
f_op8 = EXTRACT_LSB0_UINT (insn, 16, 15, 8); \
f_rm = EXTRACT_LSB0_UINT (insn, 16, 7, 4); \
f_imm4x2 = ((EXTRACT_LSB0_UINT (insn, 16, 3, 4)) << (1)); \
#endif /* DEFS_SH64_COMPACT_H */

View File

@@ -1,921 +0,0 @@
/* ISA definitions header for media.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 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 DEFS_SH64_MEDIA_H
#define DEFS_SH64_MEDIA_H
/* Instruction argument buffer. */
union sem_fields {
struct { /* no operands */
int empty;
} fmt_empty;
struct { /* */
UINT f_dest;
UINT f_uimm16;
} sfmt_shori;
struct { /* */
DI f_disp16;
UINT f_tra;
} sfmt_pta;
struct { /* */
INT f_imm16;
UINT f_dest;
} sfmt_movi;
struct { /* */
UINT f_dest;
UINT f_left_right;
} sfmt_fabsd;
struct { /* */
UINT f_dest;
UINT f_trb;
} sfmt_blink;
struct { /* */
INT f_imm6;
UINT f_dest;
UINT f_left;
} sfmt_xori;
struct { /* */
INT f_disp6;
UINT f_dest;
UINT f_left;
} sfmt_sthil;
struct { /* */
UINT f_dest;
UINT f_left;
UINT f_uimm6;
} sfmt_shari;
struct { /* */
INT f_imm10;
UINT f_dest;
UINT f_left;
} sfmt_ori;
struct { /* */
SI f_disp10x2;
UINT f_dest;
UINT f_left;
} sfmt_lduw;
struct { /* */
SI f_disp10x4;
UINT f_dest;
UINT f_left;
} sfmt_flds;
struct { /* */
SI f_disp10x8;
UINT f_dest;
UINT f_left;
} sfmt_fldd;
struct { /* */
INT f_imm6;
UINT f_left;
UINT f_tra;
} sfmt_beqi;
struct { /* */
UINT f_left;
UINT f_right;
UINT f_tra;
} sfmt_beq;
struct { /* */
INT f_disp10;
UINT f_dest;
UINT f_left;
} sfmt_addi;
struct { /* */
UINT f_dest;
UINT f_left;
UINT f_right;
} sfmt_add;
#if WITH_SCACHE_PBB
/* Writeback handler. */
struct {
/* Pointer to argbuf entry for insn whose results need writing back. */
const struct argbuf *abuf;
} write;
/* x-before handler */
struct {
/*const SCACHE *insns[MAX_PARALLEL_INSNS];*/
int first_p;
} before;
/* x-after handler */
struct {
int empty;
} after;
/* This entry is used to terminate each pbb. */
struct {
/* Number of insns in pbb. */
int insn_count;
/* Next pbb to execute. */
SCACHE *next;
SCACHE *branch_target;
} chain;
#endif
};
/* The ARGBUF struct. */
struct argbuf {
/* These are the baseclass definitions. */
IADDR addr;
const IDESC *idesc;
char trace_p;
char profile_p;
/* ??? Temporary hack for skip insns. */
char skip_count;
char unused;
/* cpu specific data follows */
union sem semantic;
int written;
union sem_fields fields;
};
/* A cached insn.
??? SCACHE used to contain more than just argbuf. We could delete the
type entirely and always just use ARGBUF, but for future concerns and as
a level of abstraction it is left in. */
struct scache {
struct argbuf argbuf;
};
/* Macros to simplify extraction, reading and semantic code.
These define and assign the local vars that contain the insn's fields. */
#define EXTRACT_IFMT_EMPTY_VARS \
unsigned int length;
#define EXTRACT_IFMT_EMPTY_CODE \
length = 0; \
#define EXTRACT_IFMT_ADD_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_ADD_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_ADDI_VARS \
UINT f_op; \
UINT f_left; \
INT f_disp10; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_ADDI_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_disp10 = EXTRACT_LSB0_INT (insn, 32, 19, 10); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_ALLOCO_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
SI f_disp6x32; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_ALLOCO_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_disp6x32 = ((EXTRACT_LSB0_INT (insn, 32, 15, 6)) << (5)); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_BEQ_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_likely; \
UINT f_8_2; \
UINT f_tra; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_BEQ_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_BEQI_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
INT f_imm6; \
UINT f_likely; \
UINT f_8_2; \
UINT f_tra; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_BEQI_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_imm6 = EXTRACT_LSB0_INT (insn, 32, 15, 6); \
f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_BLINK_VARS \
UINT f_op; \
UINT f_25; \
UINT f_trb; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_BLINK_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_25 = EXTRACT_LSB0_UINT (insn, 32, 25, 3); \
f_trb = EXTRACT_LSB0_UINT (insn, 32, 22, 3); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_BRK_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_BRK_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_BYTEREV_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_BYTEREV_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FABSD_VARS \
UINT f_op; \
UINT f_ext; \
UINT f_left; \
UINT f_right; \
UINT f_left_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FABSD_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_left_right = f_left;\
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FABSS_VARS \
UINT f_op; \
UINT f_ext; \
UINT f_left; \
UINT f_right; \
UINT f_left_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FABSS_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_left_right = f_left;\
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FADDD_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FADDD_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FADDS_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FADDS_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FCMPEQD_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FCMPEQD_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FCMPEQS_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FCMPEQS_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FCNVDS_VARS \
UINT f_op; \
UINT f_ext; \
UINT f_left; \
UINT f_right; \
UINT f_left_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FCNVDS_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_left_right = f_left;\
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FCNVSD_VARS \
UINT f_op; \
UINT f_ext; \
UINT f_left; \
UINT f_right; \
UINT f_left_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FCNVSD_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_left_right = f_left;\
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FGETSCR_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FGETSCR_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FIPRS_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FIPRS_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FLDD_VARS \
UINT f_op; \
UINT f_left; \
SI f_disp10x8; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FLDD_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3)); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FLDP_VARS \
UINT f_op; \
UINT f_left; \
SI f_disp10x8; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FLDP_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3)); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FLDS_VARS \
UINT f_op; \
UINT f_left; \
SI f_disp10x4; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FLDS_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_disp10x4 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (2)); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FLDXD_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FLDXD_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FLDXP_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FLDXP_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FMOVDQ_VARS \
UINT f_op; \
UINT f_ext; \
UINT f_left; \
UINT f_right; \
UINT f_left_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FMOVDQ_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_left_right = f_left;\
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FMOVLS_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FMOVLS_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FMOVSL_VARS \
UINT f_op; \
UINT f_ext; \
UINT f_left; \
UINT f_right; \
UINT f_left_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FMOVSL_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_left_right = f_left;\
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FPUTSCR_VARS \
UINT f_op; \
UINT f_ext; \
UINT f_left; \
UINT f_right; \
UINT f_left_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FPUTSCR_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_left_right = f_left;\
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FSTXD_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FSTXD_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_FTRVS_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_FTRVS_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_GETCFG_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
INT f_disp6; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_GETCFG_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_disp6 = EXTRACT_LSB0_INT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_GETCON_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_GETCON_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_LDL_VARS \
UINT f_op; \
UINT f_left; \
SI f_disp10x4; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_LDL_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_disp10x4 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (2)); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_LDQ_VARS \
UINT f_op; \
UINT f_left; \
SI f_disp10x8; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_LDQ_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_disp10x8 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (3)); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_MMACNFX_WL_VARS \
UINT f_op; \
UINT f_ext; \
UINT f_right; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_MMACNFX_WL_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_MOVI_VARS \
UINT f_op; \
INT f_imm16; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_MOVI_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_imm16 = EXTRACT_LSB0_INT (insn, 32, 25, 16); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_ORI_VARS \
UINT f_op; \
UINT f_left; \
INT f_imm10; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_ORI_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_imm10 = EXTRACT_LSB0_INT (insn, 32, 19, 10); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_PREFI_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
SI f_disp6x32; \
UINT f_right; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_PREFI_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_disp6x32 = ((EXTRACT_LSB0_INT (insn, 32, 15, 6)) << (5)); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_PTA_VARS \
UINT f_op; \
DI f_disp16; \
UINT f_likely; \
UINT f_8_2; \
UINT f_tra; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_PTA_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_disp16 = ((((EXTRACT_LSB0_INT (insn, 32, 25, 16)) << (2))) + (pc)); \
f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_PTABS_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_likely; \
UINT f_8_2; \
UINT f_tra; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_PTABS_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_likely = EXTRACT_LSB0_UINT (insn, 32, 9, 1); \
f_8_2 = EXTRACT_LSB0_UINT (insn, 32, 8, 2); \
f_tra = EXTRACT_LSB0_UINT (insn, 32, 6, 3); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_PUTCON_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_PUTCON_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_SHARI_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_uimm6; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_SHARI_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_uimm6 = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_SHORI_VARS \
UINT f_op; \
UINT f_uimm16; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_SHORI_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_uimm16 = EXTRACT_LSB0_UINT (insn, 32, 25, 16); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_STW_VARS \
UINT f_op; \
UINT f_left; \
SI f_disp10x2; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_STW_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_disp10x2 = ((EXTRACT_LSB0_INT (insn, 32, 19, 10)) << (1)); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#define EXTRACT_IFMT_TRAPA_VARS \
UINT f_op; \
UINT f_left; \
UINT f_ext; \
UINT f_right; \
UINT f_dest; \
UINT f_rsvd; \
unsigned int length;
#define EXTRACT_IFMT_TRAPA_CODE \
length = 4; \
f_op = EXTRACT_LSB0_UINT (insn, 32, 31, 6); \
f_left = EXTRACT_LSB0_UINT (insn, 32, 25, 6); \
f_ext = EXTRACT_LSB0_UINT (insn, 32, 19, 4); \
f_right = EXTRACT_LSB0_UINT (insn, 32, 15, 6); \
f_dest = EXTRACT_LSB0_UINT (insn, 32, 9, 6); \
f_rsvd = EXTRACT_LSB0_UINT (insn, 32, 3, 4); \
#endif /* DEFS_SH64_MEDIA_H */

View File

@@ -1,34 +0,0 @@
/* engine configuration for sh64 */
/* WITH_FAST: non-zero if a fast version of the engine is available
in addition to the full-featured version. */
#define WITH_FAST 1
/* WITH_SCACHE_PBB_SH64_COMPACT: non-zero if the pbb engine was selected. */
#define WITH_SCACHE_PBB_SH64_COMPACT 1
/* HAVE_PARALLEL_INSNS: non-zero if cpu can parallelly execute > 1 insn. */
#define HAVE_PARALLEL_INSNS 0
#define WITH_PARALLEL_READ 0
#define WITH_PARALLEL_WRITE 0
#define WITH_PARALLEL_GENWRITE 0
/* WITH_SEM_SWITCH_FULL: non-zero if full-featured engine is
implemented as a switch(). */
#define WITH_SEM_SWITCH_FULL 0
/* WITH_SEM_SWITCH_FAST: non-zero if fast engine is
implemented as a switch(). */
#define WITH_SEM_SWITCH_FAST 1
/* Functions defined in the generated mainloop.c file
(which doesn't necessarily have that file name). */
extern ENGINE_FN sh64_compact_engine_run_full;
extern ENGINE_FN sh64_compact_engine_run_fast;
extern SEM_PC sh64_compact_pbb_begin (SIM_CPU *, int);
extern SEM_PC sh64_compact_pbb_chain (SIM_CPU *, SEM_ARG);
extern SEM_PC sh64_compact_pbb_cti_chain (SIM_CPU *, SEM_ARG, SEM_BRANCH_TYPE, PCADDR);
extern void sh64_compact_pbb_before (SIM_CPU *, SCACHE *);
extern void sh64_compact_pbb_after (SIM_CPU *, SCACHE *);

View File

@@ -1,34 +0,0 @@
/* engine configuration for sh64 */
/* WITH_FAST: non-zero if a fast version of the engine is available
in addition to the full-featured version. */
#define WITH_FAST 1
/* WITH_SCACHE_PBB_SH64_MEDIA: non-zero if the pbb engine was selected. */
#define WITH_SCACHE_PBB_SH64_MEDIA 1
/* HAVE_PARALLEL_INSNS: non-zero if cpu can parallelly execute > 1 insn. */
#define HAVE_PARALLEL_INSNS 0
#define WITH_PARALLEL_READ 0
#define WITH_PARALLEL_WRITE 0
#define WITH_PARALLEL_GENWRITE 0
/* WITH_SEM_SWITCH_FULL: non-zero if full-featured engine is
implemented as a switch(). */
#define WITH_SEM_SWITCH_FULL 0
/* WITH_SEM_SWITCH_FAST: non-zero if fast engine is
implemented as a switch(). */
#define WITH_SEM_SWITCH_FAST 1
/* Functions defined in the generated mainloop.c file
(which doesn't necessarily have that file name). */
extern ENGINE_FN sh64_media_engine_run_full;
extern ENGINE_FN sh64_media_engine_run_fast;
extern SEM_PC sh64_media_pbb_begin (SIM_CPU *, int);
extern SEM_PC sh64_media_pbb_chain (SIM_CPU *, SEM_ARG);
extern SEM_PC sh64_media_pbb_cti_chain (SIM_CPU *, SEM_ARG, SEM_BRANCH_TYPE, PCADDR);
extern void sh64_media_pbb_before (SIM_CPU *, SCACHE *);
extern void sh64_media_pbb_after (SIM_CPU *, SCACHE *);

View File

@@ -1,24 +0,0 @@
/* Engine declarations.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
This file is part of the GNU simulators.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Include declarations for SHmedia and SHcompact ISAs. */
#include "eng-compact.h"
#include "eng-media.h"

View File

@@ -1,635 +0,0 @@
/* This file is generated by the genmloop script. DO NOT EDIT! */
/* Enable switch() support in cgen headers. */
#define SEM_IN_SWITCH
#define WANT_CPU sh64
#define WANT_CPU_SH64
#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
sh64_compact_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
sh64_compact_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
sh64_compact_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) [SH64_COMPACT_INSN_X_BEFORE];
abuf->fields.before.first_p = first_p;
sh64_compact_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
sh64_compact_emit_after (SIM_CPU *current_cpu, SCACHE *sc, PCADDR pc)
{
ARGBUF *abuf = &sc[0].argbuf;
const IDESC *id = & CPU_IDESC (current_cpu) [SH64_COMPACT_INSN_X_AFTER];
sh64_compact_fill_argbuf (current_cpu, abuf, id, pc, 0);
/* no need to set trace_p,profile_p */
}
#endif /* WITH_SCACHE_PBB */
static INLINE const IDESC *
extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, ARGBUF *abuf,
int fast_p)
{
const IDESC *id = sh64_compact_decode (current_cpu, pc, insn, insn, abuf);
sh64_compact_fill_argbuf (current_cpu, abuf, id, pc, fast_p);
if (! fast_p)
{
int trace_p = PC_IN_TRACE_RANGE_P (current_cpu, pc);
int profile_p = PC_IN_PROFILE_RANGE_P (current_cpu, pc);
sh64_compact_fill_argbuf_tp (current_cpu, abuf, trace_p, profile_p);
}
return id;
}
static INLINE SEM_PC
execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p)
{
SEM_PC vpc;
if (fast_p)
{
#if ! WITH_SEM_SWITCH_FAST
#if WITH_SCACHE
vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, sc);
#else
vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, &sc->argbuf);
#endif
#else
abort ();
#endif /* WITH_SEM_SWITCH_FAST */
}
else
{
#if ! WITH_SEM_SWITCH_FULL
ARGBUF *abuf = &sc->argbuf;
const IDESC *idesc = abuf->idesc;
#if WITH_SCACHE_PBB
int virtual_p = CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_VIRTUAL);
#else
int virtual_p = 0;
#endif
if (! virtual_p)
{
/* FIXME: call x-before */
if (ARGBUF_PROFILE_P (abuf))
PROFILE_COUNT_INSN (current_cpu, abuf->addr, idesc->num);
/* FIXME: Later make cover macros: PROFILE_INSN_{INIT,FINI}. */
if (PROFILE_MODEL_P (current_cpu)
&& ARGBUF_PROFILE_P (abuf))
sh64_compact_model_insn_before (current_cpu, 1 /*first_p*/);
TRACE_INSN_INIT (current_cpu, abuf, 1);
TRACE_INSN (current_cpu, idesc->idata,
(const struct argbuf *) abuf, abuf->addr);
}
#if WITH_SCACHE
vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, sc);
#else
vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, abuf);
#endif
if (! virtual_p)
{
/* FIXME: call x-after */
if (PROFILE_MODEL_P (current_cpu)
&& ARGBUF_PROFILE_P (abuf))
{
int cycles;
cycles = (*idesc->timing->model_fn) (current_cpu, sc);
sh64_compact_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
}
TRACE_INSN_FINI (current_cpu, abuf, 1);
}
#else
abort ();
#endif /* WITH_SEM_SWITCH_FULL */
}
return vpc;
}
/* 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
sh64_compact_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 */
{
const IDESC *idesc;
int icount = 0;
while (max_insns > 0)
{
UHI insn = GETIMEMUHI (current_cpu, pc);
idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
SEM_SKIP_COMPILE (current_cpu, sc, 1);
++sc;
--max_insns;
++icount;
pc += idesc->length;
if (IDESC_CTI_P (idesc))
{
SET_CTI_VPC (sc - 1);
if (CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_DELAY_SLOT))
{
USI insn = GETIMEMUHI (current_cpu, pc);
idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
if (IDESC_CTI_P (idesc) ||
CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_ILLSLOT))
{
SIM_DESC sd = CPU_STATE (current_cpu);
sim_io_eprintf (CPU_STATE (current_cpu),
"malformed program, `%s' insn in delay slot\n",
CGEN_INSN_NAME (idesc->idata));
sim_engine_halt (sd, current_cpu, NULL, pc,
sim_stopped, SIM_SIGILL);
}
else
{
++sc;
--max_insns;
++icount;
pc += idesc->length;
}
}
break;
}
}
Finish:
SET_INSN_COUNT (icount);
}
/* 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) [SH64_COMPACT_INSN_X_CTI_CHAIN];
}
else
{
id = & CPU_IDESC (current_cpu) [SH64_COMPACT_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
sh64_compact_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
sh64_compact_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 we have switched ISAs, exit back to main loop.
Set idesc to 0 to cause the engine to point to the right insn table. */
if (new_pc & 1)
{
/* Switch to SHmedia. */
CPU_IDESC_SEM_INIT_P (current_cpu) = 0;
CPU_RUNNING_P (current_cpu) = 0;
}
/* 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
sh64_compact_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);
sh64_compact_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))
sh64_compact_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
sh64_compact_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);
sh64_compact_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
}
TRACE_INSN_FINI (current_cpu, prev_abuf, 1 /*last_p*/);
}
#define FAST_P 0
void
sh64_compact_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
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 "sem-compact-switch.c"
#endif
#else
sh64_compact_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) [SH64_COMPACT_INSN_X_BEGIN]);
vpc->argbuf.idesc = & CPU_IDESC (current_cpu) [SH64_COMPACT_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 = sh64_compact_pbb_begin (current_cpu, FAST_P);
do
{
/* begin full-exec-pbb */
{
#if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST)
#define DEFINE_SWITCH
#include "sem-compact-switch.c"
#else
vpc = execute (current_cpu, vpc, FAST_P);
#endif
}
/* end full-exec-pbb */
}
while (CPU_RUNNING_P (current_cpu));
}
#undef FAST_P
#define FAST_P 1
void
sh64_compact_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
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 "sem-compact-switch.c"
#endif
#else
sh64_compact_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) [SH64_COMPACT_INSN_X_BEGIN]);
vpc->argbuf.idesc = & CPU_IDESC (current_cpu) [SH64_COMPACT_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 = sh64_compact_pbb_begin (current_cpu, FAST_P);
do
{
/* begin fast-exec-pbb */
{
#if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST)
#define DEFINE_SWITCH
#include "sem-compact-switch.c"
#else
vpc = execute (current_cpu, vpc, FAST_P);
#endif
}
/* end fast-exec-pbb */
}
while (CPU_RUNNING_P (current_cpu));
}
#undef FAST_P

View File

@@ -1,624 +0,0 @@
/* This file is generated by the genmloop script. DO NOT EDIT! */
/* Enable switch() support in cgen headers. */
#define SEM_IN_SWITCH
#define WANT_CPU sh64
#define WANT_CPU_SH64
#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
sh64_media_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
sh64_media_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
sh64_media_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) [SH64_MEDIA_INSN_X_BEFORE];
abuf->fields.before.first_p = first_p;
sh64_media_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
sh64_media_emit_after (SIM_CPU *current_cpu, SCACHE *sc, PCADDR pc)
{
ARGBUF *abuf = &sc[0].argbuf;
const IDESC *id = & CPU_IDESC (current_cpu) [SH64_MEDIA_INSN_X_AFTER];
sh64_media_fill_argbuf (current_cpu, abuf, id, pc, 0);
/* no need to set trace_p,profile_p */
}
#endif /* WITH_SCACHE_PBB */
static INLINE const IDESC *
extract (SIM_CPU *current_cpu, PCADDR pc, CGEN_INSN_INT insn, ARGBUF *abuf,
int fast_p)
{
const IDESC *id = sh64_media_decode (current_cpu, pc, insn, insn, abuf);
sh64_media_fill_argbuf (current_cpu, abuf, id, pc, fast_p);
if (! fast_p)
{
int trace_p = PC_IN_TRACE_RANGE_P (current_cpu, pc);
int profile_p = PC_IN_PROFILE_RANGE_P (current_cpu, pc);
sh64_media_fill_argbuf_tp (current_cpu, abuf, trace_p, profile_p);
}
return id;
}
static INLINE SEM_PC
execute (SIM_CPU *current_cpu, SCACHE *sc, int fast_p)
{
SEM_PC vpc;
if (fast_p)
{
#if ! WITH_SEM_SWITCH_FAST
#if WITH_SCACHE
vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, sc);
#else
vpc = (*sc->argbuf.semantic.sem_fast) (current_cpu, &sc->argbuf);
#endif
#else
abort ();
#endif /* WITH_SEM_SWITCH_FAST */
}
else
{
#if ! WITH_SEM_SWITCH_FULL
ARGBUF *abuf = &sc->argbuf;
const IDESC *idesc = abuf->idesc;
#if WITH_SCACHE_PBB
int virtual_p = CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_VIRTUAL);
#else
int virtual_p = 0;
#endif
if (! virtual_p)
{
/* FIXME: call x-before */
if (ARGBUF_PROFILE_P (abuf))
PROFILE_COUNT_INSN (current_cpu, abuf->addr, idesc->num);
/* FIXME: Later make cover macros: PROFILE_INSN_{INIT,FINI}. */
if (PROFILE_MODEL_P (current_cpu)
&& ARGBUF_PROFILE_P (abuf))
sh64_media_model_insn_before (current_cpu, 1 /*first_p*/);
TRACE_INSN_INIT (current_cpu, abuf, 1);
TRACE_INSN (current_cpu, idesc->idata,
(const struct argbuf *) abuf, abuf->addr);
}
#if WITH_SCACHE
vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, sc);
#else
vpc = (*sc->argbuf.semantic.sem_full) (current_cpu, abuf);
#endif
if (! virtual_p)
{
/* FIXME: call x-after */
if (PROFILE_MODEL_P (current_cpu)
&& ARGBUF_PROFILE_P (abuf))
{
int cycles;
cycles = (*idesc->timing->model_fn) (current_cpu, sc);
sh64_media_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
}
TRACE_INSN_FINI (current_cpu, abuf, 1);
}
#else
abort ();
#endif /* WITH_SEM_SWITCH_FULL */
}
return vpc;
}
/* 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
sh64_media_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 */
{
const IDESC *idesc;
int icount = 0;
while (max_insns > 0)
{
USI insn = GETIMEMUSI (current_cpu, pc);
idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
SEM_SKIP_COMPILE (current_cpu, sc, 1);
++sc;
--max_insns;
++icount;
pc += idesc->length;
if (IDESC_CTI_P (idesc))
{
SET_CTI_VPC (sc - 1);
if (CGEN_ATTR_VALUE (NULL, idesc->attrs, CGEN_INSN_DELAY_SLOT))
{
USI insn = GETIMEMUSI (current_cpu, pc);
idesc = extract (current_cpu, pc, insn, &sc->argbuf, FAST_P);
++sc;
--max_insns;
++icount;
pc += idesc->length;
}
break;
}
}
Finish:
SET_INSN_COUNT (icount);
}
/* 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) [SH64_MEDIA_INSN_X_CTI_CHAIN];
}
else
{
id = & CPU_IDESC (current_cpu) [SH64_MEDIA_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
sh64_media_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 | 1);
/* 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
sh64_media_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 we have switched ISAs, exit back to main loop.
Set idesc to 0 to cause the engine to point to the right insn table. */
if ((new_pc & 1) == 0)
{
/* Switch to SHcompact. */
CPU_IDESC_SEM_INIT_P (current_cpu) = 0;
CPU_RUNNING_P (current_cpu) = 0;
}
/* 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 bit 0 to stay in SHmedia mode. */
SET_H_PC (new_pc | 1);
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
sh64_media_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);
sh64_media_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))
sh64_media_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
sh64_media_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);
sh64_media_model_insn_after (current_cpu, 1 /*last_p*/, cycles);
}
TRACE_INSN_FINI (current_cpu, prev_abuf, 1 /*last_p*/);
}
#define FAST_P 0
void
sh64_media_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
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 "sem-media-switch.c"
#endif
#else
sh64_media_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) [SH64_MEDIA_INSN_X_BEGIN]);
vpc->argbuf.idesc = & CPU_IDESC (current_cpu) [SH64_MEDIA_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 = sh64_media_pbb_begin (current_cpu, FAST_P);
do
{
/* begin full-exec-pbb */
{
#if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST)
#define DEFINE_SWITCH
#define WITH_ISA_COMPACT
#include "sem-media-switch.c"
#else
vpc = execute (current_cpu, vpc, FAST_P);
#endif
}
/* end full-exec-pbb */
}
while (CPU_RUNNING_P (current_cpu));
}
#undef FAST_P
#define FAST_P 1
void
sh64_media_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
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 "sem-media-switch.c"
#endif
#else
sh64_media_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) [SH64_MEDIA_INSN_X_BEGIN]);
vpc->argbuf.idesc = & CPU_IDESC (current_cpu) [SH64_MEDIA_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 = sh64_media_pbb_begin (current_cpu, FAST_P);
do
{
/* begin fast-exec-pbb */
{
#if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST)
#define DEFINE_SWITCH
#define WITH_ISA_COMPACT
#include "sem-media-switch.c"
#else
vpc = execute (current_cpu, vpc, FAST_P);
#endif
}
/* end fast-exec-pbb */
}
while (CPU_RUNNING_P (current_cpu));
}
#undef FAST_P

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,249 +0,0 @@
/* CPU data header for sh.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef SH_CPU_H
#define SH_CPU_H
#define CGEN_ARCH sh
/* Given symbol S, return sh_cgen_<S>. */
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
#define CGEN_SYM(s) sh##_cgen_##s
#else
#define CGEN_SYM(s) sh/**/_cgen_/**/s
#endif
/* Selected cpu families. */
#define HAVE_CPU_SH64
#define CGEN_INSN_LSB0_P 1
/* Minimum size of any insn (in bytes). */
#define CGEN_MIN_INSN_SIZE 2
/* Maximum size of any insn (in bytes). */
#define CGEN_MAX_INSN_SIZE 4
#define CGEN_INT_INSN_P 1
/* Maximum nymber of syntax bytes in an instruction. */
#define CGEN_ACTUAL_MAX_SYNTAX_BYTES 22
/* CGEN_MNEMONIC_OPERANDS is defined if mnemonics have operands.
e.g. In "b,a foo" the ",a" is an operand. If mnemonics have operands
we can't hash on everything up to the space. */
#define CGEN_MNEMONIC_OPERANDS
/* Maximum number of fields in an instruction. */
#define CGEN_ACTUAL_MAX_IFMT_OPERANDS 8
/* Enums. */
/* Enum declaration for . */
typedef enum frc_names {
H_FRC_FR0, H_FRC_FR1, H_FRC_FR2, H_FRC_FR3
, H_FRC_FR4, H_FRC_FR5, H_FRC_FR6, H_FRC_FR7
, H_FRC_FR8, H_FRC_FR9, H_FRC_FR10, H_FRC_FR11
, H_FRC_FR12, H_FRC_FR13, H_FRC_FR14, H_FRC_FR15
} FRC_NAMES;
/* Enum declaration for . */
typedef enum drc_names {
H_DRC_DR0 = 0, H_DRC_DR2 = 2, H_DRC_DR4 = 4, H_DRC_DR6 = 6
, H_DRC_DR8 = 8, H_DRC_DR10 = 10, H_DRC_DR12 = 12, H_DRC_DR14 = 14
} DRC_NAMES;
/* Enum declaration for . */
typedef enum xf_names {
H_XF_XF0, H_XF_XF1, H_XF_XF2, H_XF_XF3
, H_XF_XF4, H_XF_XF5, H_XF_XF6, H_XF_XF7
, H_XF_XF8, H_XF_XF9, H_XF_XF10, H_XF_XF11
, H_XF_XF12, H_XF_XF13, H_XF_XF14, H_XF_XF15
} XF_NAMES;
/* Attributes. */
/* Enum declaration for machine type selection. */
typedef enum mach_attr {
MACH_BASE, MACH_SH2, MACH_SH3, MACH_SH3E
, MACH_SH4, MACH_SH5, MACH_MAX
} MACH_ATTR;
/* Enum declaration for instruction set selection. */
typedef enum isa_attr {
ISA_COMPACT, ISA_MEDIA, ISA_MAX
} ISA_ATTR;
/* Number of architecture variants. */
#define MAX_ISAS ((int) ISA_MAX)
#define MAX_MACHS ((int) MACH_MAX)
/* Ifield support. */
extern const struct cgen_ifld sh_cgen_ifld_table[];
/* Ifield attribute indices. */
/* Enum declaration for cgen_ifld attrs. */
typedef enum cgen_ifld_attr {
CGEN_IFLD_VIRTUAL, CGEN_IFLD_PCREL_ADDR, CGEN_IFLD_ABS_ADDR, CGEN_IFLD_RESERVED
, CGEN_IFLD_SIGN_OPT, CGEN_IFLD_SIGNED, CGEN_IFLD_END_BOOLS, CGEN_IFLD_START_NBOOLS = 31
, CGEN_IFLD_MACH, CGEN_IFLD_ISA, CGEN_IFLD_END_NBOOLS
} CGEN_IFLD_ATTR;
/* Number of non-boolean elements in cgen_ifld_attr. */
#define CGEN_IFLD_NBOOL_ATTRS (CGEN_IFLD_END_NBOOLS - CGEN_IFLD_START_NBOOLS - 1)
/* Enum declaration for sh ifield types. */
typedef enum ifield_type {
SH_F_NIL, SH_F_ANYOF, SH_F_OP4, SH_F_OP8
, SH_F_OP16, SH_F_SUB4, SH_F_SUB8, SH_F_SUB10
, SH_F_RN, SH_F_RM, SH_F_8_1, SH_F_DISP8
, SH_F_DISP12, SH_F_IMM8, SH_F_IMM4, SH_F_IMM4X2
, SH_F_IMM4X4, SH_F_IMM8X2, SH_F_IMM8X4, SH_F_DN
, SH_F_DM, SH_F_VN, SH_F_VM, SH_F_XN
, SH_F_XM, SH_F_OP, SH_F_EXT, SH_F_RSVD
, SH_F_LEFT, SH_F_RIGHT, SH_F_DEST, SH_F_LEFT_RIGHT
, SH_F_TRA, SH_F_TRB, SH_F_LIKELY, SH_F_25
, SH_F_8_2, SH_F_IMM6, SH_F_IMM10, SH_F_IMM16
, SH_F_UIMM6, SH_F_UIMM16, SH_F_DISP6, SH_F_DISP6X32
, SH_F_DISP10, SH_F_DISP10X8, SH_F_DISP10X4, SH_F_DISP10X2
, SH_F_DISP16, SH_F_MAX
} IFIELD_TYPE;
#define MAX_IFLD ((int) SH_F_MAX)
/* Hardware attribute indices. */
/* Enum declaration for cgen_hw attrs. */
typedef enum cgen_hw_attr {
CGEN_HW_VIRTUAL, CGEN_HW_CACHE_ADDR, CGEN_HW_PC, CGEN_HW_PROFILE
, CGEN_HW_END_BOOLS, CGEN_HW_START_NBOOLS = 31, CGEN_HW_MACH, CGEN_HW_END_NBOOLS
} CGEN_HW_ATTR;
/* Number of non-boolean elements in cgen_hw_attr. */
#define CGEN_HW_NBOOL_ATTRS (CGEN_HW_END_NBOOLS - CGEN_HW_START_NBOOLS - 1)
/* Enum declaration for sh hardware types. */
typedef enum cgen_hw_type {
HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR
, HW_H_IADDR, HW_H_PC, HW_H_GR, HW_H_GRC
, HW_H_CR, HW_H_SR, HW_H_FPSCR, HW_H_FRBIT
, HW_H_SZBIT, HW_H_PRBIT, HW_H_SBIT, HW_H_MBIT
, HW_H_QBIT, HW_H_FR, HW_H_FP, HW_H_FV
, HW_H_FMTX, HW_H_DR, HW_H_TR, HW_H_ENDIAN
, HW_H_ISM, HW_H_FRC, HW_H_DRC, HW_H_XF
, HW_H_XD, HW_H_FVC, HW_H_FPCCR, HW_H_GBR
, HW_H_PR, HW_H_MACL, HW_H_MACH, HW_H_TBIT
, HW_MAX
} CGEN_HW_TYPE;
#define MAX_HW ((int) HW_MAX)
/* Operand attribute indices. */
/* Enum declaration for cgen_operand attrs. */
typedef enum cgen_operand_attr {
CGEN_OPERAND_VIRTUAL, CGEN_OPERAND_PCREL_ADDR, CGEN_OPERAND_ABS_ADDR, CGEN_OPERAND_SIGN_OPT
, CGEN_OPERAND_SIGNED, CGEN_OPERAND_NEGATIVE, CGEN_OPERAND_RELAX, CGEN_OPERAND_SEM_ONLY
, CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31, CGEN_OPERAND_MACH, CGEN_OPERAND_ISA
, CGEN_OPERAND_END_NBOOLS
} CGEN_OPERAND_ATTR;
/* Number of non-boolean elements in cgen_operand_attr. */
#define CGEN_OPERAND_NBOOL_ATTRS (CGEN_OPERAND_END_NBOOLS - CGEN_OPERAND_START_NBOOLS - 1)
/* Enum declaration for sh operand types. */
typedef enum cgen_operand_type {
SH_OPERAND_PC, SH_OPERAND_ENDIAN, SH_OPERAND_ISM, SH_OPERAND_RM
, SH_OPERAND_RN, SH_OPERAND_R0, SH_OPERAND_FRN, SH_OPERAND_FRM
, SH_OPERAND_FVN, SH_OPERAND_FVM, SH_OPERAND_DRN, SH_OPERAND_DRM
, SH_OPERAND_IMM4, SH_OPERAND_IMM8, SH_OPERAND_UIMM8, SH_OPERAND_IMM4X2
, SH_OPERAND_IMM4X4, SH_OPERAND_IMM8X2, SH_OPERAND_IMM8X4, SH_OPERAND_DISP8
, SH_OPERAND_DISP12, SH_OPERAND_RM64, SH_OPERAND_RN64, SH_OPERAND_GBR
, SH_OPERAND_PR, SH_OPERAND_FPSCR, SH_OPERAND_TBIT, SH_OPERAND_SBIT
, SH_OPERAND_MBIT, SH_OPERAND_QBIT, SH_OPERAND_FPUL, SH_OPERAND_FRBIT
, SH_OPERAND_SZBIT, SH_OPERAND_PRBIT, SH_OPERAND_MACL, SH_OPERAND_MACH
, SH_OPERAND_FSDM, SH_OPERAND_FSDN, SH_OPERAND_RD, SH_OPERAND_FRG
, SH_OPERAND_FRH, SH_OPERAND_FRF, SH_OPERAND_FRGH, SH_OPERAND_FPF
, SH_OPERAND_FVG, SH_OPERAND_FVH, SH_OPERAND_FVF, SH_OPERAND_MTRXG
, SH_OPERAND_DRG, SH_OPERAND_DRH, SH_OPERAND_DRF, SH_OPERAND_DRGH
, SH_OPERAND_CRJ, SH_OPERAND_CRK, SH_OPERAND_TRA, SH_OPERAND_TRB
, SH_OPERAND_DISP6, SH_OPERAND_DISP6X32, SH_OPERAND_DISP10, SH_OPERAND_DISP10X2
, SH_OPERAND_DISP10X4, SH_OPERAND_DISP10X8, SH_OPERAND_DISP16, SH_OPERAND_IMM6
, SH_OPERAND_IMM10, SH_OPERAND_IMM16, SH_OPERAND_UIMM6, SH_OPERAND_UIMM16
, SH_OPERAND_LIKELY, SH_OPERAND_MAX
} CGEN_OPERAND_TYPE;
/* Number of operands types. */
#define MAX_OPERANDS 72
/* Maximum number of operands referenced by any insn. */
#define MAX_OPERAND_INSTANCES 8
/* Insn attribute indices. */
/* Enum declaration for cgen_insn attrs. */
typedef enum cgen_insn_attr {
CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
, CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAX
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_ILLSLOT, CGEN_INSN_FP_INSN
, CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_ISA
, CGEN_INSN_END_NBOOLS
} CGEN_INSN_ATTR;
/* Number of non-boolean elements in cgen_insn_attr. */
#define CGEN_INSN_NBOOL_ATTRS (CGEN_INSN_END_NBOOLS - CGEN_INSN_START_NBOOLS - 1)
/* cgen.h uses things we just defined. */
#include "opcode/cgen.h"
/* Attributes. */
extern const CGEN_ATTR_TABLE sh_cgen_hardware_attr_table[];
extern const CGEN_ATTR_TABLE sh_cgen_ifield_attr_table[];
extern const CGEN_ATTR_TABLE sh_cgen_operand_attr_table[];
extern const CGEN_ATTR_TABLE sh_cgen_insn_attr_table[];
/* Hardware decls. */
extern CGEN_KEYWORD sh_cgen_opval_h_gr;
extern CGEN_KEYWORD sh_cgen_opval_h_grc;
extern CGEN_KEYWORD sh_cgen_opval_h_cr;
extern CGEN_KEYWORD sh_cgen_opval_h_fr;
extern CGEN_KEYWORD sh_cgen_opval_h_fp;
extern CGEN_KEYWORD sh_cgen_opval_h_fv;
extern CGEN_KEYWORD sh_cgen_opval_h_fmtx;
extern CGEN_KEYWORD sh_cgen_opval_h_dr;
extern CGEN_KEYWORD sh_cgen_opval_h_tr;
extern CGEN_KEYWORD sh_cgen_opval_frc_names;
extern CGEN_KEYWORD sh_cgen_opval_drc_names;
extern CGEN_KEYWORD sh_cgen_opval_xf_names;
extern CGEN_KEYWORD sh_cgen_opval_frc_names;
extern CGEN_KEYWORD sh_cgen_opval_h_fvc;
#endif /* SH_CPU_H */

View File

@@ -1,216 +0,0 @@
/* Instruction opcode header for sh.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef SH_OPC_H
#define SH_OPC_H
/* -- opc.h */
/* Allows reason codes to be output when assembler errors occur. */
#define CGEN_VERBOSE_ASSEMBLER_ERRORS
/* Override disassembly hashing - there are variable bits in the top
byte of these instructions. */
#define CGEN_DIS_HASH_SIZE 8
#define CGEN_DIS_HASH(buf,value) (((* (unsigned char*) (buf)) >> 6) % CGEN_DIS_HASH_SIZE)
/* -- asm.c */
/* Enum declaration for sh instruction types. */
typedef enum cgen_insn_type {
SH_INSN_INVALID, SH_INSN_ADD_COMPACT, SH_INSN_ADDI_COMPACT, SH_INSN_ADDC_COMPACT
, SH_INSN_ADDV_COMPACT, SH_INSN_AND_COMPACT, SH_INSN_ANDI_COMPACT, SH_INSN_ANDB_COMPACT
, SH_INSN_BF_COMPACT, SH_INSN_BFS_COMPACT, SH_INSN_BRA_COMPACT, SH_INSN_BRAF_COMPACT
, SH_INSN_BRK_COMPACT, SH_INSN_BSR_COMPACT, SH_INSN_BSRF_COMPACT, SH_INSN_BT_COMPACT
, SH_INSN_BTS_COMPACT, SH_INSN_CLRMAC_COMPACT, SH_INSN_CLRS_COMPACT, SH_INSN_CLRT_COMPACT
, SH_INSN_CMPEQ_COMPACT, SH_INSN_CMPEQI_COMPACT, SH_INSN_CMPGE_COMPACT, SH_INSN_CMPGT_COMPACT
, SH_INSN_CMPHI_COMPACT, SH_INSN_CMPHS_COMPACT, SH_INSN_CMPPL_COMPACT, SH_INSN_CMPPZ_COMPACT
, SH_INSN_CMPSTR_COMPACT, SH_INSN_DIV0S_COMPACT, SH_INSN_DIV0U_COMPACT, SH_INSN_DIV1_COMPACT
, SH_INSN_DMULSL_COMPACT, SH_INSN_DMULUL_COMPACT, SH_INSN_DT_COMPACT, SH_INSN_EXTSB_COMPACT
, SH_INSN_EXTSW_COMPACT, SH_INSN_EXTUB_COMPACT, SH_INSN_EXTUW_COMPACT, SH_INSN_FABS_COMPACT
, SH_INSN_FADD_COMPACT, SH_INSN_FCMPEQ_COMPACT, SH_INSN_FCMPGT_COMPACT, SH_INSN_FCNVDS_COMPACT
, SH_INSN_FCNVSD_COMPACT, SH_INSN_FDIV_COMPACT, SH_INSN_FIPR_COMPACT, SH_INSN_FLDS_COMPACT
, SH_INSN_FLDI0_COMPACT, SH_INSN_FLDI1_COMPACT, SH_INSN_FLOAT_COMPACT, SH_INSN_FMAC_COMPACT
, SH_INSN_FMOV1_COMPACT, SH_INSN_FMOV2_COMPACT, SH_INSN_FMOV3_COMPACT, SH_INSN_FMOV4_COMPACT
, SH_INSN_FMOV5_COMPACT, SH_INSN_FMOV6_COMPACT, SH_INSN_FMOV7_COMPACT, SH_INSN_FMUL_COMPACT
, SH_INSN_FNEG_COMPACT, SH_INSN_FRCHG_COMPACT, SH_INSN_FSCHG_COMPACT, SH_INSN_FSQRT_COMPACT
, SH_INSN_FSTS_COMPACT, SH_INSN_FSUB_COMPACT, SH_INSN_FTRC_COMPACT, SH_INSN_FTRV_COMPACT
, SH_INSN_JMP_COMPACT, SH_INSN_JSR_COMPACT, SH_INSN_LDC_COMPACT, SH_INSN_LDCL_COMPACT
, SH_INSN_LDS_FPSCR_COMPACT, SH_INSN_LDSL_FPSCR_COMPACT, SH_INSN_LDS_FPUL_COMPACT, SH_INSN_LDSL_FPUL_COMPACT
, SH_INSN_LDS_MACH_COMPACT, SH_INSN_LDSL_MACH_COMPACT, SH_INSN_LDS_MACL_COMPACT, SH_INSN_LDSL_MACL_COMPACT
, SH_INSN_LDS_PR_COMPACT, SH_INSN_LDSL_PR_COMPACT, SH_INSN_MACL_COMPACT, SH_INSN_MACW_COMPACT
, SH_INSN_MOV_COMPACT, SH_INSN_MOVI_COMPACT, SH_INSN_MOVB1_COMPACT, SH_INSN_MOVB2_COMPACT
, SH_INSN_MOVB3_COMPACT, SH_INSN_MOVB4_COMPACT, SH_INSN_MOVB5_COMPACT, SH_INSN_MOVB6_COMPACT
, SH_INSN_MOVB7_COMPACT, SH_INSN_MOVB8_COMPACT, SH_INSN_MOVB9_COMPACT, SH_INSN_MOVB10_COMPACT
, SH_INSN_MOVL1_COMPACT, SH_INSN_MOVL2_COMPACT, SH_INSN_MOVL3_COMPACT, SH_INSN_MOVL4_COMPACT
, SH_INSN_MOVL5_COMPACT, SH_INSN_MOVL6_COMPACT, SH_INSN_MOVL7_COMPACT, SH_INSN_MOVL8_COMPACT
, SH_INSN_MOVL9_COMPACT, SH_INSN_MOVL10_COMPACT, SH_INSN_MOVL11_COMPACT, SH_INSN_MOVW1_COMPACT
, SH_INSN_MOVW2_COMPACT, SH_INSN_MOVW3_COMPACT, SH_INSN_MOVW4_COMPACT, SH_INSN_MOVW5_COMPACT
, SH_INSN_MOVW6_COMPACT, SH_INSN_MOVW7_COMPACT, SH_INSN_MOVW8_COMPACT, SH_INSN_MOVW9_COMPACT
, SH_INSN_MOVW10_COMPACT, SH_INSN_MOVW11_COMPACT, SH_INSN_MOVA_COMPACT, SH_INSN_MOVCAL_COMPACT
, SH_INSN_MOVT_COMPACT, SH_INSN_MULL_COMPACT, SH_INSN_MULSW_COMPACT, SH_INSN_MULUW_COMPACT
, SH_INSN_NEG_COMPACT, SH_INSN_NEGC_COMPACT, SH_INSN_NOP_COMPACT, SH_INSN_NOT_COMPACT
, SH_INSN_OCBI_COMPACT, SH_INSN_OCBP_COMPACT, SH_INSN_OCBWB_COMPACT, SH_INSN_OR_COMPACT
, SH_INSN_ORI_COMPACT, SH_INSN_ORB_COMPACT, SH_INSN_PREF_COMPACT, SH_INSN_ROTCL_COMPACT
, SH_INSN_ROTCR_COMPACT, SH_INSN_ROTL_COMPACT, SH_INSN_ROTR_COMPACT, SH_INSN_RTS_COMPACT
, SH_INSN_SETS_COMPACT, SH_INSN_SETT_COMPACT, SH_INSN_SHAD_COMPACT, SH_INSN_SHAL_COMPACT
, SH_INSN_SHAR_COMPACT, SH_INSN_SHLD_COMPACT, SH_INSN_SHLL_COMPACT, SH_INSN_SHLL2_COMPACT
, SH_INSN_SHLL8_COMPACT, SH_INSN_SHLL16_COMPACT, SH_INSN_SHLR_COMPACT, SH_INSN_SHLR2_COMPACT
, SH_INSN_SHLR8_COMPACT, SH_INSN_SHLR16_COMPACT, SH_INSN_STC_GBR_COMPACT, SH_INSN_STCL_GBR_COMPACT
, SH_INSN_STS_FPSCR_COMPACT, SH_INSN_STSL_FPSCR_COMPACT, SH_INSN_STS_FPUL_COMPACT, SH_INSN_STSL_FPUL_COMPACT
, SH_INSN_STS_MACH_COMPACT, SH_INSN_STSL_MACH_COMPACT, SH_INSN_STS_MACL_COMPACT, SH_INSN_STSL_MACL_COMPACT
, SH_INSN_STS_PR_COMPACT, SH_INSN_STSL_PR_COMPACT, SH_INSN_SUB_COMPACT, SH_INSN_SUBC_COMPACT
, SH_INSN_SUBV_COMPACT, SH_INSN_SWAPB_COMPACT, SH_INSN_SWAPW_COMPACT, SH_INSN_TASB_COMPACT
, SH_INSN_TRAPA_COMPACT, SH_INSN_TST_COMPACT, SH_INSN_TSTI_COMPACT, SH_INSN_TSTB_COMPACT
, SH_INSN_XOR_COMPACT, SH_INSN_XORI_COMPACT, SH_INSN_XORB_COMPACT, SH_INSN_XTRCT_COMPACT
, SH_INSN_ADD, SH_INSN_ADDL, SH_INSN_ADDI, SH_INSN_ADDIL
, SH_INSN_ADDZL, SH_INSN_ALLOCO, SH_INSN_AND, SH_INSN_ANDC
, SH_INSN_ANDI, SH_INSN_BEQ, SH_INSN_BEQI, SH_INSN_BGE
, SH_INSN_BGEU, SH_INSN_BGT, SH_INSN_BGTU, SH_INSN_BLINK
, SH_INSN_BNE, SH_INSN_BNEI, SH_INSN_BRK, SH_INSN_BYTEREV
, SH_INSN_CMPEQ, SH_INSN_CMPGT, SH_INSN_CMPGTU, SH_INSN_CMVEQ
, SH_INSN_CMVNE, SH_INSN_FABSD, SH_INSN_FABSS, SH_INSN_FADDD
, SH_INSN_FADDS, SH_INSN_FCMPEQD, SH_INSN_FCMPEQS, SH_INSN_FCMPGED
, SH_INSN_FCMPGES, SH_INSN_FCMPGTD, SH_INSN_FCMPGTS, SH_INSN_FCMPUND
, SH_INSN_FCMPUNS, SH_INSN_FCNVDS, SH_INSN_FCNVSD, SH_INSN_FDIVD
, SH_INSN_FDIVS, SH_INSN_FGETSCR, SH_INSN_FIPRS, SH_INSN_FLDD
, SH_INSN_FLDP, SH_INSN_FLDS, SH_INSN_FLDXD, SH_INSN_FLDXP
, SH_INSN_FLDXS, SH_INSN_FLOATLD, SH_INSN_FLOATLS, SH_INSN_FLOATQD
, SH_INSN_FLOATQS, SH_INSN_FMACS, SH_INSN_FMOVD, SH_INSN_FMOVDQ
, SH_INSN_FMOVLS, SH_INSN_FMOVQD, SH_INSN_FMOVS, SH_INSN_FMOVSL
, SH_INSN_FMULD, SH_INSN_FMULS, SH_INSN_FNEGD, SH_INSN_FNEGS
, SH_INSN_FPUTSCR, SH_INSN_FSQRTD, SH_INSN_FSQRTS, SH_INSN_FSTD
, SH_INSN_FSTP, SH_INSN_FSTS, SH_INSN_FSTXD, SH_INSN_FSTXP
, SH_INSN_FSTXS, SH_INSN_FSUBD, SH_INSN_FSUBS, SH_INSN_FTRCDL
, SH_INSN_FTRCSL, SH_INSN_FTRCDQ, SH_INSN_FTRCSQ, SH_INSN_FTRVS
, SH_INSN_GETCFG, SH_INSN_GETCON, SH_INSN_GETTR, SH_INSN_ICBI
, SH_INSN_LDB, SH_INSN_LDL, SH_INSN_LDQ, SH_INSN_LDUB
, SH_INSN_LDUW, SH_INSN_LDW, SH_INSN_LDHIL, SH_INSN_LDHIQ
, SH_INSN_LDLOL, SH_INSN_LDLOQ, SH_INSN_LDXB, SH_INSN_LDXL
, SH_INSN_LDXQ, SH_INSN_LDXUB, SH_INSN_LDXUW, SH_INSN_LDXW
, SH_INSN_MABSL, SH_INSN_MABSW, SH_INSN_MADDL, SH_INSN_MADDW
, SH_INSN_MADDSL, SH_INSN_MADDSUB, SH_INSN_MADDSW, SH_INSN_MCMPEQB
, SH_INSN_MCMPEQL, SH_INSN_MCMPEQW, SH_INSN_MCMPGTL, SH_INSN_MCMPGTUB
, SH_INSN_MCMPGTW, SH_INSN_MCMV, SH_INSN_MCNVSLW, SH_INSN_MCNVSWB
, SH_INSN_MCNVSWUB, SH_INSN_MEXTR1, SH_INSN_MEXTR2, SH_INSN_MEXTR3
, SH_INSN_MEXTR4, SH_INSN_MEXTR5, SH_INSN_MEXTR6, SH_INSN_MEXTR7
, SH_INSN_MMACFXWL, SH_INSN_MMACNFX_WL, SH_INSN_MMULL, SH_INSN_MMULW
, SH_INSN_MMULFXL, SH_INSN_MMULFXW, SH_INSN_MMULFXRPW, SH_INSN_MMULHIWL
, SH_INSN_MMULLOWL, SH_INSN_MMULSUMWQ, SH_INSN_MOVI, SH_INSN_MPERMW
, SH_INSN_MSADUBQ, SH_INSN_MSHALDSL, SH_INSN_MSHALDSW, SH_INSN_MSHARDL
, SH_INSN_MSHARDW, SH_INSN_MSHARDSQ, SH_INSN_MSHFHIB, SH_INSN_MSHFHIL
, SH_INSN_MSHFHIW, SH_INSN_MSHFLOB, SH_INSN_MSHFLOL, SH_INSN_MSHFLOW
, SH_INSN_MSHLLDL, SH_INSN_MSHLLDW, SH_INSN_MSHLRDL, SH_INSN_MSHLRDW
, SH_INSN_MSUBL, SH_INSN_MSUBW, SH_INSN_MSUBSL, SH_INSN_MSUBSUB
, SH_INSN_MSUBSW, SH_INSN_MULSL, SH_INSN_MULUL, SH_INSN_NOP
, SH_INSN_NSB, SH_INSN_OCBI, SH_INSN_OCBP, SH_INSN_OCBWB
, SH_INSN_OR, SH_INSN_ORI, SH_INSN_PREFI, SH_INSN_PTA
, SH_INSN_PTABS, SH_INSN_PTB, SH_INSN_PTREL, SH_INSN_PUTCFG
, SH_INSN_PUTCON, SH_INSN_RTE, SH_INSN_SHARD, SH_INSN_SHARDL
, SH_INSN_SHARI, SH_INSN_SHARIL, SH_INSN_SHLLD, SH_INSN_SHLLDL
, SH_INSN_SHLLI, SH_INSN_SHLLIL, SH_INSN_SHLRD, SH_INSN_SHLRDL
, SH_INSN_SHLRI, SH_INSN_SHLRIL, SH_INSN_SHORI, SH_INSN_SLEEP
, SH_INSN_STB, SH_INSN_STL, SH_INSN_STQ, SH_INSN_STW
, SH_INSN_STHIL, SH_INSN_STHIQ, SH_INSN_STLOL, SH_INSN_STLOQ
, SH_INSN_STXB, SH_INSN_STXL, SH_INSN_STXQ, SH_INSN_STXW
, SH_INSN_SUB, SH_INSN_SUBL, SH_INSN_SWAPQ, SH_INSN_SYNCI
, SH_INSN_SYNCO, SH_INSN_TRAPA, SH_INSN_XOR, SH_INSN_XORI
, SH_INSN_MAX
} CGEN_INSN_TYPE;
/* Index of `invalid' insn place holder. */
#define CGEN_INSN_INVALID SH_INSN_INVALID
/* Total number of insns in table. */
#define MAX_INSNS ((int) SH_INSN_MAX)
/* This struct records data prior to insertion or after extraction. */
struct cgen_fields
{
int length;
long f_nil;
long f_anyof;
long f_op4;
long f_op8;
long f_op16;
long f_sub4;
long f_sub8;
long f_sub10;
long f_rn;
long f_rm;
long f_8_1;
long f_disp8;
long f_disp12;
long f_imm8;
long f_imm4;
long f_imm4x2;
long f_imm4x4;
long f_imm8x2;
long f_imm8x4;
long f_dn;
long f_dm;
long f_vn;
long f_vm;
long f_xn;
long f_xm;
long f_op;
long f_ext;
long f_rsvd;
long f_left;
long f_right;
long f_dest;
long f_left_right;
long f_tra;
long f_trb;
long f_likely;
long f_25;
long f_8_2;
long f_imm6;
long f_imm10;
long f_imm16;
long f_uimm6;
long f_uimm16;
long f_disp6;
long f_disp6x32;
long f_disp10;
long f_disp10x8;
long f_disp10x4;
long f_disp10x2;
long f_disp16;
};
#define CGEN_INIT_PARSE(od) \
{\
}
#define CGEN_INIT_INSERT(od) \
{\
}
#define CGEN_INIT_EXTRACT(od) \
{\
}
#define CGEN_INIT_PRINT(od) \
{\
}
#endif /* SH_OPC_H */

View File

@@ -1,89 +0,0 @@
/* collection of junk waiting time to sort out
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Red Hat, 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 SH64_SIM_H
#define SH64_SIM_H
#define GETTWI GETTSI
#define SETTWI SETTSI
enum {
ISM_COMPACT, ISM_MEDIA
};
/* Hardware/device support. */
extern device sh5_devices;
/* FIXME: Temporary, until device support ready. */
struct _device { int foo; };
extern IDESC * sh64_idesc_media;
extern IDESC * sh64_idesc_compact;
/* Function prototypes from sh64.c. */
BI sh64_endian (SIM_CPU *);
VOID sh64_break (SIM_CPU *, PCADDR);
VOID sh64_trapa (SIM_CPU *, DI, PCADDR);
VOID sh64_compact_trapa (SIM_CPU *, UQI, PCADDR);
SF sh64_fldi0 (SIM_CPU *);
SF sh64_fldi1 (SIM_CPU *);
DF sh64_fcnvsd (SIM_CPU *, SF);
SF sh64_fcnvds (SIM_CPU *, DF);
DF sh64_fabsd (SIM_CPU *, DF);
SF sh64_fabss (SIM_CPU *, SF);
DF sh64_faddd (SIM_CPU *, DF, DF);
SF sh64_fadds (SIM_CPU *, SF, SF);
DF sh64_fdivd (SIM_CPU *, DF, DF);
SF sh64_fdivs (SIM_CPU *, SF, SF);
DF sh64_floatld (SIM_CPU *, SF);
SF sh64_floatls (SIM_CPU *, SF);
DF sh64_floatqd (SIM_CPU *, DF);
SF sh64_floatqs (SIM_CPU *, DF);
SF sh64_fmacs(SIM_CPU *, SF, SF, SF);
DF sh64_fmuld (SIM_CPU *, DF, DF);
SF sh64_fmuls (SIM_CPU *, SF, SF);
DF sh64_fnegd (SIM_CPU *, DF);
SF sh64_fnegs (SIM_CPU *, SF);
DF sh64_fsqrtd (SIM_CPU *, DF);
SF sh64_fsqrts (SIM_CPU *, SF);
DF sh64_fsubd (SIM_CPU *, DF, DF);
SF sh64_fsubs (SIM_CPU *, SF, SF);
SF sh64_ftrcdl (SIM_CPU *, DF);
DF sh64_ftrcdq (SIM_CPU *, DF);
SF sh64_ftrcsl (SIM_CPU *, SF);
DF sh64_ftrcsq (SIM_CPU *, SF);
VOID sh64_ftrvs (SIM_CPU *, unsigned, unsigned, unsigned);
BI sh64_fcmpeqs (SIM_CPU *, SF, SF);
BI sh64_fcmpeqd (SIM_CPU *, DF, DF);
BI sh64_fcmpges (SIM_CPU *, SF, SF);
BI sh64_fcmpged (SIM_CPU *, DF, DF);
BI sh64_fcmpgts (SIM_CPU *, SF, SF);
BI sh64_fcmpgtd (SIM_CPU *, DF, DF);
BI sh64_fcmpund (SIM_CPU *, DF, DF);
BI sh64_fcmpuns (SIM_CPU *, SF, SF);
DI sh64_nsb (SIM_CPU *, DI);
#endif /* SH64_SIM_H */

File diff suppressed because it is too large Load Diff

View File

@@ -1,236 +0,0 @@
/* Main simulator entry points specific to the SH5.
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of the GNU simulators.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libiberty.h"
#include "bfd.h"
#include "sim-main.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include "sim-options.h"
#include "dis-asm.h"
static void free_state (SIM_DESC);
/* Since we don't build the cgen-opcode table, we use a wrapper around
the existing disassembler from libopcodes. */
static CGEN_DISASSEMBLER sh64_disassemble_insn;
/* Records simulator descriptor so utilities like sh5_dump_regs can be
called from gdb. */
SIM_DESC current_state;
/* Cover function of sim_state_free to free the cpu buffers as well. */
static void
free_state (SIM_DESC sd)
{
if (STATE_MODULES (sd) != NULL)
sim_module_uninstall (sd);
sim_cpu_free_all (sd);
sim_state_free (sd);
}
/* Create an instance of the simulator. */
SIM_DESC
sim_open (kind, callback, abfd, argv)
SIM_OPEN_KIND kind;
host_callback *callback;
struct _bfd *abfd;
char **argv;
{
char c;
int i;
SIM_DESC sd = sim_state_alloc (kind, callback);
/* The cpu data is kept in a separately allocated chunk of memory. */
if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK)
{
free_state (sd);
return 0;
}
#if 0 /* FIXME: pc is in mach-specific struct */
/* FIXME: watchpoints code shouldn't need this */
{
SIM_CPU *current_cpu = STATE_CPU (sd, 0);
STATE_WATCHPOINTS (sd)->pc = &(PC);
STATE_WATCHPOINTS (sd)->sizeof_pc = sizeof (PC);
}
#endif
if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
{
free_state (sd);
return 0;
}
#if 0 /* FIXME: 'twould be nice if we could do this */
/* These options override any module options.
Obviously ambiguity should be avoided, however the caller may wish to
augment the meaning of an option. */
if (extra_options != NULL)
sim_add_option_table (sd, extra_options);
#endif
/* getopt will print the error message so we just have to exit if this fails.
FIXME: Hmmm... in the case of gdb we need getopt to call
print_filtered. */
if (sim_parse_args (sd, argv) != SIM_RC_OK)
{
free_state (sd);
return 0;
}
/* Allocate core managed memory if none specified by user.
Use address 4 here in case the user wanted address 0 unmapped. */
if (sim_core_read_buffer (sd, NULL, read_map, &c, 4, 1) == 0)
sim_do_commandf (sd, "memory region 0,0x%x", SH64_DEFAULT_MEM_SIZE);
/* Add a small memory region way up in the address space to handle
writes to invalidate an instruction cache line. This is used for
trampolines. Since we don't simulate the cache, this memory just
avoids bus errors. 64K ought to do. */
sim_do_command (sd," memory region 0xf0000000,0x10000");
/* check for/establish the reference program image */
if (sim_analyze_program (sd,
(STATE_PROG_ARGV (sd) != NULL
? *STATE_PROG_ARGV (sd)
: NULL),
abfd) != SIM_RC_OK)
{
free_state (sd);
return 0;
}
/* Establish any remaining configuration options. */
if (sim_config (sd) != SIM_RC_OK)
{
free_state (sd);
return 0;
}
if (sim_post_argv_init (sd) != SIM_RC_OK)
{
free_state (sd);
return 0;
}
/* Open a copy of the cpu descriptor table. */
{
CGEN_CPU_DESC cd = sh_cgen_cpu_open_1 (STATE_ARCHITECTURE (sd)->printable_name,
CGEN_ENDIAN_BIG);
for (i = 0; i < MAX_NR_PROCESSORS; ++i)
{
SIM_CPU *cpu = STATE_CPU (sd, i);
CPU_CPU_DESC (cpu) = cd;
CPU_DISASSEMBLER (cpu) = sh64_disassemble_insn;
}
}
/* Clear idesc table pointers for good measure. */
sh64_idesc_media = sh64_idesc_compact = NULL;
/* Initialize various cgen things not done by common framework.
Must be done after sh_cgen_cpu_open. */
cgen_init (sd);
/* Store in a global so things like sparc32_dump_regs can be invoked
from the gdb command line. */
current_state = sd;
return sd;
}
void
sim_close (sd, quitting)
SIM_DESC sd;
int quitting;
{
sh_cgen_cpu_close (CPU_CPU_DESC (STATE_CPU (sd, 0)));
sim_module_uninstall (sd);
}
SIM_RC
sim_create_inferior (sd, abfd, argv, envp)
SIM_DESC sd;
struct _bfd *abfd;
char **argv;
char **envp;
{
SIM_CPU *current_cpu = STATE_CPU (sd, 0);
SIM_ADDR addr;
if (abfd != NULL)
addr = bfd_get_start_address (abfd);
else
addr = 0;
sim_pc_set (current_cpu, addr);
#if 0
STATE_ARGV (sd) = sim_copy_argv (argv);
STATE_ENVP (sd) = sim_copy_argv (envp);
#endif
return SIM_RC_OK;
}
void
sim_do_command (sd, cmd)
SIM_DESC sd;
char *cmd;
{
if (sim_args_command (sd, cmd) != SIM_RC_OK)
sim_io_eprintf (sd, "Unknown command `%s'\n", cmd);
}
/* Disassemble an instruction. */
static void
sh64_disassemble_insn (SIM_CPU *cpu, const CGEN_INSN *insn,
const ARGBUF *abuf, IADDR pc, char *buf)
{
struct disassemble_info disasm_info;
SFILE sfile;
SIM_DESC sd = CPU_STATE (cpu);
sfile.buffer = sfile.current = buf;
INIT_DISASSEMBLE_INFO (disasm_info, (FILE *) &sfile,
(fprintf_ftype) sim_disasm_sprintf);
disasm_info.arch = bfd_get_arch (STATE_PROG_BFD (sd));
disasm_info.mach = bfd_get_mach (STATE_PROG_BFD (sd));
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);
disasm_info.read_memory_func = sim_disasm_read_memory;
disasm_info.memory_error_func = sim_disasm_perror_memory;
disasm_info.application_data = (PTR) cpu;
if (sh64_h_ism_get (cpu) == ISM_MEDIA)
print_insn_sh64x_media (pc, &disasm_info);
else
print_insn_sh (pc, &disasm_info);
}

View File

@@ -1,75 +0,0 @@
/* Main header for the Hitachi SH64 architecture. */
#ifndef SIM_MAIN_H
#define SIM_MAIN_H
#define USING_SIM_BASE_H /* FIXME: quick hack */
struct _sim_cpu; /* FIXME: should be in sim-basics.h */
typedef struct _sim_cpu SIM_CPU;
/* sim-basics.h includes config.h but cgen-types.h must be included before
sim-basics.h and cgen-types.h needs config.h. */
#include "config.h"
#include "symcat.h"
#include "sim-basics.h"
#include "cgen-types.h"
#include "sh-desc.h"
#include "sh-opc.h"
#include "arch.h"
/* These must be defined before sim-base.h. */
typedef UDI sim_cia;
#define CIA_GET(cpu) CPU_PC_GET (cpu)
#define CIA_SET(cpu,val) CPU_PC_SET ((cpu), (val) | (sh64_h_ism_get (cpu)))
#include "sim-base.h"
#include "cgen-sim.h"
#include "sh64-sim.h"
/* The _sim_cpu struct. */
struct _sim_cpu {
/* sim/common cpu base. */
sim_cpu_base base;
/* Static parts of cgen. */
CGEN_CPU cgen_cpu;
/* CPU specific parts go here.
Note that in files that don't need to access these pieces WANT_CPU_FOO
won't be defined and thus these parts won't appear. This is ok in the
sense that things work. It is a source of bugs though.
One has to of course be careful to not take the size of this
struct and no structure members accessed in non-cpu specific files can
go after here. Oh for a better language. */
#if defined (WANT_CPU_SH64)
SH64_CPU_DATA cpu_data;
#endif
};
/* The sim_state struct. */
struct sim_state {
sim_cpu *cpu;
#define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
CGEN_STATE cgen_state;
sim_state_base base;
};
/* Misc. */
/* Catch address exceptions. */
extern SIM_CORE_SIGNAL_FN sh64_core_signal;
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
sh64_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
(TRANSFER), (ERROR))
/* Default memory size. */
#define SH64_DEFAULT_MEM_SIZE 0x800000 /* 8M */
#endif /* SIM_MAIN_H */

View File

@@ -1,45 +0,0 @@
/* SH64 target configuration file. -*- C -*- */
/* Define this if the simulator can vary the size of memory.
See the xxx simulator for an example.
This enables the `-m size' option.
The memory size is stored in STATE_MEM_SIZE. */
/* Not used for SH64 since we use the memory module. TODO -- check this */
/* #define SIM_HAVE_MEM_SIZE */
/* See sim-hload.c. We properly handle LMA. -- TODO: check this */
#define SIM_HANDLES_LMA 1
/* For MSPR support. FIXME: revisit. */
#define WITH_DEVICES 0
/* FIXME: Revisit. */
#ifdef HAVE_DV_SOCKSER
MODULE_INSTALL_FN dv_sockser_install;
#define MODULE_LIST dv_sockser_install,
#endif
#if 0
/* Enable watchpoints. */
#define WITH_WATCHPOINTS 1
#endif
/* ??? Temporary hack until model support unified. */
#define SIM_HAVE_MODEL
/* Define this to enable the intrinsic breakpoint mechanism. */
/* FIXME: may be able to remove SIM_HAVE_BREAKPOINTS since it essentially
duplicates ifdef SIM_BREAKPOINT (right?) */
#if 1
#define SIM_HAVE_BREAKPOINTS
#define SIM_BREAKPOINT { 0, 0, 0, 0xD }
#define SIM_BREAKPOINT_SIZE 4
#endif
/* This is a global setting. Different cpu families can't mix-n-match -scache
and -pbb. However some cpu families may use -simple while others use
one of -scache/-pbb. ???? */
#define WITH_SCACHE_PBB 1
/* Define this if the target cpu is bi-endian and the simulator supports it. */
#define SIM_HAVE_BIENDIAN

View File

@@ -1,21 +0,0 @@
2001-01-06 Ben Elliston <bje@redhat.com>
* misc/fr-dr.s: New test.
2001-01-03 Ben Elliston <bje@redhat.com>
* interwork.exp: Match .s files only.
2000-12-06 Ben Elliston <bje@redhat.com>
* interwork.exp: New test case.
2000-11-16 Ben Elliston <bje@redhat.com>
* allinsn.exp: Rename from this ..
* compact.exp: .. to this.
* media.exp: New test case.
2000-11-13 Ben Elliston <bje@redhat.com>
* allinsn.exp: New test case.

View File

@@ -1,19 +0,0 @@
# SHcompact testsuite.
if [istarget sh64-*-*] {
# load support procs (none yet)
# load_lib cgen.exp
# all machines
set all_machs "sh5"
# The .cgs suffix is for "cgen .s".
foreach src [lsort [glob -nocomplain $srcdir/$subdir/compact/*.cgs]] {
# If we're only testing specific files and this isn't one of them,
# skip it.
if ![runtest_file_p $runtests $src] {
continue
}
run_sim_test $src $all_machs
}
}

View File

@@ -1,26 +0,0 @@
2002-01-09 Ben Elliston <bje@redhat.com>
* macl.cgs: For good measure, clear the S bit at startup.
2001-01-11 Ben Elliston <bje@redhat.com>
* fmov.cgs (f13b): Compare R0 with R1, not R2, when testing that
the source register was correctly post-incremented.
2000-12-01 Ben Elliston <bje@redhat.com>
* *.cgs (ld): Link tests with -m shelf32.
2000-11-24 Ben Elliston <bje@redhat.com>
* fmov.cgs: New test case.
* ftrv.cgs: Populate the matrix with meaningful values.
2000-11-22 Ben Elliston <bje@redhat.com>
* *.cgs (as): Assemble tests with -isa=shcompact.
2000-11-16 Ben Elliston <bje@redhat.com>
* *.cgs: New test cases.

View File

@@ -1,55 +0,0 @@
# sh testcase for add $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
init:
# Initialise some registers with values which help us to verify
# that the correct source registers are used by the ADD instruction.
mov #0, r0
mov #1, r1
mov #2, r2
mov #3, r3
mov #5, r5
mov #15, r15
add:
# 0 + 0 = 0.
add r0, r0
assert r0, #0
# 0 + 1 = 1.
add r0, r1
assert r1, #1
# 1 + 2 = 3.
add r1, r2
assert r2, #3
# 3 + 5 = 8.
add r3, r5
assert r5, #8
# 8 + 8 = 16.
add r5, r5
assert r5, #16
# 15 + 1 = 16.
add r15, r1
assert r1, #16
neg:
mov #1, r0
neg r0, r0
mov #2, r1
add r0, r1
assert r1, #1
okay:
pass
wrong:
fail

View File

@@ -1,90 +0,0 @@
# sh testcase for addc $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
# Initialise some registers with values which help us to verify
# that the correct source registers are used by the ADDC instruction.
.macro init
mov #0, r0
mov #1, r1
mov #2, r2
mov #3, r3
mov #5, r5
mov #15, r15
.endm
start
init
add:
clrt
addc r0, r0
assert r0, #0
clrt
addc r0, r1
assert r1, #1
clrt
addc r1, r2
assert r2, #3
clrt
addc r3, r5
assert r5, #8
clrt
addc r5, r5
assert r5, #16
clrt
addc r15, r1
assert r1, #16
init
addt:
sett
addc r0, r0
assert r0, #1
sett
addc r0, r1
assert r1, #3
sett
addc r1, r2
assert r2, #6
sett
addc r3, r5
assert r5, #9
sett
addc r5, r5
assert r5, #19
sett
addc r15, r1
assert r1, #19
bra next
nop
wrong:
fail
next:
init
large:
clrt
mov #1, r0
neg r0, r0
mov #2, r1
addc r0, r1
assert r1, #1
init
larget:
sett
mov #1, r0
neg r0, r0
mov #2, r1
addc r0, r1
assert r1, #2
okay:
pass

View File

@@ -1,46 +0,0 @@
# sh testcase for add #$imm8, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
init:
# Initialise some registers with values which help us to verify
# that the correct source registers are used by the ADD instruction.
mov #0, r0
mov #1, r1
mov #2, r2
mov #3, r3
mov #5, r5
mov #15, r15
addi:
# 0 + 0 = 0.
add #0, r0
assert r0, #0
# 0 + 1 = 1.
add #0, r1
assert r1, #1
# 2 + 2 = 4.
add #2, r2
assert r2, #4
# 120 + 5 = 125.
add #120, r5
assert r5, #125
large:
mov #1, r0
neg r0, r0
add #2, r0
assert r0, #1
okay:
pass
wrong:
fail

View File

@@ -1,48 +0,0 @@
# sh testcase for addv $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
zero:
mov #0, r0
mov #0, r1
addv r0, r1
# Assert !T and #0.
bt wrong
assert r1, #0
one:
mov #0, r0
mov #1, r1
addv r0, r1
# Assert !T and #1.
bt wrong
assert r1, #1
large:
# Produce MAXINT in R0.
mov #0, r0
not r0, r0
shlr r0
# Put #3 into R1.
mov #3, r1
# Add them and overflow.
addv r0, r1
# Assert T and overflowed value.
bf wrong
mov #1, r7
rotr r7
add #2, r7
cmp/eq r1, r7
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,33 +0,0 @@
# sh testcase for and $rm64, $rn64 -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global and
and:
mov #1, r1
mov #7, r2
rotr r2
rotr r2
and r1, r2
# R1 & R2 = 1.
assert r2, #1
another:
mov #192, r1
mov #0, r2
and r1, r2
# R1 & R2 = 0.
assert r2, #0
okay:
pass
wrong:
fail

View File

@@ -1,24 +0,0 @@
# sh testcase for and.b #$imm8, @(r0, gbr) -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global orb
init:
# Init GBR and R0.
mov #30, r0
ldc r0, gbr
mov #40, r0
orb:
and.b #255, @(r0, gbr)
and.b #170, @(r0, gbr)
and.b #255, @(r0, gbr)
and.b #0, @(r0, gbr)
okay:
pass

View File

@@ -1,43 +0,0 @@
# sh testcase for and #$imm8, r0 -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global andi
andi:
mov #0, r0
or #255, r0
and #0, r0
assert r0, #0
large:
mov #0, r0
or #255, r0
shll8 r0
or #255, r0
shll8 r0
or #255, r0
shll8 r0
or #255, r0
mask:
and #255, r0
mov r0, r1
mov #0, r0
or #255, r0
cmp/eq r0, r1
bf wrong
mask0:
and #0, r0
assert r0, #0
okay:
pass
wrong:
fail

View File

@@ -1,24 +0,0 @@
# sh testcase for bf $disp8 -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global taken
taken:
clrt
bf ntaken
fail
.global ntaken
ntaken:
sett
bf bad
pass
bad:
fail
fail
fail
fail

View File

@@ -1,28 +0,0 @@
# sh testcase for bf/s $disp8 -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global taken
taken:
clrt
bf/s ntaken
slot1:
nop
fail
.global ntaken
ntaken:
sett
bf/s bad
slot2:
nop
pass
bad:
fail
fail
fail
fail

View File

@@ -1,23 +0,0 @@
# sh testcase for bra $disp12 -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global bra
bra:
bra okay
slot:
nop
bad:
fail
fail
fail
.global okay
okay:
pass
fail

View File

@@ -1,24 +0,0 @@
# sh testcase for braf $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global braf
braf:
mov #4, r0
braf r0
slot:
nop
bad:
fail
fail
okay:
pass
alsobad:
fail
fail
fail

View File

@@ -1,18 +0,0 @@
# sh testcase for brk -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global brk
brk:
# If we hit the breakpoint, the sim will stop.
pass
# FIXME: breakpoint instruction.
# The SH4 assembler doesn't know about "brk".
.word 0x003b
bad:
fail

View File

@@ -1,21 +0,0 @@
# sh testcase for bsr $disp12 -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global bsr
bsr:
bsr okay
slot:
nop
bad:
fail
fail
okay:
pass
alsobad:
fail

View File

@@ -1,22 +0,0 @@
# sh testcase for bsrf $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
bsrf:
mov #4, r0
bsrf r0
slot:
nop
bad:
fail
fail
okay:
pass
alsobad:
fail
fail

View File

@@ -1,24 +0,0 @@
# sh testcase for bt $disp8
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global taken
taken:
sett
bt ntaken
fail
.global ntaken
ntaken:
clrt
bt bad
pass
bad:
fail
fail
fail
fail

View File

@@ -1,28 +0,0 @@
# sh testcase for bt/s $disp8 -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global taken
taken:
sett
bt/s ntaken
slot1:
nop
fail
.global ntaken
ntaken:
clrt
bt/s bad
slot2:
nop
pass
bad:
fail
fail
fail
fail

View File

@@ -1,13 +0,0 @@
# sh testcase for clrmac -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global clrmac
clrmac:
clrmac
pass

View File

@@ -1,14 +0,0 @@
# sh testcase for clrs -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global clrs
clrs:
clrs
# Somehow ensure that S is set.
pass

View File

@@ -1,16 +0,0 @@
# sh testcase for clrt -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global clrt
clrt:
clrt
bt wrong
pass
wrong:
fail

View File

@@ -1,52 +0,0 @@
# sh testcase for cmp/eq $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
zeroes:
mov #0, r1
mov #0, r2
cmp/eq r1, r2
bf wrong
zero1:
mov #0, r1
mov #1, r2
cmp/eq r1, r2
bt wrong
zero2:
mov #0, r2
mov #1, r1
cmp/eq r2, r1
bt wrong
equal:
mov #192, r1
mov #192, r2
cmp/eq r1, r2
bf wrong
noteq:
mov #192, r1
mov #193, r2
cmp/eq r1, r2
bt wrong
large:
mov #1, r1
rotr r1
mov #1, r2
rotr r2
cmp/eq r1, r2
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,39 +0,0 @@
# sh testcase for cmp/eq #$imm8, r0 -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
zeroes:
mov #0, r0
cmp/eq #0, r0
bf wrong
zero1:
mov #0, r0
cmp/eq #1, r0
bt wrong
zero2:
mov #1, r0
cmp/eq #0, r0
bt wrong
equal:
mov #192, r0
cmp/eq #192, r0
bf wrong
sign:
mov #255, r0
cmp/eq #255, r0
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,69 +0,0 @@
# sh testcase for cmp/ge $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
zero:
mov #0, r0
mov #0, r1
cmp/ge r0, r1
bf wrong
onezero:
mov #1, r0
mov #0, r1
cmp/ge r0, r1
bt wrong
zeroone:
mov #0, r0
mov #1, r1
cmp/ge r0, r1
bf wrong
equal:
mov #192, r0
mov #192, r1
cmp/ge r0, r1
bf wrong
eqlarge:
mov #1, r0
rotr r0
add #85, r0
mov #1, r1
rotr r1
add #85, r1
cmp/ge r0, r1
bf wrong
large2:
mov #1, r0
rotr r0
add #85, r0
mov #1, r1
rotr r1
add #84, r1
cmp/ge r0, r1
bt wrong
large3:
mov #1, r0
rotr r0
add #84, r0
mov #1, r1
rotr r1
add #85, r1
cmp/ge r0, r1
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,69 +0,0 @@
# sh testcase for cmp/gt $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
zero:
mov #0, r0
mov #0, r1
cmp/gt r0, r1
bt wrong
onezero:
mov #1, r0
mov #0, r1
cmp/gt r0, r1
bt wrong
zeroone:
mov #0, r0
mov #1, r1
cmp/gt r0, r1
bf wrong
equal:
mov #192, r0
mov #192, r1
cmp/gt r0, r1
bt wrong
eqlarge:
mov #1, r0
rotr r0
add #85, r0
mov #1, r1
rotr r1
add #85, r1
cmp/gt r0, r1
bt wrong
large2:
mov #1, r0
rotr r0
add #85, r0
mov #1, r1
rotr r1
add #84, r1
cmp/gt r0, r1
bt wrong
large3:
mov #1, r0
rotr r0
add #84, r0
mov #1, r1
rotr r1
add #85, r1
cmp/gt r0, r1
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,68 +0,0 @@
# sh testcase for cmp/hi $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
zero:
mov #0, r0
mov #0, r0
cmp/hi r0, r1
bt wrong
equal:
mov #1, r0
rotr r0
add #3, r0
mov #1, r1
rotr r1
add #3, r1
cmp/hi r0, r1
bt wrong
gt:
mov #10, r0
mov #12, r1
cmp/hi r0, r1
bf wrong
lt:
mov #12, r0
mov #10, r1
cmp/hi r0, r1
bt wrong
gtneg:
mov #1, r0
rotr r0
add #1, r0
mov #1, r1
rotr r1
add #3, r1
cmp/hi r0, r1
bf wrong
ltneg:
mov #1, r0
rotr r0
add #3, r0
mov #1, r1
rotr r1
add #1, r1
cmp/hi r0, r1
bt wrong
okay:
pass
wrong:
fail

View File

@@ -1,59 +0,0 @@
# sh testcase for cmp/hs $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
zero:
mov #0, r0
mov #0, r0
cmp/hs r0, r1
equal:
mov #1, r0
rotr r0
add #3, r0
mov #1, r1
rotr r1
add #3, r1
cmp/hs r0, r1
gt:
mov #10, r0
mov #12, r1
cmp/hs r0, r1
lt:
mov #12, r0
mov #10, r1
cmp/hs r0, r1
gtneg:
mov #1, r0
rotr r0
add #1, r0
mov #1, r1
rotr r1
add #3, r1
cmp/hs r0, r1
ltneg:
mov #1, r0
rotr r0
add #3, r0
mov #1, r1
rotr r1
add #1, r1
cmp/hs r0, r1
okay:
pass

View File

@@ -1,37 +0,0 @@
# sh testcase for cmp/pl $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
zero:
mov #0, r0
cmp/pl r0
bt wrong
plus:
mov #10, r0
cmp/pl r0
bf wrong
minus:
mov #10, r0
neg r0, r0
cmp/pl r0
bt wrong
large:
mov #10, r0
shll8 r0
add #123, r0
cmp/pl r0
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,37 +0,0 @@
# sh testcase for cmp/pz $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
zero:
mov #0, r0
cmp/pz r0
bf wrong
plus:
mov #10, r0
cmp/pz r0
bf wrong
minus:
mov #10, r0
neg r0, r0
cmp/pz r0
bt wrong
large:
mov #10, r0
shll8 r0
add #123, r0
cmp/pz r0
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,148 +0,0 @@
# sh testcase for cmp/str $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
.macro rot8
rotr r0
rotr r0
rotr r0
rotr r0
rotr r0
rotr r0
rotr r0
rotr r0
.endm
start
# Use multiple "wrong" labels because this program is quite long. It's
# likely that some instructions will be too far away from the branch
# target to use PC-relative branches.
match0:
# No bytes matching.
mov #1, r0
neg r0, r0
xor #170, r0
rot8
xor #170, r0
rot8
xor #170, r0
rot8
xor #170, r0
rot8
mov r0, r1
mov #1, r0
neg r0, r0
xor #85, r0
rot8
xor #85, r0
rot8
xor #85, r0
rot8
xor #85, r0
rot8
cmp/str r0, r1
bt wrong0
bra match1
nop
wrong0:
fail
match1:
# One byte matching.
mov #1, r0
neg r0, r0
xor #170, r0
rot8
xor #170, r0
rot8
xor #170, r0
rot8
mov r0, r1
mov #1, r0
neg r0, r0
xor #85, r0
rot8
xor #85, r0
rot8
xor #85, r0
rot8
cmp/str r0, r1
bf wrong1
bra match2
nop
wrong1:
fail
match2:
# Two bytes matching.
mov #1, r0
neg r0, r0
xor #170, r0
rot8
xor #170, r0
rot8
mov r0, r1
mov #1, r0
neg r0, r0
xor #85, r0
rot8
xor #85, r0
rot8
cmp/str r0, r1
bf wrong2
bra match3
nop
wrong2:
fail
byte0:
match3:
# One byte matching.
# This is also the test for byte 0.
mov #85, r0
mov #85, r1
cmp/str r0, r1
bf wrong3
byte1:
# Match in byte position 1.
mov #85, r0
shll8 r0
mov #85, r1
shll8 r1
cmp/str r0, r1
bf wrong3
byte2:
# Match in byte position 2.
mov #85, r0
shll16 r0
mov #85, r1
shll16 r1
cmp/str r0, r1
bf wrong3
byte3:
# Match in byte position 3.
mov #85, r0
shll16 r0
shll8 r0
mov #85, r1
shll16 r1
shll8 r1
cmp/str r0, r1
bf wrong3
okay:
pass
wrong3:
fail

View File

@@ -1,52 +0,0 @@
# sh testcase for div0s $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
init:
mov #0, r0
mov #3, r1
mov #4, r2
neg r1, r3
neg r2, r4
perm1:
div0s r0, r0
bt wrong
div0s r0, r1
bt wrong
div0s r1, r0
bt wrong
perm2:
div0s r0, r4
bf wrong
div0s r4, r0
bf wrong
perm3:
div0s r1, r2
bt wrong
div0s r2, r1
bt wrong
perm4:
div0s r3, r4
bt wrong
div0s r4, r3
bt wrong
perm5:
div0s r1, r1
bt wrong
div0s r3, r3
bt wrong
okay:
pass
wrong:
fail

View File

@@ -1,21 +0,0 @@
# sh testcase for div0u -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global div0u
div0u:
div0u
# Can't easily test Q and M (other than visually inspecting
# the simulator's trace output).
bt wrong
okay:
pass
wrong:
fail

View File

@@ -1,52 +0,0 @@
# sh testcase for div1 $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
mov #10, r0
mov #2, r1
div0s r0,r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
div1 r0, r1
pass

View File

@@ -1,115 +0,0 @@
# sh testcase for dmuls.l $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
mov #0, r0
mov #0, r1
dmuls.l r0, r1
# check result
sts mach, r3
sts macl, r4
assert r3, #0
assert r4, #0
test2:
mov #0, r0
mov #5, r1
dmuls.l r0, r1
# check result
sts mach, r3
sts macl, r4
assert r3, #0
assert r4, #0
test3:
mov #5, r0
mov #0, r1
dmuls.l r0, r1
# check result
sts mach, r3
sts macl, r4
assert r3, #0
assert r4, #0
test4:
mov #1, r0
mov #5, r1
dmuls.l r0, r1
# check result
sts mach, r3
sts macl, r4
assert r3, #0
assert r4, #5
test5:
mov #5, r0
mov #1, r1
dmuls.l r0, r1
# check result
sts mach, r3
sts macl, r4
assert r3, #0
assert r4, #5
bra test6
nop
wrong:
fail
test6:
mov #2, r0
mov #2, r1
dmuls.l r0, r1
# check result
sts mach, r3
sts macl, r4
assert r3, #0
assert r4, #4
test7:
mov #1, r0
neg r0, r0
mov #2, r1
dmuls.l r0, r1
# check result
sts mach, r3
sts macl, r4
mov #0, r8
not r8, r9
not r8, r10
shll r10
cmp/eq r3, r9
bf wrong
cmp/eq r4, r10
bf wrong
test8:
mov #1, r0
neg r0, r0
mov #1, r1
neg r1, r1
dmuls.l r0, r1
# check result
sts mach, r3
sts macl, r4
assert r3, #0
assert r4, #1
test9:
mov #1, r0
neg r0, r0
shlr r0
mov #1, r1
neg r1, r1
shlr r1
dmuls.l r0, r1
okay:
pass

View File

@@ -1,53 +0,0 @@
# sh testcase for dmulu.l $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
mov #0, r0
mov #0, r1
dmulu.l r0, r1
mov #0, r0
mov #5, r1
dmulu.l r0, r1
mov #5, r0
mov #0, r1
dmulu.l r0, r1
mov #1, r0
mov #5, r1
dmulu.l r0, r1
mov #5, r0
mov #1, r1
dmulu.l r0, r1
mov #2, r0
mov #2, r1
dmulu.l r0, r1
mov #1, r0
neg r0, r0
mov #2, r1
dmulu.l r0, r1
mov #1, r0
neg r0, r0
mov #1, r1
neg r1, r1
dmulu.l r0, r1
mov #1, r0
neg r0, r0
shlr r0
mov #1, r1
neg r1, r1
shlr r1
dmulu.l r0, r1
pass

View File

@@ -1,42 +0,0 @@
# sh testcase for dt $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global dt
dt:
mov #3, r0
dt r0
bt wrong
assert r0, #2
mov #1, r0
dt r0
bf wrong
assert r0, #0
mov #0, r0
dt r0
bt wrong
mov #0, r7
not r7, r7
cmp/eq r7, r0
bf wrong
mov #1, r0
neg r0, r0
dt r0
mov #1, r7
not r7, r7
cmp/eq r7, r0
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,29 +0,0 @@
# sh testcase for exts.b $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global extsb
extsb:
mov #42, r1
exts.b r1, r2
assert r2, #42
signed:
mov #0, r0
or #255, r0
exts.b r0, r1
mov #0, r7
not r7, r7
cmp/eq r1, r7
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,32 +0,0 @@
# sh testcase for exts.w $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global extsw
extsw:
mov #42, r1
exts.w r1, r2
assert r2, #42
another:
mov #0, r0
or #255, r0
shll8 r0
exts.w r0, r1
mov #-1, r7
shll8 r7
cmp/eq r1, r7
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,31 +0,0 @@
# sh testcase for extu.b $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global extub
extub:
mov #42, r1
extu.b r1, r2
assert r2, #42
another:
mov #0, r0
or #255, r0
extu.b r0, r1
mov #0, r0
or #255, r0
cmp/eq r0, r1
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,31 +0,0 @@
# sh testcase for extu.w $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
.global extuw
extuw:
mov #42, r1
extu.w r1, r2
assert r2, #42
another:
mov #0, r0
or #255, r0
shll8 r0
extu.w r0, r1
mov #0, r0
or #255, r0
shll8 r0
cmp/eq r0, r1
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,88 +0,0 @@
# sh testcase for fabs -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
_clrpr
# fabs(0.0) = 0.0.
fldi0 fr0
fabs fr0
fldi0 fr1
fcmp/eq fr0, fr1
bf wrong
# fabs(1.0) = 1.0.
fldi1 fr0
fabs fr0
fldi1 fr1
fcmp/eq fr0, fr1
bf wrong
# fabs(-1.0) = 1.0.
fldi1 fr0
fneg fr0
fabs fr0
fldi1 fr1
fcmp/eq fr0, fr1
bf wrong
bra double
nop
wrong:
fail
double:
# double precision tests.
# fabs(0.0) = 0.0.
fldi0 fr0
_s2d fr0, dr0
_setpr
fabs dr0
_clrpr
# check.
fldi0 fr2
_s2d fr2, dr2
_setpr
fcmp/eq dr0, dr2
bf wrong
_clrpr
one:
# fabs(1.0) = 1.0.
fldi1 fr0
_s2d fr0, dr0
_setpr
fabs dr0
_clrpr
# check.
fldi1 fr2
_s2d fr2, dr2
_setpr
fcmp/eq dr0, dr2
bf wrong2
_clrpr
minusone:
# fabs(-1.0) = 1.0.
fldi1 fr0
fneg fr0
_s2d fr0, dr0
_setpr
fabs dr0
_clrpr
# check.
fldi1 fr2
_s2d fr2, dr2
_setpr
fcmp/eq dr0, dr2
bf wrong2
_clrpr
okay:
pass
wrong2:
fail

View File

@@ -1,31 +0,0 @@
# sh testcase for fadd
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
_clrpr
fldi1 fr0
fldi1 fr1
fadd fr0, fr1
fldi0 fr0
fldi1 fr1
fadd fr0, fr1
fldi1 fr0
fldi0 fr1
fadd fr0, fr1
_setpr
double:
fldi1 fr0
fldi1 fr1
_s2d fr0, dr4
_s2d fr1, dr6
fadd dr4, dr6
pass

View File

@@ -1,88 +0,0 @@
# sh testcase for fcmpeq -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
# 1.0 == 1.0.
fldi1 fr0
fldi1 fr1
fcmp/eq fr0, fr1
bf wrong
# 0.0 != 1.0.
fldi0 fr0
fldi1 fr1
fcmp/eq fr0, fr1
bt wrong
# 1.0 != 0.0.
fldi1 fr0
fldi0 fr1
fcmp/eq fr0, fr1
bt wrong
# 2.0 != 1.0
fldi1 fr0
fadd fr0, fr0
fldi1 fr1
fcmp/eq fr0, fr1
bt wrong
bra double
# delay slot
nop
wrong:
fail
double:
# 1.0 == 1.0
fldi1 fr0
fldi1 fr2
_s2d fr0, dr0
_s2d fr2, dr2
_setpr
fcmp/eq dr0, dr2
bf wrong
_clrpr
# 0.0 != 1.0
fldi0 fr0
fldi1 fr2
_s2d fr0, dr0
_s2d fr2, dr2
_setpr
fcmp/eq dr0, dr2
bt wrong
_clrpr
# 1.0 != 0.0
fldi1 fr0
fldi0 fr2
_s2d fr0, dr0
_s2d fr2, dr2
_setpr
fcmp/eq dr0, dr2
bt wrong2
_clrpr
# 2.0 != 1.0
fldi1 fr0
fadd fr0, fr0
fldi1 fr2
_s2d fr0, dr0
_s2d fr2, dr2
_setpr
fcmp/eq dr0, dr2
bt wrong2
_clrpr
okay:
pass
wrong2:
fail

View File

@@ -1,95 +0,0 @@
# sh testcase for fcmpgt -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
# 1.0 !> 1.0.
fldi1 fr0
fldi1 fr1
fcmp/gt fr0, fr1
bt wrong
# 0.0 !> 1.0.
fldi0 fr0
fldi1 fr1
fcmp/gt fr0, fr1
bf wrong
# 1.0 > 0.0.
fldi1 fr0
fldi0 fr1
fcmp/gt fr0, fr1
bt wrong
# 2.0 > 1.0
fldi1 fr0
fadd fr0, fr0
fldi1 fr1
fcmp/gt fr0, fr1
bt wrong
bra double
nop
wrong:
fail
double:
# double precision tests.
# 1.0 !> 1.0.
fldi1 fr0
fldi1 fr2
_s2d fr0, dr0
_s2d fr2, dr2
_setpr
fcmp/gt dr0, dr2
bt wrong2
_clrpr
# 0.0 !> 1.0.
fldi0 fr0
fldi1 fr2
_s2d fr0, dr0
_s2d fr2, dr2
_setpr
fcmp/gt dr0, dr2
bf wrong2
_clrpr
bra next
nop
wrong2:
fail
next:
# 1.0 > 0.0.
fldi1 fr0
fldi0 fr2
_s2d fr0, dr0
_s2d fr2, dr2
_setpr
fcmp/gt dr0, dr2
bt wrong2
_clrpr
# 2.0 > 1.0.
fldi1 fr0
fadd fr0, fr0
fldi1 fr2
_s2d fr0, dr0
_s2d fr2, dr2
_setpr
fcmp/gt dr0, dr2
bt wrong2
_clrpr
okay:
pass
wrong3:
fail

View File

@@ -1,13 +0,0 @@
# sh testcase for fcnvds -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
_setpr
fcnvds dr0, fpul
_clrpr
okay:
pass

View File

@@ -1,27 +0,0 @@
# sh testcase for fcnvsd -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
fldi1 fr0
flds fr0, fpul
_setpr
fcnvsd fpul, dr2
_clrpr
# Convert back.
_setpr
fcnvds dr2, fpul
_clrpr
fsts fpul, fr1
fcmp/eq fr0, fr1
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,83 +0,0 @@
# sh testcase for fdiv -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
_clrpr
# 1.0 / 0.0 should be INF
# (and not crash the sim).
fldi0 fr0
fldi1 fr1
fdiv fr0, fr1
# 0.0 / 1.0 == 0.0.
fldi0 fr0
fldi1 fr1
fdiv fr1, fr0
fldi0 fr2
fcmp/eq fr0, fr2
bf wrong
# 2.0 / 1.0 == 2.0.
fldi1 fr1
fldi1 fr2
fadd fr2, fr2
fdiv fr1, fr2
# Load 2.0 into fr3.
fldi1 fr3
fadd fr3, fr3
fcmp/eq fr2, fr3
bf wrong
# (1.0 / 2.0) + (1.0 / 2.0) == 1.0.
fldi1 fr1
fldi1 fr2
fadd fr2, fr2
fdiv fr2, fr1
# fr1 should contain 0.5.
fadd fr1, fr1
# Load 1.0 into fr3.
fldi1 fr3
# Compare fr1 with fr3.
fcmp/eq fr1, fr3
bf wrong
bra double
nop
wrong:
fail
double:
# double test
# (1.0 / 2.0) + (1.0 / 2.0) == 1.0.
fldi1 fr1
_s2d fr1, dr6
fldi1 fr2
fadd fr2, fr2
_s2d fr2, dr8
_setpr
fdiv dr8, dr6
# dr0 should contain 0.5.
# double it, expect 1.0.
fadd dr6, dr6
_clrpr
foo:
# Load 1.0 into dr4.
fldi1 fr1
_s2d fr1, dr10
# Compare dr0 with dr10.
_setpr
fcmp/eq dr6, dr10
bf wrong2
_clrpr
okay:
pass
wrong2:
fail

View File

@@ -1,44 +0,0 @@
# sh testcase for fipr $fvm, $fvn
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
initv1:
fldi1 fr0
# Load 2 into fr2.
fldi1 fr1
fadd fr1, fr1
# Load 4 into fr2.
fldi1 fr2
fadd fr2, fr2
fadd fr2, fr2
fldi0 fr3
initv2:
fldi1 fr8
fldi0 fr9
fldi1 fr10
fldi0 fr11
fipr fv0, fv8
# Result will be in fr11.
fldi1 fr0
fldi1 fr1
# Two.
fadd fr1, fr0
# Four.
fadd fr0, fr0
# Five.
fadd fr1, fr0
fcmp/eq fr0, fr11
bf wrong
okay:
pass
wrong:
fail

View File

@@ -1,17 +0,0 @@
# sh testcase for fldi0 $frn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
fldi0 fr0
fldi0 fr2
fldi0 fr4
fldi0 fr6
fldi0 fr8
fldi0 fr10
fldi0 fr12
fldi0 fr14
pass

View File

@@ -1,17 +0,0 @@
# sh testcase for fldi1 $frn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32
.include "compact/testutils.inc"
start
fldi1 fr1
fldi1 fr3
fldi1 fr5
fldi1 fr7
fldi1 fr9
fldi1 fr11
fldi1 fr13
fldi1 fr15
pass

Some files were not shown because too many files have changed in this diff Show More