aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <>2003-06-06 10:04:21 +0000
committernobody <>2003-06-06 10:04:21 +0000
commit6e70edab446871d228f63af6e142b5b45bfb804d (patch)
treec8069c8fca07ddd7b1dc3abb51d28b633f704f6f
parent6085e5fd13ea2e8a44393b90b64c9b1fcc407fa0 (diff)
This commit was manufactured by cvs2svn to create branchcagney_convert-20030606-branchpoint
'cagney_convert-20030606-branch'. Sprout from jimb-ppc64-linux-20030528-branch 2003-05-28 00:00:03 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'jimb-' Cherrypick from master 2003-06-06 10:04:20 UTC Michal Ludvig <mludvig@suse.cz> '2003-06-06 Michal Ludvig <mludvig@suse.cz>': COPYING.NEWLIB ChangeLog Makefile.def Makefile.in Makefile.tpl README-maintainer-mode bfd/ChangeLog bfd/Makefile.am bfd/Makefile.in bfd/bfd-in2.h bfd/coff-a29k.c bfd/coff-apollo.c bfd/coff-arm.c bfd/coff-h8300.c bfd/coff-h8500.c bfd/coff-i960.c bfd/coff-m68k.c bfd/coff-m88k.c bfd/coff-mcore.c bfd/coff-sh.c bfd/coff-sparc.c bfd/coff-tic4x.c bfd/coff-tic54x.c bfd/coff-tic80.c bfd/coff-w65.c bfd/coff-we32k.c bfd/coff-z8k.c bfd/coffcode.h bfd/config.bfd bfd/config.in bfd/elf-bfd.h bfd/elf.c bfd/elf32-hppa.c bfd/elf32-i386.c bfd/elf32-ppc.c bfd/elf32-s390.c bfd/elf32-sh.c bfd/elf32-sparc.c bfd/elf32-v850.c bfd/elf64-alpha.c bfd/elf64-ppc.c bfd/elf64-s390.c bfd/elf64-sh64.c bfd/elf64-sparc.c bfd/elf64-x86-64.c bfd/elfcode.h bfd/elflink.c bfd/elflink.h bfd/elfxx-ia64.c bfd/elfxx-mips.c bfd/pef.c bfd/po/SRC-POTFILES.in bfd/po/bfd.pot bfd/simple.c bfd/syms.c bfd/version.h configure configure.in cpu/ChangeLog cpu/frv.cpu cpu/frv.opc cpu/simplify.inc gdb/ChangeLog gdb/MAINTAINERS gdb/Makefile.in gdb/acconfig.h gdb/ada-lang.c gdb/alpha-linux-tdep.c gdb/alpha-mdebug-tdep.c gdb/alpha-nat.c gdb/alpha-osf1-tdep.c gdb/alpha-tdep.c gdb/alpha-tdep.h gdb/alphabsd-nat.c gdb/alphabsd-tdep.c gdb/alphafbsd-tdep.c gdb/alphanbsd-tdep.c gdb/arm-linux-tdep.c gdb/arm-tdep.c gdb/avr-tdep.c gdb/block.c gdb/block.h gdb/breakpoint.c gdb/c-valprint.c gdb/config.in gdb/config/alpha/alpha-linux.mt gdb/config/alpha/alpha-osf1.mt gdb/config/alpha/fbsd.mt gdb/config/alpha/nbsd.mt gdb/config/alpha/nm-linux.h gdb/config/alpha/tm-alpha.h gdb/config/alpha/tm-alphalinux.h gdb/config/h8300/tm-h8300.h gdb/config/i386/i386sol2.mt gdb/config/i386/nm-x86-64linux.h gdb/config/i386/tm-x86-64linux.h gdb/config/i386/x86-64linux.mh gdb/config/i386/x86-64linux.mt gdb/config/mips/embed64.mt gdb/config/mips/embedl.mt gdb/config/mips/embedl64.mt gdb/config/mips/mips.mt gdb/config/mips/mips64.mt gdb/config/mips/tm-embed.h gdb/config/mips/tm-irix3.h gdb/config/mips/tm-irix5.h gdb/config/mips/tm-irix6.h gdb/config/mips/tm-mips.h gdb/config/mips/tm-mipsv4.h gdb/config/mips/tm-tx39.h gdb/config/mips/tx39l.mt gdb/config/pa/nm-hppah.h gdb/config/pa/tm-hppa.h gdb/config/pa/tm-hppa64.h gdb/config/pa/tm-hppah.h gdb/config/powerpc/tm-linux.h gdb/config/sparc/tm-sparc.h gdb/configure gdb/configure.in gdb/configure.tgt gdb/cp-support.h gdb/cris-tdep.c gdb/d10v-tdep.c gdb/defs.h gdb/doc/ChangeLog gdb/doc/gdbint.texinfo gdb/dwarf2-frame.c gdb/dwarf2-frame.h gdb/dwarf2read.c gdb/dwarfread.c gdb/event-top.c gdb/findvar.c gdb/frame.c gdb/frame.h gdb/frv-tdep.c gdb/gdb_assert.h gdb/gdbarch.c gdb/gdbarch.h gdb/gdbarch.sh gdb/gdbserver/ChangeLog gdb/gdbserver/linux-low.c gdb/gdbserver/remote-utils.c gdb/gdbserver/target.h gdb/h8300-tdep.c gdb/hppa-hpux-tdep.c gdb/hppa-tdep.c gdb/hpux-thread.c gdb/i386-cygwin-tdep.c gdb/i386-linux-nat.c gdb/i386-linux-tdep.c gdb/i386-nto-tdep.c gdb/i386-sol2-tdep.c gdb/i386-tdep.c gdb/i386-tdep.h gdb/i386bsd-nat.c gdb/i386bsd-tdep.c gdb/i386nbsd-tdep.c gdb/i386obsd-tdep.c gdb/ia64-tdep.c gdb/infcall.c gdb/irix4-nat.c gdb/irix5-nat.c gdb/lin-lwp.c gdb/linespec.c gdb/m68hc11-tdep.c gdb/m68k-tdep.c gdb/main.c gdb/mcore-tdep.c gdb/mips-linux-tdep.c gdb/mips-nat.c gdb/mips-tdep.c gdb/mipsnbsd-tdep.c gdb/mipsv4-nat.c gdb/mn10300-tdep.c gdb/ns32k-tdep.c gdb/objc-lang.c gdb/p-valprint.c gdb/ppc-linux-nat.c gdb/ppc-linux-tdep.c gdb/remote-vxsparc.c gdb/remote.c gdb/rs6000-tdep.c gdb/s390-nat.c gdb/sh-tdep.c gdb/shnbsd-nat.c gdb/solib-irix.c gdb/solib-sunos.c gdb/solib-svr4.c gdb/solib.c gdb/sparc-tdep.c gdb/sparcnbsd-tdep.c gdb/symfile.c gdb/target.h gdb/testsuite/ChangeLog gdb/testsuite/gdb.asm/alpha.inc gdb/testsuite/gdb.asm/asm-source.exp gdb/testsuite/gdb.base/corefile.exp gdb/testsuite/gdb.base/dump.exp gdb/testsuite/gdb.base/float.exp gdb/testsuite/gdb.base/selftest.exp gdb/thread-db.c gdb/top.c gdb/top.h gdb/v850-tdep.c gdb/valops.c gdb/value.h gdb/values.c gdb/vax-tdep.c gdb/version.in gdb/x86-64-linux-nat.c gdb/x86-64-linux-tdep.c gdb/x86-64-tdep.c gdb/x86-64-tdep.h gdb/xstormy16-tdep.c include/ChangeLog include/bfdlink.h include/elf/ChangeLog include/elf/common.h include/elf/v850.h include/opcode/ChangeLog include/opcode/h8300.h libiberty/ChangeLog libiberty/asprintf.c libiberty/functions.texi libiberty/testsuite/test-demangle.c libiberty/vasprintf.c ltconfig opcodes/ChangeLog opcodes/aclocal.m4 opcodes/config.in opcodes/configure opcodes/frv-asm.c opcodes/frv-desc.c opcodes/frv-desc.h opcodes/frv-dis.c opcodes/frv-ibld.c opcodes/frv-opc.c opcodes/frv-opc.h opcodes/h8300-dis.c opcodes/iq2000-asm.c opcodes/iq2000-desc.c opcodes/iq2000-desc.h opcodes/iq2000-dis.c opcodes/iq2000-ibld.c opcodes/iq2000-opc.c opcodes/iq2000-opc.h opcodes/po/POTFILES.in opcodes/po/opcodes.pot sim/common/ChangeLog sim/common/run.c sim/common/sim-options.c sim/h8300/ChangeLog sim/h8300/Makefile.in sim/h8300/compile.c sim/h8300/sim-main.h 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 Delete: COPYING.LIBGLOSS gdb/config/mips/bigmips.mt gdb/config/mips/bigmips64.mt gdb/config/mips/decstation.mt gdb/config/mips/littlemips.mt gdb/config/mips/tm-bigmips.h gdb/config/mips/tm-bigmips64.h gdb/config/mips/tm-embed64.h gdb/config/mips/tm-embedl.h gdb/config/mips/tm-embedl64.h gdb/config/mips/tm-tx39l.h gdb/config/mips/tm-vr4100.h gdb/config/mips/tm-vr4300.h gdb/config/mips/tm-vr4300el.h gdb/config/mips/tm-vr4xxx.h gdb/config/mips/tm-vr4xxxel.h gdb/config/mips/tm-vr5000.h gdb/config/mips/tm-vr5000el.h gdb/config/mips/vr4100.mt gdb/config/mips/vr4300.mt gdb/config/mips/vr4300el.mt gdb/config/mips/vr4xxx.mt gdb/config/mips/vr4xxxel.mt gdb/config/mips/vr5000.mt gdb/config/mips/vr5000el.mt gdb/testsuite/gdb.c++/Makefile.in gdb/testsuite/gdb.c++/ambiguous.cc gdb/testsuite/gdb.c++/ambiguous.exp gdb/testsuite/gdb.c++/annota2.cc gdb/testsuite/gdb.c++/annota2.exp gdb/testsuite/gdb.c++/anon-union.cc gdb/testsuite/gdb.c++/anon-union.exp gdb/testsuite/gdb.c++/casts.cc gdb/testsuite/gdb.c++/casts.exp gdb/testsuite/gdb.c++/classes.exp gdb/testsuite/gdb.c++/cplusfuncs.cc gdb/testsuite/gdb.c++/cplusfuncs.exp gdb/testsuite/gdb.c++/ctti.exp gdb/testsuite/gdb.c++/cttiadd.cc gdb/testsuite/gdb.c++/cttiadd1.cc gdb/testsuite/gdb.c++/cttiadd2.cc gdb/testsuite/gdb.c++/cttiadd3.cc gdb/testsuite/gdb.c++/demangle.exp gdb/testsuite/gdb.c++/derivation.cc gdb/testsuite/gdb.c++/derivation.exp gdb/testsuite/gdb.c++/hang.H gdb/testsuite/gdb.c++/hang.exp gdb/testsuite/gdb.c++/hang1.C gdb/testsuite/gdb.c++/hang2.C gdb/testsuite/gdb.c++/hang3.C gdb/testsuite/gdb.c++/inherit.exp gdb/testsuite/gdb.c++/local.cc gdb/testsuite/gdb.c++/local.exp gdb/testsuite/gdb.c++/m-data.cc gdb/testsuite/gdb.c++/m-data.exp gdb/testsuite/gdb.c++/m-static.cc gdb/testsuite/gdb.c++/m-static.exp gdb/testsuite/gdb.c++/m-static.h gdb/testsuite/gdb.c++/m-static1.cc gdb/testsuite/gdb.c++/maint.exp gdb/testsuite/gdb.c++/member-ptr.cc gdb/testsuite/gdb.c++/member-ptr.exp gdb/testsuite/gdb.c++/method.cc gdb/testsuite/gdb.c++/method.exp gdb/testsuite/gdb.c++/misc.cc gdb/testsuite/gdb.c++/misc.exp gdb/testsuite/gdb.c++/namespace.cc gdb/testsuite/gdb.c++/namespace.exp gdb/testsuite/gdb.c++/namespace1.cc gdb/testsuite/gdb.c++/overload.cc gdb/testsuite/gdb.c++/overload.exp gdb/testsuite/gdb.c++/ovldbreak.cc gdb/testsuite/gdb.c++/ovldbreak.exp gdb/testsuite/gdb.c++/pr-1023.cc gdb/testsuite/gdb.c++/pr-1023.exp gdb/testsuite/gdb.c++/pr-574.cc gdb/testsuite/gdb.c++/pr-574.exp gdb/testsuite/gdb.c++/printmethod.cc gdb/testsuite/gdb.c++/printmethod.exp gdb/testsuite/gdb.c++/psmang.exp gdb/testsuite/gdb.c++/psmang1.cc gdb/testsuite/gdb.c++/psmang2.cc gdb/testsuite/gdb.c++/ref-types.cc gdb/testsuite/gdb.c++/ref-types.exp gdb/testsuite/gdb.c++/rtti.exp gdb/testsuite/gdb.c++/rtti.h gdb/testsuite/gdb.c++/rtti1.cc gdb/testsuite/gdb.c++/rtti2.cc gdb/testsuite/gdb.c++/templates.cc gdb/testsuite/gdb.c++/templates.exp gdb/testsuite/gdb.c++/try_catch.cc gdb/testsuite/gdb.c++/try_catch.exp gdb/testsuite/gdb.c++/userdef.cc gdb/testsuite/gdb.c++/userdef.exp gdb/testsuite/gdb.c++/virtfunc.cc gdb/testsuite/gdb.c++/virtfunc.exp gdb/testsuite/gdb.objc/Makefile.in gdb/testsuite/gdb.objc/basicclass.exp gdb/testsuite/gdb.objc/basicclass.m
-rw-r--r--COPYING.LIBGLOSS297
-rw-r--r--COPYING.NEWLIB27
-rw-r--r--ChangeLog39
-rw-r--r--Makefile.def66
-rw-r--r--Makefile.in17034
-rw-r--r--Makefile.tpl192
-rw-r--r--README-maintainer-mode2
-rw-r--r--bfd/ChangeLog140
-rw-r--r--bfd/Makefile.am2
-rw-r--r--bfd/Makefile.in2
-rw-r--r--bfd/bfd-in2.h18
-rw-r--r--bfd/coff-a29k.c2
-rw-r--r--bfd/coff-apollo.c4
-rw-r--r--bfd/coff-arm.c4
-rw-r--r--bfd/coff-h8300.c2
-rw-r--r--bfd/coff-h8500.c2
-rw-r--r--bfd/coff-i960.c2
-rw-r--r--bfd/coff-m68k.c4
-rw-r--r--bfd/coff-m88k.c2
-rw-r--r--bfd/coff-mcore.c4
-rw-r--r--bfd/coff-sh.c6
-rw-r--r--bfd/coff-sparc.c2
-rw-r--r--bfd/coff-tic4x.c375
-rw-r--r--bfd/coff-tic54x.c112
-rw-r--r--bfd/coff-tic80.c2
-rw-r--r--bfd/coff-w65.c2
-rw-r--r--bfd/coff-we32k.c2
-rw-r--r--bfd/coff-z8k.c2
-rw-r--r--bfd/coffcode.h180
-rw-r--r--bfd/config.bfd22
-rw-r--r--bfd/config.in9
-rw-r--r--bfd/elf-bfd.h3
-rw-r--r--bfd/elf.c53
-rw-r--r--bfd/elf32-hppa.c11
-rw-r--r--bfd/elf32-i386.c4
-rw-r--r--bfd/elf32-ppc.c6
-rw-r--r--bfd/elf32-s390.c4
-rw-r--r--bfd/elf32-sh.c4
-rw-r--r--bfd/elf32-sparc.c4
-rw-r--r--bfd/elf32-v850.c36
-rw-r--r--bfd/elf64-alpha.c4
-rw-r--r--bfd/elf64-ppc.c4
-rw-r--r--bfd/elf64-s390.c4
-rw-r--r--bfd/elf64-sh64.c4
-rw-r--r--bfd/elf64-sparc.c4
-rw-r--r--bfd/elf64-x86-64.c4
-rw-r--r--bfd/elfcode.h4
-rw-r--r--bfd/elflink.c10
-rw-r--r--bfd/elflink.h95
-rw-r--r--bfd/elfxx-ia64.c4
-rw-r--r--bfd/elfxx-mips.c6
-rw-r--r--bfd/pef.c148
-rw-r--r--bfd/po/SRC-POTFILES.in77
-rw-r--r--bfd/po/bfd.pot1887
-rw-r--r--bfd/simple.c2
-rw-r--r--bfd/syms.c3
-rw-r--r--bfd/version.h2
-rwxr-xr-xconfigure69
-rw-r--r--configure.in3
-rw-r--r--cpu/ChangeLog38
-rw-r--r--cpu/frv.cpu8177
-rw-r--r--cpu/frv.opc971
-rw-r--r--cpu/simplify.inc215
-rw-r--r--gdb/ChangeLog1212
-rw-r--r--gdb/MAINTAINERS2
-rw-r--r--gdb/Makefile.in62
-rw-r--r--gdb/acconfig.h3
-rw-r--r--gdb/ada-lang.c3
-rw-r--r--gdb/alpha-linux-tdep.c143
-rw-r--r--gdb/alpha-mdebug-tdep.c384
-rw-r--r--gdb/alpha-nat.c98
-rw-r--r--gdb/alpha-osf1-tdep.c55
-rw-r--r--gdb/alpha-tdep.c2413
-rw-r--r--gdb/alpha-tdep.h38
-rw-r--r--gdb/alphabsd-nat.c6
-rw-r--r--gdb/alphabsd-tdep.c63
-rw-r--r--gdb/alphafbsd-tdep.c6
-rw-r--r--gdb/alphanbsd-tdep.c24
-rw-r--r--gdb/arm-linux-tdep.c4
-rw-r--r--gdb/arm-tdep.c19
-rw-r--r--gdb/avr-tdep.c4
-rw-r--r--gdb/block.c21
-rw-r--r--gdb/block.h4
-rw-r--r--gdb/breakpoint.c4
-rw-r--r--gdb/c-valprint.c3
-rw-r--r--gdb/config.in6
-rw-r--r--gdb/config/alpha/alpha-linux.mt3
-rw-r--r--gdb/config/alpha/alpha-osf1.mt2
-rw-r--r--gdb/config/alpha/fbsd.mt2
-rw-r--r--gdb/config/alpha/nbsd.mt4
-rw-r--r--gdb/config/alpha/nm-linux.h3
-rw-r--r--gdb/config/alpha/tm-alpha.h5
-rw-r--r--gdb/config/alpha/tm-alphalinux.h11
-rw-r--r--gdb/config/h8300/tm-h8300.h1
-rw-r--r--gdb/config/i386/i386sol2.mt2
-rw-r--r--gdb/config/i386/nm-x86-64linux.h54
-rw-r--r--gdb/config/i386/tm-x86-64linux.h10
-rw-r--r--gdb/config/i386/x86-64linux.mh7
-rw-r--r--gdb/config/i386/x86-64linux.mt4
-rw-r--r--gdb/config/mips/bigmips.mt3
-rw-r--r--gdb/config/mips/bigmips64.mt3
-rw-r--r--gdb/config/mips/decstation.mt3
-rw-r--r--gdb/config/mips/embed64.mt2
-rw-r--r--gdb/config/mips/embedl.mt2
-rw-r--r--gdb/config/mips/embedl64.mt2
-rw-r--r--gdb/config/mips/littlemips.mt3
-rw-r--r--gdb/config/mips/mips.mt (renamed from gdb/config/mips/vr5000.mt)2
-rw-r--r--gdb/config/mips/mips64.mt (renamed from gdb/config/mips/vr4100.mt)2
-rw-r--r--gdb/config/mips/tm-bigmips.h20
-rw-r--r--gdb/config/mips/tm-bigmips64.h22
-rw-r--r--gdb/config/mips/tm-embed.h2
-rw-r--r--gdb/config/mips/tm-embed64.h20
-rw-r--r--gdb/config/mips/tm-embedl.h20
-rw-r--r--gdb/config/mips/tm-embedl64.h20
-rw-r--r--gdb/config/mips/tm-irix3.h2
-rw-r--r--gdb/config/mips/tm-irix5.h3
-rw-r--r--gdb/config/mips/tm-irix6.h9
-rw-r--r--gdb/config/mips/tm-mips.h31
-rw-r--r--gdb/config/mips/tm-mipsv4.h2
-rw-r--r--gdb/config/mips/tm-tx39.h2
-rw-r--r--gdb/config/mips/tm-vr4100.h20
-rw-r--r--gdb/config/mips/tm-vr4300.h20
-rw-r--r--gdb/config/mips/tm-vr4300el.h20
-rw-r--r--gdb/config/mips/tm-vr4xxx.h20
-rw-r--r--gdb/config/mips/tm-vr4xxxel.h20
-rw-r--r--gdb/config/mips/tm-vr5000.h20
-rw-r--r--gdb/config/mips/tm-vr5000el.h20
-rw-r--r--gdb/config/mips/tx39l.mt2
-rw-r--r--gdb/config/mips/vr4300.mt5
-rw-r--r--gdb/config/mips/vr4300el.mt5
-rw-r--r--gdb/config/mips/vr4xxx.mt5
-rw-r--r--gdb/config/mips/vr4xxxel.mt5
-rw-r--r--gdb/config/mips/vr5000el.mt5
-rw-r--r--gdb/config/pa/nm-hppah.h4
-rw-r--r--gdb/config/pa/tm-hppa.h64
-rw-r--r--gdb/config/pa/tm-hppa64.h11
-rw-r--r--gdb/config/pa/tm-hppah.h5
-rw-r--r--gdb/config/powerpc/tm-linux.h5
-rw-r--r--gdb/config/sparc/tm-sparc.h2
-rwxr-xr-xgdb/configure478
-rw-r--r--gdb/configure.in19
-rw-r--r--gdb/configure.tgt24
-rw-r--r--gdb/cp-support.h1
-rw-r--r--gdb/cris-tdep.c3
-rw-r--r--gdb/d10v-tdep.c36
-rw-r--r--gdb/defs.h2
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/gdbint.texinfo11
-rw-r--r--gdb/dwarf2-frame.c1304
-rw-r--r--gdb/dwarf2-frame.h (renamed from gdb/config/mips/tm-tx39l.h)39
-rw-r--r--gdb/dwarf2read.c2
-rw-r--r--gdb/dwarfread.c43
-rw-r--r--gdb/event-top.c10
-rw-r--r--gdb/findvar.c24
-rw-r--r--gdb/frame.c31
-rw-r--r--gdb/frame.h25
-rw-r--r--gdb/frv-tdep.c7
-rw-r--r--gdb/gdb_assert.h11
-rw-r--r--gdb/gdbarch.c53
-rw-r--r--gdb/gdbarch.h529
-rwxr-xr-xgdb/gdbarch.sh36
-rw-r--r--gdb/gdbserver/ChangeLog17
-rw-r--r--gdb/gdbserver/linux-low.c29
-rw-r--r--gdb/gdbserver/remote-utils.c6
-rw-r--r--gdb/gdbserver/target.h3
-rw-r--r--gdb/h8300-tdep.c44
-rw-r--r--gdb/hppa-hpux-tdep.c7
-rw-r--r--gdb/hppa-tdep.c99
-rw-r--r--gdb/hpux-thread.c4
-rw-r--r--gdb/i386-cygwin-tdep.c63
-rw-r--r--gdb/i386-linux-nat.c20
-rw-r--r--gdb/i386-linux-tdep.c127
-rw-r--r--gdb/i386-nto-tdep.c16
-rw-r--r--gdb/i386-sol2-tdep.c6
-rw-r--r--gdb/i386-tdep.c1213
-rw-r--r--gdb/i386-tdep.h30
-rw-r--r--gdb/i386bsd-nat.c71
-rw-r--r--gdb/i386bsd-tdep.c100
-rw-r--r--gdb/i386nbsd-tdep.c25
-rw-r--r--gdb/i386obsd-tdep.c25
-rw-r--r--gdb/ia64-tdep.c4
-rw-r--r--gdb/infcall.c32
-rw-r--r--gdb/irix4-nat.c2
-rw-r--r--gdb/irix5-nat.c2
-rw-r--r--gdb/lin-lwp.c176
-rw-r--r--gdb/linespec.c197
-rw-r--r--gdb/m68hc11-tdep.c6
-rw-r--r--gdb/m68k-tdep.c8
-rw-r--r--gdb/main.c4
-rw-r--r--gdb/mcore-tdep.c2
-rw-r--r--gdb/mips-linux-tdep.c4
-rw-r--r--gdb/mips-nat.c2
-rw-r--r--gdb/mips-tdep.c602
-rw-r--r--gdb/mipsnbsd-tdep.c6
-rw-r--r--gdb/mipsv4-nat.c2
-rw-r--r--gdb/mn10300-tdep.c4
-rw-r--r--gdb/ns32k-tdep.c2
-rw-r--r--gdb/objc-lang.c26
-rw-r--r--gdb/p-valprint.c3
-rw-r--r--gdb/ppc-linux-nat.c4
-rw-r--r--gdb/ppc-linux-tdep.c6
-rw-r--r--gdb/remote-vxsparc.c8
-rw-r--r--gdb/remote.c12
-rw-r--r--gdb/rs6000-tdep.c94
-rw-r--r--gdb/s390-nat.c44
-rw-r--r--gdb/sh-tdep.c10
-rw-r--r--gdb/shnbsd-nat.c3
-rw-r--r--gdb/solib-irix.c8
-rw-r--r--gdb/solib-sunos.c22
-rw-r--r--gdb/solib-svr4.c48
-rw-r--r--gdb/solib.c1
-rw-r--r--gdb/sparc-tdep.c51
-rw-r--r--gdb/sparcnbsd-tdep.c4
-rw-r--r--gdb/symfile.c15
-rw-r--r--gdb/target.h6
-rw-r--r--gdb/testsuite/ChangeLog50
-rw-r--r--gdb/testsuite/gdb.asm/alpha.inc62
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp19
-rw-r--r--gdb/testsuite/gdb.base/corefile.exp32
-rw-r--r--gdb/testsuite/gdb.base/dump.exp9
-rw-r--r--gdb/testsuite/gdb.base/float.exp6
-rw-r--r--gdb/testsuite/gdb.base/selftest.exp4
-rw-r--r--gdb/testsuite/gdb.c++/Makefile.in16
-rw-r--r--gdb/testsuite/gdb.c++/ambiguous.cc110
-rw-r--r--gdb/testsuite/gdb.c++/ambiguous.exp237
-rw-r--r--gdb/testsuite/gdb.c++/annota2.cc28
-rw-r--r--gdb/testsuite/gdb.c++/annota2.exp234
-rw-r--r--gdb/testsuite/gdb.c++/anon-union.cc55
-rw-r--r--gdb/testsuite/gdb.c++/anon-union.exp348
-rw-r--r--gdb/testsuite/gdb.c++/casts.cc20
-rw-r--r--gdb/testsuite/gdb.c++/casts.exp85
-rw-r--r--gdb/testsuite/gdb.c++/classes.exp918
-rw-r--r--gdb/testsuite/gdb.c++/cplusfuncs.cc196
-rw-r--r--gdb/testsuite/gdb.c++/cplusfuncs.exp564
-rw-r--r--gdb/testsuite/gdb.c++/ctti.exp269
-rw-r--r--gdb/testsuite/gdb.c++/cttiadd.cc29
-rw-r--r--gdb/testsuite/gdb.c++/cttiadd1.cc16
-rw-r--r--gdb/testsuite/gdb.c++/cttiadd2.cc22
-rw-r--r--gdb/testsuite/gdb.c++/cttiadd3.cc33
-rw-r--r--gdb/testsuite/gdb.c++/demangle.exp1582
-rw-r--r--gdb/testsuite/gdb.c++/derivation.cc240
-rw-r--r--gdb/testsuite/gdb.c++/derivation.exp337
-rw-r--r--gdb/testsuite/gdb.c++/hang.H12
-rw-r--r--gdb/testsuite/gdb.c++/hang.exp128
-rw-r--r--gdb/testsuite/gdb.c++/hang1.C3
-rw-r--r--gdb/testsuite/gdb.c++/hang2.C8
-rw-r--r--gdb/testsuite/gdb.c++/hang3.C4
-rw-r--r--gdb/testsuite/gdb.c++/inherit.exp996
-rw-r--r--gdb/testsuite/gdb.c++/local.cc66
-rw-r--r--gdb/testsuite/gdb.c++/local.exp228
-rw-r--r--gdb/testsuite/gdb.c++/m-data.cc64
-rw-r--r--gdb/testsuite/gdb.c++/m-data.exp119
-rw-r--r--gdb/testsuite/gdb.c++/m-static.cc72
-rw-r--r--gdb/testsuite/gdb.c++/m-static.exp128
-rw-r--r--gdb/testsuite/gdb.c++/m-static.h11
-rw-r--r--gdb/testsuite/gdb.c++/m-static1.cc5
-rw-r--r--gdb/testsuite/gdb.c++/maint.exp91
-rw-r--r--gdb/testsuite/gdb.c++/member-ptr.cc106
-rw-r--r--gdb/testsuite/gdb.c++/member-ptr.exp549
-rw-r--r--gdb/testsuite/gdb.c++/method.cc80
-rw-r--r--gdb/testsuite/gdb.c++/method.exp194
-rw-r--r--gdb/testsuite/gdb.c++/misc.cc587
-rw-r--r--gdb/testsuite/gdb.c++/misc.exp159
-rw-r--r--gdb/testsuite/gdb.c++/namespace.cc163
-rw-r--r--gdb/testsuite/gdb.c++/namespace.exp219
-rw-r--r--gdb/testsuite/gdb.c++/namespace1.cc31
-rw-r--r--gdb/testsuite/gdb.c++/overload.cc168
-rw-r--r--gdb/testsuite/gdb.c++/overload.exp400
-rw-r--r--gdb/testsuite/gdb.c++/ovldbreak.cc177
-rw-r--r--gdb/testsuite/gdb.c++/ovldbreak.exp360
-rw-r--r--gdb/testsuite/gdb.c++/pr-1023.cc20
-rw-r--r--gdb/testsuite/gdb.c++/pr-1023.exp79
-rw-r--r--gdb/testsuite/gdb.c++/pr-574.cc22
-rw-r--r--gdb/testsuite/gdb.c++/pr-574.exp72
-rw-r--r--gdb/testsuite/gdb.c++/printmethod.cc14
-rw-r--r--gdb/testsuite/gdb.c++/printmethod.exp69
-rw-r--r--gdb/testsuite/gdb.c++/psmang.exp226
-rw-r--r--gdb/testsuite/gdb.c++/psmang1.cc159
-rw-r--r--gdb/testsuite/gdb.c++/psmang2.cc152
-rw-r--r--gdb/testsuite/gdb.c++/ref-types.cc79
-rw-r--r--gdb/testsuite/gdb.c++/ref-types.exp663
-rw-r--r--gdb/testsuite/gdb.c++/rtti.exp127
-rw-r--r--gdb/testsuite/gdb.c++/rtti.h48
-rw-r--r--gdb/testsuite/gdb.c++/rtti1.cc67
-rw-r--r--gdb/testsuite/gdb.c++/rtti2.cc36
-rw-r--r--gdb/testsuite/gdb.c++/templates.cc785
-rw-r--r--gdb/testsuite/gdb.c++/templates.exp516
-rw-r--r--gdb/testsuite/gdb.c++/try_catch.cc121
-rw-r--r--gdb/testsuite/gdb.c++/try_catch.exp82
-rw-r--r--gdb/testsuite/gdb.c++/userdef.cc341
-rw-r--r--gdb/testsuite/gdb.c++/userdef.exp148
-rw-r--r--gdb/testsuite/gdb.c++/virtfunc.cc201
-rw-r--r--gdb/testsuite/gdb.c++/virtfunc.exp948
-rw-r--r--gdb/testsuite/gdb.objc/Makefile.in22
-rw-r--r--gdb/testsuite/gdb.objc/basicclass.exp199
-rw-r--r--gdb/testsuite/gdb.objc/basicclass.m81
-rw-r--r--gdb/thread-db.c99
-rw-r--r--gdb/top.c12
-rw-r--r--gdb/top.h1
-rw-r--r--gdb/v850-tdep.c10
-rw-r--r--gdb/valops.c5
-rw-r--r--gdb/value.h15
-rw-r--r--gdb/values.c4
-rw-r--r--gdb/vax-tdep.c3
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/x86-64-linux-nat.c342
-rw-r--r--gdb/x86-64-linux-tdep.c210
-rw-r--r--gdb/x86-64-tdep.c1084
-rw-r--r--gdb/x86-64-tdep.h33
-rw-r--r--gdb/xstormy16-tdep.c11
-rw-r--r--include/ChangeLog15
-rw-r--r--include/bfdlink.h17
-rw-r--r--include/elf/ChangeLog5
-rw-r--r--include/elf/common.h1
-rw-r--r--include/elf/v850.h3
-rw-r--r--include/opcode/ChangeLog14
-rw-r--r--include/opcode/h8300.h2369
-rw-r--r--libiberty/ChangeLog13
-rw-r--r--libiberty/asprintf.c4
-rw-r--r--libiberty/functions.texi4
-rw-r--r--libiberty/testsuite/test-demangle.c2
-rw-r--r--libiberty/vasprintf.c6
-rwxr-xr-xltconfig12
-rw-r--r--opcodes/ChangeLog36
-rw-r--r--opcodes/aclocal.m418
-rw-r--r--opcodes/config.in9
-rwxr-xr-xopcodes/configure760
-rw-r--r--opcodes/frv-asm.c31
-rw-r--r--opcodes/frv-desc.c86
-rw-r--r--opcodes/frv-desc.h13
-rw-r--r--opcodes/frv-dis.c9
-rw-r--r--opcodes/frv-ibld.c54
-rw-r--r--opcodes/frv-opc.c280
-rw-r--r--opcodes/frv-opc.h7
-rw-r--r--opcodes/h8300-dis.c722
-rw-r--r--opcodes/iq2000-asm.c9
-rw-r--r--opcodes/iq2000-desc.c162
-rw-r--r--opcodes/iq2000-desc.h6
-rw-r--r--opcodes/iq2000-dis.c10
-rw-r--r--opcodes/iq2000-ibld.c40
-rw-r--r--opcodes/iq2000-opc.c60
-rw-r--r--opcodes/iq2000-opc.h2
-rw-r--r--opcodes/po/POTFILES.in15
-rw-r--r--opcodes/po/opcodes.pot447
-rw-r--r--sim/common/ChangeLog8
-rw-r--r--sim/common/run.c22
-rw-r--r--sim/common/sim-options.c17
-rw-r--r--sim/h8300/ChangeLog14
-rw-r--r--sim/h8300/Makefile.in18
-rw-r--r--sim/h8300/compile.c4230
-rw-r--r--sim/h8300/sim-main.h170
-rw-r--r--sim/testsuite/sim/sh64/ChangeLog21
-rw-r--r--sim/testsuite/sim/sh64/compact.exp19
-rw-r--r--sim/testsuite/sim/sh64/compact/ChangeLog26
-rw-r--r--sim/testsuite/sim/sh64/compact/add.cgs55
-rw-r--r--sim/testsuite/sim/sh64/compact/addc.cgs90
-rw-r--r--sim/testsuite/sim/sh64/compact/addi.cgs46
-rw-r--r--sim/testsuite/sim/sh64/compact/addv.cgs48
-rw-r--r--sim/testsuite/sim/sh64/compact/and.cgs33
-rw-r--r--sim/testsuite/sim/sh64/compact/andb.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/andi.cgs43
-rw-r--r--sim/testsuite/sim/sh64/compact/bf.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/bfs.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/bra.cgs23
-rw-r--r--sim/testsuite/sim/sh64/compact/braf.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/brk.cgs18
-rw-r--r--sim/testsuite/sim/sh64/compact/bsr.cgs21
-rw-r--r--sim/testsuite/sim/sh64/compact/bsrf.cgs22
-rw-r--r--sim/testsuite/sim/sh64/compact/bt.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/bts.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/clrmac.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/clrs.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/clrt.cgs16
-rw-r--r--sim/testsuite/sim/sh64/compact/cmpeq.cgs52
-rw-r--r--sim/testsuite/sim/sh64/compact/cmpeqi.cgs39
-rw-r--r--sim/testsuite/sim/sh64/compact/cmpge.cgs69
-rw-r--r--sim/testsuite/sim/sh64/compact/cmpgt.cgs69
-rw-r--r--sim/testsuite/sim/sh64/compact/cmphi.cgs68
-rw-r--r--sim/testsuite/sim/sh64/compact/cmphs.cgs59
-rw-r--r--sim/testsuite/sim/sh64/compact/cmppl.cgs37
-rw-r--r--sim/testsuite/sim/sh64/compact/cmppz.cgs37
-rw-r--r--sim/testsuite/sim/sh64/compact/cmpstr.cgs148
-rw-r--r--sim/testsuite/sim/sh64/compact/div0s.cgs52
-rw-r--r--sim/testsuite/sim/sh64/compact/div0u.cgs21
-rw-r--r--sim/testsuite/sim/sh64/compact/div1.cgs52
-rw-r--r--sim/testsuite/sim/sh64/compact/dmulsl.cgs115
-rw-r--r--sim/testsuite/sim/sh64/compact/dmulul.cgs53
-rw-r--r--sim/testsuite/sim/sh64/compact/dt.cgs42
-rw-r--r--sim/testsuite/sim/sh64/compact/extsb.cgs29
-rw-r--r--sim/testsuite/sim/sh64/compact/extsw.cgs32
-rw-r--r--sim/testsuite/sim/sh64/compact/extub.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/extuw.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/fabs.cgs88
-rw-r--r--sim/testsuite/sim/sh64/compact/fadd.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/fcmpeq.cgs88
-rw-r--r--sim/testsuite/sim/sh64/compact/fcmpgt.cgs95
-rw-r--r--sim/testsuite/sim/sh64/compact/fcnvds.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/fcnvsd.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/fdiv.cgs83
-rw-r--r--sim/testsuite/sim/sh64/compact/fipr.cgs44
-rw-r--r--sim/testsuite/sim/sh64/compact/fldi0.cgs17
-rw-r--r--sim/testsuite/sim/sh64/compact/fldi1.cgs17
-rw-r--r--sim/testsuite/sim/sh64/compact/flds.cgs26
-rw-r--r--sim/testsuite/sim/sh64/compact/float.cgs80
-rw-r--r--sim/testsuite/sim/sh64/compact/fmac.cgs78
-rw-r--r--sim/testsuite/sim/sh64/compact/fmov.cgs273
-rw-r--r--sim/testsuite/sim/sh64/compact/fmul.cgs121
-rw-r--r--sim/testsuite/sim/sh64/compact/fneg.cgs83
-rw-r--r--sim/testsuite/sim/sh64/compact/frchg.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/fschg.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/fsqrt.cgs93
-rw-r--r--sim/testsuite/sim/sh64/compact/fsts.cgs11
-rw-r--r--sim/testsuite/sim/sh64/compact/fsub.cgs120
-rw-r--r--sim/testsuite/sim/sh64/compact/ftrc.cgs132
-rw-r--r--sim/testsuite/sim/sh64/compact/ftrv.cgs74
-rw-r--r--sim/testsuite/sim/sh64/compact/jmp.cgs29
-rw-r--r--sim/testsuite/sim/sh64/compact/jsr.cgs29
-rw-r--r--sim/testsuite/sim/sh64/compact/ldc-gbr.cgs22
-rw-r--r--sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/lds-fpscr.cgs22
-rw-r--r--sim/testsuite/sim/sh64/compact/lds-fpul.cgs17
-rw-r--r--sim/testsuite/sim/sh64/compact/lds-mach.cgs23
-rw-r--r--sim/testsuite/sim/sh64/compact/lds-macl.cgs23
-rw-r--r--sim/testsuite/sim/sh64/compact/lds-pr.cgs23
-rw-r--r--sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs43
-rw-r--r--sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/ldsl-mach.cgs26
-rw-r--r--sim/testsuite/sim/sh64/compact/ldsl-macl.cgs26
-rw-r--r--sim/testsuite/sim/sh64/compact/ldsl-pr.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/macl.cgs76
-rw-r--r--sim/testsuite/sim/sh64/compact/macw.cgs70
-rw-r--r--sim/testsuite/sim/sh64/compact/mov.cgs40
-rw-r--r--sim/testsuite/sim/sh64/compact/mova.cgs29
-rw-r--r--sim/testsuite/sim/sh64/compact/movb1.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/movb10.cgs25
-rw-r--r--sim/testsuite/sim/sh64/compact/movb2.cgs34
-rw-r--r--sim/testsuite/sim/sh64/compact/movb3.cgs30
-rw-r--r--sim/testsuite/sim/sh64/compact/movb4.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/movb5.cgs25
-rw-r--r--sim/testsuite/sim/sh64/compact/movb6.cgs26
-rw-r--r--sim/testsuite/sim/sh64/compact/movb7.cgs35
-rw-r--r--sim/testsuite/sim/sh64/compact/movb8.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/movb9.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/movcal.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/movi.cgs39
-rw-r--r--sim/testsuite/sim/sh64/compact/movl1.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/movl10.cgs34
-rw-r--r--sim/testsuite/sim/sh64/compact/movl11.cgs32
-rw-r--r--sim/testsuite/sim/sh64/compact/movl2.cgs43
-rw-r--r--sim/testsuite/sim/sh64/compact/movl3.cgs36
-rw-r--r--sim/testsuite/sim/sh64/compact/movl4.cgs38
-rw-r--r--sim/testsuite/sim/sh64/compact/movl5.cgs37
-rw-r--r--sim/testsuite/sim/sh64/compact/movl6.cgs25
-rw-r--r--sim/testsuite/sim/sh64/compact/movl7.cgs37
-rw-r--r--sim/testsuite/sim/sh64/compact/movl8.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/movl9.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/movt.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/movw1.cgs29
-rw-r--r--sim/testsuite/sim/sh64/compact/movw10.cgs32
-rw-r--r--sim/testsuite/sim/sh64/compact/movw11.cgs35
-rw-r--r--sim/testsuite/sim/sh64/compact/movw2.cgs36
-rw-r--r--sim/testsuite/sim/sh64/compact/movw3.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/movw4.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/movw5.cgs32
-rw-r--r--sim/testsuite/sim/sh64/compact/movw6.cgs30
-rw-r--r--sim/testsuite/sim/sh64/compact/movw7.cgs36
-rw-r--r--sim/testsuite/sim/sh64/compact/movw8.cgs31
-rw-r--r--sim/testsuite/sim/sh64/compact/movw9.cgs33
-rw-r--r--sim/testsuite/sim/sh64/compact/mull.cgs64
-rw-r--r--sim/testsuite/sim/sh64/compact/mulsw.cgs91
-rw-r--r--sim/testsuite/sim/sh64/compact/muluw.cgs96
-rw-r--r--sim/testsuite/sim/sh64/compact/neg.cgs55
-rw-r--r--sim/testsuite/sim/sh64/compact/negc.cgs66
-rw-r--r--sim/testsuite/sim/sh64/compact/nop.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/not.cgs47
-rw-r--r--sim/testsuite/sim/sh64/compact/ocbi.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/ocbp.cgs15
-rw-r--r--sim/testsuite/sim/sh64/compact/ocbwb.cgs15
-rw-r--r--sim/testsuite/sim/sh64/compact/or.cgs43
-rw-r--r--sim/testsuite/sim/sh64/compact/orb.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/ori.cgs40
-rw-r--r--sim/testsuite/sim/sh64/compact/pref.cgs15
-rw-r--r--sim/testsuite/sim/sh64/compact/rotcl.cgs121
-rw-r--r--sim/testsuite/sim/sh64/compact/rotcr.cgs103
-rw-r--r--sim/testsuite/sim/sh64/compact/rotl.cgs62
-rw-r--r--sim/testsuite/sim/sh64/compact/rotr.cgs55
-rw-r--r--sim/testsuite/sim/sh64/compact/rts.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/sets.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/sett.cgs16
-rw-r--r--sim/testsuite/sim/sh64/compact/shad.cgs58
-rw-r--r--sim/testsuite/sim/sh64/compact/shal.cgs57
-rw-r--r--sim/testsuite/sim/sh64/compact/shar.cgs40
-rw-r--r--sim/testsuite/sim/sh64/compact/shld.cgs48
-rw-r--r--sim/testsuite/sim/sh64/compact/shll.cgs57
-rw-r--r--sim/testsuite/sim/sh64/compact/shll16.cgs44
-rw-r--r--sim/testsuite/sim/sh64/compact/shll2.cgs40
-rw-r--r--sim/testsuite/sim/sh64/compact/shll8.cgs38
-rw-r--r--sim/testsuite/sim/sh64/compact/shlr.cgs33
-rw-r--r--sim/testsuite/sim/sh64/compact/shlr16.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/shlr2.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/shlr8.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/stc-gbr.cgs21
-rw-r--r--sim/testsuite/sim/sh64/compact/stcl-gbr.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/sts-fpscr.cgs23
-rw-r--r--sim/testsuite/sim/sh64/compact/sts-fpul.cgs14
-rw-r--r--sim/testsuite/sim/sh64/compact/sts-mach.cgs22
-rw-r--r--sim/testsuite/sim/sh64/compact/sts-macl.cgs21
-rw-r--r--sim/testsuite/sim/sh64/compact/sts-pr.cgs22
-rw-r--r--sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs28
-rw-r--r--sim/testsuite/sim/sh64/compact/stsl-fpul.cgs27
-rw-r--r--sim/testsuite/sim/sh64/compact/stsl-mach.cgs42
-rw-r--r--sim/testsuite/sim/sh64/compact/stsl-macl.cgs42
-rw-r--r--sim/testsuite/sim/sh64/compact/stsl-pr.cgs42
-rw-r--r--sim/testsuite/sim/sh64/compact/sub.cgs68
-rw-r--r--sim/testsuite/sim/sh64/compact/subc.cgs109
-rw-r--r--sim/testsuite/sim/sh64/compact/subv.cgs55
-rw-r--r--sim/testsuite/sim/sh64/compact/swapb.cgs44
-rw-r--r--sim/testsuite/sim/sh64/compact/swapw.cgs43
-rw-r--r--sim/testsuite/sim/sh64/compact/tasb.cgs26
-rw-r--r--sim/testsuite/sim/sh64/compact/testutils.inc49
-rw-r--r--sim/testsuite/sim/sh64/compact/trapa.cgs13
-rw-r--r--sim/testsuite/sim/sh64/compact/tst.cgs62
-rw-r--r--sim/testsuite/sim/sh64/compact/tstb.cgs30
-rw-r--r--sim/testsuite/sim/sh64/compact/tsti.cgs32
-rw-r--r--sim/testsuite/sim/sh64/compact/xor.cgs70
-rw-r--r--sim/testsuite/sim/sh64/compact/xorb.cgs24
-rw-r--r--sim/testsuite/sim/sh64/compact/xori.cgs50
-rw-r--r--sim/testsuite/sim/sh64/compact/xtrct.cgs46
-rw-r--r--sim/testsuite/sim/sh64/interwork.exp20
-rw-r--r--sim/testsuite/sim/sh64/media.exp19
-rw-r--r--sim/testsuite/sim/sh64/media/ChangeLog102
-rw-r--r--sim/testsuite/sim/sh64/media/add.cgs47
-rw-r--r--sim/testsuite/sim/sh64/media/addi.cgs37
-rw-r--r--sim/testsuite/sim/sh64/media/addil.cgs49
-rw-r--r--sim/testsuite/sim/sh64/media/addl.cgs61
-rw-r--r--sim/testsuite/sim/sh64/media/addzl.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/alloco.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/and.cgs68
-rw-r--r--sim/testsuite/sim/sh64/media/andc.cgs50
-rw-r--r--sim/testsuite/sim/sh64/media/andi.cgs46
-rw-r--r--sim/testsuite/sim/sh64/media/beq.cgs52
-rw-r--r--sim/testsuite/sim/sh64/media/beqi.cgs40
-rw-r--r--sim/testsuite/sim/sh64/media/bge.cgs40
-rw-r--r--sim/testsuite/sim/sh64/media/bgeu.cgs47
-rw-r--r--sim/testsuite/sim/sh64/media/bgt.cgs32
-rw-r--r--sim/testsuite/sim/sh64/media/bgtu.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/blink.cgs17
-rw-r--r--sim/testsuite/sim/sh64/media/bne.cgs23
-rw-r--r--sim/testsuite/sim/sh64/media/bnei.cgs23
-rw-r--r--sim/testsuite/sim/sh64/media/brk.cgs11
-rw-r--r--sim/testsuite/sim/sh64/media/byterev.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/cmpeq.cgs42
-rw-r--r--sim/testsuite/sim/sh64/media/cmpgt.cgs43
-rw-r--r--sim/testsuite/sim/sh64/media/cmpgtu.cgs43
-rw-r--r--sim/testsuite/sim/sh64/media/cmveq.cgs32
-rw-r--r--sim/testsuite/sim/sh64/media/cmvne.cgs32
-rw-r--r--sim/testsuite/sim/sh64/media/fabsd.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/fabss.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/faddd.cgs33
-rw-r--r--sim/testsuite/sim/sh64/media/fadds.cgs34
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpeqd.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpeqs.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpged.cgs46
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpges.cgs46
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpgtd.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpgts.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpund.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/fcmpuns.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/fcnvds.cgs27
-rw-r--r--sim/testsuite/sim/sh64/media/fcnvsd.cgs27
-rw-r--r--sim/testsuite/sim/sh64/media/fdivd.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/fdivs.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/fgetscr.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/fiprs.cgs42
-rw-r--r--sim/testsuite/sim/sh64/media/fldd.cgs13
-rw-r--r--sim/testsuite/sim/sh64/media/fldp.cgs16
-rw-r--r--sim/testsuite/sim/sh64/media/flds.cgs13
-rw-r--r--sim/testsuite/sim/sh64/media/fldxd.cgs16
-rw-r--r--sim/testsuite/sim/sh64/media/fldxp.cgs22
-rw-r--r--sim/testsuite/sim/sh64/media/fldxs.cgs16
-rw-r--r--sim/testsuite/sim/sh64/media/floatld.cgs12
-rw-r--r--sim/testsuite/sim/sh64/media/floatls.cgs12
-rw-r--r--sim/testsuite/sim/sh64/media/floatqd.cgs12
-rw-r--r--sim/testsuite/sim/sh64/media/floatqs.cgs12
-rw-r--r--sim/testsuite/sim/sh64/media/fmacs.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/fmovd.cgs24
-rw-r--r--sim/testsuite/sim/sh64/media/fmovdq.cgs23
-rw-r--r--sim/testsuite/sim/sh64/media/fmovls.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/fmovqd.cgs22
-rw-r--r--sim/testsuite/sim/sh64/media/fmovs.cgs24
-rw-r--r--sim/testsuite/sim/sh64/media/fmovsl.cgs21
-rw-r--r--sim/testsuite/sim/sh64/media/fmuld.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/fmuls.cgs31
-rw-r--r--sim/testsuite/sim/sh64/media/fnegd.cgs35
-rw-r--r--sim/testsuite/sim/sh64/media/fnegs.cgs35
-rw-r--r--sim/testsuite/sim/sh64/media/fputscr.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/fsqrtd.cgs27
-rw-r--r--sim/testsuite/sim/sh64/media/fsqrts.cgs27
-rw-r--r--sim/testsuite/sim/sh64/media/fstd.cgs34
-rw-r--r--sim/testsuite/sim/sh64/media/fstp.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/fsts.cgs34
-rw-r--r--sim/testsuite/sim/sh64/media/fstxd.cgs31
-rw-r--r--sim/testsuite/sim/sh64/media/fstxp.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/fstxs.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/fsubd.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/fsubs.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/ftrcdl.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/ftrcdq.cgs24
-rw-r--r--sim/testsuite/sim/sh64/media/ftrcsl.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/ftrcsq.cgs25
-rw-r--r--sim/testsuite/sim/sh64/media/ftrvs.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/getcfg.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/getcon.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/gettr.cgs48
-rw-r--r--sim/testsuite/sim/sh64/media/icbi.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/ldb.cgs21
-rw-r--r--sim/testsuite/sim/sh64/media/ldhil.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/ldhiq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/ldl.cgs21
-rw-r--r--sim/testsuite/sim/sh64/media/ldlol.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/ldloq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/ldq.cgs21
-rw-r--r--sim/testsuite/sim/sh64/media/ldub.cgs22
-rw-r--r--sim/testsuite/sim/sh64/media/lduw.cgs22
-rw-r--r--sim/testsuite/sim/sh64/media/ldw.cgs21
-rw-r--r--sim/testsuite/sim/sh64/media/ldxb.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/ldxl.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/ldxq.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/ldxub.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/ldxuw.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/ldxw.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/mabsl.cgs39
-rw-r--r--sim/testsuite/sim/sh64/media/mabsw.cgs38
-rw-r--r--sim/testsuite/sim/sh64/media/maddl.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/maddsl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/maddsub.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/maddsw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/maddw.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpeqb.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpeql.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpeqw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpgtl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpgtub.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmpgtw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcmv.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcnvslw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcnvswb.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mcnvswub.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mextr1.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr2.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr3.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr4.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr5.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr6.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mextr7.cgs67
-rw-r--r--sim/testsuite/sim/sh64/media/mmacfxwl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulfxl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulfxrpw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulfxw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulhiwl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmull.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmullowl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulsumwq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mmulw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/movi.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/mpermw.cgs51
-rw-r--r--sim/testsuite/sim/sh64/media/msadubq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshaldsl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshaldsw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshardl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshardsq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshardw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshfhib.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshfhil.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshfhiw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshflob.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshflol.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshflow.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshlldl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshlldw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshlrdl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mshlrdw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/msubl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/msubsl.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/msubsub.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/msubsw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/msubw.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/mulsl.cgs54
-rw-r--r--sim/testsuite/sim/sh64/media/mulul.cgs54
-rw-r--r--sim/testsuite/sim/sh64/media/nop.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/nsb.cgs66
-rw-r--r--sim/testsuite/sim/sh64/media/ocbi.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/ocbp.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/ocbwb.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/or.cgs44
-rw-r--r--sim/testsuite/sim/sh64/media/ori.cgs41
-rw-r--r--sim/testsuite/sim/sh64/media/prefi.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/pta.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/ptabs.cgs25
-rw-r--r--sim/testsuite/sim/sh64/media/ptb.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/ptrel.cgs22
-rw-r--r--sim/testsuite/sim/sh64/media/putcfg.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/putcon.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/rte.cgs11
-rw-r--r--sim/testsuite/sim/sh64/media/shard.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/shardl.cgs45
-rw-r--r--sim/testsuite/sim/sh64/media/shari.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/sharil.cgs45
-rw-r--r--sim/testsuite/sim/sh64/media/shlld.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/shlldl.cgs34
-rw-r--r--sim/testsuite/sim/sh64/media/shlli.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/shllil.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/shlrd.cgs30
-rw-r--r--sim/testsuite/sim/sh64/media/shlrdl.cgs37
-rw-r--r--sim/testsuite/sim/sh64/media/shlri.cgs28
-rw-r--r--sim/testsuite/sim/sh64/media/shlril.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/shori.cgs35
-rw-r--r--sim/testsuite/sim/sh64/media/sleep.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/stb.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/sthil.cgs55
-rw-r--r--sim/testsuite/sim/sh64/media/sthiq.cgs79
-rw-r--r--sim/testsuite/sim/sh64/media/stl.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/stlol.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/stloq.cgs14
-rw-r--r--sim/testsuite/sim/sh64/media/stq.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/stw.cgs26
-rw-r--r--sim/testsuite/sim/sh64/media/stxb.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/stxl.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/stxq.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/stxw.cgs29
-rw-r--r--sim/testsuite/sim/sh64/media/sub.cgs42
-rw-r--r--sim/testsuite/sim/sh64/media/subl.cgs38
-rw-r--r--sim/testsuite/sim/sh64/media/swapq.cgs36
-rw-r--r--sim/testsuite/sim/sh64/media/synci.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/synco.cgs10
-rw-r--r--sim/testsuite/sim/sh64/media/testutils.inc51
-rw-r--r--sim/testsuite/sim/sh64/media/trapa.cgs11
-rw-r--r--sim/testsuite/sim/sh64/media/xor.cgs54
-rw-r--r--sim/testsuite/sim/sh64/media/xori.cgs48
-rw-r--r--sim/testsuite/sim/sh64/misc/fr-dr.s22
741 files changed, 56619 insertions, 25908 deletions
diff --git a/COPYING.LIBGLOSS b/COPYING.LIBGLOSS
deleted file mode 100644
index 741bc2fe0de..00000000000
--- a/COPYING.LIBGLOSS
+++ /dev/null
@@ -1,297 +0,0 @@
-The libgloss subdirectory is a collection of software from several sources.
-Each have their own copyrights embedded in each file that they concern.
-
-(1) University of California, Berkeley
-
-[1a]
-
-Copyright (c) 1990 The Regents of the University of California.
-All rights reserved.
-
-Redistribution and use in source and binary forms are permitted
-provided that the above copyright notice and this paragraph are
-duplicated in all such forms and that any documentation,
-and other materials related to such distribution and use
-acknowledge that the software was developed
-by the University of California, Berkeley. The name of the
-University may not be used to endorse or promote products derived
-from this software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-[1b]
-
-Copyright (c) 1991, 2000 The Regents of the University of California.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software
- must display the following acknowledgement:
- This product includes software developed by the University of
- California, Berkeley and its contributors.
-4. Neither the name of the University nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-[1c]
-
-Copyright (c) 1991, 1998, 2001 The Regents of the University of California.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. [rescinded 22 July 1999]
-4. Neither the name of the University nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
--------------------------------------------------------------
- Please note that in some of the above alternate licenses, there is a
- statement regarding that acknowledgement must be made in any
- advertising materials for products using the code. This restriction
- no longer applies due to the following license change:
-
- ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
-
- In some cases the defunct clause has been removed in modified newlib code and
- in some cases, the clause has been left as-is.
--------------------------------------------------------------
-
-(2) DJ Delorie
-
-Copyright (C) 1993 DJ Delorie
-All rights reserved.
-
-Redistribution and use in source and binary forms is permitted
-provided that the above copyright notice and following paragraph are
-duplicated in all such forms.
-
-This file is distributed WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-(3) GPL (fr30 directory only)
-
-Copyright (C) 1998 Free Software Foundation, Inc.
-Contributed by Cygnus Solutions.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-
-(4) Advanced Micro Devices
-
-Copyright 1989, 1990 Advanced Micro Devices, Inc.
-
-This software is the property of Advanced Micro Devices, Inc (AMD) which
-specifically grants the user the right to modify, use and distribute this
-software provided this notice is not removed or altered. All other rights
-are reserved by AMD.
-
-AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-USE OF THIS SOFTWARE.
-
-So that all may benefit from your experience, please report any problems
-or suggestions about this software to the 29K Technical Support Center at
-800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-
-Advanced Micro Devices, Inc.
-29K Support Products
-Mail Stop 573
-5900 E. Ben White Blvd.
-Austin, TX 78741
-800-292-9263
-
-(5) Array Technology Corporation and MIPS (mips/lsi33k-stub.h)
-
-COPYRIGHT (C) 1991, 1992 ARRAY TECHNOLOGY CORPORATION
- All Rights Reserved
-
-This software is confidential information which is proprietary to and
-a trade secret of ARRAY Technology Corporation. Use, duplication, or
-disclosure is subject to the terms of a separate license agreement.
-
-Copyright 1985 by MIPS Computer Systems, Inc.
-
-(6) University of Utah and the Computer Systems Laboratory (CSL)
- [applies only to hppa*-*-pro* targets]
-
-Copyright (c) 1990,1994 The University of Utah and
-the Computer Systems Laboratory (CSL). All rights reserved.
-
-Permission to use, copy, modify and distribute this software is hereby
-granted provided that (1) source code retains these copyright, permission,
-and disclaimer notices, and (2) redistributions including binaries
-reproduce the notices in supporting documentation, and (3) all advertising
-materials mentioning features or use of this software display the following
-acknowledgement: ``This product includes software developed by the
-Computer Systems Laboratory at the University of Utah.''
-
-THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
-IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
-ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
-
-CSL requests users of this software to return to csl-dist@cs.utah.edu any
-improvements that they make and grant CSL redistribution rights.
-
-(7) Sun Microsystems
-
-Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
-
-Developed at SunPro, a Sun Microsystems, Inc. business.
-Permission to use, copy, modify, and distribute this
-software is freely granted, provided that this notice
-is preserved.
-
-(8) Hewlett Packard
-
-(c) Copyright 1986 HEWLETT-PACKARD COMPANY
-
-To anyone who acknowledges that this file is provided "AS IS"
-without any express or implied warranty:
- permission to use, copy, modify, and distribute this file
-for any purpose is hereby granted without fee, provided that
-the above copyright notice and this notice appears in all
-copies, and that the name of Hewlett-Packard Company not be
-used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-Hewlett-Packard Company makes no representations about the
-suitability of this software for any purpose.
-
-(9) Hans-Peter Nilsson
-
-Copyright (C) 2001 Hans-Peter Nilsson
-
-Permission to use, copy, modify, and distribute this software is
-freely granted, provided that the above copyright notice, this notice
-and the following disclaimer are preserved with no changes.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-(10) No Copyright
-
-THIS SOFTWARE IS NOT COPYRIGHTED
-
-(11) Cygnus Support / Cygnus Solutions
-
-Copyright (c) 1995, 1996, 1997, 1998, 1999 Cygnus Support
-
-The authors hereby grant permission to use, copy, modify, distribute,
-and license this software and its documentation for any purpose, provided
-that existing copyright notices are retained in all copies and that this
-notice is included verbatim in any distributions. No written agreement,
-license, or royalty fee is required for any of the authorized uses.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
----------------------------------------------------------------
- Please note that the copyright above may be used with the name
- Cygnus Solutions instead of Cygnus Support. Both names should
- be considered interchangeable. These copyrights are now owned
- by Red Hat Incorporated.
----------------------------------------------------------------
-
-(12) Red Hat Incorporated
-
-Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-
-The authors hereby grant permission to use, copy, modify, distribute,
-and license this software and its documentation for any purpose, provided
-that existing copyright notices are retained in all copies and that this
-notice is included verbatim in any distributions. No written agreement,
-license, or royalty fee is required for any of the authorized uses.
-Modifications to this software may be copyrighted by their authors
-and need not follow the licensing terms described here, provided that
-the new terms are clearly indicated on the first page of each file where
-they apply.
-
-(13) Default copyright
-
-Unless otherwise stated in each remaining libgloss file, the remaining
-files in the libgloss subdirectory are governed by the following copyright.
-
-Copyright (c) 1994, 1997, 2001, 2002 Red Hat Incorporated.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- The name of Red Hat Incorporated may not be used to endorse
- or promote products derived from this software without specific
- prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/COPYING.NEWLIB b/COPYING.NEWLIB
index 145e2f026bf..08a9b3a50eb 100644
--- a/COPYING.NEWLIB
+++ b/COPYING.NEWLIB
@@ -542,7 +542,7 @@ duplicated in all such forms.
This file is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-(21) Free Software Foundation LGPL License (i[3456]86-*-linux* targets only)
+(21) Free Software Foundation LGPL License (*-linux* targets only)
Copyright (C) 1990-1999, 2000, 2001
Free Software Foundation, Inc.
@@ -621,7 +621,30 @@ of the software without specific, written prior permission.
Hewlett-Packard Company makes no representations about the
suitability of this software for any purpose.
-(25) Red Hat Incorporated
+(25) Henry Spencer (only *-linux targets)
+
+Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
+This software is not subject to any license of the American Telephone
+and Telegraph Company or of the Regents of the University of California.
+
+Permission is granted to anyone to use this software for any purpose on
+any computer system, and to alter it and redistribute it, subject
+to the following restrictions:
+
+1. The author is not responsible for the consequences of use of this
+ software, no matter how awful, even if they arise from flaws in it.
+
+2. The origin of this software must not be misrepresented, either by
+ explicit claim or by omission. Since few users ever read sources,
+ credits must appear in the documentation.
+
+3. Altered versions must be plainly marked as such, and must not be
+ misrepresented as being the original software. Since few users
+ ever read sources, credits must appear in the documentation.
+
+4. This notice may not be removed or altered.
+
+(26) Red Hat Incorporated
Unless otherwise stated in each remaining newlib file, the remaining
files in the newlib subdirectory default to the following copyright.
diff --git a/ChangeLog b/ChangeLog
index 6f0b06e6458..f781e7a7cb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,42 @@
+2003-06-03 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Make 'recursive targets' using autogen rather
+ than shell loop. Remove duplicate 'clean' targets and false
+ comments.
+ * Makefile.def: Add systematic dependencies to 'recursive' targets.
+ Add systematic method of specifying missing targets in subdirs.
+ Add copyright boilerplate.
+ * Makefile.in: Regenerate.
+ * configure.in: Add 'recursive targets' to maybe list.
+ * configure: Regenerate.
+
+ * Makefile.tpl: Rename [+target+] to [+make_target+].
+ * Makefile.def: Rename 'target' to 'make_target'.
+
+2003-05-30 Nick Clifton <nickc@redhat.com>
+
+ * README-maintainer-mode: Update URL for locating blessed config
+ tools.
+
+2003-05-29 Robert Millan <rmh@debian.org>
+
+ * ltconfig: Import this patch and modify for use with current
+ version of ltconfig:
+
+ 2003-05-21 Bruno Haible <bruno@clisp.org>
+
+ * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Add support for
+ GNU/FreeBSD.
+
+2003-05-28 DJ Delorie <dj@redhat.com>
+
+ * Makefile.tpl: Make maybe-check-gcc .PHONY.
+ * Makefile.in: Regenerate.
+
+2003-05-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * COPYING.NEWLIB: Add license info for newlib/libc/sys/linux/stdlib.
+
2003-05-21 DJ Delorie <dj@redhat.com>
* Makefile.tpl (configure-target-libiberty): Depend only on gcc, not
diff --git a/Makefile.def b/Makefile.def
index eab03306ff3..62444418388 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -1,6 +1,29 @@
#! /usr/bin/autogen
AutoGen definitions Makefile.tpl;
+// Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'.
+// This file was originally written by Nathanael Nerode.
+//
+// Copyright 2002, 2003 Free Software Foundation
+//
+// This file is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 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.
+
+
+// "missing" indicates that that module doesn't supply
+// that recursive target in its Makefile.
+
build_modules= { module= libiberty; };
host_modules= { module= ash; };
@@ -31,7 +54,8 @@ host_modules= { module= gzip; };
host_modules= { module= hello; };
host_modules= { module= indent; };
host_modules= { module= intl; };
-host_modules= { module= tcl; };
+host_modules= { module= tcl;
+ missing=mostlyclean; };
host_modules= { module= itcl; };
host_modules= { module= ld; };
host_modules= { module= libgui; };
@@ -65,14 +89,22 @@ host_modules= { module= expect; with_x=true; };
host_modules= { module= guile; with_x=true; };
host_modules= { module= tk; with_x=true; };
host_modules= { module= tix; with_x=true; };
-host_modules= { module= libtermcap; no_check=true; no_clean=true; };
+host_modules= { module= libtermcap; no_check=true;
+ missing=mostlyclean;
+ missing=clean;
+ missing=distclean;
+ missing=maintainer-clean; };
host_modules= { module= utils; no_check=true; };
target_modules = { module= libstdc++-v3; raw_cxx=true; };
target_modules = { module= newlib; };
target_modules = { module= libf2c; };
target_modules = { module= libobjc; };
-target_modules = { module= libtermcap; no_check=true; no_clean=true; };
+target_modules = { module= libtermcap; no_check=true;
+ missing=mostlyclean;
+ missing=clean;
+ missing=distclean;
+ missing=maintainer-clean; };
target_modules = { module= winsup; };
target_modules = { module= libgloss; no_check=true; };
target_modules = { module= libiberty; };
@@ -85,14 +117,22 @@ target_modules = { module= boehm-gc; };
target_modules = { module= qthreads; };
target_modules = { module= rda; };
-// These are (some of) the targets to be done in each subdirectory.
+// These are (some of) the make targets to be done in each subdirectory.
// Not all; these are the ones which don't have special options.
-recursive_targets = { target= clean; };
-recursive_targets = { target= distclean; };
-recursive_targets = { target= dvi; };
-recursive_targets = { target= info; };
-recursive_targets = { target= install-info; };
-recursive_targets = { target= installcheck; };
-recursive_targets = { target= mostlyclean; };
-recursive_targets = { target= maintainer-clean; };
-recursive_targets = { target= TAGS; };
+// "depend" indicates that a target depends on another target uniformly
+// for each subdirectory. There can be several such lines per target.
+recursive_targets = { make_target= info;
+ depend=configure; };
+recursive_targets = { make_target= dvi;
+ depend=configure; };
+recursive_targets = { make_target= TAGS;
+ depend=configure; };
+recursive_targets = { make_target= install-info;
+ depend=configure;
+ depend=info; };
+recursive_targets = { make_target= installcheck;
+ depend=configure; };
+recursive_targets = { make_target= mostlyclean; };
+recursive_targets = { make_target= clean; };
+recursive_targets = { make_target= distclean; };
+recursive_targets = { make_target= maintainer-clean; };
diff --git a/Makefile.in b/Makefile.in
index 7511bc057af..fb0979727f8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -472,7 +472,6 @@ RECURSE_FLAGS = \
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
-# If any variables are added here, they must be added to do-*, below.
EXTRA_HOST_FLAGS = \
'AR=$(AR)' \
'AS=$(AS)' \
@@ -501,7 +500,6 @@ X11_FLAGS_TO_PASS = \
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; the variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
-# If any variables are added here, they must be added to do-*, below.
EXTRA_TARGET_FLAGS = \
'AR=$$(AR_FOR_TARGET)' \
'AS=$$(AS_FOR_TARGET)' \
@@ -523,7 +521,7 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# unfortunately needs the native compiler and the target ar and
# ranlib.
# If any variables are added here, they must be added to do-*, below.
-# The HOST_* variables are a special case, which are used for the gcc
+# The BUILD_* variables are a special case, which are used for the gcc
# cross-building scheme.
EXTRA_GCC_FLAGS = \
'AR=$(AR)' \
@@ -636,93 +634,6 @@ configure-target: \
maybe-configure-target-qthreads \
maybe-configure-target-rda
-# This is a list of the targets for which we can do a clean-{target}.
-CLEAN_MODULES = \
- clean-ash \
- clean-autoconf \
- clean-automake \
- clean-bash \
- clean-bfd \
- clean-opcodes \
- clean-binutils \
- clean-bison \
- clean-byacc \
- clean-bzip2 \
- clean-dejagnu \
- clean-diff \
- clean-dosutils \
- clean-etc \
- clean-fastjar \
- clean-fileutils \
- clean-findutils \
- clean-find \
- clean-flex \
- clean-gas \
- clean-gawk \
- clean-gettext \
- clean-gnuserv \
- clean-gprof \
- clean-gzip \
- clean-hello \
- clean-indent \
- clean-intl \
- clean-tcl \
- clean-itcl \
- clean-ld \
- clean-libgui \
- clean-libiberty \
- clean-libtool \
- clean-m4 \
- clean-make \
- clean-mmalloc \
- clean-patch \
- clean-perl \
- clean-prms \
- clean-rcs \
- clean-readline \
- clean-release \
- clean-recode \
- clean-sed \
- clean-send-pr \
- clean-shellutils \
- clean-sid \
- clean-sim \
- clean-tar \
- clean-texinfo \
- clean-textutils \
- clean-time \
- clean-uudecode \
- clean-wdiff \
- clean-zip \
- clean-zlib \
- clean-utils
-
-# All of the target modules that can be cleaned
-CLEAN_TARGET_MODULES = \
- clean-target-libstdc++-v3 \
- clean-target-newlib \
- clean-target-libf2c \
- clean-target-libobjc \
- clean-target-winsup \
- clean-target-libgloss \
- clean-target-libiberty \
- clean-target-gperf \
- clean-target-examples \
- clean-target-libffi \
- clean-target-libjava \
- clean-target-zlib \
- clean-target-boehm-gc \
- clean-target-qthreads \
- clean-target-rda
-
-# All of the x11 modules that can be cleaned
-CLEAN_X11_MODULES = \
- clean-gdb \
- clean-expect \
- clean-guile \
- clean-tk \
- clean-tix
-
# The target built for a native build.
.PHONY: all.normal
all.normal: @all_build_modules@ all-host all-target
@@ -816,432 +727,16520 @@ all-target: \
# ``make X'' in all subdirectories (because, in general, there is a
# dependency (below) of X upon do-X, a ``make X'' will also do this,
# but it may do additional work as well).
-# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
-# because it is so large that it can easily overflow the command line
-# length limit on some systems.
-.PHONY: do-clean
-do-clean:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- clean) \
- || exit 1; \
- else true; fi; \
- done
+.PHONY: do-info
+do-info: info-host info-target
+
+.PHONY: info-host
+info-host: maybe-info-gcc \
+ maybe-info-ash \
+ maybe-info-autoconf \
+ maybe-info-automake \
+ maybe-info-bash \
+ maybe-info-bfd \
+ maybe-info-opcodes \
+ maybe-info-binutils \
+ maybe-info-bison \
+ maybe-info-byacc \
+ maybe-info-bzip2 \
+ maybe-info-dejagnu \
+ maybe-info-diff \
+ maybe-info-dosutils \
+ maybe-info-etc \
+ maybe-info-fastjar \
+ maybe-info-fileutils \
+ maybe-info-findutils \
+ maybe-info-find \
+ maybe-info-flex \
+ maybe-info-gas \
+ maybe-info-gawk \
+ maybe-info-gettext \
+ maybe-info-gnuserv \
+ maybe-info-gprof \
+ maybe-info-gzip \
+ maybe-info-hello \
+ maybe-info-indent \
+ maybe-info-intl \
+ maybe-info-tcl \
+ maybe-info-itcl \
+ maybe-info-ld \
+ maybe-info-libgui \
+ maybe-info-libiberty \
+ maybe-info-libtool \
+ maybe-info-m4 \
+ maybe-info-make \
+ maybe-info-mmalloc \
+ maybe-info-patch \
+ maybe-info-perl \
+ maybe-info-prms \
+ maybe-info-rcs \
+ maybe-info-readline \
+ maybe-info-release \
+ maybe-info-recode \
+ maybe-info-sed \
+ maybe-info-send-pr \
+ maybe-info-shellutils \
+ maybe-info-sid \
+ maybe-info-sim \
+ maybe-info-tar \
+ maybe-info-texinfo \
+ maybe-info-textutils \
+ maybe-info-time \
+ maybe-info-uudecode \
+ maybe-info-wdiff \
+ maybe-info-zip \
+ maybe-info-zlib \
+ maybe-info-gdb \
+ maybe-info-expect \
+ maybe-info-guile \
+ maybe-info-tk \
+ maybe-info-tix \
+ maybe-info-libtermcap \
+ maybe-info-utils
+
+.PHONY: info-target
+info-target: \
+ maybe-info-target-libstdc++-v3 \
+ maybe-info-target-newlib \
+ maybe-info-target-libf2c \
+ maybe-info-target-libobjc \
+ maybe-info-target-libtermcap \
+ maybe-info-target-winsup \
+ maybe-info-target-libgloss \
+ maybe-info-target-libiberty \
+ maybe-info-target-gperf \
+ maybe-info-target-examples \
+ maybe-info-target-libffi \
+ maybe-info-target-libjava \
+ maybe-info-target-zlib \
+ maybe-info-target-boehm-gc \
+ maybe-info-target-qthreads \
+ maybe-info-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-info-gcc info-gcc
+maybe-info-gcc:
+info-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-info-ash info-ash
+maybe-info-ash:
+
+info-ash: \
+ configure-ash
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-autoconf info-autoconf
+maybe-info-autoconf:
+
+info-autoconf: \
+ configure-autoconf
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-automake info-automake
+maybe-info-automake:
+
+info-automake: \
+ configure-automake
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-bash info-bash
+maybe-info-bash:
+
+info-bash: \
+ configure-bash
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-bfd info-bfd
+maybe-info-bfd:
+
+info-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-opcodes info-opcodes
+maybe-info-opcodes:
+
+info-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-binutils info-binutils
+maybe-info-binutils:
+
+info-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-bison info-bison
+maybe-info-bison:
+
+info-bison: \
+ configure-bison
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-byacc info-byacc
+maybe-info-byacc:
+
+info-byacc: \
+ configure-byacc
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-bzip2 info-bzip2
+maybe-info-bzip2:
+
+info-bzip2: \
+ configure-bzip2
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-dejagnu info-dejagnu
+maybe-info-dejagnu:
+
+info-dejagnu: \
+ configure-dejagnu
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-diff info-diff
+maybe-info-diff:
+
+info-diff: \
+ configure-diff
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-dosutils info-dosutils
+maybe-info-dosutils:
+
+info-dosutils: \
+ configure-dosutils
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-etc info-etc
+maybe-info-etc:
+
+info-etc: \
+ configure-etc
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-fastjar info-fastjar
+maybe-info-fastjar:
+
+info-fastjar: \
+ configure-fastjar
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-fileutils info-fileutils
+maybe-info-fileutils:
+
+info-fileutils: \
+ configure-fileutils
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-findutils info-findutils
+maybe-info-findutils:
+
+info-findutils: \
+ configure-findutils
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-find info-find
+maybe-info-find:
+
+info-find: \
+ configure-find
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-flex info-flex
+maybe-info-flex:
+
+info-flex: \
+ configure-flex
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gas info-gas
+maybe-info-gas:
+
+info-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gawk info-gawk
+maybe-info-gawk:
+
+info-gawk: \
+ configure-gawk
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gettext info-gettext
+maybe-info-gettext:
+
+info-gettext: \
+ configure-gettext
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gnuserv info-gnuserv
+maybe-info-gnuserv:
+
+info-gnuserv: \
+ configure-gnuserv
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gprof info-gprof
+maybe-info-gprof:
+
+info-gprof: \
+ configure-gprof
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gzip info-gzip
+maybe-info-gzip:
+
+info-gzip: \
+ configure-gzip
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-hello info-hello
+maybe-info-hello:
+
+info-hello: \
+ configure-hello
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-indent info-indent
+maybe-info-indent:
+
+info-indent: \
+ configure-indent
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-intl info-intl
+maybe-info-intl:
+
+info-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-tcl info-tcl
+maybe-info-tcl:
+
+info-tcl: \
+ configure-tcl
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-itcl info-itcl
+maybe-info-itcl:
+
+info-itcl: \
+ configure-itcl
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-ld info-ld
+maybe-info-ld:
+
+info-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-libgui info-libgui
+maybe-info-libgui:
+
+info-libgui: \
+ configure-libgui
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-libiberty info-libiberty
+maybe-info-libiberty:
+
+info-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-libtool info-libtool
+maybe-info-libtool:
+
+info-libtool: \
+ configure-libtool
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-m4 info-m4
+maybe-info-m4:
+
+info-m4: \
+ configure-m4
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-make info-make
+maybe-info-make:
+
+info-make: \
+ configure-make
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-mmalloc info-mmalloc
+maybe-info-mmalloc:
+
+info-mmalloc: \
+ configure-mmalloc
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-patch info-patch
+maybe-info-patch:
+
+info-patch: \
+ configure-patch
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-perl info-perl
+maybe-info-perl:
+
+info-perl: \
+ configure-perl
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-prms info-prms
+maybe-info-prms:
+
+info-prms: \
+ configure-prms
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-rcs info-rcs
+maybe-info-rcs:
+
+info-rcs: \
+ configure-rcs
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-readline info-readline
+maybe-info-readline:
+
+info-readline: \
+ configure-readline
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-release info-release
+maybe-info-release:
+
+info-release: \
+ configure-release
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-recode info-recode
+maybe-info-recode:
+
+info-recode: \
+ configure-recode
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-sed info-sed
+maybe-info-sed:
+
+info-sed: \
+ configure-sed
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-send-pr info-send-pr
+maybe-info-send-pr:
+
+info-send-pr: \
+ configure-send-pr
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-shellutils info-shellutils
+maybe-info-shellutils:
+
+info-shellutils: \
+ configure-shellutils
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-sid info-sid
+maybe-info-sid:
+
+info-sid: \
+ configure-sid
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-sim info-sim
+maybe-info-sim:
+
+info-sim: \
+ configure-sim
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-tar info-tar
+maybe-info-tar:
+
+info-tar: \
+ configure-tar
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-texinfo info-texinfo
+maybe-info-texinfo:
+
+info-texinfo: \
+ configure-texinfo
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-textutils info-textutils
+maybe-info-textutils:
+
+info-textutils: \
+ configure-textutils
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-time info-time
+maybe-info-time:
+
+info-time: \
+ configure-time
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-uudecode info-uudecode
+maybe-info-uudecode:
+
+info-uudecode: \
+ configure-uudecode
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-wdiff info-wdiff
+maybe-info-wdiff:
+
+info-wdiff: \
+ configure-wdiff
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-zip info-zip
+maybe-info-zip:
+
+info-zip: \
+ configure-zip
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-zlib info-zlib
+maybe-info-zlib:
+
+info-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-gdb info-gdb
+maybe-info-gdb:
+
+info-gdb: \
+ configure-gdb
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-expect info-expect
+maybe-info-expect:
+
+info-expect: \
+ configure-expect
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-guile info-guile
+maybe-info-guile:
+
+info-guile: \
+ configure-guile
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-tk info-tk
+maybe-info-tk:
+
+info-tk: \
+ configure-tk
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-tix info-tix
+maybe-info-tix:
+
+info-tix: \
+ configure-tix
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-libtermcap info-libtermcap
+maybe-info-libtermcap:
+
+info-libtermcap: \
+ configure-libtermcap
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libtermcap" ; \
+ (cd libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-utils info-utils
+maybe-info-utils:
+
+info-utils: \
+ configure-utils
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3
+maybe-info-target-libstdc++-v3:
+
+info-target-libstdc++-v3: \
+ configure-target-libstdc++-v3
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-newlib info-target-newlib
+maybe-info-target-newlib:
+
+info-target-newlib: \
+ configure-target-newlib
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libf2c info-target-libf2c
+maybe-info-target-libf2c:
+
+info-target-libf2c: \
+ configure-target-libf2c
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libobjc info-target-libobjc
+maybe-info-target-libobjc:
+
+info-target-libobjc: \
+ configure-target-libobjc
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libtermcap info-target-libtermcap
+maybe-info-target-libtermcap:
+
+info-target-libtermcap: \
+ configure-target-libtermcap
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-winsup info-target-winsup
+maybe-info-target-winsup:
+
+info-target-winsup: \
+ configure-target-winsup
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libgloss info-target-libgloss
+maybe-info-target-libgloss:
+
+info-target-libgloss: \
+ configure-target-libgloss
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libiberty info-target-libiberty
+maybe-info-target-libiberty:
+
+info-target-libiberty: \
+ configure-target-libiberty
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-gperf info-target-gperf
+maybe-info-target-gperf:
+
+info-target-gperf: \
+ configure-target-gperf
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-examples info-target-examples
+maybe-info-target-examples:
+
+info-target-examples: \
+ configure-target-examples
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libffi info-target-libffi
+maybe-info-target-libffi:
+
+info-target-libffi: \
+ configure-target-libffi
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-libjava info-target-libjava
+maybe-info-target-libjava:
+
+info-target-libjava: \
+ configure-target-libjava
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-zlib info-target-zlib
+maybe-info-target-zlib:
+
+info-target-zlib: \
+ configure-target-zlib
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc
+maybe-info-target-boehm-gc:
+
+info-target-boehm-gc: \
+ configure-target-boehm-gc
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-qthreads info-target-qthreads
+maybe-info-target-qthreads:
+
+info-target-qthreads: \
+ configure-target-qthreads
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+
+.PHONY: maybe-info-target-rda info-target-rda
+maybe-info-target-rda:
+
+info-target-rda: \
+ configure-target-rda
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing info in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
-.PHONY: do-distclean
-do-distclean:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- distclean) \
- || exit 1; \
- else true; fi; \
- done
.PHONY: do-dvi
-do-dvi:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- dvi) \
- || exit 1; \
- else true; fi; \
- done
+do-dvi: dvi-host dvi-target
+
+.PHONY: dvi-host
+dvi-host: maybe-dvi-gcc \
+ maybe-dvi-ash \
+ maybe-dvi-autoconf \
+ maybe-dvi-automake \
+ maybe-dvi-bash \
+ maybe-dvi-bfd \
+ maybe-dvi-opcodes \
+ maybe-dvi-binutils \
+ maybe-dvi-bison \
+ maybe-dvi-byacc \
+ maybe-dvi-bzip2 \
+ maybe-dvi-dejagnu \
+ maybe-dvi-diff \
+ maybe-dvi-dosutils \
+ maybe-dvi-etc \
+ maybe-dvi-fastjar \
+ maybe-dvi-fileutils \
+ maybe-dvi-findutils \
+ maybe-dvi-find \
+ maybe-dvi-flex \
+ maybe-dvi-gas \
+ maybe-dvi-gawk \
+ maybe-dvi-gettext \
+ maybe-dvi-gnuserv \
+ maybe-dvi-gprof \
+ maybe-dvi-gzip \
+ maybe-dvi-hello \
+ maybe-dvi-indent \
+ maybe-dvi-intl \
+ maybe-dvi-tcl \
+ maybe-dvi-itcl \
+ maybe-dvi-ld \
+ maybe-dvi-libgui \
+ maybe-dvi-libiberty \
+ maybe-dvi-libtool \
+ maybe-dvi-m4 \
+ maybe-dvi-make \
+ maybe-dvi-mmalloc \
+ maybe-dvi-patch \
+ maybe-dvi-perl \
+ maybe-dvi-prms \
+ maybe-dvi-rcs \
+ maybe-dvi-readline \
+ maybe-dvi-release \
+ maybe-dvi-recode \
+ maybe-dvi-sed \
+ maybe-dvi-send-pr \
+ maybe-dvi-shellutils \
+ maybe-dvi-sid \
+ maybe-dvi-sim \
+ maybe-dvi-tar \
+ maybe-dvi-texinfo \
+ maybe-dvi-textutils \
+ maybe-dvi-time \
+ maybe-dvi-uudecode \
+ maybe-dvi-wdiff \
+ maybe-dvi-zip \
+ maybe-dvi-zlib \
+ maybe-dvi-gdb \
+ maybe-dvi-expect \
+ maybe-dvi-guile \
+ maybe-dvi-tk \
+ maybe-dvi-tix \
+ maybe-dvi-libtermcap \
+ maybe-dvi-utils
+
+.PHONY: dvi-target
+dvi-target: \
+ maybe-dvi-target-libstdc++-v3 \
+ maybe-dvi-target-newlib \
+ maybe-dvi-target-libf2c \
+ maybe-dvi-target-libobjc \
+ maybe-dvi-target-libtermcap \
+ maybe-dvi-target-winsup \
+ maybe-dvi-target-libgloss \
+ maybe-dvi-target-libiberty \
+ maybe-dvi-target-gperf \
+ maybe-dvi-target-examples \
+ maybe-dvi-target-libffi \
+ maybe-dvi-target-libjava \
+ maybe-dvi-target-zlib \
+ maybe-dvi-target-boehm-gc \
+ maybe-dvi-target-qthreads \
+ maybe-dvi-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-dvi-gcc dvi-gcc
+maybe-dvi-gcc:
+dvi-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-dvi-ash dvi-ash
+maybe-dvi-ash:
+
+dvi-ash: \
+ configure-ash
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-autoconf dvi-autoconf
+maybe-dvi-autoconf:
+
+dvi-autoconf: \
+ configure-autoconf
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-automake dvi-automake
+maybe-dvi-automake:
+
+dvi-automake: \
+ configure-automake
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-bash dvi-bash
+maybe-dvi-bash:
+
+dvi-bash: \
+ configure-bash
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-bfd dvi-bfd
+maybe-dvi-bfd:
+
+dvi-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-opcodes dvi-opcodes
+maybe-dvi-opcodes:
+
+dvi-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-binutils dvi-binutils
+maybe-dvi-binutils:
+
+dvi-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-bison dvi-bison
+maybe-dvi-bison:
+
+dvi-bison: \
+ configure-bison
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-byacc dvi-byacc
+maybe-dvi-byacc:
+
+dvi-byacc: \
+ configure-byacc
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-bzip2 dvi-bzip2
+maybe-dvi-bzip2:
+
+dvi-bzip2: \
+ configure-bzip2
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-dejagnu dvi-dejagnu
+maybe-dvi-dejagnu:
+
+dvi-dejagnu: \
+ configure-dejagnu
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-diff dvi-diff
+maybe-dvi-diff:
+
+dvi-diff: \
+ configure-diff
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-dosutils dvi-dosutils
+maybe-dvi-dosutils:
+
+dvi-dosutils: \
+ configure-dosutils
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-etc dvi-etc
+maybe-dvi-etc:
+
+dvi-etc: \
+ configure-etc
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-fastjar dvi-fastjar
+maybe-dvi-fastjar:
+
+dvi-fastjar: \
+ configure-fastjar
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-fileutils dvi-fileutils
+maybe-dvi-fileutils:
+
+dvi-fileutils: \
+ configure-fileutils
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-findutils dvi-findutils
+maybe-dvi-findutils:
+
+dvi-findutils: \
+ configure-findutils
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-find dvi-find
+maybe-dvi-find:
+
+dvi-find: \
+ configure-find
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-flex dvi-flex
+maybe-dvi-flex:
+
+dvi-flex: \
+ configure-flex
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gas dvi-gas
+maybe-dvi-gas:
+
+dvi-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gawk dvi-gawk
+maybe-dvi-gawk:
+
+dvi-gawk: \
+ configure-gawk
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gettext dvi-gettext
+maybe-dvi-gettext:
+
+dvi-gettext: \
+ configure-gettext
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gnuserv dvi-gnuserv
+maybe-dvi-gnuserv:
+
+dvi-gnuserv: \
+ configure-gnuserv
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gprof dvi-gprof
+maybe-dvi-gprof:
+
+dvi-gprof: \
+ configure-gprof
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gzip dvi-gzip
+maybe-dvi-gzip:
+
+dvi-gzip: \
+ configure-gzip
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-hello dvi-hello
+maybe-dvi-hello:
+
+dvi-hello: \
+ configure-hello
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-indent dvi-indent
+maybe-dvi-indent:
+
+dvi-indent: \
+ configure-indent
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-intl dvi-intl
+maybe-dvi-intl:
+
+dvi-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-tcl dvi-tcl
+maybe-dvi-tcl:
+
+dvi-tcl: \
+ configure-tcl
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-itcl dvi-itcl
+maybe-dvi-itcl:
+
+dvi-itcl: \
+ configure-itcl
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-ld dvi-ld
+maybe-dvi-ld:
+
+dvi-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-libgui dvi-libgui
+maybe-dvi-libgui:
+
+dvi-libgui: \
+ configure-libgui
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-libiberty dvi-libiberty
+maybe-dvi-libiberty:
+
+dvi-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-libtool dvi-libtool
+maybe-dvi-libtool:
+
+dvi-libtool: \
+ configure-libtool
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-m4 dvi-m4
+maybe-dvi-m4:
+
+dvi-m4: \
+ configure-m4
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-make dvi-make
+maybe-dvi-make:
+
+dvi-make: \
+ configure-make
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-mmalloc dvi-mmalloc
+maybe-dvi-mmalloc:
+
+dvi-mmalloc: \
+ configure-mmalloc
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-patch dvi-patch
+maybe-dvi-patch:
+
+dvi-patch: \
+ configure-patch
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-perl dvi-perl
+maybe-dvi-perl:
+
+dvi-perl: \
+ configure-perl
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-prms dvi-prms
+maybe-dvi-prms:
+
+dvi-prms: \
+ configure-prms
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-rcs dvi-rcs
+maybe-dvi-rcs:
+
+dvi-rcs: \
+ configure-rcs
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-readline dvi-readline
+maybe-dvi-readline:
+
+dvi-readline: \
+ configure-readline
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-release dvi-release
+maybe-dvi-release:
+
+dvi-release: \
+ configure-release
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-recode dvi-recode
+maybe-dvi-recode:
+
+dvi-recode: \
+ configure-recode
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-sed dvi-sed
+maybe-dvi-sed:
+
+dvi-sed: \
+ configure-sed
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-send-pr dvi-send-pr
+maybe-dvi-send-pr:
+
+dvi-send-pr: \
+ configure-send-pr
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-shellutils dvi-shellutils
+maybe-dvi-shellutils:
+
+dvi-shellutils: \
+ configure-shellutils
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-sid dvi-sid
+maybe-dvi-sid:
+
+dvi-sid: \
+ configure-sid
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-sim dvi-sim
+maybe-dvi-sim:
+
+dvi-sim: \
+ configure-sim
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-tar dvi-tar
+maybe-dvi-tar:
+
+dvi-tar: \
+ configure-tar
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-texinfo dvi-texinfo
+maybe-dvi-texinfo:
+
+dvi-texinfo: \
+ configure-texinfo
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-textutils dvi-textutils
+maybe-dvi-textutils:
+
+dvi-textutils: \
+ configure-textutils
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-time dvi-time
+maybe-dvi-time:
+
+dvi-time: \
+ configure-time
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-uudecode dvi-uudecode
+maybe-dvi-uudecode:
+
+dvi-uudecode: \
+ configure-uudecode
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-wdiff dvi-wdiff
+maybe-dvi-wdiff:
+
+dvi-wdiff: \
+ configure-wdiff
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-zip dvi-zip
+maybe-dvi-zip:
+
+dvi-zip: \
+ configure-zip
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-zlib dvi-zlib
+maybe-dvi-zlib:
+
+dvi-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-gdb dvi-gdb
+maybe-dvi-gdb:
+
+dvi-gdb: \
+ configure-gdb
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-expect dvi-expect
+maybe-dvi-expect:
+
+dvi-expect: \
+ configure-expect
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-guile dvi-guile
+maybe-dvi-guile:
+
+dvi-guile: \
+ configure-guile
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-tk dvi-tk
+maybe-dvi-tk:
+
+dvi-tk: \
+ configure-tk
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-tix dvi-tix
+maybe-dvi-tix:
+
+dvi-tix: \
+ configure-tix
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-libtermcap dvi-libtermcap
+maybe-dvi-libtermcap:
+
+dvi-libtermcap: \
+ configure-libtermcap
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libtermcap" ; \
+ (cd libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-utils dvi-utils
+maybe-dvi-utils:
+
+dvi-utils: \
+ configure-utils
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-dvi-target-libstdc++-v3 dvi-target-libstdc++-v3
+maybe-dvi-target-libstdc++-v3:
+
+dvi-target-libstdc++-v3: \
+ configure-target-libstdc++-v3
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-newlib dvi-target-newlib
+maybe-dvi-target-newlib:
+
+dvi-target-newlib: \
+ configure-target-newlib
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libf2c dvi-target-libf2c
+maybe-dvi-target-libf2c:
+
+dvi-target-libf2c: \
+ configure-target-libf2c
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc
+maybe-dvi-target-libobjc:
+
+dvi-target-libobjc: \
+ configure-target-libobjc
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libtermcap dvi-target-libtermcap
+maybe-dvi-target-libtermcap:
+
+dvi-target-libtermcap: \
+ configure-target-libtermcap
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-winsup dvi-target-winsup
+maybe-dvi-target-winsup:
+
+dvi-target-winsup: \
+ configure-target-winsup
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libgloss dvi-target-libgloss
+maybe-dvi-target-libgloss:
+
+dvi-target-libgloss: \
+ configure-target-libgloss
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty
+maybe-dvi-target-libiberty:
+
+dvi-target-libiberty: \
+ configure-target-libiberty
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-gperf dvi-target-gperf
+maybe-dvi-target-gperf:
+
+dvi-target-gperf: \
+ configure-target-gperf
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-examples dvi-target-examples
+maybe-dvi-target-examples:
+
+dvi-target-examples: \
+ configure-target-examples
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libffi dvi-target-libffi
+maybe-dvi-target-libffi:
+
+dvi-target-libffi: \
+ configure-target-libffi
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-libjava dvi-target-libjava
+maybe-dvi-target-libjava:
+
+dvi-target-libjava: \
+ configure-target-libjava
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-zlib dvi-target-zlib
+maybe-dvi-target-zlib:
+
+dvi-target-zlib: \
+ configure-target-zlib
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-boehm-gc dvi-target-boehm-gc
+maybe-dvi-target-boehm-gc:
+
+dvi-target-boehm-gc: \
+ configure-target-boehm-gc
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads
+maybe-dvi-target-qthreads:
+
+dvi-target-qthreads: \
+ configure-target-qthreads
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+.PHONY: maybe-dvi-target-rda dvi-target-rda
+maybe-dvi-target-rda:
+
+dvi-target-rda: \
+ configure-target-rda
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+
+
+.PHONY: do-TAGS
+do-TAGS: TAGS-host TAGS-target
+
+.PHONY: TAGS-host
+TAGS-host: maybe-TAGS-gcc \
+ maybe-TAGS-ash \
+ maybe-TAGS-autoconf \
+ maybe-TAGS-automake \
+ maybe-TAGS-bash \
+ maybe-TAGS-bfd \
+ maybe-TAGS-opcodes \
+ maybe-TAGS-binutils \
+ maybe-TAGS-bison \
+ maybe-TAGS-byacc \
+ maybe-TAGS-bzip2 \
+ maybe-TAGS-dejagnu \
+ maybe-TAGS-diff \
+ maybe-TAGS-dosutils \
+ maybe-TAGS-etc \
+ maybe-TAGS-fastjar \
+ maybe-TAGS-fileutils \
+ maybe-TAGS-findutils \
+ maybe-TAGS-find \
+ maybe-TAGS-flex \
+ maybe-TAGS-gas \
+ maybe-TAGS-gawk \
+ maybe-TAGS-gettext \
+ maybe-TAGS-gnuserv \
+ maybe-TAGS-gprof \
+ maybe-TAGS-gzip \
+ maybe-TAGS-hello \
+ maybe-TAGS-indent \
+ maybe-TAGS-intl \
+ maybe-TAGS-tcl \
+ maybe-TAGS-itcl \
+ maybe-TAGS-ld \
+ maybe-TAGS-libgui \
+ maybe-TAGS-libiberty \
+ maybe-TAGS-libtool \
+ maybe-TAGS-m4 \
+ maybe-TAGS-make \
+ maybe-TAGS-mmalloc \
+ maybe-TAGS-patch \
+ maybe-TAGS-perl \
+ maybe-TAGS-prms \
+ maybe-TAGS-rcs \
+ maybe-TAGS-readline \
+ maybe-TAGS-release \
+ maybe-TAGS-recode \
+ maybe-TAGS-sed \
+ maybe-TAGS-send-pr \
+ maybe-TAGS-shellutils \
+ maybe-TAGS-sid \
+ maybe-TAGS-sim \
+ maybe-TAGS-tar \
+ maybe-TAGS-texinfo \
+ maybe-TAGS-textutils \
+ maybe-TAGS-time \
+ maybe-TAGS-uudecode \
+ maybe-TAGS-wdiff \
+ maybe-TAGS-zip \
+ maybe-TAGS-zlib \
+ maybe-TAGS-gdb \
+ maybe-TAGS-expect \
+ maybe-TAGS-guile \
+ maybe-TAGS-tk \
+ maybe-TAGS-tix \
+ maybe-TAGS-libtermcap \
+ maybe-TAGS-utils
+
+.PHONY: TAGS-target
+TAGS-target: \
+ maybe-TAGS-target-libstdc++-v3 \
+ maybe-TAGS-target-newlib \
+ maybe-TAGS-target-libf2c \
+ maybe-TAGS-target-libobjc \
+ maybe-TAGS-target-libtermcap \
+ maybe-TAGS-target-winsup \
+ maybe-TAGS-target-libgloss \
+ maybe-TAGS-target-libiberty \
+ maybe-TAGS-target-gperf \
+ maybe-TAGS-target-examples \
+ maybe-TAGS-target-libffi \
+ maybe-TAGS-target-libjava \
+ maybe-TAGS-target-zlib \
+ maybe-TAGS-target-boehm-gc \
+ maybe-TAGS-target-qthreads \
+ maybe-TAGS-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-TAGS-gcc TAGS-gcc
+maybe-TAGS-gcc:
+TAGS-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-TAGS-ash TAGS-ash
+maybe-TAGS-ash:
+
+TAGS-ash: \
+ configure-ash
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-autoconf TAGS-autoconf
+maybe-TAGS-autoconf:
+
+TAGS-autoconf: \
+ configure-autoconf
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-automake TAGS-automake
+maybe-TAGS-automake:
+
+TAGS-automake: \
+ configure-automake
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-bash TAGS-bash
+maybe-TAGS-bash:
+
+TAGS-bash: \
+ configure-bash
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-bfd TAGS-bfd
+maybe-TAGS-bfd:
+
+TAGS-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-opcodes TAGS-opcodes
+maybe-TAGS-opcodes:
+
+TAGS-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-binutils TAGS-binutils
+maybe-TAGS-binutils:
+
+TAGS-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-bison TAGS-bison
+maybe-TAGS-bison:
+
+TAGS-bison: \
+ configure-bison
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-byacc TAGS-byacc
+maybe-TAGS-byacc:
+
+TAGS-byacc: \
+ configure-byacc
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-bzip2 TAGS-bzip2
+maybe-TAGS-bzip2:
+
+TAGS-bzip2: \
+ configure-bzip2
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-dejagnu TAGS-dejagnu
+maybe-TAGS-dejagnu:
+
+TAGS-dejagnu: \
+ configure-dejagnu
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-diff TAGS-diff
+maybe-TAGS-diff:
+
+TAGS-diff: \
+ configure-diff
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-dosutils TAGS-dosutils
+maybe-TAGS-dosutils:
+
+TAGS-dosutils: \
+ configure-dosutils
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-etc TAGS-etc
+maybe-TAGS-etc:
+
+TAGS-etc: \
+ configure-etc
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-fastjar TAGS-fastjar
+maybe-TAGS-fastjar:
+
+TAGS-fastjar: \
+ configure-fastjar
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-fileutils TAGS-fileutils
+maybe-TAGS-fileutils:
+
+TAGS-fileutils: \
+ configure-fileutils
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-findutils TAGS-findutils
+maybe-TAGS-findutils:
+
+TAGS-findutils: \
+ configure-findutils
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-find TAGS-find
+maybe-TAGS-find:
+
+TAGS-find: \
+ configure-find
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-flex TAGS-flex
+maybe-TAGS-flex:
+
+TAGS-flex: \
+ configure-flex
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gas TAGS-gas
+maybe-TAGS-gas:
+
+TAGS-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gawk TAGS-gawk
+maybe-TAGS-gawk:
+
+TAGS-gawk: \
+ configure-gawk
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gettext TAGS-gettext
+maybe-TAGS-gettext:
+
+TAGS-gettext: \
+ configure-gettext
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv
+maybe-TAGS-gnuserv:
+
+TAGS-gnuserv: \
+ configure-gnuserv
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gprof TAGS-gprof
+maybe-TAGS-gprof:
+
+TAGS-gprof: \
+ configure-gprof
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gzip TAGS-gzip
+maybe-TAGS-gzip:
+
+TAGS-gzip: \
+ configure-gzip
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-hello TAGS-hello
+maybe-TAGS-hello:
+
+TAGS-hello: \
+ configure-hello
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-indent TAGS-indent
+maybe-TAGS-indent:
+
+TAGS-indent: \
+ configure-indent
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-intl TAGS-intl
+maybe-TAGS-intl:
+
+TAGS-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-tcl TAGS-tcl
+maybe-TAGS-tcl:
+
+TAGS-tcl: \
+ configure-tcl
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-itcl TAGS-itcl
+maybe-TAGS-itcl:
+
+TAGS-itcl: \
+ configure-itcl
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-ld TAGS-ld
+maybe-TAGS-ld:
+
+TAGS-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-libgui TAGS-libgui
+maybe-TAGS-libgui:
+
+TAGS-libgui: \
+ configure-libgui
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-libiberty TAGS-libiberty
+maybe-TAGS-libiberty:
+
+TAGS-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-libtool TAGS-libtool
+maybe-TAGS-libtool:
+
+TAGS-libtool: \
+ configure-libtool
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-m4 TAGS-m4
+maybe-TAGS-m4:
+
+TAGS-m4: \
+ configure-m4
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-make TAGS-make
+maybe-TAGS-make:
+
+TAGS-make: \
+ configure-make
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc
+maybe-TAGS-mmalloc:
+
+TAGS-mmalloc: \
+ configure-mmalloc
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-patch TAGS-patch
+maybe-TAGS-patch:
+
+TAGS-patch: \
+ configure-patch
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-perl TAGS-perl
+maybe-TAGS-perl:
+
+TAGS-perl: \
+ configure-perl
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-prms TAGS-prms
+maybe-TAGS-prms:
+
+TAGS-prms: \
+ configure-prms
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-rcs TAGS-rcs
+maybe-TAGS-rcs:
+
+TAGS-rcs: \
+ configure-rcs
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-readline TAGS-readline
+maybe-TAGS-readline:
+
+TAGS-readline: \
+ configure-readline
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-release TAGS-release
+maybe-TAGS-release:
+
+TAGS-release: \
+ configure-release
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-recode TAGS-recode
+maybe-TAGS-recode:
+
+TAGS-recode: \
+ configure-recode
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-sed TAGS-sed
+maybe-TAGS-sed:
+
+TAGS-sed: \
+ configure-sed
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-send-pr TAGS-send-pr
+maybe-TAGS-send-pr:
+
+TAGS-send-pr: \
+ configure-send-pr
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-shellutils TAGS-shellutils
+maybe-TAGS-shellutils:
+
+TAGS-shellutils: \
+ configure-shellutils
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-sid TAGS-sid
+maybe-TAGS-sid:
+
+TAGS-sid: \
+ configure-sid
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-sim TAGS-sim
+maybe-TAGS-sim:
+
+TAGS-sim: \
+ configure-sim
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-tar TAGS-tar
+maybe-TAGS-tar:
+
+TAGS-tar: \
+ configure-tar
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-texinfo TAGS-texinfo
+maybe-TAGS-texinfo:
+
+TAGS-texinfo: \
+ configure-texinfo
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-textutils TAGS-textutils
+maybe-TAGS-textutils:
+
+TAGS-textutils: \
+ configure-textutils
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-time TAGS-time
+maybe-TAGS-time:
+
+TAGS-time: \
+ configure-time
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-uudecode TAGS-uudecode
+maybe-TAGS-uudecode:
+
+TAGS-uudecode: \
+ configure-uudecode
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-wdiff TAGS-wdiff
+maybe-TAGS-wdiff:
+
+TAGS-wdiff: \
+ configure-wdiff
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-zip TAGS-zip
+maybe-TAGS-zip:
+
+TAGS-zip: \
+ configure-zip
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-zlib TAGS-zlib
+maybe-TAGS-zlib:
+
+TAGS-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-gdb TAGS-gdb
+maybe-TAGS-gdb:
+
+TAGS-gdb: \
+ configure-gdb
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-expect TAGS-expect
+maybe-TAGS-expect:
+
+TAGS-expect: \
+ configure-expect
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-guile TAGS-guile
+maybe-TAGS-guile:
+
+TAGS-guile: \
+ configure-guile
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-tk TAGS-tk
+maybe-TAGS-tk:
+
+TAGS-tk: \
+ configure-tk
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-tix TAGS-tix
+maybe-TAGS-tix:
+
+TAGS-tix: \
+ configure-tix
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-libtermcap TAGS-libtermcap
+maybe-TAGS-libtermcap:
+
+TAGS-libtermcap: \
+ configure-libtermcap
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libtermcap" ; \
+ (cd libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-utils TAGS-utils
+maybe-TAGS-utils:
+
+TAGS-utils: \
+ configure-utils
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3
+maybe-TAGS-target-libstdc++-v3:
+
+TAGS-target-libstdc++-v3: \
+ configure-target-libstdc++-v3
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib
+maybe-TAGS-target-newlib:
+
+TAGS-target-newlib: \
+ configure-target-newlib
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libf2c TAGS-target-libf2c
+maybe-TAGS-target-libf2c:
+
+TAGS-target-libf2c: \
+ configure-target-libf2c
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libobjc TAGS-target-libobjc
+maybe-TAGS-target-libobjc:
+
+TAGS-target-libobjc: \
+ configure-target-libobjc
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap
+maybe-TAGS-target-libtermcap:
+
+TAGS-target-libtermcap: \
+ configure-target-libtermcap
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-winsup TAGS-target-winsup
+maybe-TAGS-target-winsup:
+
+TAGS-target-winsup: \
+ configure-target-winsup
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss
+maybe-TAGS-target-libgloss:
+
+TAGS-target-libgloss: \
+ configure-target-libgloss
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty
+maybe-TAGS-target-libiberty:
+
+TAGS-target-libiberty: \
+ configure-target-libiberty
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf
+maybe-TAGS-target-gperf:
+
+TAGS-target-gperf: \
+ configure-target-gperf
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-examples TAGS-target-examples
+maybe-TAGS-target-examples:
+
+TAGS-target-examples: \
+ configure-target-examples
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libffi TAGS-target-libffi
+maybe-TAGS-target-libffi:
+
+TAGS-target-libffi: \
+ configure-target-libffi
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava
+maybe-TAGS-target-libjava:
+
+TAGS-target-libjava: \
+ configure-target-libjava
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-zlib TAGS-target-zlib
+maybe-TAGS-target-zlib:
+
+TAGS-target-zlib: \
+ configure-target-zlib
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc
+maybe-TAGS-target-boehm-gc:
+
+TAGS-target-boehm-gc: \
+ configure-target-boehm-gc
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads
+maybe-TAGS-target-qthreads:
+
+TAGS-target-qthreads: \
+ configure-target-qthreads
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+
+.PHONY: maybe-TAGS-target-rda TAGS-target-rda
+maybe-TAGS-target-rda:
+
+TAGS-target-rda: \
+ configure-target-rda
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
-.PHONY: do-info
-do-info:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- info) \
- || exit 1; \
- else true; fi; \
- done
.PHONY: do-install-info
-do-install-info:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- install-info) \
- || exit 1; \
- else true; fi; \
- done
+do-install-info: install-info-host install-info-target
+
+.PHONY: install-info-host
+install-info-host: maybe-install-info-gcc \
+ maybe-install-info-ash \
+ maybe-install-info-autoconf \
+ maybe-install-info-automake \
+ maybe-install-info-bash \
+ maybe-install-info-bfd \
+ maybe-install-info-opcodes \
+ maybe-install-info-binutils \
+ maybe-install-info-bison \
+ maybe-install-info-byacc \
+ maybe-install-info-bzip2 \
+ maybe-install-info-dejagnu \
+ maybe-install-info-diff \
+ maybe-install-info-dosutils \
+ maybe-install-info-etc \
+ maybe-install-info-fastjar \
+ maybe-install-info-fileutils \
+ maybe-install-info-findutils \
+ maybe-install-info-find \
+ maybe-install-info-flex \
+ maybe-install-info-gas \
+ maybe-install-info-gawk \
+ maybe-install-info-gettext \
+ maybe-install-info-gnuserv \
+ maybe-install-info-gprof \
+ maybe-install-info-gzip \
+ maybe-install-info-hello \
+ maybe-install-info-indent \
+ maybe-install-info-intl \
+ maybe-install-info-tcl \
+ maybe-install-info-itcl \
+ maybe-install-info-ld \
+ maybe-install-info-libgui \
+ maybe-install-info-libiberty \
+ maybe-install-info-libtool \
+ maybe-install-info-m4 \
+ maybe-install-info-make \
+ maybe-install-info-mmalloc \
+ maybe-install-info-patch \
+ maybe-install-info-perl \
+ maybe-install-info-prms \
+ maybe-install-info-rcs \
+ maybe-install-info-readline \
+ maybe-install-info-release \
+ maybe-install-info-recode \
+ maybe-install-info-sed \
+ maybe-install-info-send-pr \
+ maybe-install-info-shellutils \
+ maybe-install-info-sid \
+ maybe-install-info-sim \
+ maybe-install-info-tar \
+ maybe-install-info-texinfo \
+ maybe-install-info-textutils \
+ maybe-install-info-time \
+ maybe-install-info-uudecode \
+ maybe-install-info-wdiff \
+ maybe-install-info-zip \
+ maybe-install-info-zlib \
+ maybe-install-info-gdb \
+ maybe-install-info-expect \
+ maybe-install-info-guile \
+ maybe-install-info-tk \
+ maybe-install-info-tix \
+ maybe-install-info-libtermcap \
+ maybe-install-info-utils
+
+.PHONY: install-info-target
+install-info-target: \
+ maybe-install-info-target-libstdc++-v3 \
+ maybe-install-info-target-newlib \
+ maybe-install-info-target-libf2c \
+ maybe-install-info-target-libobjc \
+ maybe-install-info-target-libtermcap \
+ maybe-install-info-target-winsup \
+ maybe-install-info-target-libgloss \
+ maybe-install-info-target-libiberty \
+ maybe-install-info-target-gperf \
+ maybe-install-info-target-examples \
+ maybe-install-info-target-libffi \
+ maybe-install-info-target-libjava \
+ maybe-install-info-target-zlib \
+ maybe-install-info-target-boehm-gc \
+ maybe-install-info-target-qthreads \
+ maybe-install-info-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-install-info-gcc install-info-gcc
+maybe-install-info-gcc:
+install-info-gcc: \
+ configure-gcc \
+ info-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-install-info-ash install-info-ash
+maybe-install-info-ash:
+
+install-info-ash: \
+ configure-ash \
+ info-ash
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-autoconf install-info-autoconf
+maybe-install-info-autoconf:
+
+install-info-autoconf: \
+ configure-autoconf \
+ info-autoconf
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-automake install-info-automake
+maybe-install-info-automake:
+
+install-info-automake: \
+ configure-automake \
+ info-automake
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-bash install-info-bash
+maybe-install-info-bash:
+
+install-info-bash: \
+ configure-bash \
+ info-bash
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-bfd install-info-bfd
+maybe-install-info-bfd:
+
+install-info-bfd: \
+ configure-bfd \
+ info-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-opcodes install-info-opcodes
+maybe-install-info-opcodes:
+
+install-info-opcodes: \
+ configure-opcodes \
+ info-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-binutils install-info-binutils
+maybe-install-info-binutils:
+
+install-info-binutils: \
+ configure-binutils \
+ info-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-bison install-info-bison
+maybe-install-info-bison:
+
+install-info-bison: \
+ configure-bison \
+ info-bison
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-byacc install-info-byacc
+maybe-install-info-byacc:
+
+install-info-byacc: \
+ configure-byacc \
+ info-byacc
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-bzip2 install-info-bzip2
+maybe-install-info-bzip2:
+
+install-info-bzip2: \
+ configure-bzip2 \
+ info-bzip2
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-dejagnu install-info-dejagnu
+maybe-install-info-dejagnu:
+
+install-info-dejagnu: \
+ configure-dejagnu \
+ info-dejagnu
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-diff install-info-diff
+maybe-install-info-diff:
+
+install-info-diff: \
+ configure-diff \
+ info-diff
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-dosutils install-info-dosutils
+maybe-install-info-dosutils:
+
+install-info-dosutils: \
+ configure-dosutils \
+ info-dosutils
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-etc install-info-etc
+maybe-install-info-etc:
+
+install-info-etc: \
+ configure-etc \
+ info-etc
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-fastjar install-info-fastjar
+maybe-install-info-fastjar:
+
+install-info-fastjar: \
+ configure-fastjar \
+ info-fastjar
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-fileutils install-info-fileutils
+maybe-install-info-fileutils:
+
+install-info-fileutils: \
+ configure-fileutils \
+ info-fileutils
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-findutils install-info-findutils
+maybe-install-info-findutils:
+
+install-info-findutils: \
+ configure-findutils \
+ info-findutils
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-find install-info-find
+maybe-install-info-find:
+
+install-info-find: \
+ configure-find \
+ info-find
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-flex install-info-flex
+maybe-install-info-flex:
+
+install-info-flex: \
+ configure-flex \
+ info-flex
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gas install-info-gas
+maybe-install-info-gas:
+
+install-info-gas: \
+ configure-gas \
+ info-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gawk install-info-gawk
+maybe-install-info-gawk:
+
+install-info-gawk: \
+ configure-gawk \
+ info-gawk
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gettext install-info-gettext
+maybe-install-info-gettext:
+
+install-info-gettext: \
+ configure-gettext \
+ info-gettext
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gnuserv install-info-gnuserv
+maybe-install-info-gnuserv:
+
+install-info-gnuserv: \
+ configure-gnuserv \
+ info-gnuserv
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gprof install-info-gprof
+maybe-install-info-gprof:
+
+install-info-gprof: \
+ configure-gprof \
+ info-gprof
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gzip install-info-gzip
+maybe-install-info-gzip:
+
+install-info-gzip: \
+ configure-gzip \
+ info-gzip
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-hello install-info-hello
+maybe-install-info-hello:
+
+install-info-hello: \
+ configure-hello \
+ info-hello
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-indent install-info-indent
+maybe-install-info-indent:
+
+install-info-indent: \
+ configure-indent \
+ info-indent
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-intl install-info-intl
+maybe-install-info-intl:
+
+install-info-intl: \
+ configure-intl \
+ info-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-tcl install-info-tcl
+maybe-install-info-tcl:
+
+install-info-tcl: \
+ configure-tcl \
+ info-tcl
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-itcl install-info-itcl
+maybe-install-info-itcl:
+
+install-info-itcl: \
+ configure-itcl \
+ info-itcl
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-ld install-info-ld
+maybe-install-info-ld:
+
+install-info-ld: \
+ configure-ld \
+ info-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-libgui install-info-libgui
+maybe-install-info-libgui:
+
+install-info-libgui: \
+ configure-libgui \
+ info-libgui
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-libiberty install-info-libiberty
+maybe-install-info-libiberty:
+
+install-info-libiberty: \
+ configure-libiberty \
+ info-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-libtool install-info-libtool
+maybe-install-info-libtool:
+
+install-info-libtool: \
+ configure-libtool \
+ info-libtool
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-m4 install-info-m4
+maybe-install-info-m4:
+
+install-info-m4: \
+ configure-m4 \
+ info-m4
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-make install-info-make
+maybe-install-info-make:
+
+install-info-make: \
+ configure-make \
+ info-make
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-mmalloc install-info-mmalloc
+maybe-install-info-mmalloc:
+
+install-info-mmalloc: \
+ configure-mmalloc \
+ info-mmalloc
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-patch install-info-patch
+maybe-install-info-patch:
+
+install-info-patch: \
+ configure-patch \
+ info-patch
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-perl install-info-perl
+maybe-install-info-perl:
+
+install-info-perl: \
+ configure-perl \
+ info-perl
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-prms install-info-prms
+maybe-install-info-prms:
+
+install-info-prms: \
+ configure-prms \
+ info-prms
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-rcs install-info-rcs
+maybe-install-info-rcs:
+
+install-info-rcs: \
+ configure-rcs \
+ info-rcs
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-readline install-info-readline
+maybe-install-info-readline:
+
+install-info-readline: \
+ configure-readline \
+ info-readline
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-release install-info-release
+maybe-install-info-release:
+
+install-info-release: \
+ configure-release \
+ info-release
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-recode install-info-recode
+maybe-install-info-recode:
+
+install-info-recode: \
+ configure-recode \
+ info-recode
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-sed install-info-sed
+maybe-install-info-sed:
+
+install-info-sed: \
+ configure-sed \
+ info-sed
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-send-pr install-info-send-pr
+maybe-install-info-send-pr:
+
+install-info-send-pr: \
+ configure-send-pr \
+ info-send-pr
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-shellutils install-info-shellutils
+maybe-install-info-shellutils:
+
+install-info-shellutils: \
+ configure-shellutils \
+ info-shellutils
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-sid install-info-sid
+maybe-install-info-sid:
+
+install-info-sid: \
+ configure-sid \
+ info-sid
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-sim install-info-sim
+maybe-install-info-sim:
+
+install-info-sim: \
+ configure-sim \
+ info-sim
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-tar install-info-tar
+maybe-install-info-tar:
+
+install-info-tar: \
+ configure-tar \
+ info-tar
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-texinfo install-info-texinfo
+maybe-install-info-texinfo:
+
+install-info-texinfo: \
+ configure-texinfo \
+ info-texinfo
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-textutils install-info-textutils
+maybe-install-info-textutils:
+
+install-info-textutils: \
+ configure-textutils \
+ info-textutils
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-time install-info-time
+maybe-install-info-time:
+
+install-info-time: \
+ configure-time \
+ info-time
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-uudecode install-info-uudecode
+maybe-install-info-uudecode:
+
+install-info-uudecode: \
+ configure-uudecode \
+ info-uudecode
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-wdiff install-info-wdiff
+maybe-install-info-wdiff:
+
+install-info-wdiff: \
+ configure-wdiff \
+ info-wdiff
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-zip install-info-zip
+maybe-install-info-zip:
+
+install-info-zip: \
+ configure-zip \
+ info-zip
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-zlib install-info-zlib
+maybe-install-info-zlib:
+
+install-info-zlib: \
+ configure-zlib \
+ info-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-gdb install-info-gdb
+maybe-install-info-gdb:
+
+install-info-gdb: \
+ configure-gdb \
+ info-gdb
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-expect install-info-expect
+maybe-install-info-expect:
+
+install-info-expect: \
+ configure-expect \
+ info-expect
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-guile install-info-guile
+maybe-install-info-guile:
+
+install-info-guile: \
+ configure-guile \
+ info-guile
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-tk install-info-tk
+maybe-install-info-tk:
+
+install-info-tk: \
+ configure-tk \
+ info-tk
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-tix install-info-tix
+maybe-install-info-tix:
+
+install-info-tix: \
+ configure-tix \
+ info-tix
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-libtermcap install-info-libtermcap
+maybe-install-info-libtermcap:
+
+install-info-libtermcap: \
+ configure-libtermcap \
+ info-libtermcap
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libtermcap" ; \
+ (cd libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-utils install-info-utils
+maybe-install-info-utils:
+
+install-info-utils: \
+ configure-utils \
+ info-utils
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-install-info-target-libstdc++-v3 install-info-target-libstdc++-v3
+maybe-install-info-target-libstdc++-v3:
+
+install-info-target-libstdc++-v3: \
+ configure-target-libstdc++-v3 \
+ info-target-libstdc++-v3
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-newlib install-info-target-newlib
+maybe-install-info-target-newlib:
+
+install-info-target-newlib: \
+ configure-target-newlib \
+ info-target-newlib
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libf2c install-info-target-libf2c
+maybe-install-info-target-libf2c:
+
+install-info-target-libf2c: \
+ configure-target-libf2c \
+ info-target-libf2c
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libobjc install-info-target-libobjc
+maybe-install-info-target-libobjc:
+
+install-info-target-libobjc: \
+ configure-target-libobjc \
+ info-target-libobjc
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libtermcap install-info-target-libtermcap
+maybe-install-info-target-libtermcap:
+
+install-info-target-libtermcap: \
+ configure-target-libtermcap \
+ info-target-libtermcap
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-winsup install-info-target-winsup
+maybe-install-info-target-winsup:
+
+install-info-target-winsup: \
+ configure-target-winsup \
+ info-target-winsup
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libgloss install-info-target-libgloss
+maybe-install-info-target-libgloss:
+
+install-info-target-libgloss: \
+ configure-target-libgloss \
+ info-target-libgloss
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty
+maybe-install-info-target-libiberty:
+
+install-info-target-libiberty: \
+ configure-target-libiberty \
+ info-target-libiberty
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-gperf install-info-target-gperf
+maybe-install-info-target-gperf:
+
+install-info-target-gperf: \
+ configure-target-gperf \
+ info-target-gperf
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-examples install-info-target-examples
+maybe-install-info-target-examples:
+
+install-info-target-examples: \
+ configure-target-examples \
+ info-target-examples
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libffi install-info-target-libffi
+maybe-install-info-target-libffi:
+
+install-info-target-libffi: \
+ configure-target-libffi \
+ info-target-libffi
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-libjava install-info-target-libjava
+maybe-install-info-target-libjava:
+
+install-info-target-libjava: \
+ configure-target-libjava \
+ info-target-libjava
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-zlib install-info-target-zlib
+maybe-install-info-target-zlib:
+
+install-info-target-zlib: \
+ configure-target-zlib \
+ info-target-zlib
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-boehm-gc install-info-target-boehm-gc
+maybe-install-info-target-boehm-gc:
+
+install-info-target-boehm-gc: \
+ configure-target-boehm-gc \
+ info-target-boehm-gc
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads
+maybe-install-info-target-qthreads:
+
+install-info-target-qthreads: \
+ configure-target-qthreads \
+ info-target-qthreads
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
+.PHONY: maybe-install-info-target-rda install-info-target-rda
+maybe-install-info-target-rda:
+
+install-info-target-rda: \
+ configure-target-rda \
+ info-target-rda
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+
.PHONY: do-installcheck
-do-installcheck:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- installcheck) \
- || exit 1; \
- else true; fi; \
- done
+do-installcheck: installcheck-host installcheck-target
+
+.PHONY: installcheck-host
+installcheck-host: maybe-installcheck-gcc \
+ maybe-installcheck-ash \
+ maybe-installcheck-autoconf \
+ maybe-installcheck-automake \
+ maybe-installcheck-bash \
+ maybe-installcheck-bfd \
+ maybe-installcheck-opcodes \
+ maybe-installcheck-binutils \
+ maybe-installcheck-bison \
+ maybe-installcheck-byacc \
+ maybe-installcheck-bzip2 \
+ maybe-installcheck-dejagnu \
+ maybe-installcheck-diff \
+ maybe-installcheck-dosutils \
+ maybe-installcheck-etc \
+ maybe-installcheck-fastjar \
+ maybe-installcheck-fileutils \
+ maybe-installcheck-findutils \
+ maybe-installcheck-find \
+ maybe-installcheck-flex \
+ maybe-installcheck-gas \
+ maybe-installcheck-gawk \
+ maybe-installcheck-gettext \
+ maybe-installcheck-gnuserv \
+ maybe-installcheck-gprof \
+ maybe-installcheck-gzip \
+ maybe-installcheck-hello \
+ maybe-installcheck-indent \
+ maybe-installcheck-intl \
+ maybe-installcheck-tcl \
+ maybe-installcheck-itcl \
+ maybe-installcheck-ld \
+ maybe-installcheck-libgui \
+ maybe-installcheck-libiberty \
+ maybe-installcheck-libtool \
+ maybe-installcheck-m4 \
+ maybe-installcheck-make \
+ maybe-installcheck-mmalloc \
+ maybe-installcheck-patch \
+ maybe-installcheck-perl \
+ maybe-installcheck-prms \
+ maybe-installcheck-rcs \
+ maybe-installcheck-readline \
+ maybe-installcheck-release \
+ maybe-installcheck-recode \
+ maybe-installcheck-sed \
+ maybe-installcheck-send-pr \
+ maybe-installcheck-shellutils \
+ maybe-installcheck-sid \
+ maybe-installcheck-sim \
+ maybe-installcheck-tar \
+ maybe-installcheck-texinfo \
+ maybe-installcheck-textutils \
+ maybe-installcheck-time \
+ maybe-installcheck-uudecode \
+ maybe-installcheck-wdiff \
+ maybe-installcheck-zip \
+ maybe-installcheck-zlib \
+ maybe-installcheck-gdb \
+ maybe-installcheck-expect \
+ maybe-installcheck-guile \
+ maybe-installcheck-tk \
+ maybe-installcheck-tix \
+ maybe-installcheck-libtermcap \
+ maybe-installcheck-utils
+
+.PHONY: installcheck-target
+installcheck-target: \
+ maybe-installcheck-target-libstdc++-v3 \
+ maybe-installcheck-target-newlib \
+ maybe-installcheck-target-libf2c \
+ maybe-installcheck-target-libobjc \
+ maybe-installcheck-target-libtermcap \
+ maybe-installcheck-target-winsup \
+ maybe-installcheck-target-libgloss \
+ maybe-installcheck-target-libiberty \
+ maybe-installcheck-target-gperf \
+ maybe-installcheck-target-examples \
+ maybe-installcheck-target-libffi \
+ maybe-installcheck-target-libjava \
+ maybe-installcheck-target-zlib \
+ maybe-installcheck-target-boehm-gc \
+ maybe-installcheck-target-qthreads \
+ maybe-installcheck-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-installcheck-gcc installcheck-gcc
+maybe-installcheck-gcc:
+installcheck-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-installcheck-ash installcheck-ash
+maybe-installcheck-ash:
+
+installcheck-ash: \
+ configure-ash
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-autoconf installcheck-autoconf
+maybe-installcheck-autoconf:
+
+installcheck-autoconf: \
+ configure-autoconf
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-automake installcheck-automake
+maybe-installcheck-automake:
+
+installcheck-automake: \
+ configure-automake
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-bash installcheck-bash
+maybe-installcheck-bash:
+
+installcheck-bash: \
+ configure-bash
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-bfd installcheck-bfd
+maybe-installcheck-bfd:
+
+installcheck-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-opcodes installcheck-opcodes
+maybe-installcheck-opcodes:
+
+installcheck-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-binutils installcheck-binutils
+maybe-installcheck-binutils:
+
+installcheck-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-bison installcheck-bison
+maybe-installcheck-bison:
+
+installcheck-bison: \
+ configure-bison
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-byacc installcheck-byacc
+maybe-installcheck-byacc:
+
+installcheck-byacc: \
+ configure-byacc
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-bzip2 installcheck-bzip2
+maybe-installcheck-bzip2:
+
+installcheck-bzip2: \
+ configure-bzip2
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-dejagnu installcheck-dejagnu
+maybe-installcheck-dejagnu:
+
+installcheck-dejagnu: \
+ configure-dejagnu
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-diff installcheck-diff
+maybe-installcheck-diff:
+
+installcheck-diff: \
+ configure-diff
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-dosutils installcheck-dosutils
+maybe-installcheck-dosutils:
+
+installcheck-dosutils: \
+ configure-dosutils
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-etc installcheck-etc
+maybe-installcheck-etc:
+
+installcheck-etc: \
+ configure-etc
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-fastjar installcheck-fastjar
+maybe-installcheck-fastjar:
+
+installcheck-fastjar: \
+ configure-fastjar
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-fileutils installcheck-fileutils
+maybe-installcheck-fileutils:
+
+installcheck-fileutils: \
+ configure-fileutils
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-findutils installcheck-findutils
+maybe-installcheck-findutils:
+
+installcheck-findutils: \
+ configure-findutils
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-find installcheck-find
+maybe-installcheck-find:
+
+installcheck-find: \
+ configure-find
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-flex installcheck-flex
+maybe-installcheck-flex:
+
+installcheck-flex: \
+ configure-flex
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gas installcheck-gas
+maybe-installcheck-gas:
+
+installcheck-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gawk installcheck-gawk
+maybe-installcheck-gawk:
+
+installcheck-gawk: \
+ configure-gawk
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gettext installcheck-gettext
+maybe-installcheck-gettext:
+
+installcheck-gettext: \
+ configure-gettext
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv
+maybe-installcheck-gnuserv:
+
+installcheck-gnuserv: \
+ configure-gnuserv
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gprof installcheck-gprof
+maybe-installcheck-gprof:
+
+installcheck-gprof: \
+ configure-gprof
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gzip installcheck-gzip
+maybe-installcheck-gzip:
+
+installcheck-gzip: \
+ configure-gzip
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-hello installcheck-hello
+maybe-installcheck-hello:
+
+installcheck-hello: \
+ configure-hello
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-indent installcheck-indent
+maybe-installcheck-indent:
+
+installcheck-indent: \
+ configure-indent
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-intl installcheck-intl
+maybe-installcheck-intl:
+
+installcheck-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-tcl installcheck-tcl
+maybe-installcheck-tcl:
+
+installcheck-tcl: \
+ configure-tcl
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-itcl installcheck-itcl
+maybe-installcheck-itcl:
+
+installcheck-itcl: \
+ configure-itcl
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-ld installcheck-ld
+maybe-installcheck-ld:
+
+installcheck-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-libgui installcheck-libgui
+maybe-installcheck-libgui:
+
+installcheck-libgui: \
+ configure-libgui
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-libiberty installcheck-libiberty
+maybe-installcheck-libiberty:
+
+installcheck-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-libtool installcheck-libtool
+maybe-installcheck-libtool:
+
+installcheck-libtool: \
+ configure-libtool
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-m4 installcheck-m4
+maybe-installcheck-m4:
+
+installcheck-m4: \
+ configure-m4
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-make installcheck-make
+maybe-installcheck-make:
+
+installcheck-make: \
+ configure-make
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc
+maybe-installcheck-mmalloc:
+
+installcheck-mmalloc: \
+ configure-mmalloc
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-patch installcheck-patch
+maybe-installcheck-patch:
+
+installcheck-patch: \
+ configure-patch
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-perl installcheck-perl
+maybe-installcheck-perl:
+
+installcheck-perl: \
+ configure-perl
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-prms installcheck-prms
+maybe-installcheck-prms:
+
+installcheck-prms: \
+ configure-prms
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-rcs installcheck-rcs
+maybe-installcheck-rcs:
+
+installcheck-rcs: \
+ configure-rcs
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-readline installcheck-readline
+maybe-installcheck-readline:
+
+installcheck-readline: \
+ configure-readline
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-release installcheck-release
+maybe-installcheck-release:
+
+installcheck-release: \
+ configure-release
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-recode installcheck-recode
+maybe-installcheck-recode:
+
+installcheck-recode: \
+ configure-recode
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-sed installcheck-sed
+maybe-installcheck-sed:
+
+installcheck-sed: \
+ configure-sed
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-send-pr installcheck-send-pr
+maybe-installcheck-send-pr:
+
+installcheck-send-pr: \
+ configure-send-pr
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-shellutils installcheck-shellutils
+maybe-installcheck-shellutils:
+
+installcheck-shellutils: \
+ configure-shellutils
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-sid installcheck-sid
+maybe-installcheck-sid:
+
+installcheck-sid: \
+ configure-sid
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-sim installcheck-sim
+maybe-installcheck-sim:
+
+installcheck-sim: \
+ configure-sim
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-tar installcheck-tar
+maybe-installcheck-tar:
+
+installcheck-tar: \
+ configure-tar
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-texinfo installcheck-texinfo
+maybe-installcheck-texinfo:
+
+installcheck-texinfo: \
+ configure-texinfo
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-textutils installcheck-textutils
+maybe-installcheck-textutils:
+
+installcheck-textutils: \
+ configure-textutils
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-time installcheck-time
+maybe-installcheck-time:
+
+installcheck-time: \
+ configure-time
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-uudecode installcheck-uudecode
+maybe-installcheck-uudecode:
+
+installcheck-uudecode: \
+ configure-uudecode
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-wdiff installcheck-wdiff
+maybe-installcheck-wdiff:
+
+installcheck-wdiff: \
+ configure-wdiff
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-zip installcheck-zip
+maybe-installcheck-zip:
+
+installcheck-zip: \
+ configure-zip
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-zlib installcheck-zlib
+maybe-installcheck-zlib:
+
+installcheck-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-gdb installcheck-gdb
+maybe-installcheck-gdb:
+
+installcheck-gdb: \
+ configure-gdb
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-expect installcheck-expect
+maybe-installcheck-expect:
+
+installcheck-expect: \
+ configure-expect
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-guile installcheck-guile
+maybe-installcheck-guile:
+
+installcheck-guile: \
+ configure-guile
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-tk installcheck-tk
+maybe-installcheck-tk:
+
+installcheck-tk: \
+ configure-tk
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-tix installcheck-tix
+maybe-installcheck-tix:
+
+installcheck-tix: \
+ configure-tix
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-libtermcap installcheck-libtermcap
+maybe-installcheck-libtermcap:
+
+installcheck-libtermcap: \
+ configure-libtermcap
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libtermcap" ; \
+ (cd libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-utils installcheck-utils
+maybe-installcheck-utils:
+
+installcheck-utils: \
+ configure-utils
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3
+maybe-installcheck-target-libstdc++-v3:
+
+installcheck-target-libstdc++-v3: \
+ configure-target-libstdc++-v3
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib
+maybe-installcheck-target-newlib:
+
+installcheck-target-newlib: \
+ configure-target-newlib
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libf2c installcheck-target-libf2c
+maybe-installcheck-target-libf2c:
+
+installcheck-target-libf2c: \
+ configure-target-libf2c
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libobjc installcheck-target-libobjc
+maybe-installcheck-target-libobjc:
+
+installcheck-target-libobjc: \
+ configure-target-libobjc
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libtermcap installcheck-target-libtermcap
+maybe-installcheck-target-libtermcap:
+
+installcheck-target-libtermcap: \
+ configure-target-libtermcap
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-winsup installcheck-target-winsup
+maybe-installcheck-target-winsup:
+
+installcheck-target-winsup: \
+ configure-target-winsup
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libgloss installcheck-target-libgloss
+maybe-installcheck-target-libgloss:
+
+installcheck-target-libgloss: \
+ configure-target-libgloss
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty
+maybe-installcheck-target-libiberty:
+
+installcheck-target-libiberty: \
+ configure-target-libiberty
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf
+maybe-installcheck-target-gperf:
+
+installcheck-target-gperf: \
+ configure-target-gperf
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-examples installcheck-target-examples
+maybe-installcheck-target-examples:
+
+installcheck-target-examples: \
+ configure-target-examples
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libffi installcheck-target-libffi
+maybe-installcheck-target-libffi:
+
+installcheck-target-libffi: \
+ configure-target-libffi
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava
+maybe-installcheck-target-libjava:
+
+installcheck-target-libjava: \
+ configure-target-libjava
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-zlib installcheck-target-zlib
+maybe-installcheck-target-zlib:
+
+installcheck-target-zlib: \
+ configure-target-zlib
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-boehm-gc installcheck-target-boehm-gc
+maybe-installcheck-target-boehm-gc:
+
+installcheck-target-boehm-gc: \
+ configure-target-boehm-gc
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads
+maybe-installcheck-target-qthreads:
+
+installcheck-target-qthreads: \
+ configure-target-qthreads
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
+.PHONY: maybe-installcheck-target-rda installcheck-target-rda
+maybe-installcheck-target-rda:
+
+installcheck-target-rda: \
+ configure-target-rda
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+
.PHONY: do-mostlyclean
-do-mostlyclean:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- mostlyclean) \
- || exit 1; \
- else true; fi; \
- done
+do-mostlyclean: mostlyclean-host mostlyclean-target
+
+.PHONY: mostlyclean-host
+mostlyclean-host: maybe-mostlyclean-gcc \
+ maybe-mostlyclean-ash \
+ maybe-mostlyclean-autoconf \
+ maybe-mostlyclean-automake \
+ maybe-mostlyclean-bash \
+ maybe-mostlyclean-bfd \
+ maybe-mostlyclean-opcodes \
+ maybe-mostlyclean-binutils \
+ maybe-mostlyclean-bison \
+ maybe-mostlyclean-byacc \
+ maybe-mostlyclean-bzip2 \
+ maybe-mostlyclean-dejagnu \
+ maybe-mostlyclean-diff \
+ maybe-mostlyclean-dosutils \
+ maybe-mostlyclean-etc \
+ maybe-mostlyclean-fastjar \
+ maybe-mostlyclean-fileutils \
+ maybe-mostlyclean-findutils \
+ maybe-mostlyclean-find \
+ maybe-mostlyclean-flex \
+ maybe-mostlyclean-gas \
+ maybe-mostlyclean-gawk \
+ maybe-mostlyclean-gettext \
+ maybe-mostlyclean-gnuserv \
+ maybe-mostlyclean-gprof \
+ maybe-mostlyclean-gzip \
+ maybe-mostlyclean-hello \
+ maybe-mostlyclean-indent \
+ maybe-mostlyclean-intl \
+ maybe-mostlyclean-tcl \
+ maybe-mostlyclean-itcl \
+ maybe-mostlyclean-ld \
+ maybe-mostlyclean-libgui \
+ maybe-mostlyclean-libiberty \
+ maybe-mostlyclean-libtool \
+ maybe-mostlyclean-m4 \
+ maybe-mostlyclean-make \
+ maybe-mostlyclean-mmalloc \
+ maybe-mostlyclean-patch \
+ maybe-mostlyclean-perl \
+ maybe-mostlyclean-prms \
+ maybe-mostlyclean-rcs \
+ maybe-mostlyclean-readline \
+ maybe-mostlyclean-release \
+ maybe-mostlyclean-recode \
+ maybe-mostlyclean-sed \
+ maybe-mostlyclean-send-pr \
+ maybe-mostlyclean-shellutils \
+ maybe-mostlyclean-sid \
+ maybe-mostlyclean-sim \
+ maybe-mostlyclean-tar \
+ maybe-mostlyclean-texinfo \
+ maybe-mostlyclean-textutils \
+ maybe-mostlyclean-time \
+ maybe-mostlyclean-uudecode \
+ maybe-mostlyclean-wdiff \
+ maybe-mostlyclean-zip \
+ maybe-mostlyclean-zlib \
+ maybe-mostlyclean-gdb \
+ maybe-mostlyclean-expect \
+ maybe-mostlyclean-guile \
+ maybe-mostlyclean-tk \
+ maybe-mostlyclean-tix \
+ maybe-mostlyclean-libtermcap \
+ maybe-mostlyclean-utils
+
+.PHONY: mostlyclean-target
+mostlyclean-target: \
+ maybe-mostlyclean-target-libstdc++-v3 \
+ maybe-mostlyclean-target-newlib \
+ maybe-mostlyclean-target-libf2c \
+ maybe-mostlyclean-target-libobjc \
+ maybe-mostlyclean-target-libtermcap \
+ maybe-mostlyclean-target-winsup \
+ maybe-mostlyclean-target-libgloss \
+ maybe-mostlyclean-target-libiberty \
+ maybe-mostlyclean-target-gperf \
+ maybe-mostlyclean-target-examples \
+ maybe-mostlyclean-target-libffi \
+ maybe-mostlyclean-target-libjava \
+ maybe-mostlyclean-target-zlib \
+ maybe-mostlyclean-target-boehm-gc \
+ maybe-mostlyclean-target-qthreads \
+ maybe-mostlyclean-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc
+maybe-mostlyclean-gcc:
+mostlyclean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-mostlyclean-ash mostlyclean-ash
+maybe-mostlyclean-ash:
+
+mostlyclean-ash:
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf
+maybe-mostlyclean-autoconf:
+
+mostlyclean-autoconf:
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-automake mostlyclean-automake
+maybe-mostlyclean-automake:
+
+mostlyclean-automake:
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-bash mostlyclean-bash
+maybe-mostlyclean-bash:
+
+mostlyclean-bash:
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd
+maybe-mostlyclean-bfd:
+
+mostlyclean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-opcodes mostlyclean-opcodes
+maybe-mostlyclean-opcodes:
+
+mostlyclean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-binutils mostlyclean-binutils
+maybe-mostlyclean-binutils:
+
+mostlyclean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-bison mostlyclean-bison
+maybe-mostlyclean-bison:
+
+mostlyclean-bison:
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc
+maybe-mostlyclean-byacc:
+
+mostlyclean-byacc:
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2
+maybe-mostlyclean-bzip2:
+
+mostlyclean-bzip2:
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-dejagnu mostlyclean-dejagnu
+maybe-mostlyclean-dejagnu:
+
+mostlyclean-dejagnu:
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-diff mostlyclean-diff
+maybe-mostlyclean-diff:
+
+mostlyclean-diff:
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils
+maybe-mostlyclean-dosutils:
+
+mostlyclean-dosutils:
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-etc mostlyclean-etc
+maybe-mostlyclean-etc:
+
+mostlyclean-etc:
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-fastjar mostlyclean-fastjar
+maybe-mostlyclean-fastjar:
+
+mostlyclean-fastjar:
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils
+maybe-mostlyclean-fileutils:
+
+mostlyclean-fileutils:
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils
+maybe-mostlyclean-findutils:
+
+mostlyclean-findutils:
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-find mostlyclean-find
+maybe-mostlyclean-find:
+
+mostlyclean-find:
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-flex mostlyclean-flex
+maybe-mostlyclean-flex:
+
+mostlyclean-flex:
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gas mostlyclean-gas
+maybe-mostlyclean-gas:
+
+mostlyclean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk
+maybe-mostlyclean-gawk:
+
+mostlyclean-gawk:
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext
+maybe-mostlyclean-gettext:
+
+mostlyclean-gettext:
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv
+maybe-mostlyclean-gnuserv:
+
+mostlyclean-gnuserv:
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof
+maybe-mostlyclean-gprof:
+
+mostlyclean-gprof:
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip
+maybe-mostlyclean-gzip:
+
+mostlyclean-gzip:
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-hello mostlyclean-hello
+maybe-mostlyclean-hello:
+
+mostlyclean-hello:
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-indent mostlyclean-indent
+maybe-mostlyclean-indent:
+
+mostlyclean-indent:
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-intl mostlyclean-intl
+maybe-mostlyclean-intl:
+
+mostlyclean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-tcl mostlyclean-tcl
+maybe-mostlyclean-tcl:
+
+# tcl doesn't support mostlyclean.
+mostlyclean-tcl:
+
+
+.PHONY: maybe-mostlyclean-itcl mostlyclean-itcl
+maybe-mostlyclean-itcl:
+
+mostlyclean-itcl:
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-ld mostlyclean-ld
+maybe-mostlyclean-ld:
+
+mostlyclean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-libgui mostlyclean-libgui
+maybe-mostlyclean-libgui:
+
+mostlyclean-libgui:
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-libiberty mostlyclean-libiberty
+maybe-mostlyclean-libiberty:
+
+mostlyclean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool
+maybe-mostlyclean-libtool:
+
+mostlyclean-libtool:
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-m4 mostlyclean-m4
+maybe-mostlyclean-m4:
+
+mostlyclean-m4:
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-make mostlyclean-make
+maybe-mostlyclean-make:
+
+mostlyclean-make:
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc
+maybe-mostlyclean-mmalloc:
+
+mostlyclean-mmalloc:
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-patch mostlyclean-patch
+maybe-mostlyclean-patch:
+
+mostlyclean-patch:
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-perl mostlyclean-perl
+maybe-mostlyclean-perl:
+
+mostlyclean-perl:
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-prms mostlyclean-prms
+maybe-mostlyclean-prms:
+
+mostlyclean-prms:
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs
+maybe-mostlyclean-rcs:
+
+mostlyclean-rcs:
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-readline mostlyclean-readline
+maybe-mostlyclean-readline:
+
+mostlyclean-readline:
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-release mostlyclean-release
+maybe-mostlyclean-release:
+
+mostlyclean-release:
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-recode mostlyclean-recode
+maybe-mostlyclean-recode:
+
+mostlyclean-recode:
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-sed mostlyclean-sed
+maybe-mostlyclean-sed:
+
+mostlyclean-sed:
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr
+maybe-mostlyclean-send-pr:
+
+mostlyclean-send-pr:
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils
+maybe-mostlyclean-shellutils:
+
+mostlyclean-shellutils:
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-sid mostlyclean-sid
+maybe-mostlyclean-sid:
+
+mostlyclean-sid:
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-sim mostlyclean-sim
+maybe-mostlyclean-sim:
+
+mostlyclean-sim:
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-tar mostlyclean-tar
+maybe-mostlyclean-tar:
+
+mostlyclean-tar:
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-texinfo mostlyclean-texinfo
+maybe-mostlyclean-texinfo:
+
+mostlyclean-texinfo:
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils
+maybe-mostlyclean-textutils:
+
+mostlyclean-textutils:
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-time mostlyclean-time
+maybe-mostlyclean-time:
+
+mostlyclean-time:
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode
+maybe-mostlyclean-uudecode:
+
+mostlyclean-uudecode:
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff
+maybe-mostlyclean-wdiff:
+
+mostlyclean-wdiff:
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-zip mostlyclean-zip
+maybe-mostlyclean-zip:
+
+mostlyclean-zip:
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-zlib mostlyclean-zlib
+maybe-mostlyclean-zlib:
+
+mostlyclean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-gdb mostlyclean-gdb
+maybe-mostlyclean-gdb:
+
+mostlyclean-gdb:
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-expect mostlyclean-expect
+maybe-mostlyclean-expect:
+
+mostlyclean-expect:
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-guile mostlyclean-guile
+maybe-mostlyclean-guile:
+
+mostlyclean-guile:
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-tk mostlyclean-tk
+maybe-mostlyclean-tk:
+
+mostlyclean-tk:
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-tix mostlyclean-tix
+maybe-mostlyclean-tix:
+
+mostlyclean-tix:
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-libtermcap mostlyclean-libtermcap
+maybe-mostlyclean-libtermcap:
+
+# libtermcap doesn't support mostlyclean.
+mostlyclean-libtermcap:
+
+
+.PHONY: maybe-mostlyclean-utils mostlyclean-utils
+maybe-mostlyclean-utils:
+
+mostlyclean-utils:
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3
+maybe-mostlyclean-target-libstdc++-v3:
+
+mostlyclean-target-libstdc++-v3:
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib
+maybe-mostlyclean-target-newlib:
+
+mostlyclean-target-newlib:
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libf2c mostlyclean-target-libf2c
+maybe-mostlyclean-target-libf2c:
+
+mostlyclean-target-libf2c:
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libobjc mostlyclean-target-libobjc
+maybe-mostlyclean-target-libobjc:
+
+mostlyclean-target-libobjc:
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libtermcap mostlyclean-target-libtermcap
+maybe-mostlyclean-target-libtermcap:
+
+# libtermcap doesn't support mostlyclean.
+mostlyclean-libtermcap:
+
+
+.PHONY: maybe-mostlyclean-target-winsup mostlyclean-target-winsup
+maybe-mostlyclean-target-winsup:
+
+mostlyclean-target-winsup:
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libgloss mostlyclean-target-libgloss
+maybe-mostlyclean-target-libgloss:
+
+mostlyclean-target-libgloss:
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty
+maybe-mostlyclean-target-libiberty:
+
+mostlyclean-target-libiberty:
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf
+maybe-mostlyclean-target-gperf:
+
+mostlyclean-target-gperf:
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples
+maybe-mostlyclean-target-examples:
+
+mostlyclean-target-examples:
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libffi mostlyclean-target-libffi
+maybe-mostlyclean-target-libffi:
+
+mostlyclean-target-libffi:
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava
+maybe-mostlyclean-target-libjava:
+
+mostlyclean-target-libjava:
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-zlib mostlyclean-target-zlib
+maybe-mostlyclean-target-zlib:
+
+mostlyclean-target-zlib:
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc
+maybe-mostlyclean-target-boehm-gc:
+
+mostlyclean-target-boehm-gc:
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads
+maybe-mostlyclean-target-qthreads:
+
+mostlyclean-target-qthreads:
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+.PHONY: maybe-mostlyclean-target-rda mostlyclean-target-rda
+maybe-mostlyclean-target-rda:
+
+mostlyclean-target-rda:
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+
+
+.PHONY: do-clean
+do-clean: clean-host clean-target
+
+.PHONY: clean-host
+clean-host: maybe-clean-gcc \
+ maybe-clean-ash \
+ maybe-clean-autoconf \
+ maybe-clean-automake \
+ maybe-clean-bash \
+ maybe-clean-bfd \
+ maybe-clean-opcodes \
+ maybe-clean-binutils \
+ maybe-clean-bison \
+ maybe-clean-byacc \
+ maybe-clean-bzip2 \
+ maybe-clean-dejagnu \
+ maybe-clean-diff \
+ maybe-clean-dosutils \
+ maybe-clean-etc \
+ maybe-clean-fastjar \
+ maybe-clean-fileutils \
+ maybe-clean-findutils \
+ maybe-clean-find \
+ maybe-clean-flex \
+ maybe-clean-gas \
+ maybe-clean-gawk \
+ maybe-clean-gettext \
+ maybe-clean-gnuserv \
+ maybe-clean-gprof \
+ maybe-clean-gzip \
+ maybe-clean-hello \
+ maybe-clean-indent \
+ maybe-clean-intl \
+ maybe-clean-tcl \
+ maybe-clean-itcl \
+ maybe-clean-ld \
+ maybe-clean-libgui \
+ maybe-clean-libiberty \
+ maybe-clean-libtool \
+ maybe-clean-m4 \
+ maybe-clean-make \
+ maybe-clean-mmalloc \
+ maybe-clean-patch \
+ maybe-clean-perl \
+ maybe-clean-prms \
+ maybe-clean-rcs \
+ maybe-clean-readline \
+ maybe-clean-release \
+ maybe-clean-recode \
+ maybe-clean-sed \
+ maybe-clean-send-pr \
+ maybe-clean-shellutils \
+ maybe-clean-sid \
+ maybe-clean-sim \
+ maybe-clean-tar \
+ maybe-clean-texinfo \
+ maybe-clean-textutils \
+ maybe-clean-time \
+ maybe-clean-uudecode \
+ maybe-clean-wdiff \
+ maybe-clean-zip \
+ maybe-clean-zlib \
+ maybe-clean-gdb \
+ maybe-clean-expect \
+ maybe-clean-guile \
+ maybe-clean-tk \
+ maybe-clean-tix \
+ maybe-clean-libtermcap \
+ maybe-clean-utils
+
+.PHONY: clean-target
+clean-target: \
+ maybe-clean-target-libstdc++-v3 \
+ maybe-clean-target-newlib \
+ maybe-clean-target-libf2c \
+ maybe-clean-target-libobjc \
+ maybe-clean-target-libtermcap \
+ maybe-clean-target-winsup \
+ maybe-clean-target-libgloss \
+ maybe-clean-target-libiberty \
+ maybe-clean-target-gperf \
+ maybe-clean-target-examples \
+ maybe-clean-target-libffi \
+ maybe-clean-target-libjava \
+ maybe-clean-target-zlib \
+ maybe-clean-target-boehm-gc \
+ maybe-clean-target-qthreads \
+ maybe-clean-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-clean-gcc clean-gcc
+maybe-clean-gcc:
+clean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-clean-ash clean-ash
+maybe-clean-ash:
+
+clean-ash:
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-autoconf clean-autoconf
+maybe-clean-autoconf:
+
+clean-autoconf:
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-automake clean-automake
+maybe-clean-automake:
+
+clean-automake:
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-bash clean-bash
+maybe-clean-bash:
+
+clean-bash:
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-bfd clean-bfd
+maybe-clean-bfd:
+
+clean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-opcodes clean-opcodes
+maybe-clean-opcodes:
+
+clean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-binutils clean-binutils
+maybe-clean-binutils:
+
+clean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-bison clean-bison
+maybe-clean-bison:
+
+clean-bison:
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-byacc clean-byacc
+maybe-clean-byacc:
+
+clean-byacc:
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-bzip2 clean-bzip2
+maybe-clean-bzip2:
+
+clean-bzip2:
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-dejagnu clean-dejagnu
+maybe-clean-dejagnu:
+
+clean-dejagnu:
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-diff clean-diff
+maybe-clean-diff:
+
+clean-diff:
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-dosutils clean-dosutils
+maybe-clean-dosutils:
+
+clean-dosutils:
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-etc clean-etc
+maybe-clean-etc:
+
+clean-etc:
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-fastjar clean-fastjar
+maybe-clean-fastjar:
+
+clean-fastjar:
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-fileutils clean-fileutils
+maybe-clean-fileutils:
+
+clean-fileutils:
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-findutils clean-findutils
+maybe-clean-findutils:
+
+clean-findutils:
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-find clean-find
+maybe-clean-find:
+
+clean-find:
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-flex clean-flex
+maybe-clean-flex:
+
+clean-flex:
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gas clean-gas
+maybe-clean-gas:
+
+clean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gawk clean-gawk
+maybe-clean-gawk:
+
+clean-gawk:
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gettext clean-gettext
+maybe-clean-gettext:
+
+clean-gettext:
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gnuserv clean-gnuserv
+maybe-clean-gnuserv:
+
+clean-gnuserv:
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gprof clean-gprof
+maybe-clean-gprof:
+
+clean-gprof:
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gzip clean-gzip
+maybe-clean-gzip:
+
+clean-gzip:
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-hello clean-hello
+maybe-clean-hello:
+
+clean-hello:
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-indent clean-indent
+maybe-clean-indent:
+
+clean-indent:
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-intl clean-intl
+maybe-clean-intl:
+
+clean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-tcl clean-tcl
+maybe-clean-tcl:
+
+clean-tcl:
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-itcl clean-itcl
+maybe-clean-itcl:
+
+clean-itcl:
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-ld clean-ld
+maybe-clean-ld:
+
+clean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-libgui clean-libgui
+maybe-clean-libgui:
+
+clean-libgui:
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-libiberty clean-libiberty
+maybe-clean-libiberty:
+
+clean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-libtool clean-libtool
+maybe-clean-libtool:
+
+clean-libtool:
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-m4 clean-m4
+maybe-clean-m4:
+
+clean-m4:
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-make clean-make
+maybe-clean-make:
+
+clean-make:
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-mmalloc clean-mmalloc
+maybe-clean-mmalloc:
+
+clean-mmalloc:
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-patch clean-patch
+maybe-clean-patch:
+
+clean-patch:
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-perl clean-perl
+maybe-clean-perl:
+
+clean-perl:
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-prms clean-prms
+maybe-clean-prms:
+
+clean-prms:
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-rcs clean-rcs
+maybe-clean-rcs:
+
+clean-rcs:
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-readline clean-readline
+maybe-clean-readline:
+
+clean-readline:
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-release clean-release
+maybe-clean-release:
+
+clean-release:
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-recode clean-recode
+maybe-clean-recode:
+
+clean-recode:
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-sed clean-sed
+maybe-clean-sed:
+
+clean-sed:
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-send-pr clean-send-pr
+maybe-clean-send-pr:
+
+clean-send-pr:
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-shellutils clean-shellutils
+maybe-clean-shellutils:
+
+clean-shellutils:
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-sid clean-sid
+maybe-clean-sid:
+
+clean-sid:
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-sim clean-sim
+maybe-clean-sim:
+
+clean-sim:
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-tar clean-tar
+maybe-clean-tar:
+
+clean-tar:
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-texinfo clean-texinfo
+maybe-clean-texinfo:
+
+clean-texinfo:
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-textutils clean-textutils
+maybe-clean-textutils:
+
+clean-textutils:
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-time clean-time
+maybe-clean-time:
+
+clean-time:
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-uudecode clean-uudecode
+maybe-clean-uudecode:
+
+clean-uudecode:
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-wdiff clean-wdiff
+maybe-clean-wdiff:
+
+clean-wdiff:
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-zip clean-zip
+maybe-clean-zip:
+
+clean-zip:
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-zlib clean-zlib
+maybe-clean-zlib:
+
+clean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-gdb clean-gdb
+maybe-clean-gdb:
+
+clean-gdb:
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-expect clean-expect
+maybe-clean-expect:
+
+clean-expect:
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-guile clean-guile
+maybe-clean-guile:
+
+clean-guile:
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-tk clean-tk
+maybe-clean-tk:
+
+clean-tk:
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-tix clean-tix
+maybe-clean-tix:
+
+clean-tix:
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-libtermcap clean-libtermcap
+maybe-clean-libtermcap:
+
+# libtermcap doesn't support clean.
+clean-libtermcap:
+
+
+.PHONY: maybe-clean-utils clean-utils
+maybe-clean-utils:
+
+clean-utils:
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-clean-target-libstdc++-v3 clean-target-libstdc++-v3
+maybe-clean-target-libstdc++-v3:
+
+clean-target-libstdc++-v3:
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-newlib clean-target-newlib
+maybe-clean-target-newlib:
+
+clean-target-newlib:
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libf2c clean-target-libf2c
+maybe-clean-target-libf2c:
+
+clean-target-libf2c:
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libobjc clean-target-libobjc
+maybe-clean-target-libobjc:
+
+clean-target-libobjc:
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libtermcap clean-target-libtermcap
+maybe-clean-target-libtermcap:
+
+# libtermcap doesn't support clean.
+clean-libtermcap:
+
+
+.PHONY: maybe-clean-target-winsup clean-target-winsup
+maybe-clean-target-winsup:
+
+clean-target-winsup:
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libgloss clean-target-libgloss
+maybe-clean-target-libgloss:
+
+clean-target-libgloss:
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libiberty clean-target-libiberty
+maybe-clean-target-libiberty:
+
+clean-target-libiberty:
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-gperf clean-target-gperf
+maybe-clean-target-gperf:
+
+clean-target-gperf:
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-examples clean-target-examples
+maybe-clean-target-examples:
+
+clean-target-examples:
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libffi clean-target-libffi
+maybe-clean-target-libffi:
+
+clean-target-libffi:
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-libjava clean-target-libjava
+maybe-clean-target-libjava:
+
+clean-target-libjava:
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-zlib clean-target-zlib
+maybe-clean-target-zlib:
+
+clean-target-zlib:
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-boehm-gc clean-target-boehm-gc
+maybe-clean-target-boehm-gc:
+
+clean-target-boehm-gc:
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-qthreads clean-target-qthreads
+maybe-clean-target-qthreads:
+
+clean-target-qthreads:
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+.PHONY: maybe-clean-target-rda clean-target-rda
+maybe-clean-target-rda:
+
+clean-target-rda:
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+
+
+.PHONY: do-distclean
+do-distclean: distclean-host distclean-target
+
+.PHONY: distclean-host
+distclean-host: maybe-distclean-gcc \
+ maybe-distclean-ash \
+ maybe-distclean-autoconf \
+ maybe-distclean-automake \
+ maybe-distclean-bash \
+ maybe-distclean-bfd \
+ maybe-distclean-opcodes \
+ maybe-distclean-binutils \
+ maybe-distclean-bison \
+ maybe-distclean-byacc \
+ maybe-distclean-bzip2 \
+ maybe-distclean-dejagnu \
+ maybe-distclean-diff \
+ maybe-distclean-dosutils \
+ maybe-distclean-etc \
+ maybe-distclean-fastjar \
+ maybe-distclean-fileutils \
+ maybe-distclean-findutils \
+ maybe-distclean-find \
+ maybe-distclean-flex \
+ maybe-distclean-gas \
+ maybe-distclean-gawk \
+ maybe-distclean-gettext \
+ maybe-distclean-gnuserv \
+ maybe-distclean-gprof \
+ maybe-distclean-gzip \
+ maybe-distclean-hello \
+ maybe-distclean-indent \
+ maybe-distclean-intl \
+ maybe-distclean-tcl \
+ maybe-distclean-itcl \
+ maybe-distclean-ld \
+ maybe-distclean-libgui \
+ maybe-distclean-libiberty \
+ maybe-distclean-libtool \
+ maybe-distclean-m4 \
+ maybe-distclean-make \
+ maybe-distclean-mmalloc \
+ maybe-distclean-patch \
+ maybe-distclean-perl \
+ maybe-distclean-prms \
+ maybe-distclean-rcs \
+ maybe-distclean-readline \
+ maybe-distclean-release \
+ maybe-distclean-recode \
+ maybe-distclean-sed \
+ maybe-distclean-send-pr \
+ maybe-distclean-shellutils \
+ maybe-distclean-sid \
+ maybe-distclean-sim \
+ maybe-distclean-tar \
+ maybe-distclean-texinfo \
+ maybe-distclean-textutils \
+ maybe-distclean-time \
+ maybe-distclean-uudecode \
+ maybe-distclean-wdiff \
+ maybe-distclean-zip \
+ maybe-distclean-zlib \
+ maybe-distclean-gdb \
+ maybe-distclean-expect \
+ maybe-distclean-guile \
+ maybe-distclean-tk \
+ maybe-distclean-tix \
+ maybe-distclean-libtermcap \
+ maybe-distclean-utils
+
+.PHONY: distclean-target
+distclean-target: \
+ maybe-distclean-target-libstdc++-v3 \
+ maybe-distclean-target-newlib \
+ maybe-distclean-target-libf2c \
+ maybe-distclean-target-libobjc \
+ maybe-distclean-target-libtermcap \
+ maybe-distclean-target-winsup \
+ maybe-distclean-target-libgloss \
+ maybe-distclean-target-libiberty \
+ maybe-distclean-target-gperf \
+ maybe-distclean-target-examples \
+ maybe-distclean-target-libffi \
+ maybe-distclean-target-libjava \
+ maybe-distclean-target-zlib \
+ maybe-distclean-target-boehm-gc \
+ maybe-distclean-target-qthreads \
+ maybe-distclean-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-distclean-gcc distclean-gcc
+maybe-distclean-gcc:
+distclean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-distclean-ash distclean-ash
+maybe-distclean-ash:
+
+distclean-ash:
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-autoconf distclean-autoconf
+maybe-distclean-autoconf:
+
+distclean-autoconf:
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-automake distclean-automake
+maybe-distclean-automake:
+
+distclean-automake:
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-bash distclean-bash
+maybe-distclean-bash:
+
+distclean-bash:
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-bfd distclean-bfd
+maybe-distclean-bfd:
+
+distclean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-opcodes distclean-opcodes
+maybe-distclean-opcodes:
+
+distclean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-binutils distclean-binutils
+maybe-distclean-binutils:
+
+distclean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-bison distclean-bison
+maybe-distclean-bison:
+
+distclean-bison:
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-byacc distclean-byacc
+maybe-distclean-byacc:
+
+distclean-byacc:
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-bzip2 distclean-bzip2
+maybe-distclean-bzip2:
+
+distclean-bzip2:
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-dejagnu distclean-dejagnu
+maybe-distclean-dejagnu:
+
+distclean-dejagnu:
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-diff distclean-diff
+maybe-distclean-diff:
+
+distclean-diff:
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-dosutils distclean-dosutils
+maybe-distclean-dosutils:
+
+distclean-dosutils:
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-etc distclean-etc
+maybe-distclean-etc:
+
+distclean-etc:
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-fastjar distclean-fastjar
+maybe-distclean-fastjar:
+
+distclean-fastjar:
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-fileutils distclean-fileutils
+maybe-distclean-fileutils:
+
+distclean-fileutils:
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-findutils distclean-findutils
+maybe-distclean-findutils:
+
+distclean-findutils:
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-find distclean-find
+maybe-distclean-find:
+
+distclean-find:
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-flex distclean-flex
+maybe-distclean-flex:
+
+distclean-flex:
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gas distclean-gas
+maybe-distclean-gas:
+
+distclean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gawk distclean-gawk
+maybe-distclean-gawk:
+
+distclean-gawk:
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gettext distclean-gettext
+maybe-distclean-gettext:
+
+distclean-gettext:
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gnuserv distclean-gnuserv
+maybe-distclean-gnuserv:
+
+distclean-gnuserv:
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gprof distclean-gprof
+maybe-distclean-gprof:
+
+distclean-gprof:
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gzip distclean-gzip
+maybe-distclean-gzip:
+
+distclean-gzip:
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-hello distclean-hello
+maybe-distclean-hello:
+
+distclean-hello:
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-indent distclean-indent
+maybe-distclean-indent:
+
+distclean-indent:
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-intl distclean-intl
+maybe-distclean-intl:
+
+distclean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-tcl distclean-tcl
+maybe-distclean-tcl:
+
+distclean-tcl:
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-itcl distclean-itcl
+maybe-distclean-itcl:
+
+distclean-itcl:
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-ld distclean-ld
+maybe-distclean-ld:
+
+distclean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-libgui distclean-libgui
+maybe-distclean-libgui:
+
+distclean-libgui:
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-libiberty distclean-libiberty
+maybe-distclean-libiberty:
+
+distclean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-libtool distclean-libtool
+maybe-distclean-libtool:
+
+distclean-libtool:
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-m4 distclean-m4
+maybe-distclean-m4:
+
+distclean-m4:
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-make distclean-make
+maybe-distclean-make:
+
+distclean-make:
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-mmalloc distclean-mmalloc
+maybe-distclean-mmalloc:
+
+distclean-mmalloc:
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-patch distclean-patch
+maybe-distclean-patch:
+
+distclean-patch:
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-perl distclean-perl
+maybe-distclean-perl:
+
+distclean-perl:
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-prms distclean-prms
+maybe-distclean-prms:
+
+distclean-prms:
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-rcs distclean-rcs
+maybe-distclean-rcs:
+
+distclean-rcs:
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-readline distclean-readline
+maybe-distclean-readline:
+
+distclean-readline:
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-release distclean-release
+maybe-distclean-release:
+
+distclean-release:
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-recode distclean-recode
+maybe-distclean-recode:
+
+distclean-recode:
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-sed distclean-sed
+maybe-distclean-sed:
+
+distclean-sed:
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-send-pr distclean-send-pr
+maybe-distclean-send-pr:
+
+distclean-send-pr:
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-shellutils distclean-shellutils
+maybe-distclean-shellutils:
+
+distclean-shellutils:
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-sid distclean-sid
+maybe-distclean-sid:
+
+distclean-sid:
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-sim distclean-sim
+maybe-distclean-sim:
+
+distclean-sim:
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-tar distclean-tar
+maybe-distclean-tar:
+
+distclean-tar:
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-texinfo distclean-texinfo
+maybe-distclean-texinfo:
+
+distclean-texinfo:
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-textutils distclean-textutils
+maybe-distclean-textutils:
+
+distclean-textutils:
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-time distclean-time
+maybe-distclean-time:
+
+distclean-time:
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-uudecode distclean-uudecode
+maybe-distclean-uudecode:
+
+distclean-uudecode:
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-wdiff distclean-wdiff
+maybe-distclean-wdiff:
+
+distclean-wdiff:
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-zip distclean-zip
+maybe-distclean-zip:
+
+distclean-zip:
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-zlib distclean-zlib
+maybe-distclean-zlib:
+
+distclean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-gdb distclean-gdb
+maybe-distclean-gdb:
+
+distclean-gdb:
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-expect distclean-expect
+maybe-distclean-expect:
+
+distclean-expect:
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-guile distclean-guile
+maybe-distclean-guile:
+
+distclean-guile:
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-tk distclean-tk
+maybe-distclean-tk:
+
+distclean-tk:
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-tix distclean-tix
+maybe-distclean-tix:
+
+distclean-tix:
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-libtermcap distclean-libtermcap
+maybe-distclean-libtermcap:
+
+# libtermcap doesn't support distclean.
+distclean-libtermcap:
+
+
+.PHONY: maybe-distclean-utils distclean-utils
+maybe-distclean-utils:
+
+distclean-utils:
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-distclean-target-libstdc++-v3 distclean-target-libstdc++-v3
+maybe-distclean-target-libstdc++-v3:
+
+distclean-target-libstdc++-v3:
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-newlib distclean-target-newlib
+maybe-distclean-target-newlib:
+
+distclean-target-newlib:
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libf2c distclean-target-libf2c
+maybe-distclean-target-libf2c:
+
+distclean-target-libf2c:
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libobjc distclean-target-libobjc
+maybe-distclean-target-libobjc:
+
+distclean-target-libobjc:
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libtermcap distclean-target-libtermcap
+maybe-distclean-target-libtermcap:
+
+# libtermcap doesn't support distclean.
+distclean-libtermcap:
+
+
+.PHONY: maybe-distclean-target-winsup distclean-target-winsup
+maybe-distclean-target-winsup:
+
+distclean-target-winsup:
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libgloss distclean-target-libgloss
+maybe-distclean-target-libgloss:
+
+distclean-target-libgloss:
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty
+maybe-distclean-target-libiberty:
+
+distclean-target-libiberty:
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-gperf distclean-target-gperf
+maybe-distclean-target-gperf:
+
+distclean-target-gperf:
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-examples distclean-target-examples
+maybe-distclean-target-examples:
+
+distclean-target-examples:
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libffi distclean-target-libffi
+maybe-distclean-target-libffi:
+
+distclean-target-libffi:
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-libjava distclean-target-libjava
+maybe-distclean-target-libjava:
+
+distclean-target-libjava:
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-zlib distclean-target-zlib
+maybe-distclean-target-zlib:
+
+distclean-target-zlib:
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-boehm-gc distclean-target-boehm-gc
+maybe-distclean-target-boehm-gc:
+
+distclean-target-boehm-gc:
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads
+maybe-distclean-target-qthreads:
+
+distclean-target-qthreads:
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
+.PHONY: maybe-distclean-target-rda distclean-target-rda
+maybe-distclean-target-rda:
+
+distclean-target-rda:
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+
.PHONY: do-maintainer-clean
-do-maintainer-clean:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- maintainer-clean) \
- || exit 1; \
- else true; fi; \
- done
+do-maintainer-clean: maintainer-clean-host maintainer-clean-target
+
+.PHONY: maintainer-clean-host
+maintainer-clean-host: maybe-maintainer-clean-gcc \
+ maybe-maintainer-clean-ash \
+ maybe-maintainer-clean-autoconf \
+ maybe-maintainer-clean-automake \
+ maybe-maintainer-clean-bash \
+ maybe-maintainer-clean-bfd \
+ maybe-maintainer-clean-opcodes \
+ maybe-maintainer-clean-binutils \
+ maybe-maintainer-clean-bison \
+ maybe-maintainer-clean-byacc \
+ maybe-maintainer-clean-bzip2 \
+ maybe-maintainer-clean-dejagnu \
+ maybe-maintainer-clean-diff \
+ maybe-maintainer-clean-dosutils \
+ maybe-maintainer-clean-etc \
+ maybe-maintainer-clean-fastjar \
+ maybe-maintainer-clean-fileutils \
+ maybe-maintainer-clean-findutils \
+ maybe-maintainer-clean-find \
+ maybe-maintainer-clean-flex \
+ maybe-maintainer-clean-gas \
+ maybe-maintainer-clean-gawk \
+ maybe-maintainer-clean-gettext \
+ maybe-maintainer-clean-gnuserv \
+ maybe-maintainer-clean-gprof \
+ maybe-maintainer-clean-gzip \
+ maybe-maintainer-clean-hello \
+ maybe-maintainer-clean-indent \
+ maybe-maintainer-clean-intl \
+ maybe-maintainer-clean-tcl \
+ maybe-maintainer-clean-itcl \
+ maybe-maintainer-clean-ld \
+ maybe-maintainer-clean-libgui \
+ maybe-maintainer-clean-libiberty \
+ maybe-maintainer-clean-libtool \
+ maybe-maintainer-clean-m4 \
+ maybe-maintainer-clean-make \
+ maybe-maintainer-clean-mmalloc \
+ maybe-maintainer-clean-patch \
+ maybe-maintainer-clean-perl \
+ maybe-maintainer-clean-prms \
+ maybe-maintainer-clean-rcs \
+ maybe-maintainer-clean-readline \
+ maybe-maintainer-clean-release \
+ maybe-maintainer-clean-recode \
+ maybe-maintainer-clean-sed \
+ maybe-maintainer-clean-send-pr \
+ maybe-maintainer-clean-shellutils \
+ maybe-maintainer-clean-sid \
+ maybe-maintainer-clean-sim \
+ maybe-maintainer-clean-tar \
+ maybe-maintainer-clean-texinfo \
+ maybe-maintainer-clean-textutils \
+ maybe-maintainer-clean-time \
+ maybe-maintainer-clean-uudecode \
+ maybe-maintainer-clean-wdiff \
+ maybe-maintainer-clean-zip \
+ maybe-maintainer-clean-zlib \
+ maybe-maintainer-clean-gdb \
+ maybe-maintainer-clean-expect \
+ maybe-maintainer-clean-guile \
+ maybe-maintainer-clean-tk \
+ maybe-maintainer-clean-tix \
+ maybe-maintainer-clean-libtermcap \
+ maybe-maintainer-clean-utils
+
+.PHONY: maintainer-clean-target
+maintainer-clean-target: \
+ maybe-maintainer-clean-target-libstdc++-v3 \
+ maybe-maintainer-clean-target-newlib \
+ maybe-maintainer-clean-target-libf2c \
+ maybe-maintainer-clean-target-libobjc \
+ maybe-maintainer-clean-target-libtermcap \
+ maybe-maintainer-clean-target-winsup \
+ maybe-maintainer-clean-target-libgloss \
+ maybe-maintainer-clean-target-libiberty \
+ maybe-maintainer-clean-target-gperf \
+ maybe-maintainer-clean-target-examples \
+ maybe-maintainer-clean-target-libffi \
+ maybe-maintainer-clean-target-libjava \
+ maybe-maintainer-clean-target-zlib \
+ maybe-maintainer-clean-target-boehm-gc \
+ maybe-maintainer-clean-target-qthreads \
+ maybe-maintainer-clean-target-rda
+
+# GCC, the eternal special case
+.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc
+maybe-maintainer-clean-gcc:
+maintainer-clean-gcc:
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+# Host modules.
+
+.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash
+maybe-maintainer-clean-ash:
+
+maintainer-clean-ash:
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in ash" ; \
+ (cd ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf
+maybe-maintainer-clean-autoconf:
+
+maintainer-clean-autoconf:
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in autoconf" ; \
+ (cd autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake
+maybe-maintainer-clean-automake:
+
+maintainer-clean-automake:
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in automake" ; \
+ (cd automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash
+maybe-maintainer-clean-bash:
+
+maintainer-clean-bash:
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in bash" ; \
+ (cd bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd
+maybe-maintainer-clean-bfd:
+
+maintainer-clean-bfd:
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in bfd" ; \
+ (cd bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-opcodes maintainer-clean-opcodes
+maybe-maintainer-clean-opcodes:
+
+maintainer-clean-opcodes:
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in opcodes" ; \
+ (cd opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-binutils maintainer-clean-binutils
+maybe-maintainer-clean-binutils:
+
+maintainer-clean-binutils:
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in binutils" ; \
+ (cd binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-bison maintainer-clean-bison
+maybe-maintainer-clean-bison:
+
+maintainer-clean-bison:
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in bison" ; \
+ (cd bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc
+maybe-maintainer-clean-byacc:
+
+maintainer-clean-byacc:
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in byacc" ; \
+ (cd byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2
+maybe-maintainer-clean-bzip2:
+
+maintainer-clean-bzip2:
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in bzip2" ; \
+ (cd bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-dejagnu maintainer-clean-dejagnu
+maybe-maintainer-clean-dejagnu:
+
+maintainer-clean-dejagnu:
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in dejagnu" ; \
+ (cd dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff
+maybe-maintainer-clean-diff:
+
+maintainer-clean-diff:
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in diff" ; \
+ (cd diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils
+maybe-maintainer-clean-dosutils:
+
+maintainer-clean-dosutils:
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in dosutils" ; \
+ (cd dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-etc maintainer-clean-etc
+maybe-maintainer-clean-etc:
+
+maintainer-clean-etc:
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in etc" ; \
+ (cd etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-fastjar maintainer-clean-fastjar
+maybe-maintainer-clean-fastjar:
+
+maintainer-clean-fastjar:
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in fastjar" ; \
+ (cd fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils
+maybe-maintainer-clean-fileutils:
+
+maintainer-clean-fileutils:
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in fileutils" ; \
+ (cd fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils
+maybe-maintainer-clean-findutils:
+
+maintainer-clean-findutils:
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in findutils" ; \
+ (cd findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-find maintainer-clean-find
+maybe-maintainer-clean-find:
+
+maintainer-clean-find:
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in find" ; \
+ (cd find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-flex maintainer-clean-flex
+maybe-maintainer-clean-flex:
+
+maintainer-clean-flex:
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in flex" ; \
+ (cd flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gas maintainer-clean-gas
+maybe-maintainer-clean-gas:
+
+maintainer-clean-gas:
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gas" ; \
+ (cd gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk
+maybe-maintainer-clean-gawk:
+
+maintainer-clean-gawk:
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gawk" ; \
+ (cd gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext
+maybe-maintainer-clean-gettext:
+
+maintainer-clean-gettext:
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gettext" ; \
+ (cd gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv
+maybe-maintainer-clean-gnuserv:
+
+maintainer-clean-gnuserv:
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gnuserv" ; \
+ (cd gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof
+maybe-maintainer-clean-gprof:
+
+maintainer-clean-gprof:
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gprof" ; \
+ (cd gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip
+maybe-maintainer-clean-gzip:
+
+maintainer-clean-gzip:
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gzip" ; \
+ (cd gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello
+maybe-maintainer-clean-hello:
+
+maintainer-clean-hello:
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in hello" ; \
+ (cd hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent
+maybe-maintainer-clean-indent:
+
+maintainer-clean-indent:
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in indent" ; \
+ (cd indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-intl maintainer-clean-intl
+maybe-maintainer-clean-intl:
+
+maintainer-clean-intl:
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in intl" ; \
+ (cd intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-tcl maintainer-clean-tcl
+maybe-maintainer-clean-tcl:
+
+maintainer-clean-tcl:
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in tcl" ; \
+ (cd tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-itcl maintainer-clean-itcl
+maybe-maintainer-clean-itcl:
+
+maintainer-clean-itcl:
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in itcl" ; \
+ (cd itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-ld maintainer-clean-ld
+maybe-maintainer-clean-ld:
+
+maintainer-clean-ld:
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in ld" ; \
+ (cd ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-libgui maintainer-clean-libgui
+maybe-maintainer-clean-libgui:
+
+maintainer-clean-libgui:
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in libgui" ; \
+ (cd libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-libiberty maintainer-clean-libiberty
+maybe-maintainer-clean-libiberty:
+
+maintainer-clean-libiberty:
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in libiberty" ; \
+ (cd libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool
+maybe-maintainer-clean-libtool:
+
+maintainer-clean-libtool:
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in libtool" ; \
+ (cd libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-m4 maintainer-clean-m4
+maybe-maintainer-clean-m4:
+
+maintainer-clean-m4:
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in m4" ; \
+ (cd m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-make maintainer-clean-make
+maybe-maintainer-clean-make:
+
+maintainer-clean-make:
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in make" ; \
+ (cd make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc
+maybe-maintainer-clean-mmalloc:
+
+maintainer-clean-mmalloc:
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in mmalloc" ; \
+ (cd mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch
+maybe-maintainer-clean-patch:
+
+maintainer-clean-patch:
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in patch" ; \
+ (cd patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl
+maybe-maintainer-clean-perl:
+
+maintainer-clean-perl:
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in perl" ; \
+ (cd perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms
+maybe-maintainer-clean-prms:
+
+maintainer-clean-prms:
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in prms" ; \
+ (cd prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs
+maybe-maintainer-clean-rcs:
+
+maintainer-clean-rcs:
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in rcs" ; \
+ (cd rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-readline maintainer-clean-readline
+maybe-maintainer-clean-readline:
+
+maintainer-clean-readline:
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in readline" ; \
+ (cd readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-release maintainer-clean-release
+maybe-maintainer-clean-release:
+
+maintainer-clean-release:
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in release" ; \
+ (cd release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode
+maybe-maintainer-clean-recode:
+
+maintainer-clean-recode:
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in recode" ; \
+ (cd recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed
+maybe-maintainer-clean-sed:
+
+maintainer-clean-sed:
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in sed" ; \
+ (cd sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr
+maybe-maintainer-clean-send-pr:
+
+maintainer-clean-send-pr:
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in send-pr" ; \
+ (cd send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils
+maybe-maintainer-clean-shellutils:
+
+maintainer-clean-shellutils:
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in shellutils" ; \
+ (cd shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-sid maintainer-clean-sid
+maybe-maintainer-clean-sid:
+
+maintainer-clean-sid:
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in sid" ; \
+ (cd sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-sim maintainer-clean-sim
+maybe-maintainer-clean-sim:
+
+maintainer-clean-sim:
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in sim" ; \
+ (cd sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar
+maybe-maintainer-clean-tar:
+
+maintainer-clean-tar:
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in tar" ; \
+ (cd tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-texinfo maintainer-clean-texinfo
+maybe-maintainer-clean-texinfo:
+
+maintainer-clean-texinfo:
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in texinfo" ; \
+ (cd texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils
+maybe-maintainer-clean-textutils:
+
+maintainer-clean-textutils:
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in textutils" ; \
+ (cd textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-time maintainer-clean-time
+maybe-maintainer-clean-time:
+
+maintainer-clean-time:
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in time" ; \
+ (cd time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode
+maybe-maintainer-clean-uudecode:
+
+maintainer-clean-uudecode:
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in uudecode" ; \
+ (cd uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff
+maybe-maintainer-clean-wdiff:
+
+maintainer-clean-wdiff:
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in wdiff" ; \
+ (cd wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip
+maybe-maintainer-clean-zip:
+
+maintainer-clean-zip:
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in zip" ; \
+ (cd zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-zlib maintainer-clean-zlib
+maybe-maintainer-clean-zlib:
+
+maintainer-clean-zlib:
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in zlib" ; \
+ (cd zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-gdb maintainer-clean-gdb
+maybe-maintainer-clean-gdb:
+
+maintainer-clean-gdb:
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gdb" ; \
+ (cd gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-expect maintainer-clean-expect
+maybe-maintainer-clean-expect:
+
+maintainer-clean-expect:
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in expect" ; \
+ (cd expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-guile maintainer-clean-guile
+maybe-maintainer-clean-guile:
+
+maintainer-clean-guile:
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in guile" ; \
+ (cd guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-tk maintainer-clean-tk
+maybe-maintainer-clean-tk:
+
+maintainer-clean-tk:
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in tk" ; \
+ (cd tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-tix maintainer-clean-tix
+maybe-maintainer-clean-tix:
+
+maintainer-clean-tix:
+ @[ -f ./tix/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in tix" ; \
+ (cd tix && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap
+maybe-maintainer-clean-libtermcap:
+
+# libtermcap doesn't support maintainer-clean.
+maintainer-clean-libtermcap:
+
+
+.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils
+maybe-maintainer-clean-utils:
+
+maintainer-clean-utils:
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in utils" ; \
+ (cd utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+
+# Target modules.
+
+.PHONY: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3
+maybe-maintainer-clean-target-libstdc++-v3:
+
+maintainer-clean-target-libstdc++-v3:
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib
+maybe-maintainer-clean-target-newlib:
+
+maintainer-clean-target-newlib:
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libf2c maintainer-clean-target-libf2c
+maybe-maintainer-clean-target-libf2c:
+
+maintainer-clean-target-libf2c:
+ @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libf2c" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libf2c && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libobjc maintainer-clean-target-libobjc
+maybe-maintainer-clean-target-libobjc:
+
+maintainer-clean-target-libobjc:
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libtermcap maintainer-clean-target-libtermcap
+maybe-maintainer-clean-target-libtermcap:
+
+# libtermcap doesn't support maintainer-clean.
+maintainer-clean-libtermcap:
+
+
+.PHONY: maybe-maintainer-clean-target-winsup maintainer-clean-target-winsup
+maybe-maintainer-clean-target-winsup:
+
+maintainer-clean-target-winsup:
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libgloss maintainer-clean-target-libgloss
+maybe-maintainer-clean-target-libgloss:
+
+maintainer-clean-target-libgloss:
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty
+maybe-maintainer-clean-target-libiberty:
+
+maintainer-clean-target-libiberty:
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf
+maybe-maintainer-clean-target-gperf:
+
+maintainer-clean-target-gperf:
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples
+maybe-maintainer-clean-target-examples:
+
+maintainer-clean-target-examples:
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libffi maintainer-clean-target-libffi
+maybe-maintainer-clean-target-libffi:
+
+maintainer-clean-target-libffi:
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava
+maybe-maintainer-clean-target-libjava:
+
+maintainer-clean-target-libjava:
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-zlib maintainer-clean-target-zlib
+maybe-maintainer-clean-target-zlib:
+
+maintainer-clean-target-zlib:
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc
+maybe-maintainer-clean-target-boehm-gc:
+
+maintainer-clean-target-boehm-gc:
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads
+maybe-maintainer-clean-target-qthreads:
+
+maintainer-clean-target-qthreads:
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+
+.PHONY: maybe-maintainer-clean-target-rda maintainer-clean-target-rda
+maybe-maintainer-clean-target-rda:
+
+maintainer-clean-target-rda:
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
-.PHONY: do-TAGS
-do-TAGS:
- @r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- TAGS) \
- || exit 1; \
- else true; fi; \
- done
@@ -1291,33 +17290,8 @@ maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
maintainer-clean: local-distclean
realclean: maintainer-clean
-# This rule is used to clean specific modules.
-.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
-$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
- @dir=`echo $@ | sed -e 's/clean-//'`; \
- if [ -f ./$${dir}/Makefile ] ; then \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) clean); \
- else \
- true; \
- fi
-
-.PHONY: $(CLEAN_TARGET_MODULES)
-$(CLEAN_TARGET_MODULES):
- @dir=`echo $@ | sed -e 's/clean-target-//'`; \
- rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
- if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/$${dir} && $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
- else \
- true; \
- fi
-
-clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
+# Extra dependency for clean-target, owing to the mixed nature of gcc
+clean-target: clean-target-libgcc
clean-target-libgcc:
test ! -d gcc/libgcc || \
(cd gcc/libgcc && find . -type d -print) | \
@@ -7816,7 +23790,7 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
LANGUAGES="c c++" all
-.PHONY: check-gcc
+.PHONY: check-gcc maybe-check-gcc
maybe-check-gcc:
check-gcc:
@if [ -f ./gcc/Makefile ] ; then \
diff --git a/Makefile.tpl b/Makefile.tpl
index c07fed66392..e55c89cd0af 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -475,7 +475,6 @@ RECURSE_FLAGS = \
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
-# If any variables are added here, they must be added to do-*, below.
EXTRA_HOST_FLAGS = \
'AR=$(AR)' \
'AS=$(AS)' \
@@ -504,7 +503,6 @@ X11_FLAGS_TO_PASS = \
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; the variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
-# If any variables are added here, they must be added to do-*, below.
EXTRA_TARGET_FLAGS = \
'AR=$$(AR_FOR_TARGET)' \
'AS=$$(AS_FOR_TARGET)' \
@@ -526,7 +524,7 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# unfortunately needs the native compiler and the target ar and
# ranlib.
# If any variables are added here, they must be added to do-*, below.
-# The HOST_* variables are a special case, which are used for the gcc
+# The BUILD_* variables are a special case, which are used for the gcc
# cross-building scheme.
EXTRA_GCC_FLAGS = \
'AR=$(AR)' \
@@ -565,26 +563,6 @@ configure-target: [+
maybe-configure-target-[+module+][+
ENDFOR target_modules +]
-# This is a list of the targets for which we can do a clean-{target}.
-CLEAN_MODULES =[+
- FOR host_modules +][+
- IF (not (or (exist? "no_clean") (exist? "with_x"))) +] \
- clean-[+module+][+
- ENDIF no_clean +][+
- ENDFOR host_modules +]
-
-# All of the target modules that can be cleaned
-CLEAN_TARGET_MODULES =[+
- FOR target_modules +][+
- IF (not (exist? "no_clean")) +] \
- clean-target-[+module+][+
- ENDIF no_clean +][+
- ENDFOR target_modules +]
-
-# All of the x11 modules that can be cleaned
-CLEAN_X11_MODULES = [+ FOR host_modules +][+ IF with_x +]\
- clean-[+module+] [+ ENDIF with_x +][+ ENDFOR host_modules +]
-
# The target built for a native build.
.PHONY: all.normal
all.normal: @all_build_modules@ all-host all-target
@@ -604,58 +582,105 @@ all-target: [+
# ``make X'' in all subdirectories (because, in general, there is a
# dependency (below) of X upon do-X, a ``make X'' will also do this,
# but it may do additional work as well).
-# This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
-# because it is so large that it can easily overflow the command line
-# length limit on some systems.
[+ FOR recursive_targets +]
-.PHONY: do-[+target+]
-do-[+target+]:
- @r=`${PWD}`; export r; \
+.PHONY: do-[+make_target+]
+do-[+make_target+]: [+make_target+]-host [+make_target+]-target
+
+.PHONY: [+make_target+]-host
+[+make_target+]-host: maybe-[+make_target+]-gcc [+
+ FOR host_modules +] \
+ maybe-[+make_target+]-[+module+][+
+ ENDFOR host_modules +]
+
+.PHONY: [+make_target+]-target
+[+make_target+]-target: [+
+ FOR target_modules +] \
+ maybe-[+make_target+]-target-[+module+][+
+ ENDFOR target_modules +]
+
+# GCC, the eternal special case
+.PHONY: maybe-[+make_target+]-gcc [+make_target+]-gcc
+maybe-[+make_target+]-gcc:
+[+make_target+]-gcc: [+
+ FOR depend +]\
+ [+depend+]-gcc [+
+ ENDFOR depend +]
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- for i in $(SUBDIRS) -dummy-; do \
- if [ -f ./$$i/Makefile ]; then \
- case $$i in \
- gcc) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- *) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- ;; \
- esac ; \
- (cd ./$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+target+]) \
- || exit 1; \
- else true; fi; \
- done
- # Break into two pieces
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing [+make_target+] in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+make_target+]) \
+ || exit 1
+
+# Host modules.
+[+ FOR host_modules +]
+.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
+maybe-[+make_target+]-[+module+]:
+[+ IF (match-value? = "missing" (get "make_target") ) +]
+# [+module+] doesn't support [+make_target+].
+[+make_target+]-[+module+]:
+[+ ELSE +]
+[+make_target+]-[+module+]: [+
+ FOR depend +]\
+ [+depend+]-[+module+] [+
+ ENDFOR depend +]
+ @[ -f ./[+module+]/Makefile ] || exit 0; \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- for i in $(TARGET_CONFIGDIRS) -dummy-; do \
- if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/$$i && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+target+]) \
- || exit 1; \
- else true; fi; \
- done
-[+ ENDFOR recursive_targets +]
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing [+make_target+] in [+module+]" ; \
+ (cd [+module+] && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+make_target+]) \
+ || exit 1
+[+ ENDIF +]
+[+ ENDFOR host_modules +]
+# Target modules.
+[+ FOR target_modules +]
+.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
+maybe-[+make_target+]-target-[+module+]:
+[+ IF (match-value? = "missing" (get "make_target") ) +]
+# [+module+] doesn't support [+make_target+].
+[+make_target+]-[+module+]:
+[+ ELSE +]
+[+make_target+]-target-[+module+]: [+
+ FOR depend +]\
+ [+depend+]-target-[+module+] [+
+ ENDFOR depend +]
+ @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
+ r=`${PWD}`; export r; \
+ s=`cd $(srcdir); ${PWD}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/[+module+] && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+make_target+]) \
+ || exit 1
+[+ ENDIF +]
+[+ ENDFOR target_modules +]
+[+ ENDFOR recursive_targets +]
# Here are the targets which correspond to the do-X targets.
@@ -703,33 +728,8 @@ maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
maintainer-clean: local-distclean
realclean: maintainer-clean
-# This rule is used to clean specific modules.
-.PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
-$(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
- @dir=`echo $@ | sed -e 's/clean-//'`; \
- if [ -f ./$${dir}/Makefile ] ; then \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) clean); \
- else \
- true; \
- fi
-
-.PHONY: $(CLEAN_TARGET_MODULES)
-$(CLEAN_TARGET_MODULES):
- @dir=`echo $@ | sed -e 's/clean-target-//'`; \
- rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
- if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
- r=`${PWD}`; export r; \
- s=`cd $(srcdir); ${PWD}`; export s; \
- $(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/$${dir} && $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
- else \
- true; \
- fi
-
-clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
+# Extra dependency for clean-target, owing to the mixed nature of gcc
+clean-target: clean-target-libgcc
clean-target-libgcc:
test ! -d gcc/libgcc || \
(cd gcc/libgcc && find . -type d -print) | \
@@ -1269,7 +1269,7 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
$(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
LANGUAGES="c c++" all
-.PHONY: check-gcc
+.PHONY: check-gcc maybe-check-gcc
maybe-check-gcc:
check-gcc:
@if [ -f ./gcc/Makefile ] ; then \
diff --git a/README-maintainer-mode b/README-maintainer-mode
index fbe508f0c6e..0115a1ee556 100644
--- a/README-maintainer-mode
+++ b/README-maintainer-mode
@@ -3,7 +3,7 @@
Note that if you configure with --enable-maintainer-mode, you will need
special versions of automake, autoconf, libtool and gettext. You will
-find the sources for these in ftp://sourceware.cygnus.com/pub/binutils.
+find the sources for these in ftp://sources.redhat.com/pub/binutils.
Note - "make distclean" does not work with maintainer mode enabled.
The Makefiles in the some of the po/ subdirectories depend upon the
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 612884f2f39..e5fe8d67e62 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,143 @@
+2003-06-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
+ NULL function pointers.
+
+2003-06-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * simple.c (bfd_simple_get_relocated_section_contents): Call
+ _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
+
+2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
+ ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
+ swaptables.
+ * coff-tic4x.c: Ditto
+ * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
+ and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
+ CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
+ ticoff1_bad_format_hook() functions. Created the coff0 and coff1
+ swap tables.
+ * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
+ * coff-a29k.c: Append COFF_SWAP_TABLE argument
+ * coff-apollo.c: Ditto
+ * coff-arm.c: Ditto
+ * coff-h8300.c: Ditto
+ * coff-h8500.c: Ditto
+ * coff-i960.c: Ditto
+ * coff-m68k.c: Ditto
+ * coff-m88k.c: Ditto
+ * coff-mcore.c: Ditto
+ * coff-sh.c: Ditto
+ * coff-sparc.c: Ditto
+ * coff-tic80.c: Ditto
+ * coff-we32k.c: Ditto
+ * coff-z8k.c: Ditto
+ * coff-w65.c: Ditto
+
+2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
+ initialization bug
+
+2003-06-03 Jakub Jelinek <jakub@redhat.com>
+
+ * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
+ (bfd_section_from_phdr): Likewise.
+ (map_sections_to_segments): Create PT_GNU_STACK segment header.
+ (get_program_header_size): Count with PT_GNU_STACK.
+ * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
+ * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
+
+2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.h (elf_link_input_bfd): Call linker error_handler
+ for discarded definitions.
+
+2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
+
+ * syms.c (decode_section_type): Return 'n' if section flags are
+ SEC_HAS_CONTENTS && SEC_READONLY.
+
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
+ R_V850_ABS32. Add entry for R_V850_REL32.
+ (v850_elf_reloc_map): Likewise.
+ (v850_elf_check_relocs): Likewise.
+ (v850_elf_perform_relocation): Likewise.
+ (v850_elf_final_link_relocate): Likewise. Include computation
+ to make R_V850_REl32 pc-relative.
+
+2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
+ and DT_DEBUG dynamic tag even for position independent executables.
+ * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
+
+2003-06-02 Daniel Jacobowitz <drow@mvista.com>
+
+ * config.bfd: Move obsolete entries out of the range of the
+ targmatch sed script.
+
+2003-06-02 Daniel Jacobowitz <drow@mvista.com>
+
+ * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
+
+2003-05-31 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
+ plt entries, not just 8191.
+
+2003-05-30 Daniel Jacobowitz <drow@mvista.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
+ Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
+
+2003-05-30 Ulrich Drepper <drepper@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.h (elf_link_add_object_symbols): Use !info->executable
+ instead of info->shared where appropriate.
+ (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
+ * elflink.c (_bfd_elf_create_got_section): Likewise.
+ (_bfd_elf_link_create_dynamic_sections): Likewise.
+ (_bfd_elf_link_assign_sym_version): Likewise.
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
+ and DT_DEBUG dynamic tag even for position independent executables.
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
+ * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
+ * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
+ * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
+ * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
+ * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
+ * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
+ * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
+
+2003-05-30 Kris Warkentin <kewarken@qnx.com>
+
+ * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
+ signalled thread.
+ (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
+
+2003-05-29 Nick Clifton <nickc@redhat.com>
+
+ * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
+ Tidy up formatting.
+ * Makefile.am: Add dependency on safe-ctype.h.
+ * Makefile.in: Regenerate.
+
+2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c: Don't force symbols local unconditionally.
+
+2003-05-28 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
+ undefined_symbol call.
+
2003-05-27 Richard Sandiford <rsandifo@redhat.com>
* elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 5ecaa5b1600..cc344553cd9 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -1414,7 +1414,7 @@ pdp11.lo: pdp11.c $(INCDIR)/filenames.h libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h $(INCDIR)/safe-ctype.h
pef.lo: pef.c pef.h pef-traceback.h $(INCDIR)/filenames.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
$(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index d8fc69f4f59..2eb2f08e98c 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -1947,7 +1947,7 @@ pdp11.lo: pdp11.c $(INCDIR)/filenames.h libaout.h $(INCDIR)/bfdlink.h \
aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h $(INCDIR)/safe-ctype.h
pef.lo: pef.c pef.h pef-traceback.h $(INCDIR)/filenames.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
$(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 8df80a00aa4..b0af69e60a7 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1,7 +1,7 @@
-/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
- generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
- "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
- "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
+ "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
+ "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
"linker.c" and "simple.c".
Run "make headers" in your build bfd/ to regenerate. */
@@ -1792,7 +1792,7 @@ enum bfd_architecture
#define bfd_mach_msp43 43
#define bfd_mach_msp44 44
#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
+#define bfd_mach_msp16 16
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
#define bfd_mach_xtensa 1
bfd_arch_last
@@ -3480,14 +3480,14 @@ instruction opcode. */
BFD_RELOC_XTENSA_OP1,
BFD_RELOC_XTENSA_OP2,
-/* Xtensa relocation to mark that the assembler expanded the
+/* Xtensa relocation to mark that the assembler expanded the
instructions from an original target. The expansion size is
encoded in the reloc size. */
BFD_RELOC_XTENSA_ASM_EXPAND,
-/* Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
+/* Xtensa relocation to mark that the linker should simplify
+assembler-expanded instructions. This is commonly used
+internally by the linker after analysis of a
BFD_RELOC_XTENSA_ASM_EXPAND. */
BFD_RELOC_XTENSA_ASM_SIMPLIFY,
BFD_RELOC_UNUSED };
diff --git a/bfd/coff-a29k.c b/bfd/coff-a29k.c
index fd547315fea..844d371a94f 100644
--- a/bfd/coff-a29k.c
+++ b/bfd/coff-a29k.c
@@ -580,4 +580,4 @@ coff_a29k_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
#include "coffcode.h"
-CREATE_BIG_COFF_TARGET_VEC (a29kcoff_big_vec, "coff-a29k-big", 0, SEC_READONLY, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (a29kcoff_big_vec, "coff-a29k-big", 0, SEC_READONLY, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-apollo.c b/bfd/coff-apollo.c
index d7b921260bb..cf584538f6e 100644
--- a/bfd/coff-apollo.c
+++ b/bfd/coff-apollo.c
@@ -115,7 +115,7 @@ apollo_howto2rtype (internal)
#endif
#ifdef NAMES_HAVE_UNDERSCORE
-CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, '_', NULL, COFF_SWAP_TABLE)
#else
-CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, 0, NULL)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, 0, NULL, COFF_SWAP_TABLE)
#endif
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index f089a6c824d..a88cdba0500 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -2623,5 +2623,5 @@ coff_arm_final_link_postscript (abfd, pfinfo)
extern const bfd_target TARGET_BIG_SYM ;
/* Target vectors. */
-CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM)
-CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM)
+CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM, COFF_SWAP_TABLE)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM, COFF_SWAP_TABLE)
diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c
index ac091533553..9ef907b87df 100644
--- a/bfd/coff-h8300.c
+++ b/bfd/coff-h8300.c
@@ -1398,4 +1398,4 @@ h8300_bfd_link_add_symbols (abfd, info)
bfd_coff_reloc16_get_relocated_section_contents
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
-CREATE_BIG_COFF_TARGET_VEC (h8300coff_vec, "coff-h8300", BFD_IS_RELAXABLE, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (h8300coff_vec, "coff-h8300", BFD_IS_RELAXABLE, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-h8500.c b/bfd/coff-h8500.c
index 656bb48f37f..a94e4a30ec6 100644
--- a/bfd/coff-h8500.c
+++ b/bfd/coff-h8500.c
@@ -303,4 +303,4 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
bfd_coff_reloc16_get_relocated_section_contents
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
-CREATE_BIG_COFF_TARGET_VEC (h8500coff_vec, "coff-h8500", 0, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (h8500coff_vec, "coff-h8500", 0, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index eee6718a5ef..e4dc05322fa 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -617,7 +617,7 @@ coff_i960_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
extern const bfd_target icoff_big_vec;
-CREATE_LITTLE_COFF_TARGET_VEC (icoff_little_vec, "coff-Intel-little", 0, 0, '_', & icoff_big_vec)
+CREATE_LITTLE_COFF_TARGET_VEC (icoff_little_vec, "coff-Intel-little", 0, 0, '_', & icoff_big_vec, COFF_SWAP_TABLE)
const bfd_target icoff_big_vec =
{
diff --git a/bfd/coff-m68k.c b/bfd/coff-m68k.c
index c2c1c295c86..a293b87b991 100644
--- a/bfd/coff-m68k.c
+++ b/bfd/coff-m68k.c
@@ -532,7 +532,7 @@ bfd_m68k_coff_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
#endif
#ifdef NAMES_HAVE_UNDERSCORE
-CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE)
#else
-CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, 0, NULL)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, 0, NULL, COFF_SWAP_TABLE)
#endif
diff --git a/bfd/coff-m88k.c b/bfd/coff-m88k.c
index f2d7ecc353f..aa88b99aa5c 100644
--- a/bfd/coff-m88k.c
+++ b/bfd/coff-m88k.c
@@ -288,4 +288,4 @@ reloc_processing (relent, reloc, symbols, abfd, section)
#undef coff_write_armap
-CREATE_BIG_COFF_TARGET_VEC (m88kbcs_vec, "coff-m88kbcs", 0, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (m88kbcs_vec, "coff-m88kbcs", 0, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c
index 7847bb751b5..c30f5aa9b1d 100644
--- a/bfd/coff-mcore.c
+++ b/bfd/coff-mcore.c
@@ -593,7 +593,7 @@ extern const bfd_target TARGET_LITTLE_SYM;
/* The transfer vectors that lead the outside world to all of the above. */
CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED,
(SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_READONLY | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
- 0, & TARGET_LITTLE_SYM)
+ 0, & TARGET_LITTLE_SYM, COFF_SWAP_TABLE)
CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED,
(SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_READONLY | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
- 0, & TARGET_BIG_SYM)
+ 0, & TARGET_BIG_SYM, COFF_SWAP_TABLE)
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index bcf059d299e..c9997dbedd4 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -3132,7 +3132,7 @@ sh_coff_get_relocated_section_contents (output_bfd, link_info, link_order,
/* The target vectors. */
#ifndef TARGET_SHL_SYM
-CREATE_BIG_COFF_TARGET_VEC (shcoff_vec, "coff-sh", BFD_IS_RELAXABLE, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (shcoff_vec, "coff-sh", BFD_IS_RELAXABLE, 0, '_', NULL, COFF_SWAP_TABLE)
#endif
#ifdef TARGET_SHL_SYM
@@ -3147,10 +3147,10 @@ CREATE_BIG_COFF_TARGET_VEC (shcoff_vec, "coff-sh", BFD_IS_RELAXABLE, 0, '_', NUL
#ifdef COFF_WITH_PE
CREATE_LITTLE_COFF_TARGET_VEC (TARGET_SYM, TARGET_SHL_NAME, BFD_IS_RELAXABLE,
- SEC_CODE | SEC_DATA, '_', NULL);
+ SEC_CODE | SEC_DATA, '_', NULL, COFF_SWAP_TABLE);
#else
CREATE_LITTLE_COFF_TARGET_VEC (TARGET_SYM, TARGET_SHL_NAME, BFD_IS_RELAXABLE,
- 0, '_', NULL)
+ 0, '_', NULL, COFF_SWAP_TABLE)
#endif
#ifndef TARGET_SHL_SYM
diff --git a/bfd/coff-sparc.c b/bfd/coff-sparc.c
index 4053a6d5f4b..acfa6d4924a 100644
--- a/bfd/coff-sparc.c
+++ b/bfd/coff-sparc.c
@@ -216,4 +216,4 @@ rtype2howto (cache_ptr, dst)
#define TARGET_NAME "coff-sparc"
#endif
-CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-tic4x.c b/bfd/coff-tic4x.c
index 5c8de41995c..708e6264caa 100644
--- a/bfd/coff-tic4x.c
+++ b/bfd/coff-tic4x.c
@@ -32,10 +32,6 @@
#undef F_LSYMS
#define F_LSYMS F_LSYMS_TICOFF
-static bfd_boolean ticoff0_bad_format_hook
- PARAMS ((bfd *, PTR ));
-static bfd_boolean ticoff1_bad_format_hook
- PARAMS ((bfd *, PTR ));
static bfd_boolean ticoff_bfd_is_local_label_name
PARAMS ((bfd *, const char *));
static bfd_reloc_status_type tic4x_relocation
@@ -50,32 +46,6 @@ static void tic4x_reloc_processing
PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection * ));
-static bfd_boolean
-ticoff0_bad_format_hook (abfd, filehdr)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
-{
- struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
-
- if (COFF0_BADMAG (*internal_f))
- return FALSE;
-
- return TRUE;
-}
-
-static bfd_boolean
-ticoff1_bad_format_hook (abfd, filehdr)
- bfd *abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
-{
- struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
-
- if (COFF1_BADMAG (*internal_f))
- return FALSE;
-
- return TRUE;
-}
-
/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
labels. */
static bfd_boolean
@@ -281,353 +251,20 @@ tic4x_reloc_processing (relent, reloc, symbols, abfd, section)
}
-static const bfd_coff_backend_data ticoff0_swap_table =
-{
- coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
- coff_SWAP_aux_out, coff_SWAP_sym_out,
- coff_SWAP_lineno_out, coff_SWAP_reloc_out,
- coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
- coff_SWAP_scnhdr_out,
- FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
-#ifdef COFF_LONG_FILENAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_LONG_SECTION_NAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
- 4,
-#else
- 2,
-#endif
- COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
- coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
- coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
- coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
- coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
- coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
- coff_classify_symbol, coff_compute_section_file_positions,
- coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
- coff_adjust_symndx, coff_link_add_one_symbol,
- coff_link_output_has_begun, coff_final_link_postscript
-};
-
-/* COFF1 differs in section header size. */
-static const bfd_coff_backend_data ticoff1_swap_table =
-{
- coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
- coff_SWAP_aux_out, coff_SWAP_sym_out,
- coff_SWAP_lineno_out, coff_SWAP_reloc_out,
- coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
- coff_SWAP_scnhdr_out,
- FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
-#ifdef COFF_LONG_FILENAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_LONG_SECTION_NAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
- 4,
-#else
- 2,
-#endif
- COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
- coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
- coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
- coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
- coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
- coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
- coff_classify_symbol, coff_compute_section_file_positions,
- coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
- coff_adjust_symndx, coff_link_add_one_symbol,
- coff_link_output_has_begun, coff_final_link_postscript
-};
-
-
/* TI COFF v0, DOS tools (little-endian headers). */
-const bfd_target tic4x_coff0_vec =
-{
- "coff0-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char. */
- 15, /* ar_max_namelen. */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- NULL,
-
- (PTR)&ticoff0_swap_table
-};
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff0_vec, "coff0-tic4x", HAS_LOAD_PAGE, 0, '_', NULL, (PTR)&ticoff0_swap_table);
/* TI COFF v0, SPARC tools (big-endian headers). */
-const bfd_target tic4x_coff0_beh_vec =
-{
- "coff0-beh-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_BIG, /* Header byte order is big. */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &tic4x_coff0_vec,
-
- (PTR)&ticoff0_swap_table
-};
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff0_beh_vec, "coff0-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff0_vec, (PTR)&ticoff0_swap_table);
/* TI COFF v1, DOS tools (little-endian headers). */
-const bfd_target tic4x_coff1_vec =
-{
- "coff1-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &tic4x_coff0_beh_vec,
-
- (PTR)&ticoff1_swap_table
-};
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff1_vec, "coff1-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff0_beh_vec, (PTR)&ticoff1_swap_table);
/* TI COFF v1, SPARC tools (big-endian headers). */
-const bfd_target tic4x_coff1_beh_vec =
-{
- "coff1-beh-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_BIG, /* Header byte order is big. */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &tic4x_coff1_vec,
-
- (PTR)&ticoff1_swap_table
-};
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff1_beh_vec, "coff1-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff1_vec, (PTR)&ticoff1_swap_table);
/* TI COFF v2, TI DOS tools output (little-endian headers). */
-const bfd_target tic4x_coff2_vec =
-{
- "coff2-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_LITTLE, /* Header byte order is little (DOS tools). */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &tic4x_coff1_beh_vec,
-
- COFF_SWAP_TABLE
-};
+CREATE_LITTLE_COFF_TARGET_VEC(tic4x_coff2_vec, "coff2-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff1_beh_vec, COFF_SWAP_TABLE);
/* TI COFF v2, TI SPARC tools output (big-endian headers). */
-const bfd_target tic4x_coff2_beh_vec =
-{
- "coff2-beh-tic4x", /* Name. */
- bfd_target_coff_flavour,
- BFD_ENDIAN_LITTLE, /* Data byte order is little. */
- BFD_ENDIAN_BIG, /* Header byte order is big. */
-
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | HAS_LOAD_PAGE ),
-
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* Section flags. */
- '_', /* Leading symbol underscore. */
- '/', /* ar_pad_char */
- 15, /* ar_max_namelen */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
-
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &tic4x_coff2_vec,
-
- COFF_SWAP_TABLE
-};
+CREATE_BIGHDR_COFF_TARGET_VEC(tic4x_coff2_beh_vec, "coff2-beh-tic4x", HAS_LOAD_PAGE, 0, '_', &tic4x_coff2_vec, COFF_SWAP_TABLE);
diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c
index cf7227c8261..fdf1b5a00c1 100644
--- a/bfd/coff-tic54x.c
+++ b/bfd/coff-tic54x.c
@@ -50,10 +50,6 @@ static reloc_howto_type * tic54x_coff_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static void tic54x_lookup_howto
PARAMS ((arelent *, struct internal_reloc *));
-static bfd_boolean ticoff0_bad_format_hook
- PARAMS ((bfd *, PTR));
-static bfd_boolean ticoff1_bad_format_hook
- PARAMS ((bfd *, PTR));
static bfd_boolean ticoff_bfd_is_local_label_name
PARAMS ((bfd *, const char *));
@@ -323,32 +319,6 @@ coff_tic54x_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
return genrel.howto;
}
-static bfd_boolean
-ticoff0_bad_format_hook (abfd, filehdr)
- bfd * abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
-{
- struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
-
- if (COFF0_BADMAG (*internal_f))
- return FALSE;
-
- return TRUE;
-}
-
-static bfd_boolean
-ticoff1_bad_format_hook (abfd, filehdr)
- bfd * abfd ATTRIBUTE_UNUSED;
- PTR filehdr;
-{
- struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
-
- if (COFF1_BADMAG (*internal_f))
- return FALSE;
-
- return TRUE;
-}
-
/* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local
labels. */
@@ -435,88 +405,6 @@ tic54x_reloc_processing (relent, reloc, symbols, abfd, section)
tic54x_lookup_howto (relent, reloc);
}
-/* COFF0 differs in file/section header size and relocation entry size. */
-static const bfd_coff_backend_data ticoff0_swap_table =
- {
- coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
- coff_SWAP_aux_out, coff_SWAP_sym_out,
- coff_SWAP_lineno_out, coff_SWAP_reloc_out,
- coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
- coff_SWAP_scnhdr_out,
- FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
-#ifdef COFF_LONG_FILENAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_LONG_SECTION_NAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
- 4,
-#else
- 2,
-#endif
- COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
- coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
- coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
- coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
- coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
- coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
- coff_classify_symbol, coff_compute_section_file_positions,
- coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
- coff_adjust_symndx, coff_link_add_one_symbol,
- coff_link_output_has_begun, coff_final_link_postscript
- };
-
-/* COFF1 differs in section header size. */
-static const bfd_coff_backend_data ticoff1_swap_table =
- {
- coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
- coff_SWAP_aux_out, coff_SWAP_sym_out,
- coff_SWAP_lineno_out, coff_SWAP_reloc_out,
- coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
- coff_SWAP_scnhdr_out,
- FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
-#ifdef COFF_LONG_FILENAMES
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_LONG_SECTION_NAMES
- TRUE,
-#else
- FALSE,
-#endif
- COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
-#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
- TRUE,
-#else
- FALSE,
-#endif
-#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
- 4,
-#else
- 2,
-#endif
- coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
- coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
- coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
- coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
- coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
- coff_classify_symbol, coff_compute_section_file_positions,
- coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
- coff_adjust_symndx, coff_link_add_one_symbol,
- coff_link_output_has_begun, coff_final_link_postscript
- };
-
/* TI COFF v0, DOS tools (little-endian headers). */
const bfd_target tic54x_coff0_vec =
{
diff --git a/bfd/coff-tic80.c b/bfd/coff-tic80.c
index 4185e7b18d8..7329b7b0dcd 100644
--- a/bfd/coff-tic80.c
+++ b/bfd/coff-tic80.c
@@ -719,4 +719,4 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
#undef C_LASTENT /* Clashes with TIc80's C_STATLAB */
#include "coffcode.h"
-CREATE_LITTLE_COFF_TARGET_VEC (tic80coff_vec, "coff-tic80", D_PAGED, 0, '_', NULL)
+CREATE_LITTLE_COFF_TARGET_VEC (tic80coff_vec, "coff-tic80", D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-w65.c b/bfd/coff-w65.c
index 093764a0da0..cc31a23108d 100644
--- a/bfd/coff-w65.c
+++ b/bfd/coff-w65.c
@@ -380,4 +380,4 @@ w65_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
bfd_coff_reloc16_get_relocated_section_contents
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
-CREATE_LITTLE_COFF_TARGET_VEC (w65_vec, "coff-w65", BFD_IS_RELAXABLE, 0, '_', NULL)
+CREATE_LITTLE_COFF_TARGET_VEC (w65_vec, "coff-w65", BFD_IS_RELAXABLE, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-we32k.c b/bfd/coff-we32k.c
index fb674a95806..b71df53ce81 100644
--- a/bfd/coff-we32k.c
+++ b/bfd/coff-we32k.c
@@ -66,4 +66,4 @@ static reloc_howto_type howto_table[] =
#define coff_write_armap bsd_write_armap
-CREATE_BIG_COFF_TARGET_VEC (we32kcoff_vec, "coff-we32k", 0, 0, 0, NULL)
+CREATE_BIG_COFF_TARGET_VEC (we32kcoff_vec, "coff-we32k", 0, 0, 0, NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coff-z8k.c b/bfd/coff-z8k.c
index 068cfac7b6b..3337376fadb 100644
--- a/bfd/coff-z8k.c
+++ b/bfd/coff-z8k.c
@@ -350,4 +350,4 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
bfd_coff_reloc16_get_relocated_section_contents
#define coff_bfd_relax_section bfd_coff_reloc16_relax_section
-CREATE_BIG_COFF_TARGET_VEC (z8kcoff_vec, "coff-z8k", 0, 0, '_', NULL)
+CREATE_BIG_COFF_TARGET_VEC (z8kcoff_vec, "coff-z8k", 0, 0, '_', NULL, COFF_SWAP_TABLE)
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 31338ee99ea..e9ad4df7e80 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -362,6 +362,12 @@ static unsigned int coff_compute_checksum
static bfd_boolean coff_apply_checksum
PARAMS ((bfd *));
#endif
+#ifdef TICOFF
+static bfd_boolean ticoff0_bad_format_hook
+ PARAMS ((bfd *, PTR ));
+static bfd_boolean ticoff1_bad_format_hook
+ PARAMS ((bfd *, PTR ));
+#endif
/* void warning(); */
@@ -1439,6 +1445,36 @@ coff_bad_format_hook (abfd, filehdr)
return TRUE;
}
+#ifdef TICOFF
+static bfd_boolean
+ticoff0_bad_format_hook (abfd, filehdr)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ PTR filehdr;
+{
+ struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
+
+ if (COFF0_BADMAG (*internal_f))
+ return FALSE;
+
+ return TRUE;
+}
+#endif
+
+#ifdef TICOFF
+static bfd_boolean
+ticoff1_bad_format_hook (abfd, filehdr)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ PTR filehdr;
+{
+ struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
+
+ if (COFF1_BADMAG (*internal_f))
+ return FALSE;
+
+ return TRUE;
+}
+#endif
+
/* Check whether this section uses an alignment other than the
default. */
@@ -5338,6 +5374,92 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table =
coff_link_output_has_begun, coff_final_link_postscript
};
+#ifdef TICOFF
+/* COFF0 differs in file/section header size and relocation entry size. */
+static const bfd_coff_backend_data ticoff0_swap_table =
+{
+ coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
+ coff_SWAP_aux_out, coff_SWAP_sym_out,
+ coff_SWAP_lineno_out, coff_SWAP_reloc_out,
+ coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
+ coff_SWAP_scnhdr_out,
+ FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN,
+#ifdef COFF_LONG_FILENAMES
+ TRUE,
+#else
+ FALSE,
+#endif
+#ifdef COFF_LONG_SECTION_NAMES
+ TRUE,
+#else
+ FALSE,
+#endif
+ COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
+#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
+ TRUE,
+#else
+ FALSE,
+#endif
+#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
+ 4,
+#else
+ 2,
+#endif
+ coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
+ coff_SWAP_reloc_in, ticoff0_bad_format_hook, coff_set_arch_mach_hook,
+ coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
+ coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
+ coff_classify_symbol, coff_compute_section_file_positions,
+ coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
+ coff_adjust_symndx, coff_link_add_one_symbol,
+ coff_link_output_has_begun, coff_final_link_postscript
+};
+#endif
+
+#ifdef TICOFF
+/* COFF1 differs in section header size. */
+static const bfd_coff_backend_data ticoff1_swap_table =
+{
+ coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in,
+ coff_SWAP_aux_out, coff_SWAP_sym_out,
+ coff_SWAP_lineno_out, coff_SWAP_reloc_out,
+ coff_SWAP_filehdr_out, coff_SWAP_aouthdr_out,
+ coff_SWAP_scnhdr_out,
+ FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN,
+#ifdef COFF_LONG_FILENAMES
+ TRUE,
+#else
+ FALSE,
+#endif
+#ifdef COFF_LONG_SECTION_NAMES
+ TRUE,
+#else
+ FALSE,
+#endif
+ COFF_DEFAULT_SECTION_ALIGNMENT_POWER,
+#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS
+ TRUE,
+#else
+ FALSE,
+#endif
+#ifdef COFF_DEBUG_STRING_WIDE_PREFIX
+ 4,
+#else
+ 2,
+#endif
+ coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in,
+ coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook,
+ coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook,
+ coff_slurp_symbol_table, symname_in_debug_hook, coff_pointerize_aux_hook,
+ coff_print_aux, coff_reloc16_extra_cases, coff_reloc16_estimate,
+ coff_classify_symbol, coff_compute_section_file_positions,
+ coff_start_final_link, coff_relocate_section, coff_rtype_to_howto,
+ coff_adjust_symndx, coff_link_add_one_symbol,
+ coff_link_output_has_begun, coff_final_link_postscript
+};
+#endif
+
#ifndef coff_close_and_cleanup
#define coff_close_and_cleanup _bfd_generic_close_and_cleanup
#endif
@@ -5413,7 +5535,7 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table =
#define coff_bfd_discard_group bfd_generic_discard_group
#endif
-#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \
+#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \
const bfd_target VAR = \
{ \
NAME , \
@@ -5460,10 +5582,60 @@ const bfd_target VAR = \
\
ALTERNATIVE, \
\
- COFF_SWAP_TABLE \
+ SWAP_TABLE \
+};
+
+#define CREATE_BIGHDR_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \
+const bfd_target VAR = \
+{ \
+ NAME , \
+ bfd_target_coff_flavour, \
+ BFD_ENDIAN_LITTLE, /* data byte order is little */ \
+ BFD_ENDIAN_BIG, /* header byte order is big */ \
+ /* object flags */ \
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | \
+ HAS_SYMS | HAS_LOCALS | WP_TEXT | EXTRA_O_FLAGS), \
+ /* section flags */ \
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | EXTRA_S_FLAGS),\
+ UNDER, /* leading symbol underscore */ \
+ '/', /* ar_pad_char */ \
+ 15, /* ar_max_namelen */ \
+ \
+ /* Data conversion functions. */ \
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64, \
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32, \
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, \
+ \
+ /* Header conversion functions. */ \
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64, \
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32, \
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, \
+ \
+ /* bfd_check_format */ \
+ { _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \
+ _bfd_dummy_target }, \
+ /* bfd_set_format */ \
+ { bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \
+ /* bfd_write_contents */ \
+ { bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \
+ bfd_false }, \
+ \
+ BFD_JUMP_TABLE_GENERIC (coff), \
+ BFD_JUMP_TABLE_COPY (coff), \
+ BFD_JUMP_TABLE_CORE (_bfd_nocore), \
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff), \
+ BFD_JUMP_TABLE_SYMBOLS (coff), \
+ BFD_JUMP_TABLE_RELOCS (coff), \
+ BFD_JUMP_TABLE_WRITE (coff), \
+ BFD_JUMP_TABLE_LINK (coff), \
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), \
+ \
+ ALTERNATIVE, \
+ \
+ SWAP_TABLE \
};
-#define CREATE_LITTLE_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \
+#define CREATE_LITTLE_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \
const bfd_target VAR = \
{ \
NAME , \
@@ -5508,5 +5680,5 @@ const bfd_target VAR = \
\
ALTERNATIVE, \
\
- COFF_SWAP_TABLE \
+ SWAP_TABLE \
};
diff --git a/bfd/config.bfd b/bfd/config.bfd
index d93b07131a7..65ae17768b6 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -68,8 +68,21 @@ esac
# Make sure that the left side always has two dashes. Otherwise you
# can get spurious matches. Even for unambiguous cases, do this as a
# convention, else the table becomes a real mess to understand and maintain.
+#
+# Keep obsolete entries above the START comment, to keep them out of
+# targmatch.h.
case "${targ}" in
+ mips*-dec-bsd*)
+ echo "This target is obsolete and has been removed."
+ exit 1
+ ;;
+
+ mips*-*-pe*)
+ echo "This target is obsolete and has been removed."
+ exit 1
+ ;;
+
# START OF targmatch.h
#ifdef BFD64
alpha*-*-freebsd*)
@@ -718,10 +731,6 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
- mips*-dec-bsd*)
- targ_defvec=aout_mips_little_vec
- targ_underscore=yes
- ;;
mips*-dec-mach3*)
targ_defvec=aout_mips_little_vec
targ_cflags=-DSTAT_FOR_EXEC
@@ -756,11 +765,6 @@ case "${targ}" in
targ_defvec=aout_mips_little_vec
targ_cflags=-DSTAT_FOR_EXEC
;;
- mips*-*-pe*)
- targ_defvec=mipslpe_vec
- targ_selvecs="mipslpei_vec mipslpei_vec ecoff_little_vec ecoff_big_vec"
- targ_underscore=yes
- ;;
mips*-*-sysv4*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
diff --git a/bfd/config.in b/bfd/config.in
index 222096e3c02..9a73c730252 100644
--- a/bfd/config.in
+++ b/bfd/config.in
@@ -25,9 +25,6 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
@@ -160,15 +157,9 @@
/* Define if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_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 <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
/* Define if you have the <time.h> header file. */
#undef HAVE_TIME_H
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 1da605502b5..d3973071fb3 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1254,6 +1254,9 @@ struct elf_obj_tdata
/* Number of symbol version references we are about to emit. */
unsigned int cverrefs;
+ /* Segment flags for the PT_GNU_STACK segment. */
+ unsigned int stack_flags;
+
/* Symbol version definitions in external objects. */
Elf_Internal_Verdef *verdef;
diff --git a/bfd/elf.c b/bfd/elf.c
index 66383e7c0d4..906e13d8796 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1070,6 +1070,7 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
case PT_PHDR: pt = "PHDR"; break;
case PT_TLS: pt = "TLS"; break;
case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
+ case PT_GNU_STACK: pt = "STACK"; break;
default: sprintf (buf, "0x%lx", p->p_type); pt = buf; break;
}
fprintf (f, "%8s off 0x", pt);
@@ -2296,6 +2297,9 @@ bfd_section_from_phdr (abfd, hdr, index)
return _bfd_elf_make_section_from_phdr (abfd, hdr, index,
"eh_frame_hdr");
+ case PT_GNU_STACK:
+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "stack");
+
default:
/* Check for any processor-specific program segment types.
If no handler for them, default to making "segment" sections. */
@@ -3513,6 +3517,21 @@ map_sections_to_segments (abfd)
pm = &m->next;
}
+ if (elf_tdata (abfd)->stack_flags)
+ {
+ amt = sizeof (struct elf_segment_map);
+ m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
+ if (m == NULL)
+ goto error_return;
+ m->next = NULL;
+ m->p_type = PT_GNU_STACK;
+ m->p_flags = elf_tdata (abfd)->stack_flags;
+ m->p_flags_valid = 1;
+
+ *pm = m;
+ pm = &m->next;
+ }
+
free (sections);
sections = NULL;
@@ -4099,6 +4118,12 @@ get_program_header_size (abfd)
++segs;
}
+ if (elf_tdata (abfd)->stack_flags)
+ {
+ /* We need a PT_GNU_STACK segment. */
+ ++segs;
+ }
+
for (s = abfd->sections; s != NULL; s = s->next)
{
if ((s->flags & SEC_LOAD) != 0
@@ -7015,18 +7040,30 @@ elfcore_grok_nto_status (abfd, note, tid)
char buf[100];
char *name;
asection *sect;
+ short sig;
+ unsigned flags;
/* nto_procfs_status 'pid' field is at offset 0. */
elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, (bfd_byte *) ddata);
- /* nto_procfs_status 'tid' field is at offset 4. */
- elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, (bfd_byte *) ddata + 4);
+ /* nto_procfs_status 'tid' field is at offset 4. Pass it back. */
+ *tid = bfd_get_32 (abfd, (bfd_byte *) ddata + 4);
+
+ /* nto_procfs_status 'flags' field is at offset 8. */
+ flags = bfd_get_32 (abfd, (bfd_byte *) ddata + 8);
/* nto_procfs_status 'what' field is at offset 14. */
- elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, (bfd_byte *) ddata + 14);
+ if ((sig = bfd_get_16 (abfd, (bfd_byte *) ddata + 14)) > 0)
+ {
+ elf_tdata (abfd)->core_signal = sig;
+ elf_tdata (abfd)->core_lwpid = *tid;
+ }
- /* Pass tid back. */
- *tid = elf_tdata (abfd)->core_lwpid;
+ /* _DEBUG_FLAG_CURTID (current thread) is 0x80. Some cores
+ do not come from signals so we make sure we set the current
+ thread just in case. */
+ if (flags & 0x00000080)
+ elf_tdata (abfd)->core_lwpid = *tid;
/* Make a ".qnx_core_status/%d" section. */
sprintf (buf, ".qnx_core_status/%d", *tid);
@@ -7075,7 +7112,11 @@ elfcore_grok_nto_gregs (abfd, note, tid)
sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
- return elfcore_maybe_make_sect (abfd, ".reg", sect);
+ /* This is the current thread. */
+ if (elf_tdata (abfd)->core_lwpid == tid)
+ return elfcore_maybe_make_sect (abfd, ".reg", sect);
+
+ return TRUE;
}
#define BFD_QNT_CORE_INFO 7
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index becfb73c873..e448c43b2d0 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3666,16 +3666,11 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->elf.root.type == bfd_link_hash_undefweak)
;
- else if (info->shared && !info->no_undefined
+ else if (info->shared
+ && !info->no_undefined
&& ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
&& h->elf.type != STT_PARISC_MILLI)
- {
- if (!((*info->callbacks->undefined_symbol)
- (info, h->elf.root.root.string, input_bfd,
- input_section, rel->r_offset, FALSE)))
- return FALSE;
- warned_undef = TRUE;
- }
+ ;
else
{
if (!((*info->callbacks->undefined_symbol)
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index cfcb7b34c19..cd3dc9acbe7 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1797,7 +1797,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -1963,7 +1963,7 @@ elf_i386_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 1e1ab8cce3b..d2cbd836f40 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2719,7 +2719,7 @@ allocate_dynrelocs (h, inf)
for two entries is allocated. */
s->_raw_size += PLT_ENTRY_SIZE;
if ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE
- >= PLT_NUM_SINGLE_ENTRIES)
+ > PLT_NUM_SINGLE_ENTRIES)
s->_raw_size += PLT_ENTRY_SIZE;
/* We also need to make an entry in the .rela.plt section. */
@@ -2920,7 +2920,7 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (htab->elf.dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -3102,7 +3102,7 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 9475f60a669..97be1dbd013 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -1927,7 +1927,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -2085,7 +2085,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 4ff31bfb695..2042c34dec2 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -4338,7 +4338,7 @@ sh_elf_size_dynamic_sections (output_bfd, info)
if (htab->root.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -4500,7 +4500,7 @@ sh_elf_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (! add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index e2c65448150..5f1bec589c7 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1820,7 +1820,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -1997,7 +1997,7 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 62bbbdacf21..99c007768ac 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -189,7 +189,7 @@ static reloc_howto_type v850_elf_howto_table[] =
FALSE), /* pcrel_offset */
/* Simple 32bit reloc. */
- HOWTO (R_V850_32, /* type */
+ HOWTO (R_V850_ABS32, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
32, /* bitsize */
@@ -197,7 +197,7 @@ static reloc_howto_type v850_elf_howto_table[] =
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
v850_elf_reloc, /* special_function */
- "R_V850_32", /* name */
+ "R_V850_ABS32", /* name */
FALSE, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
@@ -518,6 +518,21 @@ static reloc_howto_type v850_elf_howto_table[] =
0, /* src_mask */
0, /* dst_mask */
TRUE), /* pcrel_offset */
+
+ /* Simple pc-relative 32bit reloc. */
+ HOWTO (R_V850_REL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ v850_elf_reloc, /* special_function */
+ "R_V850_REL32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* Map BFD reloc types to V850 ELF reloc types. */
@@ -538,7 +553,8 @@ static const struct v850_elf_reloc_map v850_elf_reloc_map[] =
{ BFD_RELOC_HI16_S, R_V850_HI16_S },
{ BFD_RELOC_HI16, R_V850_HI16 },
{ BFD_RELOC_LO16, R_V850_LO16 },
- { BFD_RELOC_32, R_V850_32 },
+ { BFD_RELOC_32, R_V850_ABS32 },
+ { BFD_RELOC_32_PCREL, R_V850_REL32 },
{ BFD_RELOC_16, R_V850_16 },
{ BFD_RELOC_8, R_V850_8 },
{ BFD_RELOC_V850_SDA_16_16_OFFSET, R_V850_SDA_16_16_OFFSET },
@@ -672,7 +688,8 @@ v850_elf_check_relocs (abfd, info, sec, relocs)
case R_V850_HI16_S:
case R_V850_HI16:
case R_V850_LO16:
- case R_V850_32:
+ case R_V850_ABS32:
+ case R_V850_REL32:
case R_V850_16:
case R_V850_8:
case R_V850_CALLT_6_7_OFFSET:
@@ -905,7 +922,8 @@ v850_elf_perform_relocation (abfd, r_type, addend, address)
/* fprintf (stderr, "reloc type %d not SUPPORTED\n", r_type ); */
return bfd_reloc_notsupported;
- case R_V850_32:
+ case R_V850_REL32:
+ case R_V850_ABS32:
bfd_put_32 (abfd, addend, address);
return bfd_reloc_ok;
@@ -1466,11 +1484,17 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd,
value = SEXT24 (value);
break;
+ case R_V850_REL32:
+ value -= (input_section->output_section->vma
+ + input_section->output_offset
+ + offset);
+ break;
+
case R_V850_HI16_S:
case R_V850_HI16:
case R_V850_LO16:
case R_V850_16:
- case R_V850_32:
+ case R_V850_ABS32:
case R_V850_8:
break;
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 9ce3bf3b56a..58ab6ba7a5d 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -4090,7 +4090,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (!info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -4176,7 +4176,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index f32d261fe6e..98af624baf5 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -5737,7 +5737,7 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -5936,7 +5936,7 @@ ppc64_elf_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 98555f269bf..b5d724a5582 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -1898,7 +1898,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -2056,7 +2056,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index d666fca9cbe..fe3195ca3a0 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -3643,7 +3643,7 @@ sh64_elf64_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -3777,7 +3777,7 @@ sh64_elf64_size_dynamic_sections (output_bfd, info)
must add the entries now so that we get the correct size for
the .dynamic section. The DT_DEBUG entry is filled in by the
dynamic linker and used by the debugger. */
- if (! info->shared)
+ if (info->executable)
{
if (! bfd_elf64_add_dynamic_entry (info, DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index d7ad1b725de..d25b429337a 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -1781,7 +1781,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -1880,7 +1880,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
struct elf_strtab_hash *dynstr;
struct elf_link_hash_table *eht = elf_hash_table (info);
- if (!info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index c0ce57d708d..b39cdcd819c 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1618,7 +1618,7 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -1779,7 +1779,7 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
#define add_dynamic_entry(TAG, VAL) \
bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
- if (! info->shared)
+ if (info->executable)
{
if (!add_dynamic_entry (DT_DEBUG, 0))
return FALSE;
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 55c5b4264e0..0263631e791 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1363,7 +1363,9 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
relent->addend = rela.r_addend;
- if (entsize == sizeof (Elf_External_Rela))
+ if ((entsize == sizeof (Elf_External_Rela)
+ && ebd->elf_info_to_howto != NULL)
+ || ebd->elf_info_to_howto_rel == NULL)
(*ebd->elf_info_to_howto) (abfd, relent, &rela);
else
(*ebd->elf_info_to_howto_rel) (abfd, relent, &rela);
diff --git a/bfd/elflink.c b/bfd/elflink.c
index cc311863e1a..d6f6d705ead 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -94,7 +94,7 @@ _bfd_elf_create_got_section (abfd, info)
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
- if (info->shared
+ if (! info->executable
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -144,7 +144,7 @@ _bfd_elf_link_create_dynamic_sections (abfd, info)
/* A dynamically linked executable has a .interp section, but a
shared library does not. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_make_section (abfd, ".interp");
if (s == NULL
@@ -227,7 +227,7 @@ _bfd_elf_link_create_dynamic_sections (abfd, info)
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
- if (info->shared
+ if (! info->executable
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -295,7 +295,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
- if (info->shared
+ if (! info->executable
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
}
@@ -1760,7 +1760,7 @@ _bfd_elf_link_assign_sym_version (h, data)
/* If we are building an application, we need to create a
version node for this version. */
- if (t == NULL && ! info->shared)
+ if (t == NULL && info->executable)
{
struct bfd_elf_version_tree **pp;
int version_index;
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 7b32491d945..8acb7a93632 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -474,7 +474,7 @@ elf_link_add_object_symbols (abfd, info)
.gnu.warning.SYMBOL are treated as warning symbols for the given
symbol. This differs from .gnu.warning sections, which generate
warnings when they are included in an output file. */
- if (! info->shared)
+ if (info->executable)
{
asection *s;
@@ -1321,7 +1321,7 @@ elf_link_add_object_symbols (abfd, info)
}
else
new_flag = ELF_LINK_HASH_DEF_REGULAR;
- if (info->shared
+ if (! info->executable
|| (old_flags & (ELF_LINK_HASH_DEF_DYNAMIC
| ELF_LINK_HASH_REF_DYNAMIC)) != 0)
dynsym = TRUE;
@@ -1937,6 +1937,43 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (! is_elf_hash_table (info))
return TRUE;
+ if (info->execstack)
+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
+ else if (info->noexecstack)
+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
+ else
+ {
+ bfd *inputobj;
+ asection *notesec = NULL;
+ int exec = 0;
+
+ for (inputobj = info->input_bfds;
+ inputobj;
+ inputobj = inputobj->link_next)
+ {
+ asection *s;
+
+ if (inputobj->flags & DYNAMIC)
+ continue;
+ s = bfd_get_section_by_name (inputobj, ".note.GNU-stack");
+ if (s)
+ {
+ if (s->flags & SEC_CODE)
+ exec = PF_X;
+ notesec = s;
+ }
+ else
+ exec = PF_X;
+ }
+ if (notesec)
+ {
+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | exec;
+ if (exec && info->relocateable
+ && notesec->output_section != bfd_abs_section_ptr)
+ notesec->output_section->flags |= SEC_CODE;
+ }
+ }
+
/* Any syms created from now on start with -1 in
got.refcount/offset and plt.refcount/offset. */
elf_hash_table (info)->init_refcount = elf_hash_table (info)->init_offset;
@@ -2174,7 +2211,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (bfd_get_section_by_name (output_bfd, ".preinit_array") != NULL)
{
/* DT_PREINIT_ARRAY is not allowed in shared library. */
- if (info->shared)
+ if (! info->executable)
{
bfd *sub;
asection *o;
@@ -2440,7 +2477,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
if (info->flags_1)
{
- if (! info->shared)
+ if (info->executable)
info->flags_1 &= ~ (DF_1_INITFIRST
| DF_1_NODELETE
| DF_1_NOOPEN);
@@ -4417,7 +4454,8 @@ elf_link_output_extsym (h, data)
referenced by regular files, because we will already have issued
warnings for them. */
if (! finfo->info->relocateable
- && (! finfo->info->shared || ! finfo->info->allow_shlib_undefined)
+ && (finfo->info->executable
+ || ! finfo->info->allow_shlib_undefined)
&& h->root.type == bfd_link_hash_undefined
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
@@ -5002,13 +5040,13 @@ elf_link_input_bfd (finfo, input_bfd)
memset (rel, 0, sizeof (*rel));
}
else
- {
- if (! ((*finfo->info->callbacks->undefined_symbol)
- (finfo->info, h->root.root.string,
- input_bfd, o, rel->r_offset,
- TRUE)))
- return FALSE;
- }
+ finfo->info->callbacks->error_handler
+ (LD_DEFINITION_IN_DISCARDED_SECTION,
+ _("%T: discarded in section `%s' from %s\n"),
+ h->root.root.string,
+ h->root.root.string,
+ h->root.u.def.section->name,
+ bfd_archive_filename (h->root.u.def.section->owner));
}
}
else
@@ -5027,26 +5065,21 @@ elf_link_input_bfd (finfo, input_bfd)
}
else
{
- bfd_boolean ok;
- const char *msg
- = _("local symbols in discarded section %s");
- bfd_size_type amt
- = strlen (sec->name) + strlen (msg) - 1;
- char *buf = (char *) bfd_malloc (amt);
-
- if (buf != NULL)
- sprintf (buf, msg, sec->name);
- else
- buf = (char *) sec->name;
- ok = (*finfo->info->callbacks
- ->undefined_symbol) (finfo->info, buf,
- input_bfd, o,
- rel->r_offset,
- TRUE);
- if (buf != sec->name)
+ static int count;
+ int ok;
+ char *buf;
+
+ ok = asprintf (&buf, "local symbol %d",
+ count++);
+ if (ok <= 0)
+ buf = (char *) "local symbol";
+ finfo->info->callbacks->error_handler
+ (LD_DEFINITION_IN_DISCARDED_SECTION,
+ _("%T: discarded in section `%s' from %s\n"),
+ buf, buf, sec->name,
+ bfd_archive_filename (input_bfd));
+ if (ok != -1)
free (buf);
- if (!ok)
- return FALSE;
}
}
}
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index ab2ff21c887..37fc968f53b 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -2903,7 +2903,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
/* Set the contents of the .interp section to the interpreter. */
if (ia64_info->root.dynamic_sections_created
- && !info->shared)
+ && info->executable)
{
sec = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (sec != NULL);
@@ -3078,7 +3078,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
later (in finish_dynamic_sections) but we must add the entries now
so that we get the correct size for the .dynamic section. */
- if (!info->shared)
+ if (info->executable)
{
/* The DT_DEBUG entry is filled in by the dynamic linker and used
by the debugger. */
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index bede3e61293..e390bed9eba 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -7799,10 +7799,10 @@ _bfd_mips_elf_hide_symbol (info, entry, force_local)
h = (struct mips_elf_link_hash_entry *) entry;
if (h->forced_local)
return;
- h->forced_local = TRUE;
+ h->forced_local = force_local;
dynobj = elf_hash_table (info)->dynobj;
- if (dynobj != NULL)
+ if (dynobj != NULL && force_local)
{
got = mips_elf_got_section (dynobj, FALSE);
g = mips_elf_section_data (got)->u.got_info;
@@ -7898,7 +7898,7 @@ _bfd_mips_elf_discard_info (abfd, cookie, info)
cookie->rel = cookie->rels;
cookie->relend = cookie->rels + o->reloc_count;
- for (i = 0, skip = 0; i < o->_raw_size; i ++)
+ for (i = 0, skip = 0; i < o->_raw_size / PDR_SIZE; i ++)
{
if (MNAME(abfd,_bfd_elf,reloc_symbol_deleted_p) (i * PDR_SIZE, cookie))
{
diff --git a/bfd/pef.c b/bfd/pef.c
index b4c5bfed1e8..550dbb81f55 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -1,5 +1,5 @@
/* PEF support for BFD.
- Copyright 1999, 2000, 2001, 2002
+ Copyright 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,7 +18,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include <ctype.h>
+#include "safe-ctype.h"
#include "pef.h"
#include "pef-traceback.h"
@@ -33,76 +33,56 @@
#define BFD_IO_FUNCS 0
#endif
-#define bfd_pef_close_and_cleanup _bfd_generic_close_and_cleanup
-#define bfd_pef_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
-#define bfd_pef_new_section_hook _bfd_generic_new_section_hook
-#define bfd_pef_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define bfd_pef_get_lineno _bfd_nosymbols_get_lineno
-#define bfd_pef_find_nearest_line _bfd_nosymbols_find_nearest_line
-#define bfd_pef_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define bfd_pef_read_minisymbols _bfd_generic_read_minisymbols
-#define bfd_pef_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
-
-#define bfd_pef_get_reloc_upper_bound _bfd_norelocs_get_reloc_upper_bound
-#define bfd_pef_canonicalize_reloc _bfd_norelocs_canonicalize_reloc
-#define bfd_pef_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
-
-#define bfd_pef_set_arch_mach _bfd_generic_set_arch_mach
-
-#define bfd_pef_get_section_contents _bfd_generic_get_section_contents
-#define bfd_pef_set_section_contents _bfd_generic_set_section_contents
-
-#define bfd_pef_bfd_get_relocated_section_contents \
- bfd_generic_get_relocated_section_contents
-#define bfd_pef_bfd_relax_section bfd_generic_relax_section
-#define bfd_pef_bfd_gc_sections bfd_generic_gc_sections
-#define bfd_pef_bfd_merge_sections bfd_generic_merge_sections
-#define bfd_pef_bfd_discard_group bfd_generic_discard_group
-#define bfd_pef_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define bfd_pef_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
-#define bfd_pef_bfd_link_add_symbols _bfd_generic_link_add_symbols
-#define bfd_pef_bfd_link_just_syms _bfd_generic_link_just_syms
-#define bfd_pef_bfd_final_link _bfd_generic_final_link
-#define bfd_pef_bfd_link_split_section _bfd_generic_link_split_section
-#define bfd_pef_get_section_contents_in_window \
- _bfd_generic_get_section_contents_in_window
-
-static void bfd_pef_print_symbol
-PARAMS ((bfd *abfd, PTR afile, asymbol *symbol, bfd_print_symbol_type how));
-static void bfd_pef_convert_architecture
-PARAMS ((unsigned long architecture,
- enum bfd_architecture *type, unsigned long *subtype));
-static bfd_boolean bfd_pef_mkobject PARAMS ((bfd *abfd));
-static int bfd_pef_parse_traceback_table
-PARAMS ((bfd *abfd, asection *section, unsigned char *buf,
- size_t len, size_t pos, asymbol *sym, FILE *file));
-static const char *bfd_pef_section_name PARAMS ((bfd_pef_section *section));
-static unsigned long bfd_pef_section_flags PARAMS ((bfd_pef_section *section));
-static asection *bfd_pef_make_bfd_section
-PARAMS ((bfd *abfd, bfd_pef_section *section));
-static int bfd_pef_read_header PARAMS ((bfd *abfd, bfd_pef_header *header));
-static const bfd_target *bfd_pef_object_p PARAMS ((bfd *));
-static int bfd_pef_parse_traceback_tables
-PARAMS ((bfd *abfd, asection *sec, unsigned char *buf,
- size_t len, long *nsym, asymbol **csym));
-static int bfd_pef_parse_function_stub
-PARAMS ((bfd *abfd, unsigned char *buf, size_t len, unsigned long *offset));
-static int bfd_pef_parse_function_stubs
-PARAMS ((bfd *abfd, asection *codesec, unsigned char *codebuf, size_t codelen,
- unsigned char *loaderbuf, size_t loaderlen, unsigned long *nsym,
- asymbol **csym));
-static long bfd_pef_parse_symbols PARAMS ((bfd *abfd, asymbol **csym));
-static long bfd_pef_count_symbols PARAMS ((bfd *abfd));
-static long bfd_pef_get_symtab_upper_bound PARAMS ((bfd *));
-static long bfd_pef_get_symtab PARAMS ((bfd *, asymbol **));
-static asymbol *bfd_pef_make_empty_symbol PARAMS ((bfd *));
-static void bfd_pef_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
-static int bfd_pef_sizeof_headers PARAMS ((bfd *, bfd_boolean));
-
-static int bfd_pef_xlib_read_header
-PARAMS ((bfd *abfd, bfd_pef_xlib_header *header));
-static int bfd_pef_xlib_scan PARAMS ((bfd *abfd, bfd_pef_xlib_header *header));
-static const bfd_target *bfd_pef_xlib_object_p PARAMS ((bfd *abfd));
+#define bfd_pef_close_and_cleanup _bfd_generic_close_and_cleanup
+#define bfd_pef_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
+#define bfd_pef_new_section_hook _bfd_generic_new_section_hook
+#define bfd_pef_bfd_is_local_label_name bfd_generic_is_local_label_name
+#define bfd_pef_get_lineno _bfd_nosymbols_get_lineno
+#define bfd_pef_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define bfd_pef_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
+#define bfd_pef_read_minisymbols _bfd_generic_read_minisymbols
+#define bfd_pef_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
+#define bfd_pef_get_reloc_upper_bound _bfd_norelocs_get_reloc_upper_bound
+#define bfd_pef_canonicalize_reloc _bfd_norelocs_canonicalize_reloc
+#define bfd_pef_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
+#define bfd_pef_set_arch_mach _bfd_generic_set_arch_mach
+#define bfd_pef_get_section_contents _bfd_generic_get_section_contents
+#define bfd_pef_set_section_contents _bfd_generic_set_section_contents
+#define bfd_pef_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
+#define bfd_pef_bfd_relax_section bfd_generic_relax_section
+#define bfd_pef_bfd_gc_sections bfd_generic_gc_sections
+#define bfd_pef_bfd_merge_sections bfd_generic_merge_sections
+#define bfd_pef_bfd_discard_group bfd_generic_discard_group
+#define bfd_pef_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
+#define bfd_pef_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
+#define bfd_pef_bfd_link_add_symbols _bfd_generic_link_add_symbols
+#define bfd_pef_bfd_link_just_syms _bfd_generic_link_just_syms
+#define bfd_pef_bfd_final_link _bfd_generic_final_link
+#define bfd_pef_bfd_link_split_section _bfd_generic_link_split_section
+#define bfd_pef_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
+
+static void bfd_pef_print_symbol PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
+static void bfd_pef_convert_architecture PARAMS ((unsigned long, enum bfd_architecture *, unsigned long *));
+static bfd_boolean bfd_pef_mkobject PARAMS ((bfd *));
+static int bfd_pef_parse_traceback_table PARAMS ((bfd *, asection *, unsigned char *, size_t, size_t, asymbol *, FILE *));
+static const char *bfd_pef_section_name PARAMS ((bfd_pef_section *));
+static unsigned long bfd_pef_section_flags PARAMS ((bfd_pef_section *));
+static asection *bfd_pef_make_bfd_section PARAMS ((bfd *, bfd_pef_section *));
+static int bfd_pef_read_header PARAMS ((bfd *, bfd_pef_header *));
+static const bfd_target *bfd_pef_object_p PARAMS ((bfd *));
+static int bfd_pef_parse_traceback_tables PARAMS ((bfd *, asection *, unsigned char *, size_t, long *, asymbol **));
+static int bfd_pef_parse_function_stub PARAMS ((bfd *, unsigned char *, size_t, unsigned long *));
+static int bfd_pef_parse_function_stubs PARAMS ((bfd *, asection *, unsigned char *, size_t, unsigned char *, size_t, unsigned long *, asymbol **));
+static long bfd_pef_parse_symbols PARAMS ((bfd *, asymbol **));
+static long bfd_pef_count_symbols PARAMS ((bfd *));
+static long bfd_pef_get_symtab_upper_bound PARAMS ((bfd *));
+static long bfd_pef_get_symtab PARAMS ((bfd *, asymbol **));
+static asymbol *bfd_pef_make_empty_symbol PARAMS ((bfd *));
+static void bfd_pef_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
+static int bfd_pef_sizeof_headers PARAMS ((bfd *, bfd_boolean));
+static int bfd_pef_xlib_read_header PARAMS ((bfd *, bfd_pef_xlib_header *));
+static int bfd_pef_xlib_scan PARAMS ((bfd *, bfd_pef_xlib_header *));
+static const bfd_target *bfd_pef_xlib_object_p PARAMS ((bfd *));
static void
bfd_pef_print_symbol (abfd, afile, symbol, how)
@@ -112,6 +92,7 @@ bfd_pef_print_symbol (abfd, afile, symbol, how)
bfd_print_symbol_type how;
{
FILE *file = (FILE *) afile;
+
switch (how)
{
case bfd_print_symbol_name:
@@ -186,14 +167,14 @@ bfd_pef_parse_traceback_table (abfd, section, buf, len, pos, sym, file)
sym->flags = 0;
sym->udata.i = 0;
- /* memcpy is fine since all fields are unsigned char */
+ /* memcpy is fine since all fields are unsigned char. */
if ((pos + 8) > len)
return -1;
memcpy (&table, buf + pos, 8);
- /* calling code relies on returned symbols having a name and
- correct offset */
+ /* Calling code relies on returned symbols having a name and
+ correct offset. */
if ((table.lang != TB_C) && (table.lang != TB_CPLUSPLUS))
return -1;
@@ -218,8 +199,8 @@ bfd_pef_parse_traceback_table (abfd, section, buf, len, pos, sym, file)
off.tb_offset = bfd_getb32 (buf + pos + offset);
offset += 4;
- /* need to subtract 4 because the offset includes the 0x0L
- preceding the table */
+ /* Need to subtract 4 because the offset includes the 0x0L
+ preceding the table. */
if (file != NULL)
fprintf (file, " [offset = 0x%lx]", off.tb_offset);
@@ -271,14 +252,14 @@ bfd_pef_parse_traceback_table (abfd, section, buf, len, pos, sym, file)
memcpy (namebuf, buf + pos + offset, name.name_len);
namebuf[name.name_len] = '\0';
- /* strip leading period inserted by compiler */
+ /* Strip leading period inserted by compiler. */
if (namebuf[0] == '.')
memmove (namebuf, namebuf + 1, name.name_len + 1);
sym->name = namebuf;
for (s = sym->name; (*s != '\0'); s++)
- if (! isprint (*s))
+ if (! ISPRINT (*s))
return -1;
offset += name.name_len;
@@ -713,8 +694,7 @@ static int bfd_pef_parse_traceback_tables (abfd, sec, buf, len, nsym, csym)
for (;;)
{
- /* we're reading symbols two at a time */
-
+ /* We're reading symbols two at a time. */
if (csym && ((csym[count] == NULL) || (csym[count + 1] == NULL)))
break;
@@ -735,7 +715,7 @@ static int bfd_pef_parse_traceback_tables (abfd, sec, buf, len, nsym, csym)
&function, 0);
if (ret < 0)
{
- /* skip over 0x0L to advance to next possible traceback table */
+ /* Skip over 0x0L to advance to next possible traceback table. */
pos += 4;
continue;
}
@@ -743,7 +723,7 @@ static int bfd_pef_parse_traceback_tables (abfd, sec, buf, len, nsym, csym)
BFD_ASSERT (function.name != NULL);
/* Don't bother to compute the name if we are just
- counting symbols */
+ counting symbols. */
if (csym)
{
@@ -913,7 +893,7 @@ static int bfd_pef_parse_function_stubs (abfd, codesec, codebuf, codelen,
{
if (*s == '\0')
break;
- if (! isprint (*s))
+ if (! ISPRINT (*s))
goto error;
namelen++;
}
diff --git a/bfd/po/SRC-POTFILES.in b/bfd/po/SRC-POTFILES.in
index 24d4a48337c..898aa264d52 100644
--- a/bfd/po/SRC-POTFILES.in
+++ b/bfd/po/SRC-POTFILES.in
@@ -1,19 +1,19 @@
aix386-core.c
aix5ppc-core.c
+aout0.c
+aout32.c
+aout64.c
aout-adobe.c
aout-arm.c
aout-cris.c
+aoutf1.h
aout-ns32k.c
aout-sparcle.c
aout-target.h
aout-tic30.c
-aout0.c
-aout32.c
-aout64.c
-aoutf1.h
aoutx.h
-archive.c
archive64.c
+archive.c
archures.c
armnetbsd.c
bfd.c
@@ -26,17 +26,21 @@ cf-i386lynx.c
cf-m68klynx.c
cf-sparclynx.c
cisco-core.c
+coff64-rs6000.c
coff-a29k.c
coff-alpha.c
coff-apollo.c
coff-arm.c
coff-aux.c
+coffcode.h
+coffgen.c
coff-go32.c
coff-h8300.c
coff-h8500.c
coff-i386.c
coff-i860.c
coff-i960.c
+cofflink.c
coff-m68k.c
coff-m88k.c
coff-mips.c
@@ -46,6 +50,7 @@ coff-sh.c
coff-sparc.c
coff-stgo32.c
coff-svm68k.c
+coffswap.h
coff-tic30.c
coff-tic4x.c
coff-tic54x.c
@@ -54,11 +59,6 @@ coff-u68k.c
coff-w65.c
coff-we32k.c
coff-z8k.c
-coff64-rs6000.c
-coffcode.h
-coffgen.c
-cofflink.c
-coffswap.h
corefile.c
cpu-a29k.c
cpu-alpha.c
@@ -111,6 +111,7 @@ cpu-vax.c
cpu-w65.c
cpu-we32k.c
cpu-xstormy16.c
+cpu-xtensa.c
cpu-z8k.c
demo64.c
dwarf1.c
@@ -120,16 +121,10 @@ ecofflink.c
ecoffswap.h
efi-app-ia32.c
efi-app-ia64.c
-elf-bfd.h
-elf-eh-frame.c
-elf-hppa.h
-elf-m10200.c
-elf-m10300.c
-elf-strtab.c
-elf.c
elf32-arc.c
elf32-arm.h
elf32-avr.c
+elf32.c
elf32-cris.c
elf32-d10v.c
elf32-d30v.c
@@ -149,6 +144,7 @@ elf32-iq2000.c
elf32-m32r.c
elf32-m68hc11.c
elf32-m68hc12.c
+elf32-m68hc1x.c
elf32-m68k.c
elf32-m88k.c
elf32-mcore.c
@@ -159,15 +155,16 @@ elf32-or32.c
elf32-pj.c
elf32-ppc.c
elf32-s390.c
-elf32-sh.c
-elf32-sh64-com.c
elf32-sh64.c
+elf32-sh64-com.c
+elf32-sh.c
elf32-sparc.c
elf32-v850.c
elf32-vax.c
elf32-xstormy16.c
-elf32.c
+elf32-xtensa.c
elf64-alpha.c
+elf64.c
elf64-gen.c
elf64-hppa.c
elf64-hppa.h
@@ -178,14 +175,20 @@ elf64-s390.c
elf64-sh64.c
elf64-sparc.c
elf64-x86-64.c
-elf64.c
elfarm-nabi.c
elfarm-oabi.c
+elf-bfd.h
+elf.c
elfcode.h
elfcore.h
+elf-eh-frame.c
+elf-hppa.h
elflink.c
elflink.h
+elf-m10200.c
+elf-m10300.c
elfn32-mips.c
+elf-strtab.c
elfxx-mips.c
epoc-pe-arm.c
epoc-pei-arm.c
@@ -236,16 +239,16 @@ mipsbsd.c
mmo.c
netbsd.h
newsos3.c
-nlm-target.h
-nlm.c
nlm32-alpha.c
+nlm32.c
nlm32-i386.c
nlm32-ppc.c
nlm32-sparc.c
-nlm32.c
nlm64.c
+nlm.c
nlmcode.h
nlmswap.h
+nlm-target.h
ns32k.h
ns32knetbsd.c
oasys.c
@@ -254,24 +257,24 @@ osf-core.c
pc532-mach.c
pdp11.c
pe-arm.c
-pe-i386.c
-pe-mcore.c
-pe-mips.c
-pe-ppc.c
-pe-sh.c
-pef-traceback.h
pef.c
pef.h
+pef-traceback.h
+pe-i386.c
pei-arm.c
+peicode.h
pei-i386.c
pei-mcore.c
pei-mips.c
pei-ppc.c
pei-sh.c
-peicode.h
+pe-mcore.c
+pe-mips.c
+pe-ppc.c
+pe-sh.c
ppcboot.c
-reloc.c
reloc16.c
+reloc.c
riscix.c
sco5-core.c
section.c
@@ -282,8 +285,8 @@ sparclinux.c
sparclynx.c
sparcnetbsd.c
srec.c
-stab-syms.c
stabs.c
+stab-syms.c
sunos.c
syms.c
targets.c
@@ -294,13 +297,15 @@ vaxbsd.c
vaxnetbsd.c
versados.c
version.h
+vms.c
vms-gsd.c
+vms.h
vms-hdr.c
vms-misc.c
vms-tir.c
-vms.c
-vms.h
-xcoff-target.h
xcofflink.c
+xcoff-target.h
xsym.c
xsym.h
+xtensa-isa.c
+xtensa-modules.c
diff --git a/bfd/po/bfd.pot b/bfd/po/bfd.pot
index 8471c0cda7e..f402c966b59 100644
--- a/bfd/po/bfd.pot
+++ b/bfd/po/bfd.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-02-08 03:22-0200\n"
+"POT-Creation-Date: 2003-06-03 14:40+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -14,163 +14,176 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: aout-adobe.c:196
+#: aout-adobe.c:204
#, c-format
msgid "%s: Unknown section type in a.out.adobe file: %x\n"
msgstr ""
-#: aout-cris.c:208
+#: aout-cris.c:207
#, c-format
msgid "%s: Invalid relocation type exported: %d"
msgstr ""
-#: aout-cris.c:252
+#: aout-cris.c:251
#, c-format
msgid "%s: Invalid relocation type imported: %d"
msgstr ""
-#: aout-cris.c:263
+#: aout-cris.c:262
#, c-format
msgid "%s: Bad relocation record imported: %d"
msgstr ""
-#: aoutx.h:1282 aoutx.h:1699
+#: aoutx.h:1295 aoutx.h:1716
#, c-format
msgid "%s: can not represent section `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1669
+#: aoutx.h:1682
#, c-format
msgid ""
"%s: can not represent section for symbol `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1671
+#: aoutx.h:1684
msgid "*unknown*"
msgstr ""
-#: aoutx.h:3735
+#: aoutx.h:3776
#, c-format
msgid "%s: relocateable link from %s to %s not supported"
msgstr ""
-#: archive.c:1826
+#: archive.c:1823
msgid "Warning: writing archive was slow: rewriting timestamp\n"
msgstr ""
-#: archive.c:2093
+#: archive.c:2090
msgid "Reading archive file mod timestamp"
msgstr ""
-#. FIXME: bfd can't call perror.
-#: archive.c:2120
+#: archive.c:2116
msgid "Writing updated armap timestamp"
msgstr ""
-#: bfd.c:274
+#: bfd.c:286
msgid "No error"
msgstr ""
-#: bfd.c:275
+#: bfd.c:287
msgid "System call error"
msgstr ""
-#: bfd.c:276
+#: bfd.c:288
msgid "Invalid bfd target"
msgstr ""
-#: bfd.c:277
+#: bfd.c:289
msgid "File in wrong format"
msgstr ""
-#: bfd.c:278
+#: bfd.c:290
msgid "Archive object file in wrong format"
msgstr ""
-#: bfd.c:279
+#: bfd.c:291
msgid "Invalid operation"
msgstr ""
-#: bfd.c:280
+#: bfd.c:292
msgid "Memory exhausted"
msgstr ""
-#: bfd.c:281
+#: bfd.c:293
msgid "No symbols"
msgstr ""
-#: bfd.c:282
+#: bfd.c:294
msgid "Archive has no index; run ranlib to add one"
msgstr ""
-#: bfd.c:283
+#: bfd.c:295
msgid "No more archived files"
msgstr ""
-#: bfd.c:284
+#: bfd.c:296
msgid "Malformed archive"
msgstr ""
-#: bfd.c:285
+#: bfd.c:297
msgid "File format not recognized"
msgstr ""
-#: bfd.c:286
+#: bfd.c:298
msgid "File format is ambiguous"
msgstr ""
-#: bfd.c:287
+#: bfd.c:299
msgid "Section has no contents"
msgstr ""
-#: bfd.c:288
+#: bfd.c:300
msgid "Nonrepresentable section on output"
msgstr ""
-#: bfd.c:289
+#: bfd.c:301
msgid "Symbol needs debug section which does not exist"
msgstr ""
-#: bfd.c:290
+#: bfd.c:302
msgid "Bad value"
msgstr ""
-#: bfd.c:291
+#: bfd.c:303
msgid "File truncated"
msgstr ""
-#: bfd.c:292
+#: bfd.c:304
msgid "File too big"
msgstr ""
-#: bfd.c:293
+#: bfd.c:305
msgid "#<Invalid error code>"
msgstr ""
-#: bfd.c:700
+#: bfd.c:712
#, c-format
msgid "BFD %s assertion fail %s:%d"
msgstr ""
-#: bfd.c:719
+#: bfd.c:731
#, c-format
msgid "BFD %s internal error, aborting at %s line %d in %s\n"
msgstr ""
-#: bfd.c:723
+#: bfd.c:735
#, c-format
msgid "BFD %s internal error, aborting at %s line %d\n"
msgstr ""
-#: bfd.c:725
+#: bfd.c:737
msgid "Please report this bug.\n"
msgstr ""
+#: bfdwin.c:206
+#, c-format
+msgid "not mapping: data=%lx mapped=%d\n"
+msgstr ""
+
+#: bfdwin.c:209
+msgid "not mapping: env var not set\n"
+msgstr ""
+
#: binary.c:306
#, c-format
msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
msgstr ""
+#: coff-rs6000.c:3616 coff64-rs6000.c:2109
+#, c-format
+msgid "%s: symbol `%s' has unrecognized smclas %d"
+msgstr ""
+
#: coff-a29k.c:119
msgid "Missing IHCONST"
msgstr ""
@@ -179,7 +192,7 @@ msgstr ""
msgid "Missing IHIHALF"
msgstr ""
-#: coff-a29k.c:212 coff-or32.c:228
+#: coff-a29k.c:212 coff-or32.c:236
msgid "Unrecognized reloc"
msgstr ""
@@ -191,323 +204,334 @@ msgstr ""
msgid "missing IHIHALF reloc"
msgstr ""
-#: coff-alpha.c:881 coff-alpha.c:918 coff-alpha.c:1989 coff-mips.c:1433
+#: coff-alpha.c:884 coff-alpha.c:921 coff-alpha.c:1992 coff-mips.c:1397
msgid "GP relative relocation used when GP not defined"
msgstr ""
-#: coff-alpha.c:1485
+#: coff-alpha.c:1488
msgid "using multiple gp values"
msgstr ""
-#: coff-arm.c:1051 elf32-arm.h:285
+#: coff-arm.c:1066 elf32-arm.h:294
#, c-format
msgid "%s: unable to find THUMB glue '%s' for `%s'"
msgstr ""
-#: coff-arm.c:1080 elf32-arm.h:320
+#: coff-arm.c:1096 elf32-arm.h:329
#, c-format
msgid "%s: unable to find ARM glue '%s' for `%s'"
msgstr ""
-#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990
+#: coff-arm.c:1394 coff-arm.c:1489 elf32-arm.h:892 elf32-arm.h:999
#, c-format
msgid "%s(%s): warning: interworking not enabled."
msgstr ""
-#: coff-arm.c:1379 elf32-arm.h:993
+#: coff-arm.c:1398 elf32-arm.h:1002
#, c-format
msgid " first occurrence: %s: arm call to thumb"
msgstr ""
-#: coff-arm.c:1474 elf32-arm.h:889
+#: coff-arm.c:1493 elf32-arm.h:895
#, c-format
msgid " first occurrence: %s: thumb call to arm"
msgstr ""
-#: coff-arm.c:1477
+#: coff-arm.c:1496
msgid " consider relinking with --support-old-code enabled"
msgstr ""
-#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017
+#: coff-arm.c:1788 coff-tic80.c:686 cofflink.c:3038
#, c-format
msgid "%s: bad reloc address 0x%lx in section `%s'"
msgstr ""
-#: coff-arm.c:2107
+#: coff-arm.c:2132
#, c-format
msgid "%s: illegal symbol index in reloc: %d"
msgstr ""
-#: coff-arm.c:2235
+#: coff-arm.c:2265
#, c-format
msgid "ERROR: %s is compiled for APCS-%d, whereas %s is compiled for APCS-%d"
msgstr ""
-#: coff-arm.c:2250 elf32-arm.h:2287
+#: coff-arm.c:2280 elf32-arm.h:2328
#, c-format
msgid ""
"ERROR: %s passes floats in float registers, whereas %s passes them in "
"integer registers"
msgstr ""
-#: coff-arm.c:2253 elf32-arm.h:2292
+#: coff-arm.c:2283 elf32-arm.h:2333
#, c-format
msgid ""
"ERROR: %s passes floats in integer registers, whereas %s passes them in "
"float registers"
msgstr ""
-#: coff-arm.c:2268
+#: coff-arm.c:2298
#, c-format
msgid ""
"ERROR: %s is compiled as position independent code, whereas target %s is "
"absolute position"
msgstr ""
-#: coff-arm.c:2271
+#: coff-arm.c:2301
#, c-format
msgid ""
"ERROR: %s is compiled as absolute position code, whereas target %s is "
"position independent"
msgstr ""
-#: coff-arm.c:2300 elf32-arm.h:2348
+#: coff-arm.c:2330 elf32-arm.h:2405
#, c-format
msgid "Warning: %s supports interworking, whereas %s does not"
msgstr ""
-#: coff-arm.c:2303 elf32-arm.h:2355
+#: coff-arm.c:2333 elf32-arm.h:2412
#, c-format
msgid "Warning: %s does not support interworking, whereas %s does"
msgstr ""
-#: coff-arm.c:2330
+#: coff-arm.c:2360
#, c-format
msgid "private flags = %x:"
msgstr ""
-#: coff-arm.c:2338 elf32-arm.h:2408
+#: coff-arm.c:2368 elf32-arm.h:2467
msgid " [floats passed in float registers]"
msgstr ""
-#: coff-arm.c:2340
+#: coff-arm.c:2370
msgid " [floats passed in integer registers]"
msgstr ""
-#: coff-arm.c:2343 elf32-arm.h:2411
+#: coff-arm.c:2373 elf32-arm.h:2470
msgid " [position independent]"
msgstr ""
-#: coff-arm.c:2345
+#: coff-arm.c:2375
msgid " [absolute position]"
msgstr ""
-#: coff-arm.c:2349
+#: coff-arm.c:2379
msgid " [interworking flag not initialised]"
msgstr ""
-#: coff-arm.c:2351
+#: coff-arm.c:2381
msgid " [interworking supported]"
msgstr ""
-#: coff-arm.c:2353
+#: coff-arm.c:2383
msgid " [interworking not supported]"
msgstr ""
-#: coff-arm.c:2401 elf32-arm.h:2114
+#: coff-arm.c:2431 elf32-arm.h:2150
#, c-format
msgid ""
"Warning: Not setting interworking flag of %s since it has already been "
"specified as non-interworking"
msgstr ""
-#: coff-arm.c:2405 elf32-arm.h:2118
+#: coff-arm.c:2435 elf32-arm.h:2154
#, c-format
msgid "Warning: Clearing the interworking flag of %s due to outside request"
msgstr ""
-#: coff-i960.c:136 coff-i960.c:485
-msgid "uncertain calling convention for non-COFF symbol"
+#: coffcode.h:1102
+#, c-format
+msgid "%s (%s): Section flag %s (0x%x) ignored"
msgstr ""
-#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212 elf32-mips.c:9967
-msgid "unsupported reloc type"
+#: coffcode.h:2178
+#, c-format
+msgid "Unrecognized TI COFF target id '0x%x'"
msgstr ""
-#: coff-mips.c:875 elf32-mips.c:1997 elf64-mips.c:1739
-msgid "GP relative relocation when _gp not defined"
+#: coffcode.h:4401
+#, c-format
+msgid "%s: warning: illegal symbol index %ld in line numbers"
msgstr ""
-#. No other sections should appear in -membedded-pic
-#. code.
-#: coff-mips.c:2468
-msgid "reloc against unsupported section"
+#: coffcode.h:4415
+#, c-format
+msgid "%s: warning: duplicate line number information for `%s'"
msgstr ""
-#: coff-mips.c:2476
-msgid "reloc not properly aligned"
+#: coffcode.h:4769
+#, c-format
+msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
msgstr ""
-#: coff-rs6000.c:2710 coff64-rs6000.c:1164
+#: coffcode.h:4902
#, c-format
-msgid "%s: unsupported relocation type 0x%02x"
+msgid "warning: %s: local symbol `%s' has no section"
msgstr ""
-#: coff-rs6000.c:2756 coff64-rs6000.c:1210
+#: coff-tic4x.c:248 coff-tic54x.c:403 coffcode.h:5009
#, c-format
-msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
+msgid "%s: warning: illegal symbol index %ld in relocs"
msgstr ""
-#: coff-rs6000.c:3006 coff64-rs6000.c:2060
+#: coffcode.h:5047
#, c-format
-msgid "%s: symbol `%s' has unrecognized smclas %d"
+msgid "%s: illegal relocation type %d at address 0x%lx"
msgstr ""
-#: coff-tic54x.c:279 coff-tic80.c:449
+#: coffgen.c:1666
#, c-format
-msgid "Unrecognized reloc type 0x%x"
+msgid "%s: bad string table size %lu"
msgstr ""
-#: coff-tic54x.c:390 coffcode.h:4874
+#: coff-h8300.c:1096
#, c-format
-msgid "%s: warning: illegal symbol index %ld in relocs"
+msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
msgstr ""
-#: coff-w65.c:363
-#, c-format
-msgid "ignoring reloc %s\n"
+#: coff-i960.c:137 coff-i960.c:486
+msgid "uncertain calling convention for non-COFF symbol"
msgstr ""
-#: coffcode.h:1081
+#: cofflink.c:538 elflink.h:1276
#, c-format
-msgid "%s (%s): Section flag %s (0x%x) ignored"
+msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
msgstr ""
-#: coffcode.h:2137
+#: cofflink.c:2328
#, c-format
-msgid "Unrecognized TI COFF target id '0x%x'"
+msgid "%s: relocs in section `%s', but it has no contents"
msgstr ""
-#: coffcode.h:4263
+#: cofflink.c:2671 coffswap.h:890
#, c-format
-msgid "%s: warning: illegal symbol index %ld in line numbers"
+msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
msgstr ""
-#: coffcode.h:4277
+#: cofflink.c:2680 coffswap.h:876
#, c-format
-msgid "%s: warning: duplicate line number information for `%s'"
+msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
msgstr ""
-#: coffcode.h:4636
-#, c-format
-msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
+#: coff-m68k.c:482 coff-mips.c:2394 elf32-m68k.c:2193 elf32-mips.c:1741
+msgid "unsupported reloc type"
msgstr ""
-#: coffcode.h:4767
-#, c-format
-msgid "warning: %s: local symbol `%s' has no section"
+#: coff-mips.c:839 elf32-mips.c:1061 elf64-mips.c:1587 elfn32-mips.c:1553
+msgid "GP relative relocation when _gp not defined"
msgstr ""
-#: coffcode.h:4912
+#. No other sections should appear in -membedded-pic
+#. code.
+#: coff-mips.c:2431
+msgid "reloc against unsupported section"
+msgstr ""
+
+#: coff-mips.c:2439
+msgid "reloc not properly aligned"
+msgstr ""
+
+#: coff-rs6000.c:2790
#, c-format
-msgid "%s: illegal relocation type %d at address 0x%lx"
+msgid "%s: unsupported relocation type 0x%02x"
msgstr ""
-#: coffgen.c:1661
+#: coff-rs6000.c:2883
#, c-format
-msgid "%s: bad string table size %lu"
+msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
msgstr ""
-#: cofflink.c:536 elflink.h:1967
+#: coff-tic4x.c:200 coff-tic54x.c:292 coff-tic80.c:449
#, c-format
-msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
+msgid "Unrecognized reloc type 0x%x"
msgstr ""
-#: cofflink.c:2317
+#: coff-w65.c:364
#, c-format
-msgid "%s: relocs in section `%s', but it has no contents"
+msgid "ignoring reloc %s\n"
msgstr ""
-#: cofflink.c:2653 coffswap.h:889
+#: cpu-arm.c:196 cpu-arm.c:206
#, c-format
-msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
+msgid "ERROR: %s is compiled for the EP9312, whereas %s is compiled for XScale"
msgstr ""
-#: cofflink.c:2662 coffswap.h:876
+#: cpu-arm.c:344
#, c-format
-msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
+msgid "warning: unable to update contents of %s section in %s"
msgstr ""
-#: dwarf2.c:381
+#: dwarf2.c:380
msgid "Dwarf Error: Can't find .debug_str section."
msgstr ""
-#: dwarf2.c:398
+#: dwarf2.c:397
#, c-format
msgid ""
-"Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str "
-"size (%u)."
+"Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str "
+"size (%lu)."
msgstr ""
-#: dwarf2.c:542
+#: dwarf2.c:541
msgid "Dwarf Error: Can't find .debug_abbrev section."
msgstr ""
-#: dwarf2.c:559
+#: dwarf2.c:556
#, c-format
msgid ""
-"Dwarf Error: Abbrev offset (%u) greater than or equal to .debug_abbrev size "
-"(%u)."
+"Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size "
+"(%lu)."
msgstr ""
#: dwarf2.c:756
#, c-format
-msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
+msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
msgstr ""
-#: dwarf2.c:843
+#: dwarf2.c:933
msgid "Dwarf Error: mangled line number section (bad file number)."
msgstr ""
-#: dwarf2.c:929
+#: dwarf2.c:1032
msgid "Dwarf Error: Can't find .debug_line section."
msgstr ""
-#: dwarf2.c:952
+#: dwarf2.c:1049
#, c-format
msgid ""
-"Dwarf Error: Line offset (%u) greater than or equal to .debug_line size (%u)."
+"Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%"
+"lu)."
msgstr ""
-#: dwarf2.c:1143
+#: dwarf2.c:1255
msgid "Dwarf Error: mangled line number section."
msgstr ""
-#: dwarf2.c:1318 dwarf2.c:1529
+#: dwarf2.c:1470 dwarf2.c:1620
#, c-format
-msgid "Dwarf Error: Could not find abbrev number %d."
+msgid "Dwarf Error: Could not find abbrev number %u."
msgstr ""
-#: dwarf2.c:1490
+#: dwarf2.c:1581
#, c-format
msgid ""
-"Dwarf Error: found dwarf version '%hu', this reader only handles version 2 "
+"Dwarf Error: found dwarf version '%u', this reader only handles version 2 "
"information."
msgstr ""
-#: dwarf2.c:1497
+#: dwarf2.c:1588
#, c-format
msgid ""
"Dwarf Error: found address size '%u', this reader can not handle sizes "
"greater than '%u'."
msgstr ""
-#: dwarf2.c:1520
+#: dwarf2.c:1611
#, c-format
-msgid "Dwarf Error: Bad abbrev number: %d."
+msgid "Dwarf Error: Bad abbrev number: %u."
msgstr ""
-#: ecoff.c:1328
+#: ecoff.c:1337
#, c-format
msgid "Unknown basic type %d"
msgstr ""
@@ -568,831 +592,895 @@ msgid ""
" Type: %s"
msgstr ""
-#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:4286
-#: elf64-sh64.c:1640 elf64-x86-64.c:1275
-#, c-format
-msgid ""
-"%s: warning: unresolvable relocation against symbol `%s' from %s section"
-msgstr ""
-
-#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835
-#: elf32-cris.c:1406 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547
-#: elf32-i860.c:1048 elf32-m32r.c:1280 elf32-openrisc.c:455 elf32-v850.c:1691
-#: elf32-xstormy16.c:976 elf64-mmix.c:1302
-msgid "internal error: out of range error"
-msgstr ""
-
-#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839
-#: elf32-cris.c:1410 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551
-#: elf32-i860.c:1052 elf32-m32r.c:1284 elf32-mips.c:7600 elf32-openrisc.c:459
-#: elf32-v850.c:1695 elf32-xstormy16.c:980 elf64-mips.c:4464 elf64-mmix.c:1306
-msgid "internal error: unsupported relocation error"
-msgstr ""
-
-#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490
-#: elf32-h8300.c:555 elf32-m32r.c:1288
-msgid "internal error: dangerous error"
-msgstr ""
-
-#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847
-#: elf32-cris.c:1418 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559
-#: elf32-i860.c:1060 elf32-m32r.c:1292 elf32-openrisc.c:467 elf32-v850.c:1715
-#: elf32-xstormy16.c:988 elf64-mmix.c:1314
-msgid "internal error: unknown error"
-msgstr ""
-
-#: elf.c:343
+#: elf32-arm.h:1228
#, c-format
-msgid "%s: invalid string offset %u >= %lu for section `%s'"
-msgstr ""
-
-#: elf.c:448
-#, c-format
-msgid "%s: invalid SHT_GROUP entry"
-msgstr ""
-
-#: elf.c:529
-#, c-format
-msgid "%s: no group info for section %s"
-msgstr ""
-
-#: elf.c:840
-msgid ""
-"\n"
-"Program Header:\n"
-msgstr ""
-
-#: elf.c:889
-msgid ""
-"\n"
-"Dynamic Section:\n"
-msgstr ""
-
-#: elf.c:1018
-msgid ""
-"\n"
-"Version definitions:\n"
-msgstr ""
-
-#: elf.c:1041
-msgid ""
-"\n"
-"Version References:\n"
-msgstr ""
-
-#: elf.c:1046
-#, c-format
-msgid " required from %s:\n"
-msgstr ""
-
-#: elf.c:1682
-#, c-format
-msgid "%s: invalid link %lu for reloc section %s (index %u)"
+msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
msgstr ""
-#: elf.c:3296
+#: elf32-arm.h:1424
#, c-format
-msgid "%s: Not enough room for program headers (allocated %u, need %u)"
+msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
msgstr ""
-#: elf.c:3400
+#: elf32-arm.h:1918 elf32-sh.c:4703 elf64-sh64.c:1613
#, c-format
-msgid "%s: Not enough room for program headers, try linking with -N"
+msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
msgstr ""
-#: elf.c:3525
+#: elf32-arm.h:2012
#, c-format
msgid ""
-"Error: First section in segment (%s) starts at 0x%x whereas the segment "
-"starts at 0x%x"
-msgstr ""
-
-#: elf.c:3811
-#, c-format
-msgid "%s: warning: allocated section `%s' not in segment"
-msgstr ""
-
-#: elf.c:4142
-#, c-format
-msgid "%s: symbol `%s' required but not present"
-msgstr ""
-
-#: elf.c:4395
-#, c-format
-msgid "%s: warning: Empty loadable segment detected\n"
-msgstr ""
-
-#: elf.c:5808
-#, c-format
-msgid "%s: unsupported relocation type %s"
+"%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
msgstr ""
-#: elf32-arm.h:1224
-#, c-format
-msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
+#: elf-m10200.c:442 elf-m10300.c:655 elf32-arm.h:2088 elf32-avr.c:812
+#: elf32-cris.c:1383 elf32-d10v.c:481 elf32-fr30.c:633 elf32-frv.c:815
+#: elf32-h8300.c:528 elf32-i860.c:1028 elf32-ip2k.c:1586 elf32-iq2000.c:699
+#: elf32-m32r.c:1283 elf32-m68hc1x.c:1305 elf32-msp430.c:510
+#: elf32-openrisc.c:436 elf32-v850.c:1753 elf32-xstormy16.c:976
+#: elf64-mmix.c:1332
+msgid "internal error: out of range error"
msgstr ""
-#: elf32-arm.h:1420
-#, c-format
-msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
+#: elf-m10200.c:446 elf-m10300.c:659 elf32-arm.h:2092 elf32-avr.c:816
+#: elf32-cris.c:1387 elf32-d10v.c:485 elf32-fr30.c:637 elf32-frv.c:819
+#: elf32-h8300.c:532 elf32-i860.c:1032 elf32-iq2000.c:703 elf32-m32r.c:1287
+#: elf32-m68hc1x.c:1309 elf32-msp430.c:514 elf32-openrisc.c:440
+#: elf32-v850.c:1757 elf32-xstormy16.c:980 elf64-mmix.c:1336 elfxx-mips.c:6533
+msgid "internal error: unsupported relocation error"
msgstr ""
-#: elf32-arm.h:1904 elf32-i386.c:1782 elf32-sh.c:4198
-#, c-format
-msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
+#: elf-m10200.c:450 elf-m10300.c:663 elf32-arm.h:2096 elf32-d10v.c:489
+#: elf32-h8300.c:536 elf32-m32r.c:1291 elf32-m68hc1x.c:1313
+msgid "internal error: dangerous error"
msgstr ""
-#: elf32-arm.h:1998
-#, c-format
-msgid ""
-"%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
+#: elf-m10200.c:454 elf-m10300.c:667 elf32-arm.h:2100 elf32-avr.c:824
+#: elf32-cris.c:1395 elf32-d10v.c:493 elf32-fr30.c:645 elf32-frv.c:827
+#: elf32-h8300.c:540 elf32-i860.c:1040 elf32-ip2k.c:1601 elf32-iq2000.c:711
+#: elf32-m32r.c:1295 elf32-m68hc1x.c:1317 elf32-msp430.c:522
+#: elf32-openrisc.c:448 elf32-v850.c:1777 elf32-xstormy16.c:988
+#: elf64-mmix.c:1344
+msgid "internal error: unknown error"
msgstr ""
-#: elf32-arm.h:2166
+#: elf32-arm.h:2202
#, c-format
msgid ""
"Warning: Clearing the interworking flag of %s because non-interworking code "
"in %s has been linked with it"
msgstr ""
-#: elf32-arm.h:2261
+#: elf32-arm.h:2302
#, c-format
msgid ""
"ERROR: %s is compiled for EABI version %d, whereas %s is compiled for "
"version %d"
msgstr ""
-#: elf32-arm.h:2275
+#: elf32-arm.h:2316
#, c-format
msgid "ERROR: %s is compiled for APCS-%d, whereas target %s uses APCS-%d"
msgstr ""
-#: elf32-arm.h:2303
+#: elf32-arm.h:2344
#, c-format
-msgid "ERROR: %s uses VFP instructions, whereas %s uses FPA instructions"
+msgid "ERROR: %s uses VFP instructions, whereas %s does not"
msgstr ""
-#: elf32-arm.h:2308
+#: elf32-arm.h:2349
#, c-format
-msgid "ERROR: %s uses FPA instructions, whereas %s uses VFP instructions"
+msgid "ERROR: %s uses FPA instructions, whereas %s does not"
msgstr ""
-#: elf32-arm.h:2328
+#: elf32-arm.h:2360 elf32-arm.h:2365
+#, c-format
+msgid "ERROR: %s uses Maverick instructions, whereas %s does not"
+msgstr ""
+
+#: elf32-arm.h:2385
#, c-format
msgid "ERROR: %s uses software FP, whereas %s uses hardware FP"
msgstr ""
-#: elf32-arm.h:2333
+#: elf32-arm.h:2390
#, c-format
msgid "ERROR: %s uses hardware FP, whereas %s uses software FP"
msgstr ""
#. Ignore init flag - it may not be set, despite the flags field
#. containing valid data.
-#: elf32-arm.h:2386 elf32-cris.c:2991 elf32-m68k.c:410 elf32-mips.c:3255
+#: elf32-arm.h:2443 elf32-cris.c:2968 elf32-m68hc1x.c:1459 elf32-m68k.c:397
+#: elf32-vax.c:546 elfxx-mips.c:9379
#, c-format
msgid "private flags = %lx:"
msgstr ""
-#: elf32-arm.h:2395
+#: elf32-arm.h:2452
msgid " [interworking enabled]"
msgstr ""
-#: elf32-arm.h:2403
+#: elf32-arm.h:2460
msgid " [VFP float format]"
msgstr ""
-#: elf32-arm.h:2405
+#: elf32-arm.h:2462
+msgid " [Maverick float format]"
+msgstr ""
+
+#: elf32-arm.h:2464
msgid " [FPA float format]"
msgstr ""
-#: elf32-arm.h:2414
+#: elf32-arm.h:2473
msgid " [new ABI]"
msgstr ""
-#: elf32-arm.h:2417
+#: elf32-arm.h:2476
msgid " [old ABI]"
msgstr ""
-#: elf32-arm.h:2420
+#: elf32-arm.h:2479
msgid " [software FP]"
msgstr ""
-#: elf32-arm.h:2428
+#: elf32-arm.h:2488
msgid " [Version1 EABI]"
msgstr ""
-#: elf32-arm.h:2431 elf32-arm.h:2442
+#: elf32-arm.h:2491 elf32-arm.h:2502
msgid " [sorted symbol table]"
msgstr ""
-#: elf32-arm.h:2433 elf32-arm.h:2444
+#: elf32-arm.h:2493 elf32-arm.h:2504
msgid " [unsorted symbol table]"
msgstr ""
-#: elf32-arm.h:2439
+#: elf32-arm.h:2499
msgid " [Version2 EABI]"
msgstr ""
-#: elf32-arm.h:2447
+#: elf32-arm.h:2507
msgid " [dynamic symbols use segment index]"
msgstr ""
-#: elf32-arm.h:2450
+#: elf32-arm.h:2510
msgid " [mapping symbols precede others]"
msgstr ""
-#: elf32-arm.h:2457
+#: elf32-arm.h:2517
msgid " <EABI version unrecognised>"
msgstr ""
-#: elf32-arm.h:2464
+#: elf32-arm.h:2524
msgid " [relocatable executable]"
msgstr ""
-#: elf32-arm.h:2467
+#: elf32-arm.h:2527
msgid " [has entry point]"
msgstr ""
-#: elf32-arm.h:2472
+#: elf32-arm.h:2532
msgid "<Unrecognised flag bits set>"
msgstr ""
-#: elf32-avr.c:843 elf32-cris.c:1414 elf32-fr30.c:661 elf32-i860.c:1056
-#: elf32-openrisc.c:463 elf32-v850.c:1699 elf32-xstormy16.c:984
-#: elf64-mmix.c:1310
+#: elf32-avr.c:820 elf32-cris.c:1391 elf32-fr30.c:641 elf32-frv.c:823
+#: elf32-i860.c:1036 elf32-ip2k.c:1597 elf32-iq2000.c:707 elf32-msp430.c:518
+#: elf32-openrisc.c:444 elf32-v850.c:1761 elf32-xstormy16.c:984
+#: elf64-mmix.c:1340
msgid "internal error: dangerous relocation"
msgstr ""
-#: elf32-cris.c:949
+#: elf32-cris.c:931
#, c-format
msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
msgstr ""
-#: elf32-cris.c:1012
+#: elf32-cris.c:993
#, c-format
msgid ""
"%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
msgstr ""
-#: elf32-cris.c:1015 elf32-cris.c:1142
+#: elf32-cris.c:996 elf32-cris.c:1122
msgid "[whose name is lost]"
msgstr ""
-#: elf32-cris.c:1131
+#: elf32-cris.c:1111
#, c-format
msgid ""
"%s: relocation %s with non-zero addend %d against local symbol from %s "
"section"
msgstr ""
-#: elf32-cris.c:1138
+#: elf32-cris.c:1118
#, c-format
msgid ""
"%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
msgstr ""
-#: elf32-cris.c:1156
+#: elf32-cris.c:1136
#, c-format
msgid ""
"%s: relocation %s is not allowed for global symbol: `%s' from %s section"
msgstr ""
-#: elf32-cris.c:1171
+#: elf32-cris.c:1151
#, c-format
msgid "%s: relocation %s in section %s with no GOT created"
msgstr ""
-#: elf32-cris.c:1289
+#: elf32-cris.c:1270
#, c-format
msgid "%s: Internal inconsistency; no relocation section %s"
msgstr ""
-#: elf32-cris.c:2523
+#: elf32-cris.c:2493
#, c-format
msgid ""
"%s, section %s:\n"
" relocation %s should not be used in a shared object; recompile with -fPIC"
msgstr ""
-#: elf32-cris.c:2994
+#: elf32-cris.c:2971
msgid " [symbols have a _ prefix]"
msgstr ""
-#: elf32-cris.c:3033
+#: elf32-cris.c:3010
#, c-format
msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
msgstr ""
-#: elf32-cris.c:3034
+#: elf32-cris.c:3011
#, c-format
msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
msgstr ""
-#: elf32-gen.c:82 elf64-gen.c:82
+#: elf32-frv.c:1223
+#, c-format
+msgid ""
+"%s: compiled with %s and linked with modules that use non-pic relocations"
+msgstr ""
+
+#: elf32-frv.c:1273 elf32-iq2000.c:895
+#, c-format
+msgid "%s: compiled with %s and linked with modules compiled with %s"
+msgstr ""
+
+#: elf32-frv.c:1285
+#, c-format
+msgid ""
+"%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%"
+"lx)"
+msgstr ""
+
+#: elf32-frv.c:1321 elf32-iq2000.c:933
+#, c-format
+msgid "private flags = 0x%lx:"
+msgstr ""
+
+#: elf32-gen.c:83 elf64-gen.c:82
#, c-format
msgid "%s: Relocations in generic ELF (EM: %d)"
msgstr ""
-#: elf32-hppa.c:646
+#: elf32-hppa.c:672 elf32-m68hc1x.c:176 elf64-ppc.c:3147
#, c-format
msgid "%s: cannot create stub entry %s"
msgstr ""
-#: elf32-hppa.c:937 elf32-hppa.c:3549
+#: elf32-hppa.c:957 elf32-hppa.c:3538
#, c-format
msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
msgstr ""
-#: elf32-hppa.c:1312
+#: elf32-hppa.c:1340 elf64-x86-64.c:751 elf64-x86-64.c:876
#, c-format
msgid ""
"%s: relocation %s can not be used when making a shared object; recompile "
"with -fPIC"
msgstr ""
-#: elf32-hppa.c:1332
+#: elf32-hppa.c:1360
#, c-format
msgid ""
"%s: relocation %s should not be used when making a shared object; recompile "
"with -fPIC"
msgstr ""
-#: elf32-hppa.c:1525
+#: elf32-hppa.c:1553
#, c-format
msgid "Could not find relocation section for %s"
msgstr ""
-#: elf32-hppa.c:2871
+#: elf32-hppa.c:2828
#, c-format
msgid "%s: duplicate export stub %s"
msgstr ""
-#: elf32-hppa.c:3433
+#: elf32-hppa.c:3416
#, c-format
msgid "%s(%s+0x%lx): fixing %s"
msgstr ""
-#: elf32-hppa.c:4073
+#: elf32-hppa.c:4039
#, c-format
msgid "%s(%s+0x%lx): cannot handle %s for %s"
msgstr ""
-#: elf32-hppa.c:4412
+#: elf32-hppa.c:4357
msgid ".got section not immediately after .plt section"
msgstr ""
-#: elf32-i386.c:298
+#: elf32-i386.c:390
#, c-format
msgid "%s: invalid relocation type %d"
msgstr ""
-#: elf32-i386.c:718 elf32-s390.c:637 elf64-s390.c:595
+#: elf32-i386.c:923 elf32-s390.c:919 elf32-sparc.c:887 elf32-xtensa.c:635
+#: elf64-s390.c:873 elf64-x86-64.c:729
#, c-format
msgid "%s: bad symbol index: %d"
msgstr ""
-#: elf32-i386.c:863 elf32-s390.c:791 elf64-ppc.c:2198 elf64-s390.c:759
+#: elf32-i386.c:1032 elf32-s390.c:1089 elf32-sh.c:6422 elf32-sparc.c:1011
+#: elf64-s390.c:1051
+#, c-format
+msgid "%s: `%s' accessed both as normal and thread local symbol"
+msgstr ""
+
+#: elf32-i386.c:1146 elf32-s390.c:1200 elf64-ppc.c:3956 elf64-s390.c:1165
+#: elf64-x86-64.c:965
#, c-format
msgid "%s: bad relocation section name `%s'"
msgstr ""
-#: elf32-i386.c:2073 elf32-s390.c:1956 elf64-ppc.c:4128 elf64-s390.c:1959
+#: elf32-i386.c:3003 elf32-m68k.c:1757 elf32-s390.c:2936 elf32-sparc.c:2876
+#: elf32-xtensa.c:2160 elf64-s390.c:2933 elf64-sparc.c:2664
+#: elf64-x86-64.c:2553
#, c-format
msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
msgstr ""
-#: elf32-i386.c:2111 elf32-s390.c:1994 elf64-s390.c:1997
+#: elf32-i386.c:3042 elf32-m68k.c:1796 elf32-s390.c:2974 elf64-s390.c:2971
+#: elf64-x86-64.c:2591
#, c-format
msgid "%s(%s+0x%lx): reloc against `%s': error %d"
msgstr ""
-#: elf32-m32r.c:923
-msgid "SDA relocation when _SDA_BASE_ not defined"
+#: elf32-ip2k.c:565 elf32-ip2k.c:571 elf32-ip2k.c:734 elf32-ip2k.c:740
+msgid ""
+"ip2k relaxer: switch table without complete matching relocation information."
msgstr ""
-#: elf32-ia64.c:3537 elf32-m32r.c:1007 elf32-ppc.c:2930 elf64-ia64.c:3537
-#, c-format
-msgid "%s: unknown relocation type %d"
+#: elf32-ip2k.c:588 elf32-ip2k.c:767
+msgid "ip2k relaxer: switch table header corrupt."
msgstr ""
-#: elf32-m32r.c:1223
+#: elf32-ip2k.c:1395
#, c-format
-msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
+msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
msgstr ""
-#: elf32-m32r.c:2000
+#: elf32-ip2k.c:1409
#, c-format
-msgid "%s: Instruction set mismatch with previous modules"
+msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
+msgstr ""
+
+#. Only if it's not an unresolved symbol.
+#: elf32-ip2k.c:1593
+msgid "unsupported relocation between data/insn address spaces"
msgstr ""
-#: elf32-m32r.c:2023
+#: elf32-iq2000.c:907 elf32-m68hc1x.c:1431 elf32-ppc.c:2211 elf64-sparc.c:3072
+#: elfxx-mips.c:9336
#, c-format
-msgid "private flags = %lx"
+msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
msgstr ""
-#: elf32-m32r.c:2028
-msgid ": m32r instructions"
+#: elf32-m32r.c:930
+msgid "SDA relocation when _SDA_BASE_ not defined"
msgstr ""
-#: elf32-m32r.c:2029
-msgid ": m32rx instructions"
+#: elf32-ia64.c:3903 elf32-m32r.c:1018 elf64-alpha.c:4279 elf64-alpha.c:4407
+#: elf64-ia64.c:3903
+#, c-format
+msgid "%s: unknown relocation type %d"
msgstr ""
-#: elf32-m68k.c:413
-msgid " [cpu32]"
+#: elf32-m32r.c:1226
+#, c-format
+msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
msgstr ""
-#: elf32-mcore.c:353 elf32-mcore.c:479
+#: elf32-m32r.c:1952
#, c-format
-msgid "%s: Relocation %s (%d) is not currently supported.\n"
+msgid "%s: Instruction set mismatch with previous modules"
msgstr ""
-#: elf32-mcore.c:438
+#: elf32-m32r.c:1975
#, c-format
-msgid "%s: Unknown relocation type %d\n"
+msgid "private flags = %lx"
msgstr ""
-#: elf32-mips.c:2156 elf64-mips.c:1972
-msgid "32bits gp relative relocation occurs for an external symbol"
+#: elf32-m32r.c:1980
+msgid ": m32r instructions"
msgstr ""
-#: elf32-mips.c:2305
-#, c-format
-msgid "Linking mips16 objects into %s format is not supported"
+#: elf32-m32r.c:1981
+msgid ": m32rx instructions"
msgstr ""
-#: elf32-mips.c:3129
+#: elf32-m68hc1x.c:1217
#, c-format
-msgid "%s: linking PIC files with non-PIC files"
+msgid ""
+"Reference to the far symbol `%s' using a wrong relocation may result in "
+"incorrect execution"
msgstr ""
-#: elf32-mips.c:3139
+#: elf32-m68hc1x.c:1240
#, c-format
-msgid "%s: linking abicalls files with non-abicalls files"
+msgid ""
+"banked address [%lx:%04lx] (%lx) is not in the same bank as current banked "
+"address [%lx:%04lx] (%lx)"
msgstr ""
-#: elf32-mips.c:3168
+#: elf32-m68hc1x.c:1259
#, c-format
-msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
+msgid ""
+"reference to a banked address [%lx:%04lx] in the normal address space at %"
+"04lx"
msgstr ""
-#: elf32-mips.c:3190
+#: elf32-m68hc1x.c:1396
#, c-format
-msgid "%s: ISA mismatch (%d) with previous modules (%d)"
+msgid ""
+"%s: linking files compiled for 16-bit integers (-mshort) and others for 32-"
+"bit integers"
msgstr ""
-#: elf32-mips.c:3213
+#: elf32-m68hc1x.c:1404
#, c-format
-msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgid ""
+"%s: linking files compiled for 32-bit double (-fshort-double) and others for "
+"64-bit double"
msgstr ""
-#: elf32-mips.c:3227 elf32-ppc.c:1470 elf64-ppc.c:1556 elf64-sparc.c:3027
+#: elf32-m68hc1x.c:1414
#, c-format
-msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
+msgid "%s: linking files compiled for HCS12 with others compiled for HC12"
msgstr ""
-#: elf32-mips.c:3258
-msgid " [abi=O32]"
+#: elf32-m68hc1x.c:1462
+msgid "[abi=32-bit int, "
msgstr ""
-#: elf32-mips.c:3260
-msgid " [abi=O64]"
+#: elf32-m68hc1x.c:1464
+msgid "[abi=16-bit int, "
msgstr ""
-#: elf32-mips.c:3262
-msgid " [abi=EABI32]"
+#: elf32-m68hc1x.c:1467
+msgid "64-bit double, "
msgstr ""
-#: elf32-mips.c:3264
-msgid " [abi=EABI64]"
+#: elf32-m68hc1x.c:1469
+msgid "32-bit double, "
msgstr ""
-#: elf32-mips.c:3266
-msgid " [abi unknown]"
+#: elf32-m68hc1x.c:1472
+msgid "cpu=HC11]"
msgstr ""
-#: elf32-mips.c:3268
-msgid " [abi=N32]"
+#: elf32-m68hc1x.c:1474
+msgid "cpu=HCS12]"
msgstr ""
-#: elf32-mips.c:3270
-msgid " [abi=64]"
+#: elf32-m68hc1x.c:1476
+msgid "cpu=HC12]"
msgstr ""
-#: elf32-mips.c:3272
-msgid " [no abi set]"
+#: elf32-m68hc1x.c:1479
+msgid " [memory=bank-model]"
msgstr ""
-#: elf32-mips.c:3275
-msgid " [mips1]"
+#: elf32-m68hc1x.c:1481
+msgid " [memory=flat]"
msgstr ""
-#: elf32-mips.c:3277
-msgid " [mips2]"
+#: elf32-m68k.c:400
+msgid " [cpu32]"
msgstr ""
-#: elf32-mips.c:3279
-msgid " [mips3]"
+#: elf32-m68k.c:403
+msgid " [m68000]"
msgstr ""
-#: elf32-mips.c:3281
-msgid " [mips4]"
+#: elf32-mcore.c:353 elf32-mcore.c:456
+#, c-format
+msgid "%s: Relocation %s (%d) is not currently supported.\n"
msgstr ""
-#: elf32-mips.c:3283
-msgid " [mips5]"
+#: elf32-mcore.c:441
+#, c-format
+msgid "%s: Unknown relocation type %d\n"
msgstr ""
-#: elf32-mips.c:3285
-msgid " [mips32]"
+#: elf32-mips.c:1151 elf64-mips.c:1720 elfn32-mips.c:1665
+msgid "32bits gp relative relocation occurs for an external symbol"
msgstr ""
-#: elf32-mips.c:3287
-msgid " [mips64]"
+#: elf32-mips.c:1294 elf64-mips.c:1836 elfn32-mips.c:1781
+#, c-format
+msgid "Linking mips16 objects into %s format is not supported"
msgstr ""
-#: elf32-mips.c:3289
-msgid " [unknown ISA]"
+#: elf32-ppc.c:2176
+#, c-format
+msgid ""
+"%s: compiled with -mrelocatable and linked with modules compiled normally"
msgstr ""
-#: elf32-mips.c:3292
-msgid " [32bitmode]"
+#: elf32-ppc.c:2184
+#, c-format
+msgid ""
+"%s: compiled normally and linked with modules compiled with -mrelocatable"
msgstr ""
-#: elf32-mips.c:3294
-msgid " [not 32bitmode]"
+#: elf32-ppc.c:2309
+#, c-format
+msgid "%s: unknown special linker type %d"
msgstr ""
-#: elf32-mips.c:4967
-msgid "static procedure (no name)"
+#: elf32-ppc.c:3178
+#, c-format
+msgid "%s: relocation %s cannot be used when making a shared object"
msgstr ""
-#: elf32-mips.c:5585 elf64-mips.c:6694
+#: elf32-ppc.c:4651 elf64-ppc.c:7532
#, c-format
-msgid "%s: illegal section name `%s'"
+msgid "%s: unknown relocation type %d for symbol %s"
msgstr ""
-#: elf32-mips.c:6152 elf64-mips.c:3150
-msgid "not enough GOT space for local GOT entries"
+#: elf32-ppc.c:4902
+#, c-format
+msgid "%s(%s+0x%lx): non-zero addend on %s reloc against `%s'"
msgstr ""
-#: elf32-mips.c:7263 elf64-mips.c:4203
+#: elf32-ppc.c:5190 elf32-ppc.c:5214 elf32-ppc.c:5271
#, c-format
-msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgid ""
+"%s: the target (%s) of a %s relocation is in the wrong output section (%s)"
msgstr ""
-#: elf32-mips.c:8272 elf64-mips.c:5891
+#: elf32-ppc.c:5325
#, c-format
-msgid "%s: Malformed reloc detected for section %s"
+msgid "%s: relocation %s is not yet supported for symbol %s."
msgstr ""
-#: elf32-mips.c:8350 elf64-mips.c:5969
+#: elf32-ppc.c:5379 elf64-ppc.c:8124
#, c-format
-msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgid "%s(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
msgstr ""
-#: elf32-ppc.c:1436 elf64-ppc.c:1521
+#: elf32-ppc.c:5429 elf64-ppc.c:8170
#, c-format
-msgid ""
-"%s: compiled with -mrelocatable and linked with modules compiled normally"
+msgid "%s(%s+0x%lx): %s reloc against `%s': error %d"
msgstr ""
-#: elf32-ppc.c:1444 elf64-ppc.c:1529
+#: elf32-ppc.c:5695
#, c-format
-msgid ""
-"%s: compiled normally and linked with modules compiled with -mrelocatable"
+msgid "corrupt or empty %s section in %s"
msgstr ""
-#: elf32-ppc.c:1568
+#: elf32-ppc.c:5702
#, c-format
-msgid "%s: Unknown special linker type %d"
+msgid "unable to read in %s section from %s"
msgstr ""
-#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287
+#: elf32-ppc.c:5708
#, c-format
-msgid "%s: relocation %s cannot be used when making a shared object"
+msgid "corrupt %s section in %s"
msgstr ""
-#: elf32-ppc.c:3097 elf64-ppc.c:3720
+#: elf32-ppc.c:5751
#, c-format
-msgid "%s: unknown relocation type %d for symbol %s"
+msgid "warning: unable to set size of %s section in %s"
msgstr ""
-#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523
-#, c-format
-msgid ""
-"%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
+#: elf32-ppc.c:5804
+msgid "failed to allocate space for new APUinfo section."
msgstr ""
-#: elf32-ppc.c:3589
-#, c-format
-msgid "%s: Relocation %s is not yet supported for symbol %s."
+#: elf32-ppc.c:5823
+msgid "failed to compute new APUinfo section."
+msgstr ""
+
+#: elf32-ppc.c:5826
+msgid "failed to install new APUinfo section."
msgstr ""
-#: elf32-sh.c:1971
+#: elf32-s390.c:2173 elf64-s390.c:2144
#, c-format
-msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
+msgid "%s(%s+0x%lx): invalid instruction for TLS relocation %s"
msgstr ""
-#: elf32-sh.c:1983
+#: elf32-sh64.c:221 elf64-sh64.c:2407
#, c-format
-msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
+msgid "%s: compiled as 32-bit object and %s is 64-bit"
msgstr ""
-#: elf32-sh.c:2000
+#: elf32-sh64.c:224 elf64-sh64.c:2410
#, c-format
-msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
+msgid "%s: compiled as 64-bit object and %s is 32-bit"
msgstr ""
-#: elf32-sh.c:2015
+#: elf32-sh64.c:226 elf64-sh64.c:2412
#, c-format
-msgid "%s: 0x%lx: warning: could not find expected reloc"
+msgid "%s: object size does not match that of target %s"
msgstr ""
-#: elf32-sh.c:2072
+#: elf32-sh64.c:461 elf64-sh64.c:2990
#, c-format
-msgid "%s: 0x%lx: warning: symbol in unexpected section"
+msgid "%s: encountered datalabel symbol in input"
msgstr ""
-#: elf32-sh.c:2193
+#: elf32-sh64.c:544
+msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+msgstr ""
+
+#: elf32-sh64.c:547
+msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+msgstr ""
+
+#: elf32-sh64.c:565
#, c-format
-msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
+msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
msgstr ""
-#: elf32-sh.c:2202
+#: elf32-sh64.c:614 elf64-sh64.c:1748
#, c-format
-msgid "%s: 0x%lx: warning: bad count"
+msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
msgstr ""
-#: elf32-sh.c:2611 elf32-sh.c:3002
+#: elf32-sh64.c:698
#, c-format
-msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
+msgid "%s: could not write out added .cranges entries"
msgstr ""
-#: elf32-sh.c:4146 elf64-sh64.c:1557
-msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
+#: elf32-sh64.c:760
+#, c-format
+msgid "%s: could not write out sorted .cranges entries"
msgstr ""
-#: elf32-sh.c:4357
+#: elf32-sh.c:2103
#, c-format
-msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
+msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
msgstr ""
-#: elf32-sh64.c:211 elf64-sh64.c:2391
+#: elf32-sh.c:2115
#, c-format
-msgid "%s: compiled as 32-bit object and %s is 64-bit"
+msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
msgstr ""
-#: elf32-sh64.c:214 elf64-sh64.c:2394
+#: elf32-sh.c:2132
#, c-format
-msgid "%s: compiled as 64-bit object and %s is 32-bit"
+msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
msgstr ""
-#: elf32-sh64.c:216 elf64-sh64.c:2396
+#: elf32-sh.c:2147
#, c-format
-msgid "%s: object size does not match that of target %s"
+msgid "%s: 0x%lx: warning: could not find expected reloc"
msgstr ""
-#: elf32-sh64.c:447 elf64-sh64.c:2973
+#: elf32-sh.c:2175
#, c-format
-msgid "%s: encountered datalabel symbol in input"
+msgid "%s: 0x%lx: warning: symbol in unexpected section"
msgstr ""
-#: elf32-sh64.c:530
-msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
+#: elf32-sh.c:2300
+#, c-format
+msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
msgstr ""
-#: elf32-sh64.c:533
-msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
+#: elf32-sh.c:2309
+#, c-format
+msgid "%s: 0x%lx: warning: bad count"
msgstr ""
-#: elf32-sh64.c:551
+#: elf32-sh.c:2712 elf32-sh.c:3088
#, c-format
-msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
+msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
+msgstr ""
+
+#: elf32-sh.c:4651 elf64-sh64.c:1585
+msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
msgstr ""
-#: elf32-sh64.c:600 elf64-sh64.c:1684
+#: elf32-sh.c:4806
#, c-format
-msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
+msgid "%s: unresolvable relocation against symbol `%s' from %s section"
msgstr ""
-#: elf32-sh64.c:684
+#: elf32-sh.c:4878
#, c-format
-msgid "%s: could not write out added .cranges entries"
+msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
msgstr ""
-#: elf32-sh64.c:745
+#: elf32-sh.c:6621 elf64-alpha.c:4848
#, c-format
-msgid "%s: could not write out sorted .cranges entries"
+msgid "%s: TLS local exec code cannot be linked into shared objects"
msgstr ""
-#: elf32-sparc.c:1554 elf64-sparc.c:2280
+#: elf32-sparc.c:2518 elf64-sparc.c:2314
#, c-format
msgid "%s: probably compiled without -fPIC?"
msgstr ""
-#: elf32-sparc.c:2007
+#: elf32-sparc.c:3345
#, c-format
msgid "%s: compiled for a 64 bit system and target is 32 bit"
msgstr ""
-#: elf32-sparc.c:2021
+#: elf32-sparc.c:3359
#, c-format
msgid "%s: linking little endian files with big endian files"
msgstr ""
-#: elf32-v850.c:682
+#: elf32-v850.c:736
#, c-format
msgid "Variable `%s' cannot occupy in multiple small data regions"
msgstr ""
-#: elf32-v850.c:685
+#: elf32-v850.c:739
#, c-format
msgid ""
"Variable `%s' can only be in one of the small, zero, and tiny data regions"
msgstr ""
-#: elf32-v850.c:688
+#: elf32-v850.c:742
#, c-format
msgid ""
"Variable `%s' cannot be in both small and zero data regions simultaneously"
msgstr ""
-#: elf32-v850.c:691
+#: elf32-v850.c:745
#, c-format
msgid ""
"Variable `%s' cannot be in both small and tiny data regions simultaneously"
msgstr ""
-#: elf32-v850.c:694
+#: elf32-v850.c:748
#, c-format
msgid ""
"Variable `%s' cannot be in both zero and tiny data regions simultaneously"
msgstr ""
-#: elf32-v850.c:1072
+#: elf32-v850.c:1126
msgid "FAILED to find previous HI16 reloc\n"
msgstr ""
-#: elf32-v850.c:1703
+#: elf32-v850.c:1765
msgid "could not locate special linker symbol __gp"
msgstr ""
-#: elf32-v850.c:1707
+#: elf32-v850.c:1769
msgid "could not locate special linker symbol __ep"
msgstr ""
-#: elf32-v850.c:1711
+#: elf32-v850.c:1773
msgid "could not locate special linker symbol __ctbp"
msgstr ""
-#: elf32-v850.c:1877
+#: elf32-v850.c:1939
#, c-format
msgid "%s: Architecture mismatch with previous modules"
msgstr ""
-#: elf32-v850.c:1897
+#: elf32-v850.c:1959
#, c-format
msgid "private flags = %lx: "
msgstr ""
-#: elf32-v850.c:1902
+#: elf32-v850.c:1964
msgid "v850 architecture"
msgstr ""
-#: elf32-v850.c:1903
+#: elf32-v850.c:1965
msgid "v850e architecture"
msgstr ""
-#: elf32-v850.c:1904
-msgid "v850ea architecture"
+#: elf32-vax.c:549
+msgid " [nonpic]"
+msgstr ""
+
+#: elf32-vax.c:552
+msgid " [d-float]"
+msgstr ""
+
+#: elf32-vax.c:555
+msgid " [g-float]"
+msgstr ""
+
+#: elf32-vax.c:663
+#, c-format
+msgid ""
+"%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of "
+"%ld"
+msgstr ""
+
+#: elf32-vax.c:1667
+#, c-format
+msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
+msgstr ""
+
+#: elf32-vax.c:1802
+#, c-format
+msgid "%s: warning: %s relocation against symbol `%s' from %s section"
+msgstr ""
+
+#: elf32-vax.c:1808
+#, c-format
+msgid "%s: warning: %s relocation to 0x%x from %s section"
msgstr ""
-#: elf32-ia64.c:2247 elf32-xstormy16.c:414 elf64-ia64.c:2247
+#: elf32-ia64.c:2429 elf32-xstormy16.c:462 elf64-ia64.c:2429
msgid "non-zero addend in @fptr reloc"
msgstr ""
-#: elf64-alpha.c:858
+#: elf64-alpha.c:1108
msgid "GPDISP relocation did not find ldah and lda instructions"
msgstr ""
-#: elf64-alpha.c:2934
+#: elf64-alpha.c:3731
#, c-format
msgid "%s: .got subsegment exceeds 64K (size %d)"
msgstr ""
-#: elf64-alpha.c:3518 elf64-alpha.c:3530
+#: elf64-alpha.c:4602 elf64-alpha.c:4614
#, c-format
msgid "%s: gp-relative relocation against dynamic symbol %s"
msgstr ""
-#: elf64-hppa.c:2070
+#: elf64-alpha.c:4640 elf64-alpha.c:4773
+#, c-format
+msgid "%s: pc-relative relocation against dynamic symbol %s"
+msgstr ""
+
+#: elf64-alpha.c:4668
+#, c-format
+msgid "%s: change in gp: BRSGP %s"
+msgstr ""
+
+#: elf64-alpha.c:4693
+msgid "<unknown>"
+msgstr ""
+
+#: elf64-alpha.c:4698
+#, c-format
+msgid "%s: !samegp reloc against symbol without .prologue: %s"
+msgstr ""
+
+#: elf64-alpha.c:4749
+#, c-format
+msgid "%s: unhandled dynamic relocation against %s"
+msgstr ""
+
+#: elf64-alpha.c:4832
+#, c-format
+msgid "%s: dtp-relative relocation against dynamic symbol %s"
+msgstr ""
+
+#: elf64-alpha.c:4855
+#, c-format
+msgid "%s: tp-relative relocation against dynamic symbol %s"
+msgstr ""
+
+#: elf64-hppa.c:2086
#, c-format
msgid "stub entry for %s cannot load .plt, dp offset = %ld"
msgstr ""
-#: elf64-mmix.c:1002
+#: elf64-mmix.c:1032
#, c-format
msgid ""
"%s: Internal inconsistency error for value for\n"
@@ -1400,517 +1488,818 @@ msgid ""
"08lx\n"
msgstr ""
-#: elf64-mmix.c:1386
+#: elf64-mmix.c:1416
#, c-format
msgid ""
"%s: base-plus-offset relocation against register symbol: (unknown) in %s"
msgstr ""
-#: elf64-mmix.c:1391
+#: elf64-mmix.c:1421
#, c-format
msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
msgstr ""
-#: elf64-mmix.c:1435
+#: elf64-mmix.c:1465
#, c-format
msgid "%s: register relocation against non-register symbol: (unknown) in %s"
msgstr ""
-#: elf64-mmix.c:1440
+#: elf64-mmix.c:1470
#, c-format
msgid "%s: register relocation against non-register symbol: %s in %s"
msgstr ""
-#: elf64-mmix.c:1477
+#: elf64-mmix.c:1507
#, c-format
msgid "%s: directive LOCAL valid only with a register or absolute value"
msgstr ""
-#: elf64-mmix.c:1505
+#: elf64-mmix.c:1535
#, c-format
msgid ""
"%s: LOCAL directive: Register $%ld is not a local register. First global "
"register is $%ld."
msgstr ""
-#: elf64-mmix.c:1967
+#: elf64-mmix.c:1994
#, c-format
msgid ""
"%s: Error: multiple definition of `%s'; start of %s is set in a earlier "
"linked file\n"
msgstr ""
-#: elf64-mmix.c:2026
+#: elf64-mmix.c:2053
msgid "Register section has contents\n"
msgstr ""
-#: elf64-ppc.c:1484 libbfd.c:1436
+#: elf64-mmix.c:2216
+#, c-format
+msgid ""
+"Internal inconsistency: remaining %u != max %u.\n"
+" Please report this bug."
+msgstr ""
+
+#: elf64-ppc.c:2362 libbfd.c:887
#, c-format
msgid "%s: compiled for a big endian system and target is little endian"
msgstr ""
-#: elf64-ppc.c:1486 libbfd.c:1438
+#: elf64-ppc.c:2364 libbfd.c:889
#, c-format
msgid "%s: compiled for a little endian system and target is big endian"
msgstr ""
-#: elf64-ppc.c:3354
+#: elf64-ppc.c:4903
+#, c-format
+msgid "%s: unexpected reloc type %u in .opd section"
+msgstr ""
+
+#: elf64-ppc.c:4923
+#, c-format
+msgid "%s: .opd is not a regular array of opd entries"
+msgstr ""
+
+#: elf64-ppc.c:4943
+#, c-format
+msgid "%s: undefined sym `%s' in .opd section"
+msgstr ""
+
+#: elf64-ppc.c:6131
+#, c-format
+msgid "can't find branch stub `%s'"
+msgstr ""
+
+#: elf64-ppc.c:6170 elf64-ppc.c:6220
#, c-format
msgid "linkage table error against `%s'"
msgstr ""
-#: elf64-ppc.c:3436
-msgid "stub section size doesn't match calculated size"
+#: elf64-ppc.c:6301
+#, c-format
+msgid "can't build branch stub `%s'"
msgstr ""
-#: elf64-ppc.c:4065
+#: elf64-ppc.c:6934
+msgid "stubs don't match calculated size"
+msgstr ""
+
+#: elf64-ppc.c:8009
#, c-format
-msgid "%s: Relocation %s is not supported for symbol %s."
+msgid "%s: relocation %s is not supported for symbol %s."
msgstr ""
-#: elf64-ppc.c:4109
+#: elf64-ppc.c:8078
#, c-format
msgid "%s: error: relocation %s not a multiple of 4"
msgstr ""
-#: elf64-sparc.c:1277
+#: elf-hppa.h:1458 elf-hppa.h:1491 elf64-sh64.c:1704
+#, c-format
+msgid ""
+"%s: warning: unresolvable relocation against symbol `%s' from %s section"
+msgstr ""
+
+#: elf64-sparc.c:1370
#, c-format
msgid "%s: check_relocs: unhandled reloc type %d"
msgstr ""
-#: elf64-sparc.c:1314
+#: elf64-sparc.c:1407
#, c-format
msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
msgstr ""
-#: elf64-sparc.c:1334
+#: elf64-sparc.c:1427
#, c-format
msgid "Register %%g%d used incompatibly: %s in %s, previously %s in %s"
msgstr ""
-#: elf64-sparc.c:1357
+#: elf64-sparc.c:1450
#, c-format
msgid "Symbol `%s' has differing types: REGISTER in %s, previously %s in %s"
msgstr ""
-#: elf64-sparc.c:1404
+#: elf64-sparc.c:1496
#, c-format
msgid "Symbol `%s' has differing types: %s in %s, previously REGISTER in %s"
msgstr ""
-#: elf64-sparc.c:3008
+#: elf64-sparc.c:3053
#, c-format
msgid "%s: linking UltraSPARC specific with HAL specific code"
msgstr ""
-#: elfcode.h:1218
+#: elf64-x86-64.c:818
+#, c-format
+msgid "%s: %s' accessed both as normal and thread local symbol"
+msgstr ""
+
+#: elf.c:372
+#, c-format
+msgid "%s: invalid string offset %u >= %lu for section `%s'"
+msgstr ""
+
+#: elf.c:624
+#, c-format
+msgid "%s: invalid SHT_GROUP entry"
+msgstr ""
+
+#: elf.c:695
+#, c-format
+msgid "%s: no group info for section %s"
+msgstr ""
+
+#: elf.c:1055
+msgid ""
+"\n"
+"Program Header:\n"
+msgstr ""
+
+#: elf.c:1105
+msgid ""
+"\n"
+"Dynamic Section:\n"
+msgstr ""
+
+#: elf.c:1234
+msgid ""
+"\n"
+"Version definitions:\n"
+msgstr ""
+
+#: elf.c:1257
+msgid ""
+"\n"
+"Version References:\n"
+msgstr ""
+
+#: elf.c:1262
+#, c-format
+msgid " required from %s:\n"
+msgstr ""
+
+#: elf.c:1944
+#, c-format
+msgid "%s: invalid link %lu for reloc section %s (index %u)"
+msgstr ""
+
+#: elf.c:3668
+#, c-format
+msgid "%s: Not enough room for program headers (allocated %u, need %u)"
+msgstr ""
+
+#: elf.c:3773
+#, c-format
+msgid "%s: Not enough room for program headers, try linking with -N"
+msgstr ""
+
+#: elf.c:3904
+#, c-format
+msgid ""
+"Error: First section in segment (%s) starts at 0x%x whereas the segment "
+"starts at 0x%x"
+msgstr ""
+
+#: elf.c:4218
+#, c-format
+msgid "%s: warning: allocated section `%s' not in segment"
+msgstr ""
+
+#: elf.c:4542
+#, c-format
+msgid "%s: symbol `%s' required but not present"
+msgstr ""
+
+#: elf.c:4830
+#, c-format
+msgid "%s: warning: Empty loadable segment detected, is this intentional ?\n"
+msgstr ""
+
+#: elf.c:5461
+#, c-format
+msgid ""
+"Unable to find equivalent output section for symbol '%s' from section '%s'"
+msgstr ""
+
+#: elf.c:6274
+#, c-format
+msgid "%s: unsupported relocation type %s"
+msgstr ""
+
+#: elfcode.h:1117
#, c-format
msgid "%s: version count (%ld) does not match symbol count (%ld)"
msgstr ""
-#: elflink.c:434
+#: elfcode.h:1346
+#, c-format
+msgid "%s(%s): relocation %d has invalid symbol index %ld"
+msgstr ""
+
+#: elflink.c:1456
+#, c-format
+msgid "%s: warning: unexpected redefinition of indirect versioned symbol `%s'"
+msgstr ""
+
+#: elflink.c:1807
+#, c-format
+msgid "%s: undefined versioned symbol name %s"
+msgstr ""
+
+#: elflink.c:1956
#, c-format
msgid "%s: Section %s is too large to add hole of %ld bytes"
msgstr ""
-#: elflink.h:1113
+#: elflink.c:2315
#, c-format
-msgid "%s: warning: unexpected redefinition of `%s'"
+msgid "%s: relocation size mismatch in %s section %s"
+msgstr ""
+
+#: elflink.c:2607
+#, c-format
+msgid "warning: type and size of dynamic symbol `%s' are not defined"
msgstr ""
-#: elflink.h:1784
+#: elflink.h:1022
#, c-format
msgid "%s: %s: invalid version %u (max %d)"
msgstr ""
-#: elflink.h:1825
+#: elflink.h:1063
#, c-format
msgid "%s: %s: invalid needed version %d"
msgstr ""
-#: elflink.h:1945
+#: elflink.h:1238
#, c-format
-msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
+msgid "Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s"
msgstr ""
-#: elflink.h:4014
+#: elflink.h:1252
#, c-format
-msgid "warning: type and size of dynamic symbol `%s' are not defined"
+msgid "Warning: size of symbol `%s' changed from %lu in %s to %lu in %s"
msgstr ""
-#: elflink.h:4320
+#: elflink.h:2123
#, c-format
-msgid "%s: undefined versioned symbol name %s"
+msgid "%s: undefined version: %s"
msgstr ""
-#: elflink.h:4544 elflink.h:4552 elflink.h:6203 elflink.h:7280
-msgid "Error: out of memory"
+#: elflink.h:2189
+#, c-format
+msgid "%s: .preinit_array section is not allowed in DSO"
msgstr ""
-#: elflink.h:4714
+#: elflink.h:3040
msgid "Not enough memory to sort relocations"
msgstr ""
-#: elflink.h:5980
+#: elflink.h:3922 elflink.h:3965
#, c-format
-msgid "%s: could not find output section %s for input section %s"
+msgid "%s: could not find output section %s"
+msgstr ""
+
+#: elflink.h:3928
+#, c-format
+msgid "warning: %s section has zero size"
+msgstr ""
+
+#: elflink.h:4447
+#, c-format
+msgid "%s: %s symbol `%s' in %s is referenced by DSO"
msgstr ""
-#: elflink.h:6553
-msgid "warning: relocation against removed section; zeroing"
+#: elflink.h:4528
+#, c-format
+msgid "%s: could not find output section %s for input section %s"
msgstr ""
-#: elflink.h:6583
-msgid "warning: relocation against removed section"
+#: elflink.h:4630
+#, c-format
+msgid "%s: %s symbol `%s' isn't defined"
msgstr ""
-#: elflink.h:6596
+#: elflink.h:5033
#, c-format
msgid "local symbols in discarded section %s"
msgstr ""
-#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456
+#: elfxx-mips.c:901
+msgid "static procedure (no name)"
+msgstr ""
+
+#: elfxx-mips.c:1935
+msgid "not enough GOT space for local GOT entries"
+msgstr ""
+
+#: elfxx-mips.c:3755
+#, c-format
+msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
+msgstr ""
+
+#: elfxx-mips.c:5266
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr ""
+
+#: elfxx-mips.c:5340
+#, c-format
+msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
+msgstr ""
+
+#: elfxx-mips.c:8833
+#, c-format
+msgid "%s: illegal section name `%s'"
+msgstr ""
+
+#: elfxx-mips.c:9166
+#, c-format
+msgid "%s: endianness incompatible with that of the selected emulation"
+msgstr ""
+
+#: elfxx-mips.c:9178
+#, c-format
+msgid "%s: ABI is incompatible with that of the selected emulation"
+msgstr ""
+
+#: elfxx-mips.c:9245
+#, c-format
+msgid "%s: warning: linking PIC files with non-PIC files"
+msgstr ""
+
+#: elfxx-mips.c:9262
+#, c-format
+msgid "%s: linking 32-bit code with 64-bit code"
+msgstr ""
+
+#: elfxx-mips.c:9290
+#, c-format
+msgid "%s: linking %s module with previous %s modules"
+msgstr ""
+
+#: elfxx-mips.c:9313
+#, c-format
+msgid "%s: ABI mismatch: linking %s module with previous %s modules"
+msgstr ""
+
+#: elfxx-mips.c:9382
+msgid " [abi=O32]"
+msgstr ""
+
+#: elfxx-mips.c:9384
+msgid " [abi=O64]"
+msgstr ""
+
+#: elfxx-mips.c:9386
+msgid " [abi=EABI32]"
+msgstr ""
+
+#: elfxx-mips.c:9388
+msgid " [abi=EABI64]"
+msgstr ""
+
+#: elfxx-mips.c:9390
+msgid " [abi unknown]"
+msgstr ""
+
+#: elfxx-mips.c:9392
+msgid " [abi=N32]"
+msgstr ""
+
+#: elfxx-mips.c:9394
+msgid " [abi=64]"
+msgstr ""
+
+#: elfxx-mips.c:9396
+msgid " [no abi set]"
+msgstr ""
+
+#: elfxx-mips.c:9399
+msgid " [mips1]"
+msgstr ""
+
+#: elfxx-mips.c:9401
+msgid " [mips2]"
+msgstr ""
+
+#: elfxx-mips.c:9403
+msgid " [mips3]"
+msgstr ""
+
+#: elfxx-mips.c:9405
+msgid " [mips4]"
+msgstr ""
+
+#: elfxx-mips.c:9407
+msgid " [mips5]"
+msgstr ""
+
+#: elfxx-mips.c:9409
+msgid " [mips32]"
+msgstr ""
+
+#: elfxx-mips.c:9411
+msgid " [mips64]"
+msgstr ""
+
+#: elfxx-mips.c:9413
+msgid " [mips32r2]"
+msgstr ""
+
+#: elfxx-mips.c:9415
+msgid " [unknown ISA]"
+msgstr ""
+
+#: elfxx-mips.c:9418
+msgid " [mdmx]"
+msgstr ""
+
+#: elfxx-mips.c:9421
+msgid " [mips16]"
+msgstr ""
+
+#: elfxx-mips.c:9424
+msgid " [32bitmode]"
+msgstr ""
+
+#: elfxx-mips.c:9426
+msgid " [not 32bitmode]"
+msgstr ""
+
+#: i386linux.c:457 m68klinux.c:461 sparclinux.c:458
#, c-format
msgid "Output file requires shared library `%s'\n"
msgstr ""
-#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464
+#: i386linux.c:465 m68klinux.c:469 sparclinux.c:466
#, c-format
msgid "Output file requires shared library `%s.so.%s'\n"
msgstr ""
-#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708
-#: sparclinux.c:655 sparclinux.c:705
+#: i386linux.c:654 i386linux.c:704 m68klinux.c:661 m68klinux.c:709
+#: sparclinux.c:656 sparclinux.c:706
#, c-format
msgid "Symbol %s not defined for fixups\n"
msgstr ""
-#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729
+#: i386linux.c:728 m68klinux.c:733 sparclinux.c:730
msgid "Warning: fixup count mismatch\n"
msgstr ""
-#: ieee.c:235
+#: ieee.c:293
#, c-format
msgid "%s: string too long (%d chars, max 65535)"
msgstr ""
-#: ieee.c:365
+#: ieee.c:428
#, c-format
msgid "%s: unrecognized symbol `%s' flags 0x%x"
msgstr ""
-#: ieee.c:877
+#: ieee.c:938
#, c-format
msgid "%s: unimplemented ATI record %u for symbol %u"
msgstr ""
-#: ieee.c:902
+#: ieee.c:963
#, c-format
msgid "%s: unexpected ATN type %d in external part"
msgstr ""
-#: ieee.c:924
+#: ieee.c:985
#, c-format
msgid "%s: unexpected type after ATN"
msgstr ""
-#: ihex.c:258
+#: ihex.c:264
#, c-format
msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
msgstr ""
-#: ihex.c:368
+#: ihex.c:372
#, c-format
msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
msgstr ""
-#: ihex.c:422
+#: ihex.c:426
#, c-format
msgid "%s:%u: bad extended address record length in Intel Hex file"
msgstr ""
-#: ihex.c:439
+#: ihex.c:443
#, c-format
msgid "%s:%u: bad extended start address length in Intel Hex file"
msgstr ""
-#: ihex.c:456
+#: ihex.c:460
#, c-format
msgid "%s:%u: bad extended linear address record length in Intel Hex file"
msgstr ""
-#: ihex.c:473
+#: ihex.c:477
#, c-format
msgid "%s:%u: bad extended linear start address length in Intel Hex file"
msgstr ""
-#: ihex.c:490
+#: ihex.c:494
#, c-format
msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
msgstr ""
-#: ihex.c:610
+#: ihex.c:619
#, c-format
msgid "%s: internal error in ihex_read_section"
msgstr ""
-#: ihex.c:645
+#: ihex.c:654
#, c-format
msgid "%s: bad section length in ihex_read_section"
msgstr ""
-#: ihex.c:863
+#: ihex.c:872
#, c-format
msgid "%s: address 0x%s out of range for Intel Hex file"
msgstr ""
-#: libbfd.c:492
-#, c-format
-msgid "not mapping: data=%lx mapped=%d\n"
-msgstr ""
-
-#: libbfd.c:495
-msgid "not mapping: env var not set\n"
-msgstr ""
-
-#: libbfd.c:1467
+#: libbfd.c:918
#, c-format
msgid "Deprecated %s called at %s line %d in %s\n"
msgstr ""
-#: libbfd.c:1470
+#: libbfd.c:921
#, c-format
msgid "Deprecated %s called\n"
msgstr ""
-#: linker.c:1849
+#: linker.c:1877
#, c-format
msgid "%s: indirect symbol `%s' to `%s' is a loop"
msgstr ""
-#: linker.c:2745
+#: linker.c:2780
#, c-format
msgid "Attempt to do relocateable link with %s input and %s output"
msgstr ""
-#: merge.c:897
+#: merge.c:896
#, c-format
msgid "%s: access beyond end of merged section (%ld + %ld)"
msgstr ""
-#: mmo.c:459
+#: mmo.c:503
#, c-format
msgid "%s: No core to allocate section name %s\n"
msgstr ""
-#: mmo.c:535
+#: mmo.c:579
#, c-format
msgid "%s: No core to allocate a symbol %d bytes long\n"
msgstr ""
-#: mmo.c:1188
+#: mmo.c:1287
#, c-format
msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
msgstr ""
-#: mmo.c:1334
+#: mmo.c:1433
#, c-format
msgid ""
"%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name "
"starting with `%s'\n"
msgstr ""
-#: mmo.c:1569
+#: mmo.c:1674
#, c-format
msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
msgstr ""
-#: mmo.c:1579
+#: mmo.c:1684
#, c-format
msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
msgstr ""
-#: mmo.c:1615
+#: mmo.c:1720
#, c-format
msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
msgstr ""
-#: mmo.c:1661
+#: mmo.c:1766
#, c-format
msgid ""
"%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
msgstr ""
-#: mmo.c:1700
+#: mmo.c:1805
#, c-format
msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
msgstr ""
-#: mmo.c:1709
+#: mmo.c:1814
#, c-format
msgid ""
"%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
msgstr ""
-#: mmo.c:1732
+#: mmo.c:1837
#, c-format
msgid ""
"%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d "
"for lop_fixrx\n"
msgstr ""
-#: mmo.c:1755
+#: mmo.c:1860
#, c-format
msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
msgstr ""
-#: mmo.c:1775
+#: mmo.c:1880
#, c-format
msgid ""
"%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
msgstr ""
-#: mmo.c:1788
+#: mmo.c:1893
#, c-format
msgid ""
"%s: invalid mmo file: file name for number %d was not specified before use\n"
msgstr ""
-#: mmo.c:1894
+#: mmo.c:1999
#, c-format
msgid ""
"%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
msgstr ""
-#: mmo.c:1930
+#: mmo.c:2035
#, c-format
msgid "%s: invalid mmo file: lop_end not last item in file\n"
msgstr ""
-#: mmo.c:1943
+#: mmo.c:2048
#, c-format
msgid ""
"%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras "
"to the preceding lop_stab (%ld)\n"
msgstr ""
-#: mmo.c:2608
+#: mmo.c:2698
#, c-format
msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
msgstr ""
-#: mmo.c:2896
+#: mmo.c:2949
#, c-format
msgid ""
"%s: Bad symbol definition: `Main' set to %s rather than the start address %"
"s\n"
msgstr ""
-#: mmo.c:2930
+#: mmo.c:3039
#, c-format
msgid ""
"%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: "
"%d. Only `Main' will be emitted.\n"
msgstr ""
-#: mmo.c:2975
+#: mmo.c:3084
#, c-format
msgid "%s: internal error, symbol table changed size from %d to %d words\n"
msgstr ""
-#: mmo.c:3030
+#: mmo.c:3139
#, c-format
msgid "%s: internal error, internal register section %s had contents\n"
msgstr ""
-#: mmo.c:3082
+#: mmo.c:3191
#, c-format
msgid "%s: no initialized registers; section length 0\n"
msgstr ""
-#: mmo.c:3088
+#: mmo.c:3197
#, c-format
msgid "%s: too many initialized registers; section length %ld\n"
msgstr ""
-#: mmo.c:3093
+#: mmo.c:3202
#, c-format
msgid ""
"%s: invalid start address for initialized registers of length %ld: 0x%lx%"
"08lx\n"
msgstr ""
-#: oasys.c:1036
+#: oasys.c:1052
#, c-format
msgid "%s: can not represent section `%s' in oasys"
msgstr ""
-#: osf-core.c:132
+#: osf-core.c:137
#, c-format
msgid "Unhandled OSF/1 core file section type %d\n"
msgstr ""
-#: pe-mips.c:658
+#. XXX code yet to be written.
+#: peicode.h:787
#, c-format
-msgid "%s: `ld -r' not supported with PE MIPS objects\n"
+msgid "%s: Unhandled import type; %x"
msgstr ""
-#. OK, at this point the following variables are set up:
-#. src = VMA of the memory we're fixing up
-#. mem = pointer to memory we're fixing up
-#. val = VMA of what we need to refer to
-#.
-#: pe-mips.c:794
+#: peicode.h:792
#, c-format
-msgid "%s: unimplemented %s\n"
+msgid "%s: Unrecognised import type; %x"
msgstr ""
-#: pe-mips.c:820
+#: peicode.h:806
#, c-format
-msgid "%s: jump too far away\n"
+msgid "%s: Unrecognised import name type; %x"
msgstr ""
-#: pe-mips.c:847
+#: peicode.h:1164
#, c-format
-msgid "%s: bad pair/reflo after refhi\n"
+msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
msgstr ""
-#. XXX code yet to be written.
-#: peicode.h:785
+#: peicode.h:1176
#, c-format
-msgid "%s: Unhandled import type; %x"
+msgid ""
+"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
+"archive"
msgstr ""
-#: peicode.h:790
+#: peicode.h:1193
#, c-format
-msgid "%s: Unrecognised import type; %x"
+msgid "%s: size field is zero in Import Library Format header"
msgstr ""
-#: peicode.h:804
+#: peicode.h:1224
#, c-format
-msgid "%s: Unrecognised import name type; %x"
+msgid "%s: string not null terminated in ILF object file."
msgstr ""
-#: peicode.h:1162
+#: pe-mips.c:659
#, c-format
-msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
+msgid "%s: `ld -r' not supported with PE MIPS objects\n"
msgstr ""
-#: peicode.h:1174
+#. OK, at this point the following variables are set up:
+#. src = VMA of the memory we're fixing up
+#. mem = pointer to memory we're fixing up
+#. val = VMA of what we need to refer to
+#.
+#: pe-mips.c:795
#, c-format
-msgid ""
-"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
-"archive"
+msgid "%s: unimplemented %s\n"
msgstr ""
-#: peicode.h:1191
+#: pe-mips.c:821
#, c-format
-msgid "%s: size field is zero in Import Library Format header"
+msgid "%s: jump too far away\n"
msgstr ""
-#: peicode.h:1219
+#: pe-mips.c:848
#, c-format
-msgid "%s: string not null terminated in ILF object file."
+msgid "%s: bad pair/reflo after refhi\n"
msgstr ""
#: ppcboot.c:416
@@ -1961,16 +2350,21 @@ msgstr ""
msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
msgstr ""
-#: som.c:5402
+#: som.c:5422
msgid "som_sizeof_headers unimplemented"
msgstr ""
-#: srec.c:301
+#: srec.c:302
#, c-format
msgid "%s:%d: Unexpected character `%s' in S-record file\n"
msgstr ""
-#: syms.c:998
+#: stabs.c:319
+#, c-format
+msgid "%s(%s+0x%lx): Stabs entry has invalid string index."
+msgstr ""
+
+#: syms.c:1042
msgid "Unsupported .stab relocation"
msgstr ""
@@ -1994,28 +2388,28 @@ msgstr ""
msgid "unknown gsd/egsd subtype %d"
msgstr ""
-#: vms-hdr.c:406
+#: vms-hdr.c:408
msgid "Object module NOT error-free !\n"
msgstr ""
-#: vms-misc.c:543
+#: vms-misc.c:541
#, c-format
msgid "Stack overflow (%d) in _bfd_vms_push"
msgstr ""
-#: vms-misc.c:561
+#: vms-misc.c:559
msgid "Stack underflow in _bfd_vms_pop"
msgstr ""
-#: vms-misc.c:919
+#: vms-misc.c:918
msgid "_bfd_vms_output_counted called with zero bytes"
msgstr ""
-#: vms-misc.c:924
+#: vms-misc.c:923
msgid "_bfd_vms_output_counted called with too many bytes"
msgstr ""
-#: vms-misc.c:1055
+#: vms-misc.c:1054
#, c-format
msgid "Symbol %s replaced by %s\n"
msgstr ""
@@ -2025,26 +2419,26 @@ msgstr ""
msgid "failed to enter %s"
msgstr ""
-#: vms-tir.c:81
+#: vms-tir.c:102
msgid "No Mem !"
msgstr ""
-#: vms-tir.c:362
+#: vms-tir.c:383
#, c-format
msgid "bad section index in %s"
msgstr ""
-#: vms-tir.c:375
+#: vms-tir.c:396
#, c-format
msgid "unsupported STA cmd %s"
msgstr ""
-#: vms-tir.c:380 vms-tir.c:1240
+#: vms-tir.c:401 vms-tir.c:1261
#, c-format
msgid "reserved STA cmd %d"
msgstr ""
-#: vms-tir.c:491 vms-tir.c:514
+#: vms-tir.c:512 vms-tir.c:535
#, c-format
msgid "%s: no symbol \"%s\""
msgstr ""
@@ -2053,39 +2447,39 @@ msgstr ""
#. rotate
#. Redefine symbol to current location.
#. Define a literal.
-#: vms-tir.c:581 vms-tir.c:693 vms-tir.c:803 vms-tir.c:821 vms-tir.c:829
-#: vms-tir.c:838 vms-tir.c:1563
+#: vms-tir.c:602 vms-tir.c:714 vms-tir.c:824 vms-tir.c:842 vms-tir.c:850
+#: vms-tir.c:859 vms-tir.c:1584
#, c-format
msgid "%s: not supported"
msgstr ""
-#: vms-tir.c:586 vms-tir.c:1418
+#: vms-tir.c:607 vms-tir.c:1439
#, c-format
msgid "%s: not implemented"
msgstr ""
-#: vms-tir.c:590 vms-tir.c:1422
+#: vms-tir.c:611 vms-tir.c:1443
#, c-format
msgid "reserved STO cmd %d"
msgstr ""
-#: vms-tir.c:708 vms-tir.c:1568
+#: vms-tir.c:729 vms-tir.c:1589
#, c-format
msgid "reserved OPR cmd %d"
msgstr ""
-#: vms-tir.c:776 vms-tir.c:1632
+#: vms-tir.c:797 vms-tir.c:1653
#, c-format
msgid "reserved CTL cmd %d"
msgstr ""
#. stack byte from image
#. arg: none.
-#: vms-tir.c:1148
+#: vms-tir.c:1169
msgid "stack-from-image not implemented"
msgstr ""
-#: vms-tir.c:1166
+#: vms-tir.c:1187
msgid "stack-entry-mask not fully implemented"
msgstr ""
@@ -2096,341 +2490,340 @@ msgstr ""
#.
#. compare argument descriptor with symbol argument (ARG$V_PASSMECH)
#. and stack TRUE (args match) or FALSE (args dont match) value.
-#: vms-tir.c:1180
+#: vms-tir.c:1201
msgid "PASSMECH not fully implemented"
msgstr ""
-#: vms-tir.c:1199
+#: vms-tir.c:1220
msgid "stack-local-symbol not fully implemented"
msgstr ""
-#: vms-tir.c:1212
+#: vms-tir.c:1233
msgid "stack-literal not fully implemented"
msgstr ""
-#: vms-tir.c:1233
+#: vms-tir.c:1254
msgid "stack-local-symbol-entry-point-mask not fully implemented"
msgstr ""
-#: vms-tir.c:1510 vms-tir.c:1522 vms-tir.c:1534 vms-tir.c:1546 vms-tir.c:1611
-#: vms-tir.c:1619 vms-tir.c:1627
+#: vms-tir.c:1531 vms-tir.c:1543 vms-tir.c:1555 vms-tir.c:1567 vms-tir.c:1632
+#: vms-tir.c:1640 vms-tir.c:1648
#, c-format
msgid "%s: not fully implemented"
msgstr ""
-#: vms-tir.c:1684
+#: vms-tir.c:1705
#, c-format
msgid "obj code %d not found"
msgstr ""
-#: vms-tir.c:2019
+#: vms-tir.c:2043
#, c-format
msgid "SEC_RELOC with no relocs in section %s"
msgstr ""
-#: vms-tir.c:2307
+#: vms-tir.c:2331
#, c-format
msgid "Unhandled relocation %s"
msgstr ""
-#: xcofflink.c:1241
+#: xcofflink.c:1244
#, c-format
msgid "%s: `%s' has line numbers but no enclosing section"
msgstr ""
-#: xcofflink.c:1294
+#: xcofflink.c:1297
#, c-format
msgid "%s: class %d symbol `%s' has no aux entries"
msgstr ""
-#: xcofflink.c:1317
+#: xcofflink.c:1320
#, c-format
msgid "%s: symbol `%s' has unrecognized csect type %d"
msgstr ""
-#: xcofflink.c:1329
+#: xcofflink.c:1332
#, c-format
msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
msgstr ""
-#: xcofflink.c:1365
+#: xcofflink.c:1368
#, c-format
msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
msgstr ""
-#: xcofflink.c:1517
+#: xcofflink.c:1520
#, c-format
msgid "%s: csect `%s' not in enclosing section"
msgstr ""
-#: xcofflink.c:1624
+#: xcofflink.c:1627
#, c-format
msgid "%s: misplaced XTY_LD `%s'"
msgstr ""
-#: xcofflink.c:1948
+#: xcofflink.c:1958
#, c-format
msgid "%s: reloc %s:%d not in csect"
msgstr ""
-#: xcofflink.c:2083
+#: xcofflink.c:2095
#, c-format
msgid "%s: XCOFF shared object when not producing XCOFF output"
msgstr ""
-#: xcofflink.c:2104
+#: xcofflink.c:2116
#, c-format
msgid "%s: dynamic object with no .loader section"
msgstr ""
-#: xcofflink.c:2749
+#: xcofflink.c:2761
#, c-format
msgid "%s: no such symbol"
msgstr ""
-#: xcofflink.c:2890
+#: xcofflink.c:2894
msgid "error: undefined symbol __rtinit"
msgstr ""
-#: xcofflink.c:3458
+#: xcofflink.c:3455
#, c-format
msgid "warning: attempt to export undefined symbol `%s'"
msgstr ""
-#: xcofflink.c:4452
+#: xcofflink.c:4448
#, c-format
msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
msgstr ""
-#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117
+#: xcofflink.c:5288 xcofflink.c:5755 xcofflink.c:5817 xcofflink.c:6119
#, c-format
msgid "%s: loader reloc in unrecognized section `%s'"
msgstr ""
-#: xcofflink.c:5314 xcofflink.c:6128
+#: xcofflink.c:5310 xcofflink.c:6130
#, c-format
msgid "%s: `%s' in loader reloc but not loader sym"
msgstr ""
-#: xcofflink.c:5329
+#: xcofflink.c:5325
#, c-format
msgid "%s: loader reloc in read-only section %s"
msgstr ""
-#: elf32-ia64.c:2189 elf64-ia64.c:2189
+#: elf32-ia64.c:2371 elf64-ia64.c:2371
msgid "@pltoff reloc against local symbol"
msgstr ""
-#: elf32-ia64.c:3413 elf64-ia64.c:3413
+#: elf32-ia64.c:3749 elf64-ia64.c:3749
#, c-format
msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
msgstr ""
-#: elf32-ia64.c:3424 elf64-ia64.c:3424
+#: elf32-ia64.c:3760 elf64-ia64.c:3760
#, c-format
msgid "%s: __gp does not cover short data segment"
msgstr ""
-#: elf32-ia64.c:3728 elf64-ia64.c:3728
+#: elf32-ia64.c:4076 elf64-ia64.c:4076
#, c-format
msgid "%s: linking non-pic code in a shared library"
msgstr ""
-#: elf32-ia64.c:3761 elf64-ia64.c:3761
+#: elf32-ia64.c:4109 elf64-ia64.c:4109
#, c-format
msgid "%s: @gprel relocation against dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:3900 elf64-ia64.c:3900
+#: elf32-ia64.c:4285 elf64-ia64.c:4285
+#, c-format
+msgid "%s: @internal branch to dynamic symbol %s"
+msgstr ""
+
+#: elf32-ia64.c:4287 elf64-ia64.c:4287
#, c-format
-msgid "%s: dynamic relocation against speculation fixup"
+msgid "%s: speculation fixup to dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:3908 elf64-ia64.c:3908
+#: elf32-ia64.c:4289 elf64-ia64.c:4289
#, c-format
-msgid "%s: speculation fixup against undefined weak symbol"
+msgid "%s: @pcrel relocation against dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:4092 elf64-ia64.c:4092
+#: elf32-ia64.c:4501 elf64-ia64.c:4501
msgid "unsupported reloc"
msgstr ""
-#: elf32-ia64.c:4372 elf64-ia64.c:4372
+#: elf32-ia64.c:4780 elf64-ia64.c:4780
#, c-format
msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
msgstr ""
-#: elf32-ia64.c:4381 elf64-ia64.c:4381
+#: elf32-ia64.c:4789 elf64-ia64.c:4789
#, c-format
msgid "%s: linking big-endian files with little-endian files"
msgstr ""
-#: elf32-ia64.c:4390 elf64-ia64.c:4390
+#: elf32-ia64.c:4798 elf64-ia64.c:4798
#, c-format
msgid "%s: linking 64-bit files with 32-bit files"
msgstr ""
-#: elf32-ia64.c:4399 elf64-ia64.c:4399
+#: elf32-ia64.c:4807 elf64-ia64.c:4807
#, c-format
msgid "%s: linking constant-gp files with non-constant-gp files"
msgstr ""
-#: elf32-ia64.c:4409 elf64-ia64.c:4409
+#: elf32-ia64.c:4817 elf64-ia64.c:4817
#, c-format
msgid "%s: linking auto-pic files with non-auto-pic files"
msgstr ""
-#: peigen.c:962 pepigen.c:962
+#: peigen.c:985 pepigen.c:985
#, c-format
msgid "%s: line number overflow: 0x%lx > 0xffff"
msgstr ""
-#: peigen.c:979 pepigen.c:979
+#: peigen.c:1002 pepigen.c:1002
#, c-format
msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
msgstr ""
-#: peigen.c:993 pepigen.c:993
+#: peigen.c:1016 pepigen.c:1016
msgid "Export Directory [.edata (or where ever we found it)]"
msgstr ""
-#: peigen.c:994 pepigen.c:994
+#: peigen.c:1017 pepigen.c:1017
msgid "Import Directory [parts of .idata]"
msgstr ""
-#: peigen.c:995 pepigen.c:995
+#: peigen.c:1018 pepigen.c:1018
msgid "Resource Directory [.rsrc]"
msgstr ""
-#: peigen.c:996 pepigen.c:996
+#: peigen.c:1019 pepigen.c:1019
msgid "Exception Directory [.pdata]"
msgstr ""
-#: peigen.c:997 pepigen.c:997
+#: peigen.c:1020 pepigen.c:1020
msgid "Security Directory"
msgstr ""
-#: peigen.c:998 pepigen.c:998
+#: peigen.c:1021 pepigen.c:1021
msgid "Base Relocation Directory [.reloc]"
msgstr ""
-#: peigen.c:999 pepigen.c:999
+#: peigen.c:1022 pepigen.c:1022
msgid "Debug Directory"
msgstr ""
-#: peigen.c:1000 pepigen.c:1000
+#: peigen.c:1023 pepigen.c:1023
msgid "Description Directory"
msgstr ""
-#: peigen.c:1001 pepigen.c:1001
+#: peigen.c:1024 pepigen.c:1024
msgid "Special Directory"
msgstr ""
-#: peigen.c:1002 pepigen.c:1002
+#: peigen.c:1025 pepigen.c:1025
msgid "Thread Storage Directory [.tls]"
msgstr ""
-#: peigen.c:1003 pepigen.c:1003
+#: peigen.c:1026 pepigen.c:1026
msgid "Load Configuration Directory"
msgstr ""
-#: peigen.c:1004 pepigen.c:1004
+#: peigen.c:1027 pepigen.c:1027
msgid "Bound Import Directory"
msgstr ""
-#: peigen.c:1005 pepigen.c:1005
+#: peigen.c:1028 pepigen.c:1028
msgid "Import Address Table Directory"
msgstr ""
-#: peigen.c:1006 pepigen.c:1006
+#: peigen.c:1029 pepigen.c:1029
msgid "Delay Import Directory"
msgstr ""
-#: peigen.c:1007 peigen.c:1008 pepigen.c:1007 pepigen.c:1008
+#: peigen.c:1030 peigen.c:1031 pepigen.c:1030 pepigen.c:1031
msgid "Reserved"
msgstr ""
-#: peigen.c:1071 pepigen.c:1071
+#: peigen.c:1094 pepigen.c:1094
msgid ""
"\n"
"There is an import table, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1076 pepigen.c:1076
+#: peigen.c:1099 pepigen.c:1099
#, c-format
msgid ""
"\n"
"There is an import table in %s at 0x%lx\n"
msgstr ""
-#: peigen.c:1113 pepigen.c:1113
+#: peigen.c:1136 pepigen.c:1136
#, c-format
msgid ""
"\n"
"Function descriptor located at the start address: %04lx\n"
msgstr ""
-#: peigen.c:1116 pepigen.c:1116
+#: peigen.c:1139 pepigen.c:1139
#, c-format
msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
msgstr ""
-#: peigen.c:1122 pepigen.c:1122
+#: peigen.c:1145 pepigen.c:1145
msgid ""
"\n"
"No reldata section! Function descriptor not decoded.\n"
msgstr ""
-#: peigen.c:1127 pepigen.c:1127
+#: peigen.c:1150 pepigen.c:1150
#, c-format
msgid ""
"\n"
"The Import Tables (interpreted %s section contents)\n"
msgstr ""
-#: peigen.c:1130 pepigen.c:1130
+#: peigen.c:1153 pepigen.c:1153
msgid ""
" vma: Hint Time Forward DLL First\n"
" Table Stamp Chain Name Thunk\n"
msgstr ""
-#: peigen.c:1180 pepigen.c:1180
+#: peigen.c:1204 pepigen.c:1204
#, c-format
msgid ""
"\n"
"\tDLL Name: %s\n"
msgstr ""
-#: peigen.c:1184 peigen.c:1247 pepigen.c:1184 pepigen.c:1247
-msgid "\tvma: Hint/Ord Member-Name\n"
-msgstr ""
-
-#: peigen.c:1246 pepigen.c:1246
-msgid "\tThe Import Address Table (difference found)\n"
-msgstr ""
-
-#: peigen.c:1253 pepigen.c:1253
-msgid "\t>>> Ran out of IAT members!\n"
+#: peigen.c:1215 pepigen.c:1215
+msgid "\tvma: Hint/Ord Member-Name Bound-To\n"
msgstr ""
-#: peigen.c:1271 pepigen.c:1271
-msgid "\tThe Import Address Table is identical\n"
+#: peigen.c:1240 pepigen.c:1240
+msgid ""
+"\n"
+"There is a first thunk, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1343 pepigen.c:1343
+#: peigen.c:1380 pepigen.c:1380
msgid ""
"\n"
"There is an export table, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1348 pepigen.c:1348
+#: peigen.c:1385 pepigen.c:1385
#, c-format
msgid ""
"\n"
"There is an export table in %s at 0x%lx\n"
msgstr ""
-#: peigen.c:1379 pepigen.c:1379
+#: peigen.c:1416 pepigen.c:1416
#, c-format
msgid ""
"\n"
@@ -2438,129 +2831,129 @@ msgid ""
"\n"
msgstr ""
-#: peigen.c:1383 pepigen.c:1383
+#: peigen.c:1420 pepigen.c:1420
#, c-format
msgid "Export Flags \t\t\t%lx\n"
msgstr ""
-#: peigen.c:1386 pepigen.c:1386
+#: peigen.c:1423 pepigen.c:1423
#, c-format
msgid "Time/Date stamp \t\t%lx\n"
msgstr ""
-#: peigen.c:1389 pepigen.c:1389
+#: peigen.c:1426 pepigen.c:1426
#, c-format
msgid "Major/Minor \t\t\t%d/%d\n"
msgstr ""
-#: peigen.c:1392 pepigen.c:1392
+#: peigen.c:1429 pepigen.c:1429
msgid "Name \t\t\t\t"
msgstr ""
-#: peigen.c:1398 pepigen.c:1398
+#: peigen.c:1435 pepigen.c:1435
#, c-format
msgid "Ordinal Base \t\t\t%ld\n"
msgstr ""
-#: peigen.c:1401 pepigen.c:1401
+#: peigen.c:1438 pepigen.c:1438
msgid "Number in:\n"
msgstr ""
-#: peigen.c:1404 pepigen.c:1404
+#: peigen.c:1441 pepigen.c:1441
#, c-format
msgid "\tExport Address Table \t\t%08lx\n"
msgstr ""
-#: peigen.c:1408 pepigen.c:1408
+#: peigen.c:1445 pepigen.c:1445
#, c-format
msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
msgstr ""
-#: peigen.c:1411 pepigen.c:1411
+#: peigen.c:1448 pepigen.c:1448
msgid "Table Addresses\n"
msgstr ""
-#: peigen.c:1414 pepigen.c:1414
+#: peigen.c:1451 pepigen.c:1451
msgid "\tExport Address Table \t\t"
msgstr ""
-#: peigen.c:1419 pepigen.c:1419
+#: peigen.c:1456 pepigen.c:1456
msgid "\tName Pointer Table \t\t"
msgstr ""
-#: peigen.c:1424 pepigen.c:1424
+#: peigen.c:1461 pepigen.c:1461
msgid "\tOrdinal Table \t\t\t"
msgstr ""
-#: peigen.c:1439 pepigen.c:1439
+#: peigen.c:1476 pepigen.c:1476
#, c-format
msgid ""
"\n"
"Export Address Table -- Ordinal Base %ld\n"
msgstr ""
-#: peigen.c:1458 pepigen.c:1458
+#: peigen.c:1495 pepigen.c:1495
msgid "Forwarder RVA"
msgstr ""
-#: peigen.c:1469 pepigen.c:1469
+#: peigen.c:1506 pepigen.c:1506
msgid "Export RVA"
msgstr ""
-#: peigen.c:1476 pepigen.c:1476
+#: peigen.c:1513 pepigen.c:1513
msgid ""
"\n"
"[Ordinal/Name Pointer] Table\n"
msgstr ""
-#: peigen.c:1531 pepigen.c:1531
+#: peigen.c:1568 pepigen.c:1568
#, c-format
msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
msgstr ""
-#: peigen.c:1535 pepigen.c:1535
+#: peigen.c:1572 pepigen.c:1572
msgid ""
"\n"
"The Function Table (interpreted .pdata section contents)\n"
msgstr ""
-#: peigen.c:1538 pepigen.c:1538
+#: peigen.c:1575 pepigen.c:1575
msgid " vma:\t\t\tBegin Address End Address Unwind Info\n"
msgstr ""
-#: peigen.c:1540 pepigen.c:1540
+#: peigen.c:1577 pepigen.c:1577
msgid ""
" vma:\t\tBegin End EH EH PrologEnd Exception\n"
" \t\tAddress Address Handler Data Address Mask\n"
msgstr ""
-#: peigen.c:1610 pepigen.c:1610
+#: peigen.c:1647 pepigen.c:1647
msgid " Register save millicode"
msgstr ""
-#: peigen.c:1613 pepigen.c:1613
+#: peigen.c:1650 pepigen.c:1650
msgid " Register restore millicode"
msgstr ""
-#: peigen.c:1616 pepigen.c:1616
+#: peigen.c:1653 pepigen.c:1653
msgid " Glue code sequence"
msgstr ""
-#: peigen.c:1668 pepigen.c:1668
+#: peigen.c:1705 pepigen.c:1705
msgid ""
"\n"
"\n"
"PE File Base Relocations (interpreted .reloc section contents)\n"
msgstr ""
-#: peigen.c:1698 pepigen.c:1698
+#: peigen.c:1735 pepigen.c:1735
#, c-format
msgid ""
"\n"
"Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
msgstr ""
-#: peigen.c:1711 pepigen.c:1711
+#: peigen.c:1748 pepigen.c:1748
#, c-format
msgid "\treloc %4d offset %4x [%4lx] %s"
msgstr ""
@@ -2568,7 +2961,7 @@ msgstr ""
#. The MS dumpbin program reportedly ands with 0xff0f before
#. printing the characteristics field. Not sure why. No reason to
#. emulate it here.
-#: peigen.c:1751 pepigen.c:1751
+#: peigen.c:1788 pepigen.c:1788
#, c-format
msgid ""
"\n"
diff --git a/bfd/simple.c b/bfd/simple.c
index a247f1153ba..0042e60a3f5 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -243,7 +243,7 @@ bfd_simple_get_relocated_section_contents (abfd, sec, outbuf, symbol_table)
if (symbol_table == NULL)
{
- bfd_link_add_symbols (abfd, &link_info);
+ _bfd_generic_link_add_symbols (abfd, &link_info);
storage_needed = bfd_get_symtab_upper_bound (abfd);
symbol_table = (asymbol **) bfd_malloc (storage_needed);
diff --git a/bfd/syms.c b/bfd/syms.c
index d65a8689ca7..0fcb7b36623 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -619,6 +619,9 @@ decode_section_type (section)
}
if (section->flags & SEC_DEBUGGING)
return 'N';
+ if ((section->flags & SEC_HAS_CONTENTS) &&
+ (section->flags & SEC_READONLY))
+ return 'n';
return '?';
}
diff --git a/bfd/version.h b/bfd/version.h
index f9de765b097..6b4a5f8c6b1 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20030523
+#define BFD_VERSION_DATE 20030606
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/configure b/configure
index e0d5acfb6b2..6ee8dc0afeb 100755
--- a/configure
+++ b/configure
@@ -2341,7 +2341,8 @@ rm -f maybedep.tmp
echo '# maybedep.tmp' > maybedep.tmp
# Make-targets which may need maybe dependencies.
-mts="configure all install check"
+mts="configure all install check clean distclean dvi info install-info"
+mts="${mts} installcheck mostlyclean maintainer-clean TAGS"
# Loop over modules and make-targets.
for module in ${build_modules} ; do
@@ -2691,7 +2692,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
# Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2695: checking for $ac_word" >&5
+echo "configure:2696: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2724,7 +2725,7 @@ if test -z "$ac_cv_prog_AR" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2728: checking for $ac_word" >&5
+echo "configure:2729: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2763,7 +2764,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2767: checking for $ac_word" >&5
+echo "configure:2768: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2796,7 +2797,7 @@ if test -z "$ac_cv_prog_AS" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2800: checking for $ac_word" >&5
+echo "configure:2801: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2835,7 +2836,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2839: checking for $ac_word" >&5
+echo "configure:2840: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2868,7 +2869,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2872: checking for $ac_word" >&5
+echo "configure:2873: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2907,7 +2908,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2911: checking for $ac_word" >&5
+echo "configure:2912: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2940,7 +2941,7 @@ if test -z "$ac_cv_prog_LD" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2944: checking for $ac_word" >&5
+echo "configure:2945: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2979,7 +2980,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2983: checking for $ac_word" >&5
+echo "configure:2984: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3012,7 +3013,7 @@ if test -z "$ac_cv_prog_NM" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3016: checking for $ac_word" >&5
+echo "configure:3017: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3051,7 +3052,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3055: checking for $ac_word" >&5
+echo "configure:3056: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3084,7 +3085,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3088: checking for $ac_word" >&5
+echo "configure:3089: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3123,7 +3124,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3127: checking for $ac_word" >&5
+echo "configure:3128: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3156,7 +3157,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3160: checking for $ac_word" >&5
+echo "configure:3161: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3195,7 +3196,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3199: checking for $ac_word" >&5
+echo "configure:3200: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3228,7 +3229,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then
# Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3232: checking for $ac_word" >&5
+echo "configure:3233: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3267,7 +3268,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3271: checking for $ac_word" >&5
+echo "configure:3272: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3300,7 +3301,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3304: checking for $ac_word" >&5
+echo "configure:3305: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3348,7 +3349,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3352: checking for $ac_word" >&5
+echo "configure:3353: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3381,7 +3382,7 @@ if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3385: checking for $ac_word" >&5
+echo "configure:3386: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3420,7 +3421,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3424: checking for $ac_word" >&5
+echo "configure:3425: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3453,7 +3454,7 @@ if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3457: checking for $ac_word" >&5
+echo "configure:3458: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3492,7 +3493,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3496: checking for $ac_word" >&5
+echo "configure:3497: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3525,7 +3526,7 @@ if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3529: checking for $ac_word" >&5
+echo "configure:3530: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3564,7 +3565,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3568: checking for $ac_word" >&5
+echo "configure:3569: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3597,7 +3598,7 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3601: checking for $ac_word" >&5
+echo "configure:3602: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3636,7 +3637,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3640: checking for $ac_word" >&5
+echo "configure:3641: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3669,7 +3670,7 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3673: checking for $ac_word" >&5
+echo "configure:3674: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3708,7 +3709,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3712: checking for $ac_word" >&5
+echo "configure:3713: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3741,7 +3742,7 @@ if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3745: checking for $ac_word" >&5
+echo "configure:3746: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3780,7 +3781,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3784: checking for $ac_word" >&5
+echo "configure:3785: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3813,7 +3814,7 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3817: checking for $ac_word" >&5
+echo "configure:3818: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3880,7 +3881,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:3884: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:3885: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
diff --git a/configure.in b/configure.in
index 87ab222891f..ba9c3bfcb80 100644
--- a/configure.in
+++ b/configure.in
@@ -1655,7 +1655,8 @@ rm -f maybedep.tmp
echo '# maybedep.tmp' > maybedep.tmp
# Make-targets which may need maybe dependencies.
-mts="configure all install check"
+mts="configure all install check clean distclean dvi info install-info"
+mts="${mts} installcheck mostlyclean maintainer-clean TAGS"
# Loop over modules and make-targets.
for module in ${build_modules} ; do
diff --git a/cpu/ChangeLog b/cpu/ChangeLog
index c66cc4b7b95..b262a8e8f7f 100644
--- a/cpu/ChangeLog
+++ b/cpu/ChangeLog
@@ -1,3 +1,41 @@
+2003-06-05 Nick Clifton <nickc@redhat.com>
+
+ * frv.cpu (FRintieven): New operand. An even-numbered only
+ version of the FRinti operand.
+ (FRintjeven): Likewise for FRintj.
+ (FRintkeven): Likewise for FRintk.
+ (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
+ media-quad-arith-sat-semantics, media-quad-arith-sat,
+ conditional-media-quad-arith-sat, mdunpackh,
+ media-quad-multiply-semantics, media-quad-multiply,
+ conditional-media-quad-multiply, media-quad-complex-i,
+ media-quad-multiply-acc-semantics, media-quad-multiply-acc,
+ conditional-media-quad-multiply-acc, munpackh,
+ media-quad-multiply-cross-acc-semantics, mdpackh,
+ media-quad-multiply-cross-acc, mbtoh-semantics,
+ media-quad-cross-multiply-cross-acc-semantics,
+ media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
+ media-quad-cross-multiply-acc-semantics, cmbtoh,
+ media-quad-cross-multiply-acc, media-quad-complex, mhtob,
+ media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
+ cmhtob): Use new operands.
+ * frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
+ (parse_even_register): New function.
+
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
+ immediate value not unsigned.
+
+2003-06-03 Andrew Cagney <cagney@redhat.com>
+
+ Contributed by Red Hat.
+ * frv.cpu: New file. Written by Dave Brolley, Catherine Moore,
+ and Eric Christopher.
+ * frv.opc: New file. Written by Catherine Moore, and Dave
+ Brolley.
+ * simplify.inc: New file. Written by Doug Evans.
+
2003-05-02 Andrew Cagney <cagney@redhat.com>
* New file.
diff --git a/cpu/frv.cpu b/cpu/frv.cpu
new file mode 100644
index 00000000000..95508507eef
--- /dev/null
+++ b/cpu/frv.cpu
@@ -0,0 +1,8177 @@
+; Fujitsu FRV opcode support, for GNU Binutils. -*- Scheme -*-
+;
+; Copyright 2000, 2001 Free Software Foundation, Inc.
+;
+; Contributed by Red Hat Inc; developed under contract from Fujitsu.
+;
+; This file is part of the GNU Binutils.
+;
+; This program is free software; you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or
+; (at your option) any later version.
+;
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with this program; if not, write to the Free Software
+; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+(include "simplify.inc")
+
+; define-arch must appear first
+
+(define-arch
+ (name frv) ; name of cpu architecture
+ (comment "Fujitsu FRV")
+ (insn-lsb0? #t)
+ (machs frv fr500 fr400 tomcat simple)
+ (isas frv)
+)
+
+(define-isa
+ (name frv)
+ (base-insn-bitsize 32)
+ ; Initial bitnumbers to decode insns by.
+ (decode-assist (24 23 22 21 20 19 18))
+ (liw-insns 1) ; The frv fetches up to 1 insns at a time.
+ (parallel-insns 4) ; The frv executes up to 4 insns at a time.
+)
+
+; Cpu family definitions.
+;
+(define-cpu
+ ; cpu names must be distinct from the architecture name and machine names.
+ ; The "b" suffix stands for "base" and is the convention.
+ ; The "f" suffix stands for "family" and is the convention.
+ (name frvbf)
+ (comment "Fujitsu FRV base family")
+ (endian big)
+ (word-bitsize 32)
+)
+
+; Generic FR-V machine. Supports the entire architecture
+(define-mach
+ (name frv)
+ (comment "Generic FRV cpu")
+ (cpu frvbf)
+)
+(define-model
+ (name frv) (comment "Generic FRV model") (attrs)
+ (mach frv)
+
+ (pipeline all "" () ((fetch) (decode) (execute) (writeback)))
+
+ ; `state' is a list of variables for recording model state
+ ; (state)
+
+ (unit u-exec "Execution Unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+)
+
+; FR500 machine.
+(define-mach
+ (name fr500)
+ (comment "FR500 cpu")
+ (cpu frvbf)
+)
+(define-model
+ (name fr500) (comment "FR500 model") (attrs)
+ (mach fr500)
+
+ (pipeline all "" () ((fetch) (decode) (execute) (writeback)))
+
+ ; `state' is a list of variables for recording model state
+ (state
+ ; State items
+ ; These are all masks with each bit representing one register.
+ (prev-fpop DI) ; Previous use of FR register was floating point insn
+ (prev-media DI) ; Previous use of FR register was a media insn
+ (prev-cc-complex DI) ; Previous use of ICC register was not simple
+ (cur-fpop DI) ; Current use of FR register was floating point insn
+ (cur-media DI) ; Current use of FR register was a media insn
+ (cur-cc-complex DI) ; Current use of ICC register was not simple
+ )
+ ; Basic unit for instructions with no latency penalties
+ (unit u-exec "Execution Unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Basic integer insn unit
+ (unit u-integer "Integer Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1) (ICCi_1 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Integer multiplication unit
+ (unit u-imul "Integer Multiplication Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRdoublek INT -1) (ICCi_1 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Integer division unit
+ (unit u-idiv "Integer Division Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1) (ICCi_1 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Branch unit
+ (unit u-branch "Branch Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)
+ (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs
+ ((pc)) ; outputs
+ () ; profile action (default)
+ )
+ ; Trap unit
+ (unit u-trap "Trap Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)
+ (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Condition code check unit
+ (unit u-check "Check Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ICCi_3 INT -1) (FCCi_3 INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; GR set half unit
+ (unit u-set-hilo "GR Set Half" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ ((GRkhi INT -1) (GRklo INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR load unit -- TODO doesn't handle quad
+ (unit u-gr-load "GR Load Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1) (GRdoublek INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR store unit -- TODO doesn't handle quad
+ (unit u-gr-store "GR Store Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1) (GRk INT -1) (GRdoublek INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; GR recovering store unit -- TODO doesn't handle quad
+ (unit u-gr-r-store "GR Recovering Store Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1) (GRk INT -1) (GRdoublek INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; FR load unit -- TODO doesn't handle quad
+ (unit u-fr-load "FR Load Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((FRintk INT -1) (FRdoublek INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; FR store unit -- TODO doesn't handle quad
+ (unit u-fr-store "FR Store Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; FR recovering store unit -- TODO doesn't handle quad
+ (unit u-fr-r-store "FR Recovering Store Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Swap unit
+ (unit u-swap "Swap Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; FR Move to FR unit
+ (unit u-fr2fr "FR Move to FR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRi INT -1)) ; inputs
+ ((FRk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; FR Move to GR unit
+ (unit u-fr2gr "FR Move to GR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRintk INT -1)) ; inputs
+ ((GRj INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; SPR Move to GR unit
+ (unit u-spr2gr "SPR Move to GR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((spr INT -1)) ; inputs
+ ((GRj INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR Move to FR unit
+ (unit u-gr2fr "GR Move to FR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR Move to SPR unit
+ (unit u-gr2spr "GR Move to SPR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRj INT -1)) ; inputs
+ ((spr INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Float Arithmetic unit
+ (unit u-float-arith "Float Arithmetic unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRi INT -1) (FRj INT -1) ; inputs
+ (FRdoublei INT -1) (FRdoublej INT -1)) ; inputs
+ ((FRk INT -1) (FRdoublek INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Float Dual Arithmetic unit
+ (unit u-float-dual-arith "Float Arithmetic unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRi INT -1) (FRj INT -1) ; inputs
+ (FRdoublei INT -1) (FRdoublej INT -1)) ; inputs
+ ((FRk INT -1) (FRdoublek INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Float Div unit
+ (unit u-float-div "Float Div unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRi INT -1) (FRj INT -1)) ; inputs
+ ((FRk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Float Square Root unit
+ (unit u-float-sqrt "Float Square Root unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRj INT -1) (FRdoublej INT -1)) ; inputs
+ ((FRk INT -1) (FRdoublek INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Float Dual Square Root unit
+ (unit u-float-dual-sqrt "Float Dual Square Root unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRj INT -1)) ; inputs
+ ((FRk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Float Compare unit
+ (unit u-float-compare "Float Compare unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRi INT -1) (FRj INT -1)
+ (FRdoublei INT -1) (FRdoublej INT -1)) ; inputs
+ ((FCCi_2 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Dual Float Compare unit
+ (unit u-float-dual-compare "Float Dual Compare unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRi INT -1) (FRj INT -1)) ; inputs
+ ((FCCi_2 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Float Conversion unit
+ (unit u-float-convert "Float Conversion unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRj INT -1) (FRintj INT -1) (FRdoublej INT -1)) ; inputs
+ ((FRk INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Dual Float Conversion unit
+ (unit u-float-dual-convert "Float Dual Conversion unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRj INT -1) (FRintj INT -1)) ; inputs
+ ((FRk INT -1) (FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit
+ (unit u-media "Media unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1) (ACC40Si INT -1) (ACCGi INT -1)) ; inputs
+ ((FRintk INT -1) (ACC40Sk INT -1) (ACC40Uk INT -1) (ACCGk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Quad Arithmetic unit
+ (unit u-media-quad-arith "Media Quad Arithmetic unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Dual Multiplication unit
+ (unit u-media-dual-mul "Media Dual Multiplication unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Quad Multiplication unit
+ (unit u-media-quad-mul "Media Quad Multiplication unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Quad Complex unit
+ (unit u-media-quad-complex "Media Quad Complex unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((ACC40Sk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Dual Expand unit
+ (unit u-media-dual-expand "Media Dual Expand unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Dual Unpack unit
+ (unit u-media-dual-unpack "Media Dual Unpack unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Dual byte to half unit
+ (unit u-media-dual-btoh "Media Byte to byte" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Dual half to byte unit
+ (unit u-media-dual-htob "Media Half to byte" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Dual byte to half unit extended
+ (unit u-media-dual-btohe "Media Byte to byte extended" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Barrier unit
+ (unit u-barrier "Barrier unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Memory Barrier unit
+ (unit u-membar "Memory Barrier unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Insn cache invalidate unit
+ (unit u-ici "Insn cache invalidate unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache invalidate unit
+ (unit u-dci "Data cache invalidate unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache flush unit
+ (unit u-dcf "Data cache flush unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Insn cache preload unit
+ (unit u-icpl "Insn cache preload unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache preload unit
+ (unit u-dcpl "Data cache preload unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Insn cache unlock unit
+ (unit u-icul "Insn cache unlock unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache unlock unit
+ (unit u-dcul "Data cache unlock unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+)
+
+; Tomcat machine. Early version of fr500 machine
+(define-mach
+ (name tomcat)
+ (comment "Tomcat -- early version of fr500")
+ (cpu frvbf)
+)
+(define-model
+ (name tomcat) (comment "Tomcat model") (attrs)
+ (mach tomcat)
+
+ (pipeline all "" () ((fetch) (decode) (execute) (writeback)))
+
+ ; `state' is a list of variables for recording model state
+ ; (state)
+
+ (unit u-exec "Execution Unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+)
+
+; FR400 machine
+(define-mach
+ (name fr400)
+ (comment "FR400 cpu")
+ (cpu frvbf)
+)
+(define-model
+ (name fr400) (comment "FR400 model") (attrs)
+ (mach fr400)
+ (pipeline all "" () ((fetch) (decode) (execute) (writeback)))
+ ; `state' is a list of variables for recording model state
+ (state
+ ; State items
+ ; These are all masks with each bit representing one register.
+ (prev-fp-load DI) ; Previous use of FR register was floating point load
+ (prev-fr-p4 DI) ; Previous use of FR register was media unit 4
+ (prev-fr-p6 DI) ; Previous use of FR register was media unit 6
+ (prev-acc-p2 DI) ; Previous use of ACC register was media unit 2
+ (prev-acc-p4 DI) ; Previous use of ACC register was media unit 4
+ (cur-fp-load DI) ; Current use of FR register is floating point load
+ (cur-fr-p4 DI) ; Current use of FR register is media unit 4
+ (cur-fr-p6 DI) ; Current use of FR register is media unit 6
+ (cur-acc-p2 DI) ; Current use of ACC register is media unit 2
+ (cur-acc-p4 DI) ; Current use of ACC register is media unit 4
+ )
+ (unit u-exec "Execution Unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Basic integer insn unit
+ (unit u-integer "Integer Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1) (ICCi_1 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Integer multiplication unit
+ (unit u-imul "Integer Multiplication Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRdoublek INT -1) (ICCi_1 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Integer division unit
+ (unit u-idiv "Integer Division Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1) (ICCi_1 INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Branch unit
+ (unit u-branch "Branch Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)
+ (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs
+ ((pc)) ; outputs
+ () ; profile action (default)
+ )
+ ; Trap unit
+ (unit u-trap "Trap Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)
+ (ICCi_2 INT -1) (FCCi_2 INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Condition code check unit
+ (unit u-check "Check Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ICCi_3 INT -1) (FCCi_3 INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; GR set half unit
+ (unit u-set-hilo "GR Set Half" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ ((GRkhi INT -1) (GRklo INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR load unit -- TODO doesn't handle quad
+ (unit u-gr-load "GR Load Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1) (GRdoublek INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR store unit -- TODO doesn't handle quad
+ (unit u-gr-store "GR Store Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1) (GRk INT -1) (GRdoublek INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; FR load unit -- TODO doesn't handle quad
+ (unit u-fr-load "FR Load Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((FRintk INT -1) (FRdoublek INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; FR store unit -- TODO doesn't handle quad
+ (unit u-fr-store "FR Store Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1) (FRintk INT -1) (FRdoublek INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Swap unit
+ (unit u-swap "Swap Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ ((GRk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; FR Move to GR unit
+ (unit u-fr2gr "FR Move to GR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRintk INT -1)) ; inputs
+ ((GRj INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; SPR Move to GR unit
+ (unit u-spr2gr "SPR Move to GR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((spr INT -1)) ; inputs
+ ((GRj INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR Move to FR unit
+ (unit u-gr2fr "GR Move to FR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; GR Move to SPR unit
+ (unit u-gr2spr "GR Move to SPR Unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRj INT -1)) ; inputs
+ ((spr INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M1 -- see table 13-8 in the fr400 LSI
+ (unit u-media-1 "Media-1 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-1-quad "Media-1-quad unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-hilo "Media-hilo unit -- a variation of the Media-1 unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ ((FRkhi INT -1) (FRklo INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M2 -- see table 13-8 in the fr400 LSI
+ (unit u-media-2 "Media-2 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-2-quad "Media-2-quad unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((ACC40Sk INT -1) (ACC40Uk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-2-acc "Media-2-acc unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1)) ; inputs
+ ((ACC40Sk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-2-acc-dual "Media-2-acc-dual unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1)) ; inputs
+ ((ACC40Sk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-2-add-sub "Media-2-add-sub unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1)) ; inputs
+ ((ACC40Sk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-2-add-sub-dual "Media-2-add-sub-dual unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1)) ; inputs
+ ((ACC40Sk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M3 -- see table 13-8 in the fr400 LSI
+ (unit u-media-3 "Media-3 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-3-dual "Media-3-dual unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-3-quad "Media-3-quad unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M4 -- see table 13-8 in the fr400 LSI
+ (unit u-media-4 "Media-4 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1) (FRintj INT -1)) ; inputs
+ ((ACC40Sk INT -1) (FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-4-accg "Media-4-accg unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACCGi INT -1) (FRinti INT -1)) ; inputs
+ ((ACCGk INT -1) (FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ (unit u-media-4-acc-dual "Media-4-acc-dual unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((ACC40Si INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M6 -- see table 13-8 in the fr400 LSI
+ (unit u-media-6 "Media-6 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media unit M7 -- see table 13-8 in the fr400 LSI
+ (unit u-media-7 "Media-1 unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1) (FRintj INT -1)) ; inputs
+ ((FCCk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Dual Expand unit
+ (unit u-media-dual-expand "Media Dual Expand unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRinti INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Media Dual half to byte unit
+ (unit u-media-dual-htob "Media Half to byte" ()
+ 1 1 ; issue done
+ () ; state
+ ((FRintj INT -1)) ; inputs
+ ((FRintk INT -1)) ; outputs
+ () ; profile action (default)
+ )
+ ; Barrier unit
+ (unit u-barrier "Barrier unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Memory Barrier unit
+ (unit u-membar "Memory Barrier unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Insn cache invalidate unit
+ (unit u-ici "Insn cache invalidate unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache invalidate unit
+ (unit u-dci "Data cache invalidate unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache flush unit
+ (unit u-dcf "Data cache flush unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Insn cache preload unit
+ (unit u-icpl "Insn cache preload unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache preload unit
+ (unit u-dcpl "Data cache preload unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Insn cache unlock unit
+ (unit u-icul "Insn cache unlock unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+ ; Data cache unlock unit
+ (unit u-dcul "Data cache unlock unit" ()
+ 1 1 ; issue done
+ () ; state
+ ((GRi INT -1) (GRj INT -1)) ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+)
+
+; Simple machine - single issue integer machine
+(define-mach
+ (name simple)
+ (comment "Simple single issue integer cpu")
+ (cpu frvbf)
+)
+(define-model
+ (name simple) (comment "Simple model") (attrs)
+ (mach simple)
+ (pipeline all "" () ((fetch) (decode) (execute) (writeback)))
+ ; `state' is a list of variables for recording model state
+ (state)
+ (unit u-exec "Execution Unit" ()
+ 1 1 ; issue done
+ () ; state
+ () ; inputs
+ () ; outputs
+ () ; profile action (default)
+ )
+)
+
+; The instruction fetch/execute cycle.
+;
+; This is how to fetch and decode an instruction.
+; Leave it out for now
+
+; (define-extract (const SI 0))
+
+; This is how to execute a decoded instruction.
+; Leave it out for now
+
+; (define-execute (const SI 0))
+
+; An attribute to describe which unit an insn runs in.
+(define-attr
+ (for insn)
+ (type enum)
+ (name UNIT)
+ (comment "parallel execution pipeline selection")
+ ; The order of declaration is significant. Keep variations on the same unit
+ ; together and keep the '01' variation last within each unit.
+ (values NIL
+ I0 I1 I01
+ FM0 FM1 FM01
+ B0 B1 B01
+ C
+ MULT-DIV ; multiply/division slotted differently on different machines
+ LOAD ; loads slotted differently on different machines
+ NUM_UNITS
+ )
+)
+; Attributes to describe major categories of insns
+(define-attr
+ (for insn)
+ (type enum)
+ (name FR400-MAJOR)
+ (comment "fr400 major insn categories")
+ ; The order of declaration is significant. Keep variations on the same major
+ ; together.
+ (values NONE
+ I-1 I-2 I-3 I-4 I-5
+ B-1 B-2 B-3 B-4 B-5 B-6
+ C-1 C-2
+ M-1 M-2
+ )
+)
+(define-attr
+ (for insn)
+ (type enum)
+ (name FR500-MAJOR)
+ (comment "fr500 major insn categories")
+ ; The order of declaration is significant. Keep variations on the same major
+ ; together.
+ (values NONE
+ I-1 I-2 I-3 I-4 I-5 I-6
+ B-1 B-2 B-3 B-4 B-5 B-6
+ C-1 C-2
+ F-1 F-2 F-3 F-4 F-5 F-6 F-7 F-8
+ M-1 M-2 M-3 M-4 M-5 M-6 M-7 M-8
+ )
+)
+; Privileged insn
+(define-attr
+ (for insn)
+ (type boolean)
+ (name PRIVILEGED)
+ (comment "insn only allowed in supervisor mode")
+)
+; Non-Excepting insn
+(define-attr
+ (for insn)
+ (type boolean)
+ (name NON-EXCEPTING)
+ (comment "non-excepting insn")
+)
+; Conditional insn
+(define-attr
+ (for insn)
+ (type boolean)
+ (name CONDITIONAL)
+ (comment "conditional insn")
+)
+; insn accesses FR registers
+(define-attr
+ (for insn)
+ (type boolean)
+ (name FR-ACCESS)
+ (comment "insn accesses FR registers")
+)
+; insn preserves MSR.OVF
+(define-attr
+ (for insn)
+ (type boolean)
+ (name PRESERVE-OVF)
+ (comment "Preserve value of MSR.OVF")
+)
+; null attribute -- used as a place holder for where an attribue it required.
+(define-attr
+ (for insn)
+ (type boolean)
+ (name NA)
+ (comment "placeholder attribute")
+ (attrs META) ; do not define in any generated file for now
+)
+
+; Instruction fields.
+;
+; Attributes:
+; PCREL-ADDR: pc relative value (for reloc and disassembly purposes)
+; ABS-ADDR: absolute address (for reloc and disassembly purposes?)
+; RESERVED: bits are not used to decode insn, must be all 0
+(dnf f-pack "packing bit" () 31 1)
+(dnf f-op "primary opcode" () 24 7)
+(dnf f-ope1 "extended opcode" () 11 6)
+(dnf f-ope2 "extended opcode" () 9 4)
+(dnf f-ope3 "extended opcode" () 15 3)
+(dnf f-ope4 "extended opcode" () 7 2)
+
+(dnf f-GRi "source register 1" () 17 6)
+(dnf f-GRj "source register 2" () 5 6)
+(dnf f-GRk "destination register" () 30 6)
+
+(dnf f-FRi "source register 1" () 17 6)
+(dnf f-FRj "source register 2" () 5 6)
+(dnf f-FRk "destination register" () 30 6)
+
+(dnf f-CPRi "source register 1" () 17 6)
+(dnf f-CPRj "source register 2" () 5 6)
+(dnf f-CPRk "destination register" () 30 6)
+
+(dnf f-ACCGi "source register" () 17 6)
+(dnf f-ACCGk "destination register" () 30 6)
+
+(dnf f-ACC40Si "40 bit signed accumulator" () 17 6)
+(dnf f-ACC40Ui "40 bit unsigned accumulator" () 17 6)
+(dnf f-ACC40Sk "40 bit accumulator" () 30 6)
+(dnf f-ACC40Uk "40 bit accumulator" () 30 6)
+
+(dnf f-CRi "source register" () 14 3)
+(dnf f-CRj "source register" () 2 3)
+(dnf f-CRk "destination register" () 27 3)
+(dnf f-CCi "condition register" () 11 3)
+
+(df f-CRj_int "target cr for ck insns" () 26 2 UINT
+ ((value pc) (sub WI value 4))
+ ((value pc) (add WI value 4))
+)
+(dnf f-CRj_float "target cr for fck insns" () 26 2)
+
+(dnf f-ICCi_1 "condition register" () 11 2)
+(dnf f-ICCi_2 "condition register" () 26 2)
+(dnf f-ICCi_3 "condition register" () 1 2)
+(dnf f-FCCi_1 "condition register" () 11 2)
+(dnf f-FCCi_2 "condition register" () 26 2)
+(dnf f-FCCi_3 "condition register" () 1 2)
+(dnf f-FCCk "condition register" () 26 2)
+(dnf f-eir "exception insn register" () 17 6)
+
+(df f-s10 "10 bit sign extended" () 9 10 INT #f #f)
+(df f-s12 "12 bit sign extended" () 11 12 INT #f #f)
+(df f-d12 "12 bit sign extended" () 11 12 INT #f #f)
+(df f-u16 "16 bit unsigned" () 15 16 UINT #f #f)
+(df f-s16 "16 bit sign extended" () 15 16 INT #f #f)
+(df f-s6 "6 bit signed" () 5 6 INT #f #f)
+(df f-s6_1 "6 bit signed" () 11 6 INT #f #f)
+(df f-u6 "6 bit unsigned" () 5 6 UINT #f #f)
+(df f-s5 "5 bit signed" () 4 5 INT #f #f)
+
+(df f-u12-h "upper 6 bits of u12" () 17 6 INT #f #f)
+(df f-u12-l "lower 6 bits of u12" () 5 6 UINT #f #f)
+(dnmf f-u12 "12 bit signed immediate" () INT
+ (f-u12-h f-u12-l)
+ (sequence () ; insert
+ (set (ifield f-u12-h) (sra SI (ifield f-u12) 6))
+ (set (ifield f-u12-l) (and (ifield f-u12) #x3f))
+ )
+ (sequence () ; extract
+ (set (ifield f-u12) (or (sll (ifield f-u12-h) 6)
+ (ifield f-u12-l)))
+ )
+)
+
+(dnf f-int-cc "integer branch conditions" () 30 4)
+(dnf f-flt-cc "floating branch conditions" () 30 4)
+(df f-cond "conditional arithmetic" () 8 1 UINT #f #f)
+(df f-ccond "lr branch condition" () 12 1 UINT #f #f)
+(df f-hint "2 bit branch prediction hint" () 17 2 UINT #f #f)
+(df f-LI "link indicator" () 25 1 UINT #f #f)
+(df f-lock "cache lock indicator" () 25 1 UINT #f #f)
+(df f-debug "debug mode indicator" () 25 1 UINT #f #f)
+(df f-A "all accumulator bit" () 17 1 UINT #f #f)
+(df f-ae "cache all entries indicator" () 25 1 UINT #f #f)
+
+(dnf f-spr-h "upper 6 bits of spr" () 30 6)
+(dnf f-spr-l "lower 6 bits of spr" () 17 6)
+(dnmf f-spr "special purpose register" () UINT
+ (f-spr-h f-spr-l)
+ (sequence () ; insert
+ (set (ifield f-spr-h) (srl (ifield f-spr) (const 6)))
+ (set (ifield f-spr-l) (and (ifield f-spr) (const #x3f)))
+ )
+ (sequence () ; extract
+ (set (ifield f-spr) (or (sll (ifield f-spr-h) (const 6))
+ (ifield f-spr-l)))
+ )
+)
+
+(df f-label16 "18 bit pc relative signed offset" (PCREL-ADDR) 15 16 INT
+ ((value pc) (sra WI (sub WI value pc) (const 2)))
+ ((value pc) (add WI (sll WI value (const 2)) pc))
+)
+
+(df f-labelH6 "upper 6 bits of label24" () 30 6 INT #f #f)
+(dnf f-labelL18 "lower 18 bits of label24" () 17 18)
+(dnmf f-label24 "26 bit signed offset" (PCREL-ADDR) INT
+ (f-labelH6 f-labelL18)
+ ; insert
+ (sequence ()
+ (set (ifield f-labelH6)
+ (sra WI (sub (ifield f-label24) pc) (const 20)))
+ (set (ifield f-labelL18)
+ (and (srl (sub (ifield f-label24) pc) (const 2))
+ (const #x3ffff)))
+ )
+ ; extract
+ (sequence ()
+ (set (ifield f-label24)
+ (add (sll (or (sll (ifield f-labelH6) (const 18))
+ (ifield f-labelL18))
+ (const 2))
+ pc)))
+)
+
+(dnf f-ICCi_1-null "null field" (RESERVED) 11 2)
+(dnf f-ICCi_2-null "null field" (RESERVED) 26 2)
+(dnf f-ICCi_3-null "null field" (RESERVED) 1 2)
+(dnf f-FCCi_1-null "null field" (RESERVED) 11 2)
+(dnf f-FCCi_2-null "null field" (RESERVED) 26 2)
+(dnf f-FCCi_3-null "null field" (RESERVED) 1 2)
+(dnf f-rs-null "null field" (RESERVED) 17 6)
+(dnf f-GRi-null "null field" (RESERVED) 17 6)
+(dnf f-GRj-null "null field" (RESERVED) 5 6)
+(dnf f-GRk-null "null field" (RESERVED) 30 6)
+(dnf f-FRi-null "null field" (RESERVED) 17 6)
+(dnf f-FRj-null "null field" (RESERVED) 5 6)
+(dnf f-ACCj-null "null field" (RESERVED) 5 6)
+(dnf f-rd-null "null field" (RESERVED) 30 6)
+(dnf f-cond-null "null field" (RESERVED) 30 4)
+(dnf f-ccond-null "null field" (RESERVED) 12 1)
+(dnf f-s12-null "null field" (RESERVED) 11 12)
+(dnf f-label16-null "null field" (RESERVED) 15 16)
+(dnf f-misc-null-1 "null field" (RESERVED) 30 5)
+(dnf f-misc-null-2 "null field" (RESERVED) 11 6)
+(dnf f-misc-null-3 "null field" (RESERVED) 11 4)
+(dnf f-misc-null-4 "null field" (RESERVED) 17 2)
+(dnf f-misc-null-5 "null field" (RESERVED) 17 16)
+(dnf f-misc-null-6 "null field" (RESERVED) 30 3)
+(dnf f-misc-null-7 "null field" (RESERVED) 17 3)
+(dnf f-misc-null-8 "null field" (RESERVED) 5 3)
+(dnf f-misc-null-9 "null field" (RESERVED) 5 4)
+(dnf f-misc-null-10 "null field" (RESERVED) 16 5)
+(dnf f-misc-null-11 "null field" (RESERVED) 5 1)
+
+(dnf f-LI-off "null field" (RESERVED) 25 1)
+(dnf f-LI-on "null field" (RESERVED) 25 1)
+
+; Enums.
+
+; insn-op:
+; FIXME: should use die macro or some such
+(define-normal-insn-enum insn-op "insn op enums" () OP_ f-op
+ (
+ "00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F"
+ "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F"
+ "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2A" "2B" "2C" "2D" "2E" "2F"
+ "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F"
+ "40" "41" "42" "43" "44" "45" "46" "47" "48" "49" "4A" "4B" "4C" "4D" "4E" "4F"
+ "50" "51" "52" "53" "54" "55" "56" "57" "58" "59" "5A" "5B" "5C" "5D" "5E" "5F"
+ "60" "61" "62" "63" "64" "65" "66" "67" "68" "69" "6A" "6B" "6C" "6D" "6E" "6F"
+ "70" "71" "72" "73" "74" "75" "76" "77" "78" "79" "7A" "7B" "7C" "7D" "7E" "7F"
+ )
+)
+
+(define-normal-insn-enum insn-ope1 "insn ope enums" () OPE1_ f-ope1
+ (
+ "00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F"
+ "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F"
+ "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2A" "2B" "2C" "2D" "2E" "2F"
+ "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F"
+ )
+)
+
+(define-normal-insn-enum insn-ope2 "insn ope enums" () OPE2_ f-ope2
+ (
+ "00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F"
+ )
+)
+
+(define-normal-insn-enum insn-ope3 "insn ope enums" () OPE3_ f-ope3
+ (
+ "00" "01" "02" "03" "04" "05" "06" "07"
+ )
+)
+
+(define-normal-insn-enum insn-ope4 "insn ope enums" () OPE4_ f-ope4
+ (
+ "0" "1" "2" "3"
+ )
+)
+
+; int-cc: integer branch conditions
+; FIXME: should use die macro or some such
+(define-normal-insn-enum int-cc "integer branch cond enums" () ICC_ f-int-cc
+ (
+ "nev" "c" "v" "lt" "eq" "ls" "n" "le"
+ "ra" "nc" "nv" "ge" "ne" "hi" "p" "gt"
+ )
+)
+
+; flt-cc: floating-point/media branch conditions
+; FIXME: should use die macro or some such
+(define-normal-insn-enum flt-cc "float branch cond enums" () FCC_ f-flt-cc
+ ("nev" "u" "gt" "ug" "lt" "ul" "lg" "ne"
+ "eq" "ue" "ge" "uge" "le" "ule" "o" "ra")
+)
+
+; Hardware pieces.
+; These entries list the elements of the raw hardware.
+; They're also used to provide tables and other elements of the assembly
+; language.
+(dnh h-pc "program counter" (PC PROFILE) (pc) () () ())
+
+; The PSR. The individual fields are referenced more than the entire
+; register, so reference them directly. We can assemble the
+; entire register contents when necessary.
+;
+(dsh h-psr_imple "PSR.IMPLE" () (register UQI))
+(dsh h-psr_ver "PSR.VER" () (register UQI))
+(dsh h-psr_ice "PSR.ICE bit" () (register BI))
+(dsh h-psr_nem "PSR.NEM bit" () (register BI))
+(dsh h-psr_cm "PSR.CM bit" () (register BI))
+(dsh h-psr_be "PSR.BE bit" () (register BI))
+(dsh h-psr_esr "PSR.ESR bit" () (register BI))
+(dsh h-psr_ef "PSR.EF bit" () (register BI))
+(dsh h-psr_em "PSR.EM bit" () (register BI))
+(dsh h-psr_pil "PSR.PIL " () (register UQI))
+(dsh h-psr_ps "PSR.PS bit" () (register BI))
+(dsh h-psr_et "PSR.ET bit" () (register BI))
+
+; PSR.S requires special handling because the shadow registers (SR0-SR4) must
+; be switched with GR4-GR7 when changing from user to supervisor mode or
+; vice-versa.
+(define-hardware
+ (name h-psr_s)
+ (comment "PSR.S bit")
+ (attrs)
+ (type register BI)
+ (get)
+ (set (newval) (c-call VOID "@cpu@_h_psr_s_set_handler" newval))
+)
+
+; The TBR. The individual bits are referenced more than the entire
+; register, so reference them directly. We can assemble the
+; entire register contents when necessary.
+;
+(dsh h-tbr_tba "TBR.TBA" () (register UWI))
+(dsh h-tbr_tt "TBR.TT" () (register UQI))
+
+; The BPSR. The individual bits are referenced more than the entire
+; register, so reference them directly. We can assemble the
+; entire register contents when necessary.
+;
+(dsh h-bpsr_bs "PSR.S bit" () (register BI))
+(dsh h-bpsr_bet "PSR.ET bit" () (register BI))
+
+; General registers
+;
+(define-keyword
+ (name gr-names)
+ (print-name h-gr)
+ (prefix "")
+ (values
+ (sp 1) (fp 2)
+ (gr0 0)(gr1 1)(gr2 2)(gr3 3)(gr4 4)(gr5 5)(gr6 6)(gr7 7)
+ (gr8 8)(gr9 9)(gr10 10)(gr11 11)(gr12 12)(gr13 13)(gr14 14)(gr15 15)
+ (gr16 16)(gr17 17)(gr18 18)(gr19 19)(gr20 20)(gr21 21)(gr22 22)(gr23 23)
+ (gr24 24)(gr25 25)(gr26 26)(gr27 27)(gr28 28)(gr29 29)(gr30 30)(gr31 31)
+ (gr32 32)(gr33 33)(gr34 34)(gr35 35)(gr36 36)(gr37 37)(gr38 38)(gr39 39)
+ (gr40 40)(gr41 41)(gr42 42)(gr43 43)(gr44 44)(gr45 45)(gr46 46)(gr47 47)
+ (gr48 48)(gr49 49)(gr50 50)(gr51 51)(gr52 52)(gr53 53)(gr54 54)(gr55 55)
+ (gr56 56)(gr57 57)(gr58 58)(gr59 59)(gr60 60)(gr61 61)(gr62 62)(gr63 63)
+ )
+)
+
+(define-hardware
+ (name h-gr)
+ (comment "general registers")
+ (attrs PROFILE)
+ (type register USI (64))
+ (indices extern-keyword gr-names)
+ (get (index) (c-call WI "@cpu@_h_gr_get_handler" index))
+ (set (index newval) (c-call VOID "@cpu@_h_gr_set_handler" index newval))
+)
+
+; General Registers as double words
+; These registers are shadowed onto h-gr
+(define-hardware
+ (name h-gr_double)
+ (comment "general registers as double words")
+ (attrs PROFILE VIRTUAL)
+ (type register DI (32))
+ ; FIXME: Need constraint to prohibit odd numbers.
+ (indices extern-keyword gr-names)
+ (get (index)
+ (c-call DI "@cpu@_h_gr_double_get_handler" index))
+ (set (index newval)
+ (c-call VOID "@cpu@_h_gr_double_set_handler" index newval))
+)
+
+; General Registers as high and low half words
+; These registers are shadowed onto h-gr
+(define-hardware
+ (name h-gr_hi)
+ (comment "general registers as high half word")
+ (attrs PROFILE VIRTUAL)
+ (type register UHI (64))
+ (indices extern-keyword gr-names)
+ (get (index) (c-call UHI "@cpu@_h_gr_hi_get_handler" index))
+ (set (index newval) (c-call VOID "@cpu@_h_gr_hi_set_handler" index newval))
+)
+(define-hardware
+ (name h-gr_lo)
+ (comment "general registers as low half word")
+ (attrs PROFILE VIRTUAL)
+ (type register UHI (64))
+ (indices extern-keyword gr-names)
+ (get (index) (c-call UHI "@cpu@_h_gr_lo_get_handler" index))
+ (set (index newval) (c-call VOID "@cpu@_h_gr_lo_set_handler" index newval))
+)
+
+; Floating Point Registers
+(define-keyword
+ (name fr-names)
+ (print-name h-fr)
+ (prefix "")
+ (values
+ (fr0 0)(fr1 1)(fr2 2)(fr3 3)(fr4 4)(fr5 5)(fr6 6)(fr7 7)
+ (fr8 8)(fr9 9)(fr10 10)(fr11 11)(fr12 12)(fr13 13)(fr14 14)(fr15 15)
+ (fr16 16)(fr17 17)(fr18 18)(fr19 19)(fr20 20)(fr21 21)(fr22 22)(fr23 23)
+ (fr24 24)(fr25 25)(fr26 26)(fr27 27)(fr28 28)(fr29 29)(fr30 30)(fr31 31)
+ (fr32 32)(fr33 33)(fr34 34)(fr35 35)(fr36 36)(fr37 37)(fr38 38)(fr39 39)
+ (fr40 40)(fr41 41)(fr42 42)(fr43 43)(fr44 44)(fr45 45)(fr46 46)(fr47 47)
+ (fr48 48)(fr49 49)(fr50 50)(fr51 51)(fr52 52)(fr53 53)(fr54 54)(fr55 55)
+ (fr56 56)(fr57 57)(fr58 58)(fr59 59)(fr60 60)(fr61 61)(fr62 62)(fr63 63)
+ )
+)
+
+(define-hardware
+ (name h-fr)
+ (comment "floating point registers")
+ (attrs PROFILE)
+ (type register SF (64))
+ (indices extern-keyword fr-names)
+ (get (index) (c-call SF "@cpu@_h_fr_get_handler" index))
+ (set (index newval) (c-call VOID "@cpu@_h_fr_set_handler" index newval))
+)
+
+; Floating Point Registers as double precision
+; These registers are shadowed onto h-fr
+
+(define-hardware
+ (name h-fr_double)
+ (comment "floating point registers as double precision")
+ (attrs PROFILE VIRTUAL)
+ (type register DF (32))
+ ; FIXME: Need constraint to prohibit odd numbers.
+ (indices extern-keyword fr-names)
+ (get (index)
+ (c-call DF "@cpu@_h_fr_double_get_handler" index))
+ (set (index newval)
+ (c-call VOID "@cpu@_h_fr_double_set_handler" index newval))
+)
+
+; Floating Point Registers as integer words.
+; These registers are shadowed onto h-fr
+
+(define-hardware
+ (name h-fr_int)
+ (comment "floating point registers as integers")
+ (attrs PROFILE VIRTUAL)
+ (type register USI (64))
+ (indices extern-keyword fr-names)
+ (get (index)
+ (c-call USI "@cpu@_h_fr_int_get_handler" index))
+ (set (index newval)
+ (c-call VOID "@cpu@_h_fr_int_set_handler" index newval))
+)
+
+; Floating Point Registers as high and low half words
+; These registers are shadowed onto h-fr
+(define-hardware
+ (name h-fr_hi)
+ (comment "floating point registers as unsigned high half word")
+ (attrs PROFILE VIRTUAL)
+ (type register UHI (64))
+ (indices extern-keyword fr-names)
+ (get (regno) (srl (reg h-fr_int regno) 16))
+ (set (regno newval) (set (reg h-fr_int regno)
+ (or (and (reg h-fr_int regno) #xffff)
+ (sll newval 16))))
+)
+(define-hardware
+ (name h-fr_lo)
+ (comment "floating point registers as unsigned low half word")
+ (attrs PROFILE VIRTUAL)
+ (type register UHI (64))
+ (indices extern-keyword fr-names)
+ (get (regno) (and (reg h-fr_int regno) #xffff))
+ (set (regno newval) (set (reg h-fr_int regno)
+ (or (and (reg h-fr_int regno) #xffff0000)
+ (and newval #xffff))))
+)
+
+; Floating Point Registers as unsigned bytes
+; These registers are shadowed onto h-fr
+(define-hardware
+ (name h-fr_0)
+ (comment "floating point registers as unsigned byte 0")
+ (attrs PROFILE VIRTUAL)
+ (type register UHI (64))
+ (indices extern-keyword fr-names)
+ (get (regno) (and (reg h-fr_int regno) #xff))
+ (set (regno newval)
+ (sequence ()
+ (if (gt USI newval #xff)
+ (set newval #xff))
+ (set (reg h-fr_int regno) (or (and (reg h-fr_int regno) #xffffff00)
+ newval))))
+)
+(define-hardware
+ (name h-fr_1)
+ (comment "floating point registers as unsigned byte 1")
+ (attrs PROFILE VIRTUAL)
+ (type register UHI (64))
+ (indices extern-keyword fr-names)
+ (get (regno) (and (srl (reg h-fr_int regno) 8) #xff))
+ (set (regno newval)
+ (sequence ()
+ (if (gt USI newval #xff)
+ (set newval #xff))
+ (set (reg h-fr_int regno) (or (and (reg h-fr_int regno) #xffff00ff)
+ (sll newval 8)))))
+)
+(define-hardware
+ (name h-fr_2)
+ (comment "floating point registers as unsigned byte 2")
+ (attrs PROFILE VIRTUAL)
+ (type register UHI (64))
+ (indices extern-keyword fr-names)
+ (get (regno) (and (srl (reg h-fr_int regno) 16) #xff))
+ (set (regno newval)
+ (sequence ()
+ (if (gt USI newval #xff)
+ (set newval #xff))
+ (set (reg h-fr_int regno) (or (and (reg h-fr_int regno) #xff00ffff)
+ (sll newval 16)))))
+)
+(define-hardware
+ (name h-fr_3)
+ (comment "floating point registers as unsigned byte 3")
+ (attrs PROFILE VIRTUAL)
+ (type register UHI (64))
+ (indices extern-keyword fr-names)
+ (get (regno) (and (srl (reg h-fr_int regno) 24) #xff))
+ (set (regno newval)
+ (sequence ()
+ (if (gt USI newval #xff)
+ (set newval #xff))
+ (set (reg h-fr_int regno) (or (and (reg h-fr_int regno) #x00ffffff)
+ (sll newval 24)))))
+)
+; Coprocessor Registers
+;
+(define-keyword
+ (name cpr-names)
+ (print-name h-cpr)
+ (prefix "")
+ (values
+(cpr0 0)(cpr1 1)(cpr2 2)(cpr3 3)(cpr4 4)(cpr5 5)(cpr6 6)(cpr7 7)
+(cpr8 8)(cpr9 9)(cpr10 10)(cpr11 11)(cpr12 12)(cpr13 13)(cpr14 14)(cpr15 15)
+(cpr16 16)(cpr17 17)(cpr18 18)(cpr19 19)(cpr20 20)(cpr21 21)(cpr22 22)(cpr23 23)
+(cpr24 24)(cpr25 25)(cpr26 26)(cpr27 27)(cpr28 28)(cpr29 29)(cpr30 30)(cpr31 31)
+(cpr32 32)(cpr33 33)(cpr34 34)(cpr35 35)(cpr36 36)(cpr37 37)(cpr38 38)(cpr39 39)
+(cpr40 40)(cpr41 41)(cpr42 42)(cpr43 43)(cpr44 44)(cpr45 45)(cpr46 46)(cpr47 47)
+(cpr48 48)(cpr49 49)(cpr50 50)(cpr51 51)(cpr52 52)(cpr53 53)(cpr54 54)(cpr55 55)
+(cpr56 56)(cpr57 57)(cpr58 58)(cpr59 59)(cpr60 60)(cpr61 61)(cpr62 62)(cpr63 63)
+ )
+)
+
+(define-hardware
+ (name h-cpr)
+ (comment "coprocessor registers")
+ (attrs PROFILE (MACH frv))
+ (type register WI (64))
+ (indices extern-keyword cpr-names)
+)
+
+; Coprocessor Registers as double words
+; These registers are shadowed onto h-cpr
+(define-hardware
+ (name h-cpr_double)
+ (comment "coprocessor registers as double words")
+ (attrs PROFILE VIRTUAL (MACH frv))
+ (type register DI (32))
+ ; FIXME: Need constraint to prohibit odd numbers.
+ (indices extern-keyword cpr-names)
+ (get (index)
+ (c-call DI "@cpu@_h_cpr_double_get_handler" index))
+ (set (index newval)
+ (c-call VOID "@cpu@_h_cpr_double_set_handler" index newval))
+)
+
+; Special Purpose Registers
+;
+(define-keyword
+ (name spr-names)
+ (print-name h-spr)
+ (prefix "")
+ (values
+ (psr 0) (pcsr 1) (bpcsr 2) (tbr 3) (bpsr 4)
+
+ (hsr0 16) (hsr1 17) (hsr2 18) (hsr3 19)
+ (hsr4 20) (hsr5 21) (hsr6 22) (hsr7 23)
+ (hsr8 24) (hsr9 25) (hsr10 26) (hsr11 27)
+ (hsr12 28) (hsr13 29) (hsr14 30) (hsr15 31)
+ (hsr16 32) (hsr17 33) (hsr18 34) (hsr19 35)
+ (hsr20 36) (hsr21 37) (hsr22 38) (hsr23 39)
+ (hsr24 40) (hsr25 41) (hsr26 42) (hsr27 43)
+ (hsr28 44) (hsr29 45) (hsr30 46) (hsr31 47)
+ (hsr32 48) (hsr33 49) (hsr34 50) (hsr35 51)
+ (hsr36 52) (hsr37 53) (hsr38 54) (hsr39 55)
+ (hsr40 56) (hsr41 57) (hsr42 58) (hsr43 59)
+ (hsr44 60) (hsr45 61) (hsr46 62) (hsr47 63)
+ (hsr48 64) (hsr49 65) (hsr50 66) (hsr51 67)
+ (hsr52 68) (hsr53 69) (hsr54 70) (hsr55 71)
+ (hsr56 72) (hsr57 73) (hsr58 74) (hsr59 75)
+ (hsr60 76) (hsr61 77) (hsr62 78) (hsr63 79)
+
+ (ccr 256) (cccr 263) (lr 272) (lcr 273) (isr 288)
+
+ (neear0 352) (neear1 353) (neear2 354) (neear3 355)
+ (neear4 356) (neear5 357) (neear6 358) (neear7 359)
+ (neear8 360) (neear9 361) (neear10 362) (neear11 363)
+ (neear12 364) (neear13 365) (neear14 366) (neear15 367)
+ (neear16 368) (neear17 369) (neear18 370) (neear19 371)
+ (neear20 372) (neear21 373) (neear22 374) (neear23 375)
+ (neear24 376) (neear25 377) (neear26 378) (neear27 379)
+ (neear28 380) (neear29 381) (neear30 382) (neear31 383)
+
+ (nesr0 384) (nesr1 385) (nesr2 386) (nesr3 387)
+ (nesr4 388) (nesr5 389) (nesr6 390) (nesr7 391)
+ (nesr8 392) (nesr9 393) (nesr10 394) (nesr11 395)
+ (nesr12 396) (nesr13 397) (nesr14 398) (nesr15 399)
+ (nesr16 400) (nesr17 401) (nesr18 402) (nesr19 403)
+ (nesr20 404) (nesr21 405) (nesr22 406) (nesr23 407)
+ (nesr24 408) (nesr25 409) (nesr26 410) (nesr27 411)
+ (nesr28 412) (nesr29 413) (nesr30 414) (nesr31 415)
+
+ (necr 416)
+
+ (gner0 432) (gner1 433)
+
+ (fner0 434) (fner1 435)
+
+ (epcr0 512) (epcr1 513) (epcr2 514) (epcr3 515)
+ (epcr4 516) (epcr5 517) (epcr6 518) (epcr7 519)
+ (epcr8 520) (epcr9 521) (epcr10 522) (epcr11 523)
+ (epcr12 524) (epcr13 525) (epcr14 526) (epcr15 527)
+ (epcr16 528) (epcr17 529) (epcr18 530) (epcr19 531)
+ (epcr20 532) (epcr21 533) (epcr22 534) (epcr23 535)
+ (epcr24 536) (epcr25 537) (epcr26 538) (epcr27 539)
+ (epcr28 540) (epcr29 541) (epcr30 542) (epcr31 543)
+ (epcr32 544) (epcr33 545) (epcr34 546) (epcr35 547)
+ (epcr36 548) (epcr37 549) (epcr38 550) (epcr39 551)
+ (epcr40 552) (epcr41 553) (epcr42 554) (epcr43 555)
+ (epcr44 556) (epcr45 557) (epcr46 558) (epcr47 559)
+ (epcr48 560) (epcr49 561) (epcr50 562) (epcr51 563)
+ (epcr52 564) (epcr53 565) (epcr54 566) (epcr55 567)
+ (epcr56 568) (epcr57 569) (epcr58 570) (epcr59 571)
+ (epcr60 572) (epcr61 573) (epcr62 574) (epcr63 575)
+
+ (esr0 576) (esr1 577) (esr2 578) (esr3 579)
+ (esr4 580) (esr5 581) (esr6 582) (esr7 583)
+ (esr8 584) (esr9 585) (esr10 586) (esr11 587)
+ (esr12 588) (esr13 589) (esr14 590) (esr15 591)
+ (esr16 592) (esr17 593) (esr18 594) (esr19 595)
+ (esr20 596) (esr21 597) (esr22 598) (esr23 599)
+ (esr24 600) (esr25 601) (esr26 602) (esr27 603)
+ (esr28 604) (esr29 605) (esr30 606) (esr31 607)
+ (esr32 608) (esr33 609) (esr34 610) (esr35 611)
+ (esr36 612) (esr37 613) (esr38 614) (esr39 615)
+ (esr40 616) (esr41 617) (esr42 618) (esr43 619)
+ (esr44 620) (esr45 621) (esr46 622) (esr47 623)
+ (esr48 624) (esr49 625) (esr50 626) (esr51 627)
+ (esr52 628) (esr53 629) (esr54 630) (esr55 631)
+ (esr56 632) (esr57 633) (esr58 634) (esr59 635)
+ (esr60 636) (esr61 637) (esr62 638) (esr63 639)
+
+ (eir0 640) (eir1 641) (eir2 642) (eir3 643)
+ (eir4 644) (eir5 645) (eir6 646) (eir7 647)
+ (eir8 648) (eir9 649) (eir10 650) (eir11 651)
+ (eir12 652) (eir13 653) (eir14 654) (eir15 655)
+ (eir16 656) (eir17 657) (eir18 658) (eir19 659)
+ (eir20 660) (eir21 661) (eir22 662) (eir23 663)
+ (eir24 664) (eir25 665) (eir26 666) (eir27 667)
+ (eir28 668) (eir29 669) (eir30 670) (eir31 671)
+
+ (esfr0 672) (esfr1 673)
+
+ (sr0 768) (sr1 769) (sr2 770) (sr3 771)
+
+ (fsr0 1024) (fsr1 1025) (fsr2 1026) (fsr3 1027)
+ (fsr4 1028) (fsr5 1029) (fsr6 1030) (fsr7 1031)
+ (fsr8 1032) (fsr9 1033) (fsr10 1034) (fsr11 1035)
+ (fsr12 1036) (fsr13 1037) (fsr14 1038) (fsr15 1039)
+ (fsr16 1040) (fsr17 1041) (fsr18 1042) (fsr19 1043)
+ (fsr20 1044) (fsr21 1045) (fsr22 1046) (fsr23 1047)
+ (fsr24 1048) (fsr25 1049) (fsr26 1050) (fsr27 1051)
+ (fsr28 1052) (fsr29 1053) (fsr30 1054) (fsr31 1055)
+ (fsr32 1056) (fsr33 1057) (fsr34 1058) (fsr35 1059)
+ (fsr36 1060) (fsr37 1061) (fsr38 1062) (fsr39 1063)
+ (fsr40 1064) (fsr41 1065) (fsr42 1066) (fsr43 1067)
+ (fsr44 1068) (fsr45 1069) (fsr46 1070) (fsr47 1071)
+ (fsr48 1072) (fsr49 1073) (fsr50 1074) (fsr51 1075)
+ (fsr52 1076) (fsr53 1077) (fsr54 1078) (fsr55 1079)
+ (fsr56 1080) (fsr57 1081) (fsr58 1082) (fsr59 1083)
+ (fsr60 1084) (fsr61 1085) (fsr62 1086) (fsr63 1087)
+
+ ; FQ0-FQ31 are 64 bit registers.
+ ; These names allow access to the upper 32 bits of the FQ registers.
+ (fqop0 1088) (fqop1 1090) (fqop2 1092) (fqop3 1094)
+ (fqop4 1096) (fqop5 1098) (fqop6 1100) (fqop7 1102)
+ (fqop8 1104) (fqop9 1106) (fqop10 1108) (fqop11 1110)
+ (fqop12 1112) (fqop13 1114) (fqop14 1116) (fqop15 1118)
+ (fqop16 1120) (fqop17 1122) (fqop18 1124) (fqop19 1126)
+ (fqop20 1128) (fqop21 1130) (fqop22 1132) (fqop23 1134)
+ (fqop24 1136) (fqop25 1138) (fqop26 1140) (fqop27 1142)
+ (fqop28 1144) (fqop29 1146) (fqop30 1148) (fqop31 1150)
+ ; These names allow access to the lower 32 bits of the FQ registers.
+ (fqst0 1089) (fqst1 1091) (fqst2 1093) (fqst3 1095)
+ (fqst4 1097) (fqst5 1099) (fqst6 1101) (fqst7 1103)
+ (fqst8 1105) (fqst9 1107) (fqst10 1109) (fqst11 1111)
+ (fqst12 1113) (fqst13 1115) (fqst14 1117) (fqst15 1119)
+ (fqst16 1121) (fqst17 1123) (fqst18 1125) (fqst19 1127)
+ (fqst20 1129) (fqst21 1131) (fqst22 1133) (fqst23 1135)
+ (fqst24 1137) (fqst25 1139) (fqst26 1141) (fqst27 1143)
+ (fqst28 1145) (fqst29 1147) (fqst30 1149) (fqst31 1151)
+ ; These also access the lower 32 bits of the FQ registers.
+ ; These are not accessible as spr registers (see LSI appendix - section 13.4)
+; (fq0 1089) (fq1 1091) (fq2 1093) (fq3 1095)
+; (fq4 1097) (fq5 1099) (fq6 1101) (fq7 1103)
+; (fq8 1105) (fq9 1107) (fq10 1109) (fq11 1111)
+; (fq12 1113) (fq13 1115) (fq14 1117) (fq15 1119)
+; (fq16 1121) (fq17 1123) (fq18 1125) (fq19 1127)
+; (fq20 1129) (fq21 1131) (fq22 1133) (fq23 1135)
+; (fq24 1137) (fq25 1139) (fq26 1141) (fq27 1143)
+; (fq28 1145) (fq29 1147) (fq30 1149) (fq31 1151)
+
+ (mcilr0 1272) (mcilr1 1273)
+
+ (msr0 1280) (msr1 1281) (msr2 1282) (msr3 1283)
+ (msr4 1284) (msr5 1285) (msr6 1286) (msr7 1287)
+ (msr8 1288) (msr9 1289) (msr10 1290) (msr11 1291)
+ (msr12 1292) (msr13 1293) (msr14 1294) (msr15 1295)
+ (msr16 1296) (msr17 1297) (msr18 1298) (msr19 1299)
+ (msr20 1300) (msr21 1301) (msr22 1302) (msr23 1303)
+ (msr24 1304) (msr25 1305) (msr26 1306) (msr27 1307)
+ (msr28 1308) (msr29 1309) (msr30 1310) (msr31 1311)
+ (msr32 1312) (msr33 1313) (msr34 1314) (msr35 1315)
+ (msr36 1316) (msr37 1317) (msr38 1318) (msr39 1319)
+ (msr40 1320) (msr41 1321) (msr42 1322) (msr43 1323)
+ (msr44 1324) (msr45 1325) (msr46 1326) (msr47 1327)
+ (msr48 1328) (msr49 1329) (msr50 1330) (msr51 1331)
+ (msr52 1332) (msr53 1333) (msr54 1334) (msr55 1335)
+ (msr56 1336) (msr57 1337) (msr58 1338) (msr59 1339)
+ (msr60 1340) (msr61 1341) (msr62 1342) (msr63 1343)
+
+ ; MQ0-MQ31 are 64 bit registers.
+ ; These names allow access to the upper 32 bits of the MQ registers.
+ (mqop0 1344) (mqop1 1346) (mqop2 1348) (mqop3 1350)
+ (mqop4 1352) (mqop5 1354) (mqop6 1356) (mqop7 1358)
+ (mqop8 1360) (mqop9 1362) (mqop10 1364) (mqop11 1366)
+ (mqop12 1368) (mqop13 1370) (mqop14 1372) (mqop15 1374)
+ (mqop16 1376) (mqop17 1378) (mqop18 1380) (mqop19 1382)
+ (mqop20 1384) (mqop21 1386) (mqop22 1388) (mqop23 1390)
+ (mqop24 1392) (mqop25 1394) (mqop26 1396) (mqop27 1398)
+ (mqop28 1400) (mqop29 1402) (mqop30 1404) (mqop31 1406)
+ ; These names allow access to the lower 32 bits of the MQ registers.
+ (mqst0 1345) (mqst1 1347) (mqst2 1349) (mqst3 1351)
+ (mqst4 1353) (mqst5 1355) (mqst6 1357) (mqst7 1359)
+ (mqst8 1361) (mqst9 1363) (mqst10 1365) (mqst11 1367)
+ (mqst12 1369) (mqst13 1371) (mqst14 1373) (mqst15 1375)
+ (mqst16 1377) (mqst17 1379) (mqst18 1381) (mqst19 1383)
+ (mqst20 1385) (mqst21 1387) (mqst22 1389) (mqst23 1391)
+ (mqst24 1393) (mqst25 1395) (mqst26 1397) (mqst27 1399)
+ (mqst28 1401) (mqst29 1403) (mqst30 1405) (mqst31 1407)
+ ; These also access the lower 32 bits of the MQ registers.
+ ; These are not accessible as spr registers (see LSI appendix - section 13.4)
+; (mq0 1345) (mq1 1347) (mq2 1349) (mq3 1351)
+; (mq4 1353) (mq5 1355) (mq6 1357) (mq7 1359)
+; (mq8 1361) (mq9 1363) (mq10 1365) (mq11 1367)
+; (mq12 1369) (mq13 1371) (mq14 1373) (mq15 1375)
+; (mq16 1377) (mq17 1379) (mq18 1381) (mq19 1383)
+; (mq20 1385) (mq21 1387) (mq22 1389) (mq23 1391)
+; (mq24 1393) (mq25 1395) (mq26 1397) (mq27 1399)
+; (mq28 1401) (mq29 1403) (mq30 1405) (mq31 1407)
+
+ ; These are not accessible as spr registers (see LSI appendix - section 13.4)
+; (acc0 1408) (acc1 1409) (acc2 1410) (acc3 1411)
+; (acc4 1412) (acc5 1413) (acc6 1414) (acc7 1415)
+; (acc8 1416) (acc9 1417) (acc10 1418) (acc11 1419)
+; (acc12 1420) (acc13 1421) (acc14 1422) (acc15 1423)
+; (acc16 1424) (acc17 1425) (acc18 1426) (acc19 1427)
+; (acc20 1428) (acc21 1429) (acc22 1430) (acc23 1431)
+; (acc24 1432) (acc25 1433) (acc26 1434) (acc27 1435)
+; (acc28 1436) (acc29 1437) (acc30 1438) (acc31 1439)
+; (acc32 1440) (acc33 1441) (acc34 1442) (acc35 1443)
+; (acc36 1444) (acc37 1445) (acc38 1446) (acc39 1447)
+; (acc40 1448) (acc41 1449) (acc42 1450) (acc43 1451)
+; (acc44 1452) (acc45 1453) (acc46 1454) (acc47 1455)
+; (acc48 1456) (acc49 1457) (acc50 1458) (acc51 1459)
+; (acc52 1460) (acc53 1461) (acc54 1462) (acc55 1463)
+; (acc56 1464) (acc57 1465) (acc58 1466) (acc59 1467)
+; (acc60 1468) (acc61 1469) (acc62 1470) (acc63 1471)
+
+; (accg0 1472) (accg1 1473) (accg2 1474) (accg3 1475)
+; (accg4 1476) (accg5 1477) (accg6 1478) (accg7 1479)
+; (accg8 1480) (accg9 1481) (accg10 1482) (accg11 1483)
+; (accg12 1484) (accg13 1485) (accg14 1486) (accg15 1487)
+; (accg16 1488) (accg17 1489) (accg18 1490) (accg19 1491)
+; (accg20 1492) (accg21 1493) (accg22 1494) (accg23 1495)
+; (accg24 1496) (accg25 1497) (accg26 1498) (accg27 1499)
+; (accg28 1500) (accg29 1501) (accg30 1502) (accg31 1503)
+; (accg32 1504) (accg33 1505) (accg34 1506) (accg35 1507)
+; (accg36 1508) (accg37 1509) (accg38 1510) (accg39 1511)
+; (accg40 1512) (accg41 1513) (accg42 1514) (accg43 1515)
+; (accg44 1516) (accg45 1517) (accg46 1518) (accg47 1519)
+; (accg48 1520) (accg49 1521) (accg50 1522) (accg51 1523)
+; (accg52 1524) (accg53 1525) (accg54 1526) (accg55 1527)
+; (accg56 1528) (accg57 1529) (accg58 1530) (accg59 1531)
+; (accg60 1532) (accg61 1533) (accg62 1534) (accg63 1535)
+
+ (ear0 1536) (ear1 1537) (ear2 1538) (ear3 1539)
+ (ear4 1540) (ear5 1541) (ear6 1542) (ear7 1543)
+ (ear8 1544) (ear9 1545) (ear10 1546) (ear11 1547)
+ (ear12 1548) (ear13 1549) (ear14 1550) (ear15 1551)
+ (ear16 1552) (ear17 1553) (ear18 1554) (ear19 1555)
+ (ear20 1556) (ear21 1557) (ear22 1558) (ear23 1559)
+ (ear24 1560) (ear25 1561) (ear26 1562) (ear27 1563)
+ (ear28 1564) (ear29 1565) (ear30 1566) (ear31 1567)
+ (ear32 1568) (ear33 1569) (ear34 1570) (ear35 1571)
+ (ear36 1572) (ear37 1573) (ear38 1574) (ear39 1575)
+ (ear40 1576) (ear41 1577) (ear42 1578) (ear43 1579)
+ (ear44 1580) (ear45 1581) (ear46 1582) (ear47 1583)
+ (ear48 1584) (ear49 1585) (ear50 1586) (ear51 1587)
+ (ear52 1588) (ear53 1589) (ear54 1590) (ear55 1591)
+ (ear56 1592) (ear57 1593) (ear58 1594) (ear59 1595)
+ (ear60 1596) (ear61 1597) (ear62 1598) (ear63 1599)
+
+ (edr0 1600) (edr1 1601) (edr2 1602) (edr3 1603)
+ (edr4 1604) (edr5 1605) (edr6 1606) (edr7 1607)
+ (edr8 1608) (edr9 1609) (edr10 1610) (edr11 1611)
+ (edr12 1612) (edr13 1613) (edr14 1614) (edr15 1615)
+ (edr16 1616) (edr17 1617) (edr18 1618) (edr19 1619)
+ (edr20 1620) (edr21 1621) (edr22 1622) (edr23 1623)
+ (edr24 1624) (edr25 1625) (edr26 1626) (edr27 1627)
+ (edr28 1628) (edr29 1629) (edr30 1630) (edr31 1631)
+ (edr32 1632) (edr33 1636) (edr34 1634) (edr35 1635)
+ (edr36 1636) (edr37 1637) (edr38 1638) (edr39 1639)
+ (edr40 1640) (edr41 1641) (edr42 1642) (edr43 1643)
+ (edr44 1644) (edr45 1645) (edr46 1646) (edr47 1647)
+ (edr48 1648) (edr49 1649) (edr50 1650) (edr51 1651)
+ (edr52 1652) (edr53 1653) (edr54 1654) (edr55 1655)
+ (edr56 1656) (edr57 1657) (edr58 1658) (edr59 1659)
+ (edr60 1660) (edr61 1661) (edr62 1662) (edr63 1663)
+
+ (iamlr0 1664) (iamlr1 1665) (iamlr2 1666) (iamlr3 1667)
+ (iamlr4 1668) (iamlr5 1669) (iamlr6 1670) (iamlr7 1671)
+ (iamlr8 1672) (iamlr9 1673) (iamlr10 1674) (iamlr11 1675)
+ (iamlr12 1676) (iamlr13 1677) (iamlr14 1678) (iamlr15 1679)
+ (iamlr16 1680) (iamlr17 1681) (iamlr18 1682) (iamlr19 1683)
+ (iamlr20 1684) (iamlr21 1685) (iamlr22 1686) (iamlr23 1687)
+ (iamlr24 1688) (iamlr25 1689) (iamlr26 1690) (iamlr27 1691)
+ (iamlr28 1692) (iamlr29 1693) (iamlr30 1694) (iamlr31 1695)
+ (iamlr32 1696) (iamlr33 1697) (iamlr34 1698) (iamlr35 1699)
+ (iamlr36 1700) (iamlr37 1701) (iamlr38 1702) (iamlr39 1703)
+ (iamlr40 1704) (iamlr41 1705) (iamlr42 1706) (iamlr43 1707)
+ (iamlr44 1708) (iamlr45 1709) (iamlr46 1710) (iamlr47 1711)
+ (iamlr48 1712) (iamlr49 1713) (iamlr50 1714) (iamlr51 1715)
+ (iamlr52 1716) (iamlr53 1717) (iamlr54 1718) (iamlr55 1719)
+ (iamlr56 1720) (iamlr57 1721) (iamlr58 1722) (iamlr59 1723)
+ (iamlr60 1724) (iamlr61 1725) (iamlr62 1726) (iamlr63 1727)
+
+ (iampr0 1728) (iampr1 1729) (iampr2 1730) (iampr3 1731)
+ (iampr4 1732) (iampr5 1733) (iampr6 1734) (iampr7 1735)
+ (iampr8 1736) (iampr9 1737) (iampr10 1738) (iampr11 1739)
+ (iampr12 1740) (iampr13 1741) (iampr14 1742) (iampr15 1743)
+ (iampr16 1744) (iampr17 1745) (iampr18 1746) (iampr19 1747)
+ (iampr20 1748) (iampr21 1749) (iampr22 1750) (iampr23 1751)
+ (iampr24 1752) (iampr25 1753) (iampr26 1754) (iampr27 1755)
+ (iampr28 1756) (iampr29 1757) (iampr30 1758) (iampr31 1759)
+ (iampr32 1760) (iampr33 1761) (iampr34 1762) (iampr35 1763)
+ (iampr36 1764) (iampr37 1765) (iampr38 1766) (iampr39 1767)
+ (iampr40 1768) (iampr41 1769) (iampr42 1770) (iampr43 1771)
+ (iampr44 1772) (iampr45 1773) (iampr46 1774) (iampr47 1775)
+ (iampr48 1776) (iampr49 1777) (iampr50 1778) (iampr51 1779)
+ (iampr52 1780) (iampr53 1781) (iampr54 1782) (iampr55 1783)
+ (iampr56 1784) (iampr57 1785) (iampr58 1786) (iampr59 1787)
+ (iampr60 1788) (iampr61 1789) (iampr62 1790) (iampr63 1791)
+
+ (damlr0 1792) (damlr1 1793) (damlr2 1794) (damlr3 1795)
+ (damlr4 1796) (damlr5 1797) (damlr6 1798) (damlr7 1799)
+ (damlr8 1800) (damlr9 1801) (damlr10 1802) (damlr11 1803)
+ (damlr12 1804) (damlr13 1805) (damlr14 1806) (damlr15 1807)
+ (damlr16 1808) (damlr17 1809) (damlr18 1810) (damlr19 1811)
+ (damlr20 1812) (damlr21 1813) (damlr22 1814) (damlr23 1815)
+ (damlr24 1816) (damlr25 1817) (damlr26 1818) (damlr27 1819)
+ (damlr28 1820) (damlr29 1821) (damlr30 1822) (damlr31 1823)
+ (damlr32 1824) (damlr33 1825) (damlr34 1826) (damlr35 1827)
+ (damlr36 1828) (damlr37 1829) (damlr38 1830) (damlr39 1831)
+ (damlr40 1832) (damlr41 1833) (damlr42 1834) (damlr43 1835)
+ (damlr44 1836) (damlr45 1837) (damlr46 1838) (damlr47 1839)
+ (damlr48 1840) (damlr49 1841) (damlr50 1842) (damlr51 1843)
+ (damlr52 1844) (damlr53 1845) (damlr54 1846) (damlr55 1847)
+ (damlr56 1848) (damlr57 1849) (damlr58 1850) (damlr59 1851)
+ (damlr60 1852) (damlr61 1853) (damlr62 1854) (damlr63 1855)
+
+ (dampr0 1856) (dampr1 1857) (dampr2 1858) (dampr3 1859)
+ (dampr4 1860) (dampr5 1861) (dampr6 1862) (dampr7 1863)
+ (dampr8 1864) (dampr9 1865) (dampr10 1866) (dampr11 1867)
+ (dampr12 1868) (dampr13 1869) (dampr14 1870) (dampr15 1871)
+ (dampr16 1872) (dampr17 1873) (dampr18 1874) (dampr19 1875)
+ (dampr20 1876) (dampr21 1877) (dampr22 1878) (dampr23 1879)
+ (dampr24 1880) (dampr25 1881) (dampr26 1882) (dampr27 1883)
+ (dampr28 1884) (dampr29 1885) (dampr30 1886) (dampr31 1887)
+ (dampr32 1888) (dampr33 1889) (dampr34 1890) (dampr35 1891)
+ (dampr36 1892) (dampr37 1893) (dampr38 1894) (dampr39 1895)
+ (dampr40 1896) (dampr41 1897) (dampr42 1898) (dampr43 1899)
+ (dampr44 1900) (dampr45 1901) (dampr46 1902) (dampr47 1903)
+ (dampr48 1904) (dampr49 1905) (dampr50 1906) (dampr51 1907)
+ (dampr52 1908) (dampr53 1909) (dampr54 1910) (dampr55 1911)
+ (dampr56 1912) (dampr57 1913) (dampr58 1914) (dampr59 1915)
+ (dampr60 1916) (dampr61 1917) (dampr62 1918) (dampr63 1919)
+
+ (amcr 1920) (stbar 1921) (mmcr 1922)
+ (dcr 2048) (brr 2049) (nmar 2050)
+
+ (ibar0 2052) (ibar1 2053) (ibar2 2054) (ibar3 2055)
+ (dbar0 2056) (dbar1 2057) (dbar2 2058) (dbar3 2059)
+
+ (dbdr00 2060) (dbdr01 2061) (dbdr02 2062) (dbdr03 2063)
+ (dbdr10 2064) (dbdr11 2065) (dbdr12 2066) (dbdr13 2067)
+ (dbdr20 2068) (dbdr21 2069) (dbdr22 2070) (dbdr23 2071)
+ (dbdr30 2072) (dbdr31 2073) (dbdr32 2074) (dbdr33 2075)
+
+ (dbmr00 2076) (dbmr01 2077) (dbmr02 2078) (dbmr03 2079)
+ (dbmr10 2080) (dbmr11 2081) (dbmr12 2082) (dbmr13 2083)
+ (dbmr20 2084) (dbmr21 2085) (dbmr22 2086) (dbmr23 2087)
+ (dbmr30 2088) (dbmr31 2089) (dbmr32 2090) (dbmr33 2091)
+
+ (cpcfr 2092) (cpcr 2093) (cpsr 2094)
+
+ (cpesr0 2096) (cpesr1 2097)
+ (cpemr0 2098) (cpemr1 2099)
+
+ (ihsr8 3848)
+ )
+)
+
+(define-hardware
+ (name h-spr)
+ (comment "special purpose registers")
+ (attrs PROFILE)
+ (type register UWI (4096))
+ (indices extern-keyword spr-names)
+ (get (index) (c-call UWI "@cpu@_h_spr_get_handler" index))
+ (set (index newval) (c-call VOID "@cpu@_h_spr_set_handler" index newval))
+)
+
+(define-pmacro (spr-pcsr) (reg h-spr 1))
+(define-pmacro (spr-bpcsr) (reg h-spr 2))
+(define-pmacro (spr-lr) (reg h-spr 272))
+(define-pmacro (spr-lcr) (reg h-spr 273))
+(define-pmacro (spr-sr0) (reg h-spr 768))
+(define-pmacro (spr-sr1) (reg h-spr 769))
+(define-pmacro (spr-sr2) (reg h-spr 770))
+(define-pmacro (spr-sr3) (reg h-spr 771))
+
+; Accumulator guard. Actually a subset of the SPR registers, but those SPRs
+; are read-only in most insns. This hardware element is used by those insns
+; which have direct access (mwtaccg, mrdaccg).
+(define-keyword
+ (name accg-names)
+ (print-name h-accg)
+ (prefix "")
+ (values
+ (accg0 0)(accg1 1)(accg2 2)(accg3 3)
+ (accg4 4)(accg5 5)(accg6 6)(accg7 7)
+ (accg8 8)(accg9 9)(accg10 10)(accg11 11)
+ (accg12 12)(accg13 13)(accg14 14)(accg15 15)
+ (accg16 16)(accg17 17)(accg18 18)(accg19 19)
+ (accg20 20)(accg21 21)(accg22 22)(accg23 23)
+ (accg24 24)(accg25 25)(accg26 26)(accg27 27)
+ (accg28 28)(accg29 29)(accg30 30)(accg31 31)
+ (accg32 32)(accg33 33)(accg34 34)(accg35 35)
+ (accg36 36)(accg37 37)(accg38 38)(accg39 39)
+ (accg40 40)(accg41 41)(accg42 42)(accg43 43)
+ (accg44 44)(accg45 45)(accg46 46)(accg47 47)
+ (accg48 48)(accg49 49)(accg50 50)(accg51 51)
+ (accg52 52)(accg53 53)(accg54 54)(accg55 55)
+ (accg56 56)(accg57 57)(accg58 58)(accg59 59)
+ (accg60 60)(accg61 61)(accg62 62)(accg63 63)
+ )
+)
+
+(define-hardware
+ (name h-accg)
+ (comment "accumulator guard")
+ (attrs PROFILE VIRTUAL)
+ (type register UWI (64))
+ (indices extern-keyword accg-names)
+ (get (index)
+ (and (reg h-spr (add index 1472)) #xff))
+ (set (index newval)
+ (set (raw-reg UWI h-spr (add index 1472)) (and newval #xff)))
+)
+
+; 40 bit accumulator. Composed of ACCG and ACC registers concatenated, but
+; referenced more often as the composed 40 bits.
+(define-keyword
+ (name acc-names)
+ (print-name h-acc40)
+ (prefix "")
+ (values
+(acc0 0)(acc1 1)(acc2 2)(acc3 3)(acc4 4)(acc5 5)(acc6 6)(acc7 7)
+(acc8 8)(acc9 9)(acc10 10)(acc11 11)(acc12 12)(acc13 13)(acc14 14)(acc15 15)
+(acc16 16)(acc17 17)(acc18 18)(acc19 19)(acc20 20)(acc21 21)(acc22 22)(acc23 23)
+(acc24 24)(acc25 25)(acc26 26)(acc27 27)(acc28 28)(acc29 29)(acc30 30)(acc31 31)
+(acc32 32)(acc33 33)(acc34 34)(acc35 35)(acc36 36)(acc37 37)(acc38 38)(acc39 39)
+(acc40 40)(acc41 41)(acc42 42)(acc43 43)(acc44 44)(acc45 45)(acc46 46)(acc47 47)
+(acc48 48)(acc49 49)(acc50 50)(acc51 51)(acc52 52)(acc53 53)(acc54 54)(acc55 55)
+(acc56 56)(acc57 57)(acc58 58)(acc59 59)(acc60 60)(acc61 61)(acc62 62)(acc63 63)
+ )
+)
+
+(define-hardware
+ (name h-acc40S)
+ (comment "40 bit signed accumulator")
+ (attrs PROFILE VIRTUAL)
+ (type register DI (64))
+ (indices extern-keyword acc-names)
+ ; The accumlator is made up of two 32 bit registers, accgi/acci.
+ ; We want to extract this as a combined 40 signed bits
+ (get (index)
+ (or DI
+ (sll DI (ext DI (trunc QI (reg h-spr (add index 1472))))
+ 32)
+ (zext DI (reg h-spr (add index 1408)))))
+ ; Bits 40-63 are not written. raw-reg is used to bypass read-only restrictions
+ ; on ACC and ACCG registers
+ (set (index newval)
+ (sequence ()
+ (c-call VOID "frv_check_spr_write_access" (add index 1408))
+ (set (raw-reg UWI h-spr
+ (add index 1472)) (and (srl newval 32) #xff))
+ (set (raw-reg UWI h-spr
+ (add index 1408)) (trunc USI newval))))
+)
+
+(define-hardware
+ (name h-acc40U)
+ (comment "40 bit unsigned accumulator")
+ (attrs PROFILE VIRTUAL)
+ (type register UDI (64))
+ (indices extern-keyword acc-names)
+ ; The accumlator is made up of two 32 bit registers, accgi/acci.
+ ; We want to extract this as a combined 40 unsigned bits
+ (get (index)
+ (or DI
+ (sll DI (zext DI (reg h-spr (add index 1472))) 32)
+ (zext DI (reg h-spr (add index 1408)))))
+ ; Bits 40-63 are not written. raw-reg is used to bypass read-only restrictions
+ ; on ACC and ACCG registers
+ (set (index newval)
+ (sequence ()
+ (c-call VOID "frv_check_spr_write_access" (add index 1408))
+ (set (raw-reg UWI h-spr
+ (add index 1472)) (and (srl newval 32) #xff))
+ (set (raw-reg UWI h-spr
+ (add index 1408)) (trunc USI newval))))
+)
+
+; Integer condition code registers (CCR)
+;
+; The individual sub registers bits of the CCR are referenced more often than
+; the entire register so set them directly. We can assemble the
+; entire register when necessary.
+;
+(define-keyword
+ (name iccr-names)
+ (print-name h-iccr)
+ (prefix "")
+ (values (icc0 0) (icc1 1) (icc2 2) (icc3 3))
+)
+
+(define-hardware
+ (name h-iccr)
+ (comment "Integer condition code registers")
+ (attrs PROFILE)
+ (type register UQI (4))
+ (indices extern-keyword iccr-names)
+)
+
+; Floating point condition code registers (CCR)
+;
+; The individual sub registers bits of the CCR are referenced more often than
+; the entire register so set them directly. We can assemble the
+; entire register when necessary.
+;
+(define-keyword
+ (name fccr-names)
+ (print-name h-fccr)
+ (prefix "")
+ (values (fcc0 0) (fcc1 1) (fcc2 2) (fcc3 3))
+)
+
+(define-hardware
+ (name h-fccr)
+ (comment "Integer condition code registers")
+ (attrs PROFILE)
+ (type register UQI (4))
+ (indices extern-keyword fccr-names)
+)
+
+; C condition code registers (CCCR)
+;
+(define-keyword
+ (name cccr-names)
+ (print-name h-cccr)
+ (prefix "")
+ (values (cc0 0) (cc1 1) (cc2 2) (cc3 3) (cc4 4) (cc5 5) (cc6 6) (cc7 7))
+)
+
+(define-hardware
+ (name h-cccr)
+ (comment "Condition code registers")
+ (attrs PROFILE)
+ (type register UQI (8))
+ (indices extern-keyword cccr-names)
+)
+
+; Dummy hardware used to define packing bit on insns
+;
+(define-hardware
+ (name h-pack)
+ (comment "Packing bit dummy hardware")
+ (type immediate (UINT 1))
+ (values keyword "" (("" 1) (".p" 0) (".P" 0)))
+)
+; Dummy hardware used to define hint field for branches always taken
+;
+(define-hardware
+ (name h-hint-taken)
+ (comment "Branch taken hint dummy hardware")
+ (type immediate (UINT 1))
+ ; The order of these is important. We want '2' to get written by default,
+ ; but we also want the docoder/disassembler to allow the values '0', '1' and
+ ; '3'.
+ (values keyword "" (("" 2) ("" 0) ("" 1) ("" 3)))
+)
+; Dummy hardware used to define hint field for branches never taken
+;
+(define-hardware
+ (name h-hint-not-taken)
+ (comment "Branch not taken hint dummy hardware")
+ (type immediate (UINT 1))
+ ; The order of these is important. We want '0' to get written by default,
+ ; but we also want the docoder/disassembler to allow the values '1', '2' and
+ ; '3'.
+ (values keyword "" (("" 0) ("" 1) ("" 2) ("" 3)))
+)
+
+; Instruction Operands.
+; These entries provide a layer between the assembler and the raw hardware
+; description, and are used to refer to hardware elements in the semantic
+; code. Usually there's a bit of over-specification, but in more complicated
+; instruction sets there isn't.
+
+; FRV specific operand attributes:
+
+(define-attr
+ (for operand)
+ (type boolean)
+ (name HASH-PREFIX)
+ (comment "immediates have an optional '#' prefix")
+)
+
+; ??? Convention says this should be o-sr, but then the insn definitions
+; should refer to o-sr which is clumsy. The "o-" could be implicit, but
+; then it should be implicit for all the symbols here, but then there would
+; be confusion between (f-)simm8 and (h-)simm8.
+; So for now the rule is exactly as it appears here.
+
+; dnmop: define-normal-mode-operand: temporary, pending potential removal
+; of modes from h/w.
+(define-pmacro (dnmop xname xcomment xattrs xtype xindex xmode)
+ (define-operand
+ (name xname)
+ (comment xcomment)
+ (.splice attrs (.unsplice xattrs))
+ (type xtype)
+ (index xindex)
+ (mode xmode)
+ )
+)
+
+(dnop pack "packing bit" () h-pack f-pack)
+
+(dnmop GRi "source register 1" () h-gr f-GRi SI)
+(dnmop GRj "source register 2" () h-gr f-GRj SI)
+(dnmop GRk "destination register" () h-gr f-GRk SI)
+(dnmop GRkhi "destination register" () h-gr_hi f-GRk UHI)
+(dnmop GRklo "destination register" () h-gr_lo f-GRk UHI)
+(dnmop GRdoublek "destination register" () h-gr_double f-GRk DI)
+(dnmop ACC40Si "signed accumulator" () h-acc40S f-ACC40Si DI)
+(dnmop ACC40Ui "unsigned accumulator" () h-acc40U f-ACC40Ui UDI)
+(dnmop ACC40Sk "target accumulator" () h-acc40S f-ACC40Sk DI)
+(dnmop ACC40Uk "target accumulator" () h-acc40U f-ACC40Uk UDI)
+(dnmop ACCGi "source register" () h-accg f-ACCGi UWI)
+(dnmop ACCGk "target register" () h-accg f-ACCGk UWI)
+
+(dnmop CPRi "source register" ((MACH frv)) h-cpr f-CPRi SI)
+(dnmop CPRj "source register" ((MACH frv)) h-cpr f-CPRj SI)
+(dnmop CPRk "destination register" ((MACH frv)) h-cpr f-CPRk SI)
+(dnmop CPRdoublek "destination register" ((MACH frv)) h-cpr_double f-CPRk DI)
+
+; floating point operands
+(dnmop FRinti "source register 1" () h-fr_int f-FRi SI)
+(dnmop FRintj "source register 2" () h-fr_int f-FRj SI)
+(dnmop FRintk "target register" () h-fr_int f-FRk SI)
+(dnmop FRi "source register 1" () h-fr f-FRi SF)
+(dnmop FRj "source register 2" () h-fr f-FRj SF)
+(dnmop FRk "destination register" () h-fr f-FRk SF)
+(dnmop FRkhi "destination register" () h-fr_hi f-FRk UHI)
+(dnmop FRklo "destination register" () h-fr_lo f-FRk UHI)
+(dnmop FRdoublei "source register 1" () h-fr_double f-FRi DF)
+(dnmop FRdoublej "source register 2" () h-fr_double f-FRj DF)
+(dnmop FRdoublek "target register" () h-fr_double f-FRk DF)
+
+(dnop CRi "source register 1" () h-cccr f-CRi)
+(dnop CRj "source register 2" () h-cccr f-CRj)
+(dnop CRj_int "destination register" () h-cccr f-CRj_int)
+(dnop CRj_float "destination register" () h-cccr f-CRj_float)
+(dnop CRk "destination register" () h-cccr f-CRk)
+(dnop CCi "condition register" () h-cccr f-CCi)
+
+(dnop ICCi_1 "condition register" () h-iccr f-ICCi_1)
+(dnop ICCi_2 "condition register" () h-iccr f-ICCi_2)
+(dnop ICCi_3 "condition register" () h-iccr f-ICCi_3)
+(dnop FCCi_1 "condition register" () h-fccr f-FCCi_1)
+(dnop FCCi_2 "condition register" () h-fccr f-FCCi_2)
+(dnop FCCi_3 "condition register" () h-fccr f-FCCi_3)
+(dnop FCCk "condition register" () h-fccr f-FCCk)
+
+(dnop eir "exception insn reg" () h-uint f-eir)
+(dnop s10 "10 bit signed immediate" (HASH-PREFIX) h-sint f-s10)
+(dnop u16 "16 bit unsigned immediate" (HASH-PREFIX) h-uint f-u16)
+(dnop s16 "16 bit signed immediate" (HASH-PREFIX) h-sint f-s16)
+(dnop s6 "6 bit signed immediate" (HASH-PREFIX) h-sint f-s6)
+(dnop s6_1 "6 bit signed immediate" (HASH-PREFIX) h-sint f-s6_1)
+(dnop u6 "6 bit unsigned immediate" (HASH-PREFIX) h-uint f-u6)
+(dnop s5 "5 bit signed immediate" (HASH-PREFIX) h-sint f-s5)
+(dnop cond "conditional arithmetic" (HASH-PREFIX) h-uint f-cond)
+(dnop ccond "lr branch condition" (HASH-PREFIX) h-uint f-ccond)
+(dnop hint "2 bit branch predictor" (HASH-PREFIX) h-uint f-hint)
+(dnop hint_taken "2 bit branch predictor" () h-hint-taken f-hint)
+(dnop hint_not_taken "2 bit branch predictor" () h-hint-not-taken f-hint)
+
+(dnop LI "link indicator" () h-uint f-LI)
+(dnop lock "cache lock indicator" (HASH-PREFIX) h-uint f-lock)
+(dnop debug "debug mode indicator" (HASH-PREFIX) h-uint f-debug)
+(dnop A "all accumulator indicator" (HASH-PREFIX) h-uint f-A)
+(dnop ae "all entries indicator" (HASH-PREFIX) h-uint f-ae)
+
+(dnop label16 "18 bit pc relative address" () h-iaddr f-label16)
+(dnop label24 "26 bit pc relative address" () h-iaddr f-label24)
+
+(define-operand
+ (name FRintieven)
+ (comment "(even) source register 1")
+ (attrs)
+ (type h-fr_int)
+ (index f-FRi)
+ (mode SI)
+ (handlers (parse "even_register"))
+)
+
+(define-operand
+ (name FRintjeven)
+ (comment "(even) source register 2")
+ (attrs)
+ (type h-fr_int)
+ (index f-FRj)
+ (mode SI)
+ (handlers (parse "even_register"))
+)
+
+(define-operand
+ (name FRintkeven)
+ (comment "(even) target register")
+ (attrs)
+ (type h-fr_int)
+ (index f-FRk)
+ (mode SI)
+ (handlers (parse "even_register"))
+)
+
+(define-operand
+ (name d12)
+ (comment "12 bit signed immediate")
+ (attrs)
+ (type h-sint)
+ (index f-d12)
+ (handlers (parse "d12"))
+)
+
+(define-operand
+ (name s12)
+ (comment "12 bit signed immediate")
+ (attrs HASH-PREFIX)
+ (type h-sint)
+ (index f-d12)
+ (handlers (parse "s12"))
+)
+
+(define-operand
+ (name u12)
+ (comment "12 bit signed immediate")
+ (attrs HASH-PREFIX)
+ (type h-sint)
+ (index f-u12)
+ (handlers (parse "u12"))
+)
+
+(define-operand
+ (name spr)
+ (comment "special purpose register")
+ (attrs)
+ (type h-spr)
+ (index f-spr)
+ (handlers (parse "spr") (print "spr"))
+)
+
+(define-operand
+ (name ulo16)
+ (comment "16 bit unsigned immediate, for #lo()")
+ (attrs)
+ (type h-uint)
+ (index f-u16)
+ (handlers (parse "ulo16") (print "lo"))
+)
+
+(define-operand
+ (name slo16)
+ (comment "16 bit unsigned immediate, for #lo()")
+ (attrs)
+ (type h-sint)
+ (index f-s16)
+ (handlers (parse "uslo16") (print "lo"))
+)
+
+(define-operand
+ (name uhi16)
+ (comment "16 bit unsigned immediate, for #hi()")
+ (attrs)
+ (type h-uint)
+ (index f-u16)
+ (handlers (parse "uhi16") (print "hi"))
+)
+
+; operands representing hardware
+;
+(dnop psr_esr "PSR.ESR bit" (SEM-ONLY) h-psr_esr f-nil)
+(dnop psr_s "PSR.S bit" (SEM-ONLY) h-psr_s f-nil)
+(dnop psr_ps "PSR.PS bit" (SEM-ONLY) h-psr_ps f-nil)
+(dnop psr_et "PSR.ET bit" (SEM-ONLY) h-psr_et f-nil)
+
+(dnop bpsr_bs "BPSR.BS bit" (SEM-ONLY) h-bpsr_bs f-nil)
+(dnop bpsr_bet "BPSR.BET bit" (SEM-ONLY) h-bpsr_bet f-nil)
+
+(dnop tbr_tba "TBR.TBA" (SEM-ONLY) h-tbr_tba f-nil)
+(dnop tbr_tt "TBR.TT" (SEM-ONLY) h-tbr_tt f-nil)
+
+; Null operands
+;
+(define-pmacro (ICCi_1-null) (f-ICCi_1-null 0))
+(define-pmacro (ICCi_2-null) (f-ICCi_2-null 0))
+(define-pmacro (ICCi_3-null) (f-ICCi_3-null 0))
+(define-pmacro (FCCi_1-null) (f-FCCi_1-null 0))
+(define-pmacro (FCCi_2-null) (f-FCCi_2-null 0))
+(define-pmacro (FCCi_3-null) (f-FCCi_3-null 0))
+(define-pmacro (rs-null) (f-rs-null 0))
+(define-pmacro (GRi-null) (f-GRi-null 0))
+(define-pmacro (GRj-null) (f-GRj-null 0))
+(define-pmacro (GRk-null) (f-GRk-null 0))
+(define-pmacro (FRi-null) (f-FRi-null 0))
+(define-pmacro (FRj-null) (f-FRj-null 0))
+(define-pmacro (ACCj-null) (f-ACCj-null 0))
+(define-pmacro (rd-null) (f-rd-null 0))
+(define-pmacro (cond-null) (f-cond-null 0))
+(define-pmacro (ccond-null) (f-ccond-null 0))
+(define-pmacro (s12-null) (f-s12-null 0))
+(define-pmacro (label16-null) (f-label16-null 0))
+(define-pmacro (misc-null-1) (f-misc-null-1 0))
+(define-pmacro (misc-null-2) (f-misc-null-2 0))
+(define-pmacro (misc-null-3) (f-misc-null-3 0))
+(define-pmacro (misc-null-4) (f-misc-null-4 0))
+(define-pmacro (misc-null-5) (f-misc-null-5 0))
+(define-pmacro (misc-null-6) (f-misc-null-6 0))
+(define-pmacro (misc-null-7) (f-misc-null-7 0))
+(define-pmacro (misc-null-8) (f-misc-null-8 0))
+(define-pmacro (misc-null-9) (f-misc-null-9 0))
+(define-pmacro (misc-null-10) (f-misc-null-10 0))
+(define-pmacro (misc-null-11) (f-misc-null-11 0))
+
+(define-pmacro (LI-on) (f-LI-on 1))
+(define-pmacro (LI-off) (f-LI-off 0))
+
+; Instruction definitions.
+;
+; Notes:
+; - dni is short for "define-normal-instruction"
+; - Macros are used to represent each insn format. These should be used as much
+; as possible unless an insn has exceptional behaviour
+;
+
+; Commonly used Macros
+;
+; Specific registers
+;
+
+; Integer condition code manipulation
+;
+(define-pmacro (set-z-and-n icc x)
+ (if (eq x 0)
+ (set icc (or (and icc #x7) #x4))
+ (if (lt x 0)
+ (set icc (or (and icc #xb) #x8))
+ (set icc (and icc #x3))))
+)
+
+(define-pmacro (set-n icc val)
+ (if (eq val 0)
+ (set icc (and icc #x7))
+ (set icc (or icc #x8)))
+)
+
+(define-pmacro (set-z icc val)
+ (if (eq val 0)
+ (set icc (and icc #xb))
+ (set icc (or icc #x4)))
+)
+
+(define-pmacro (set-v icc val)
+ (if (eq val 0)
+ (set icc (and icc #xd))
+ (set icc (or icc #x2)))
+)
+
+(define-pmacro (set-c icc val)
+ (if (eq val 0)
+ (set icc (and icc #xe))
+ (set icc (or icc #x1)))
+)
+
+(define-pmacro (nbit icc)
+ (trunc BI (srl (and icc #x8) 3))
+)
+
+(define-pmacro (zbit icc)
+ (trunc BI (srl (and icc #x4) 2))
+)
+
+(define-pmacro (vbit icc)
+ (trunc BI (srl (and icc #x2) 1))
+)
+
+(define-pmacro (cbit icc)
+ (trunc BI (and icc #x1))
+)
+
+(define-pmacro (ebit icc)
+ (trunc BI (srl (and icc #x8) 3))
+)
+
+(define-pmacro (lbit icc)
+ (trunc BI (srl (and icc #x4) 2))
+)
+
+(define-pmacro (gbit icc)
+ (trunc BI (srl (and icc #x2) 1))
+)
+
+(define-pmacro (ubit icc)
+ (trunc BI (and icc #x1))
+)
+
+; FRV specific insn attributes:
+;
+
+; Format: INT, Logic, Shift r-r
+;
+(define-pmacro (int-logic-r-r name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$GRj,$GRk")
+ (+ pack GRk op GRi (ICCi_1-null) ope GRj)
+ (set GRk (operation GRi GRj))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-logic-r-r add add OP_00 OPE2_00 "add reg/reg")
+(int-logic-r-r sub sub OP_00 OPE2_04 "sub reg/reg")
+(int-logic-r-r and and OP_01 OPE2_00 "and reg/reg")
+(int-logic-r-r or or OP_01 OPE2_02 "or reg/reg")
+(int-logic-r-r xor xor OP_01 OPE2_04 "xor reg/reg")
+
+(dni not
+ ("not")
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ ("not$pack $GRj,$GRk")
+ (+ pack GRk OP_01 (rs-null) (ICCi_1-null) OPE2_06 GRj)
+ (set GRk (inv GRj))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+)
+
+(dni sdiv
+ "signed division"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "sdiv$pack $GRi,$GRj,$GRk"
+ (+ pack GRk OP_00 GRi (ICCi_1-null) OPE2_0E GRj)
+ (sequence ()
+ (c-call VOID "@cpu@_signed_integer_divide"
+ GRi GRj (index-of GRk) 0)
+ (clobber GRk))
+ ((fr400 (unit u-idiv))
+ (fr500 (unit u-idiv)))
+)
+
+(dni nsdiv
+ "non excepting signed division"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) NON-EXCEPTING
+ (MACH simple,tomcat,fr500,frv))
+ "nsdiv$pack $GRi,$GRj,$GRk"
+ (+ pack GRk OP_01 GRi (ICCi_1-null) OPE2_0E GRj)
+ (sequence ()
+ (c-call VOID "@cpu@_signed_integer_divide"
+ GRi GRj (index-of GRk) 1)
+ (clobber GRk))
+ ((fr400 (unit u-idiv))
+ (fr500 (unit u-idiv)))
+)
+
+(dni udiv
+ "unsigned division reg/reg"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "udiv$pack $GRi,$GRj,$GRk"
+ (+ pack GRk OP_00 GRi (ICCi_1-null) OPE2_0F GRj)
+ (sequence ()
+ (c-call VOID "@cpu@_unsigned_integer_divide"
+ GRi GRj (index-of GRk) 0)
+ (clobber GRk))
+ ((fr400 (unit u-idiv))
+ (fr500 (unit u-idiv)))
+)
+
+(dni nudiv
+ "non excepting unsigned division"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) NON-EXCEPTING
+ (MACH simple,tomcat,fr500,frv))
+ "nudiv$pack $GRi,$GRj,$GRk"
+ (+ pack GRk OP_01 GRi (ICCi_1-null) OPE2_0F GRj)
+ (sequence ()
+ (c-call VOID "@cpu@_unsigned_integer_divide"
+ GRi GRj (index-of GRk) 1)
+ (clobber GRk))
+ ((fr400 (unit u-idiv))
+ (fr500 (unit u-idiv)))
+)
+
+; Multiplication
+;
+(define-pmacro (multiply-r-r name signop op ope comment)
+ (dni name
+ (comment)
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$GRj,$GRdoublek")
+ (+ pack GRdoublek op GRi (ICCi_1-null) ope GRj)
+ (set GRdoublek (mul DI (signop DI GRi) (signop DI GRj)))
+ ((fr400 (unit u-imul))
+ (fr500 (unit u-imul)))
+ )
+)
+
+(multiply-r-r smul ext OP_00 OPE2_08 "signed multiply reg/reg")
+(multiply-r-r umul zext OP_00 OPE2_0A "unsigned multiply reg/reg")
+
+(define-pmacro (int-shift-r-r name op ope comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$GRj,$GRk")
+ (+ pack GRk op GRi (ICCi_1-null) ope GRj)
+ (set GRk (name GRi (and GRj #x1f)))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-shift-r-r sll OP_01 OPE2_08 "shift left logical reg/reg")
+(int-shift-r-r srl OP_01 OPE2_0A "shift right logical reg/reg")
+(int-shift-r-r sra OP_01 OPE2_0C "shift right arith reg/reg")
+
+(define-pmacro (scan-semantics arg1 arg2 targ)
+ (sequence ((WI tmp1) (WI tmp2))
+ (set tmp1 arg1)
+ (set tmp2 (sra arg2 1))
+ (set targ (c-call WI "@cpu@_scan_result" (xor tmp1 tmp2))))
+)
+
+(dni scan
+ "scan"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "scan$pack $GRi,$GRj,$GRk"
+ (+ pack GRk OP_0B GRi (ICCi_1-null) OPE2_00 GRj)
+ (scan-semantics GRi GRj GRk)
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+)
+
+; Format: conditional INT, Logic, Shift r-r
+;
+(define-pmacro (conditional-int-logic name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond")
+ (+ pack GRk op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (set GRk (operation GRi GRj)))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(conditional-int-logic cadd add OP_58 OPE4_0 "conditional add")
+(conditional-int-logic csub sub OP_58 OPE4_1 "conditional sub")
+(conditional-int-logic cand and OP_5A OPE4_0 "conditional and")
+(conditional-int-logic cor or OP_5A OPE4_1 "conditional or")
+(conditional-int-logic cxor xor OP_5A OPE4_2 "conditional xor")
+
+(dni cnot
+ "conditional not"
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ "cnot$pack $GRj,$GRk,$CCi,$cond"
+ (+ pack GRk OP_5A (rs-null) CCi cond OPE4_3 GRj)
+ (if (eq CCi (or cond 2))
+ (set GRk (inv GRj)))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+)
+
+(dni csmul
+ "conditional signed multiply"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ "csmul$pack $GRi,$GRj,$GRdoublek,$CCi,$cond"
+ (+ pack GRdoublek OP_58 GRi CCi cond OPE4_2 GRj)
+ (if (eq CCi (or cond 2))
+ (set GRdoublek (mul DI (ext DI GRi) (ext DI GRj))))
+ ((fr400 (unit u-imul))
+ (fr500 (unit u-imul)))
+)
+
+(dni csdiv
+ "conditional signed division"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ "csdiv$pack $GRi,$GRj,$GRk,$CCi,$cond"
+ (+ pack GRk OP_58 GRi CCi cond OPE4_3 GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ()
+ (c-call VOID "@cpu@_signed_integer_divide"
+ GRi GRj (index-of GRk) 0)
+ (clobber GRk)))
+ ((fr400 (unit u-idiv))
+ (fr500 (unit u-idiv)))
+)
+
+(dni cudiv
+ "conditional unsigned division"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ "cudiv$pack $GRi,$GRj,$GRk,$CCi,$cond"
+ (+ pack GRk OP_59 GRi CCi cond OPE4_3 GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ()
+ (c-call VOID "@cpu@_unsigned_integer_divide"
+ GRi GRj (index-of GRk) 0)
+ (clobber GRk)))
+ ((fr400 (unit u-idiv))
+ (fr500 (unit u-idiv)))
+)
+
+(define-pmacro (conditional-shift name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond")
+ (+ pack GRk op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (set GRk (operation GRi (and GRj #x1f))))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(conditional-shift csll sll OP_5C OPE4_0 "conditional shift left logical")
+(conditional-shift csrl srl OP_5C OPE4_1 "conditional shift right logical")
+(conditional-shift csra sra OP_5C OPE4_2 "conditional shift right arith")
+
+(dni cscan
+ "conditional scan"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ "cscan$pack $GRi,$GRj,$GRk,$CCi,$cond"
+ (+ pack GRk OP_65 GRi CCi cond OPE4_3 GRj)
+ (if (eq CCi (or cond 2))
+ (scan-semantics GRi GRj GRk))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+)
+
+; Format: INT, Logic, Shift, cc r-r
+;
+(define-pmacro (int-arith-cc-semantics operation icc)
+ (sequence ((BI tmp) (QI cc) (SI result))
+ (set cc icc)
+ (set tmp ((.sym operation -oflag) GRi GRj (const 0)))
+ (set-v cc tmp)
+ (set tmp ((.sym operation -cflag) GRi GRj (const 0)))
+ (set-c cc tmp)
+ (set result (operation GRi GRj))
+ (set-z-and-n cc result)
+ (set GRk result)
+ (set icc cc))
+)
+
+(define-pmacro (int-arith-cc-r-r name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$GRj,$GRk,$ICCi_1")
+ (+ pack GRk op GRi ICCi_1 ope GRj)
+ (int-arith-cc-semantics operation ICCi_1)
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-arith-cc-r-r addcc add OP_00 OPE2_01 "add reg/reg, set icc")
+(int-arith-cc-r-r subcc sub OP_00 OPE2_05 "sub reg/reg, set icc")
+
+(define-pmacro (int-logic-cc-semantics op icc)
+ (sequence ((SI tmp))
+ (set tmp (op GRi GRj))
+ (set GRk tmp)
+ (set-z-and-n icc tmp))
+)
+
+(define-pmacro (int-logic-cc-r-r name op ope comment)
+ (dni (.sym name cc)
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str (.sym name cc) "$pack $GRi,$GRj,$GRk,$ICCi_1")
+ (+ pack GRk op GRi ICCi_1 ope GRj)
+ (int-logic-cc-semantics name ICCi_1)
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-logic-cc-r-r and OP_01 OPE2_01 "and reg/reg, set icc")
+(int-logic-cc-r-r or OP_01 OPE2_03 "or reg/reg, set icc")
+(int-logic-cc-r-r xor OP_01 OPE2_05 "xor reg/reg, set icc")
+
+(define-pmacro (int-shift-cc-semantics op l-r icc)
+ (sequence ((WI shift) (SI tmp) (QI cc))
+ (set shift (and GRj #x1f))
+ (set cc (c-call QI (.str "@cpu@_set_icc_for_shift_" l-r)
+ GRi shift icc))
+ (set tmp (op GRi shift))
+ (set GRk tmp)
+ (set-z-and-n cc tmp)
+ (set icc cc))
+)
+
+(define-pmacro (int-shift-cc-r-r name l-r op ope comment)
+ (dni (.sym name cc)
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str (.sym name cc) "$pack $GRi,$GRj,$GRk,$ICCi_1")
+ (+ pack GRk op GRi ICCi_1 ope GRj)
+ (int-shift-cc-semantics name l-r ICCi_1)
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-shift-cc-r-r sll left OP_01 OPE2_09 "shift left logical reg/reg,set icc")
+(int-shift-cc-r-r srl right OP_01 OPE2_0B "shift right logical reg/reg,set icc")
+(int-shift-cc-r-r sra right OP_01 OPE2_0D "shift right arith reg/reg,set icc")
+
+(define-pmacro (multiply-cc-semantics signop arg1 arg2 targ icc)
+ (sequence ((DI tmp) (QI cc))
+ (set cc icc)
+ (set tmp (mul DI (signop DI arg1) (signop DI arg2)))
+ (set-n cc (srl DI tmp 63))
+ (set-z cc (eq tmp 0))
+ (set targ tmp)
+ (set icc cc))
+)
+
+(define-pmacro (multiply-cc-r-r name signop op ope comment)
+ (dni name
+ (comment)
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$GRj,$GRdoublek,$ICCi_1")
+ (+ pack GRdoublek op GRi ICCi_1 ope GRj)
+ (multiply-cc-semantics signop GRi GRj GRdoublek ICCi_1)
+ ((fr400 (unit u-imul))
+ (fr500 (unit u-imul)))
+ )
+)
+
+(multiply-cc-r-r smulcc ext OP_00 OPE2_09 "signed multiply reg/reg")
+(multiply-cc-r-r umulcc zext OP_00 OPE2_0B "unsigned multiply reg/reg")
+
+
+; Format: conditional INT, Logic, Shift, cc r-r
+;
+(define-pmacro (conditional-int-arith-cc name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond")
+ (+ pack GRk op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (int-arith-cc-semantics operation
+ (reg h-iccr (and (index-of CCi) 3))))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(conditional-int-arith-cc caddcc add OP_59 OPE4_0 "add, set icc")
+(conditional-int-arith-cc csubcc sub OP_59 OPE4_1 "sub, set icc")
+
+(dni csmulcc
+ "conditional signed multiply and set condition code"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ "csmulcc$pack $GRi,$GRj,$GRdoublek,$CCi,$cond"
+ (+ pack GRdoublek OP_59 GRi CCi cond OPE4_2 GRj)
+ (if (eq CCi (or cond 2))
+ (multiply-cc-semantics ext GRi GRj GRdoublek
+ (reg h-iccr (and (index-of CCi) 3))))
+ ((fr400 (unit u-imul))
+ (fr500 (unit u-imul)))
+)
+
+(define-pmacro (conditional-int-logic-cc name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ (.str name "$pack $GRi,$GRj,$GRk,$CCi,$cond")
+ (+ pack GRk op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (int-logic-cc-semantics operation
+ (reg h-iccr (and (index-of CCi) 3))))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(conditional-int-logic-cc candcc and OP_5B OPE4_0 "conditional and, set icc")
+(conditional-int-logic-cc corcc or OP_5B OPE4_1 "conditional or , set icc")
+(conditional-int-logic-cc cxorcc xor OP_5B OPE4_2 "conditional xor, set icc")
+
+(define-pmacro (conditional-int-shift-cc name l-r op ope comment)
+ (dni (.sym c name cc)
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ (.str (.sym c name cc) "$pack $GRi,$GRj,$GRk,$CCi,$cond")
+ (+ pack GRk op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (int-shift-cc-semantics name l-r
+ (reg h-iccr (and (index-of CCi) 3))))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(conditional-int-shift-cc sll left OP_5D OPE4_0 "shift left logical, set icc")
+(conditional-int-shift-cc srl right OP_5D OPE4_1 "shift right logical, set icc")
+(conditional-int-shift-cc sra right OP_5D OPE4_2 "shift right arith , set icc")
+
+; Add and subtract with carry
+;
+(define-pmacro (int-arith-x-r-r name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$GRj,$GRk,$ICCi_1")
+ (+ pack GRk op GRi ICCi_1 ope GRj)
+ (set GRk ((.sym operation c) GRi GRj (cbit ICCi_1)))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-arith-x-r-r addx add OP_00 OPE2_02 "Add reg/reg, with carry")
+(int-arith-x-r-r subx sub OP_00 OPE2_06 "Sub reg/reg, with carry")
+
+(define-pmacro (int-arith-x-cc-r-r name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$GRj,$GRk,$ICCi_1")
+ (+ pack GRk op GRi ICCi_1 ope GRj)
+ (sequence ((WI tmp) (QI cc))
+ (set cc ICCi_1)
+ (set tmp ((.sym operation c) GRi GRj (cbit cc)))
+ (set-v cc ((.sym operation -oflag) GRi GRj (cbit cc)))
+ (set-c cc ((.sym operation -cflag) GRi GRj (cbit cc)))
+ (set-z-and-n cc tmp)
+ (set GRk tmp)
+ (set ICCi_1 cc))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-arith-x-cc-r-r addxcc add OP_00 OPE2_03 "Add reg/reg, use/set carry")
+(int-arith-x-cc-r-r subxcc sub OP_00 OPE2_07 "Sub reg/reg, use/set carry")
+
+; Format: INT, Logic, Shift r-simm
+;
+(define-pmacro (int-logic-r-simm name operation op comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$s12,$GRk")
+ (+ pack GRk op GRi s12)
+ (set GRk (operation GRi s12))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-logic-r-simm addi add OP_10 "add reg/immed")
+(int-logic-r-simm subi sub OP_14 "sub reg/immed")
+(int-logic-r-simm andi and OP_20 "and reg/immed")
+(int-logic-r-simm ori or OP_22 "or reg/immed")
+(int-logic-r-simm xori xor OP_24 "xor reg/immed")
+
+(dni sdivi
+ "signed division reg/immed"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "sdivi$pack $GRi,$s12,$GRk"
+ (+ pack GRk OP_1E GRi s12)
+ (sequence ()
+ (c-call VOID "@cpu@_signed_integer_divide"
+ GRi s12 (index-of GRk) 0)
+ (clobber GRk))
+ ((fr400 (unit u-idiv))
+ (fr500 (unit u-idiv)))
+)
+
+(dni nsdivi
+ "non excepting signed division reg/immed"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) NON-EXCEPTING
+ (MACH simple,tomcat,fr500,frv))
+ "nsdivi$pack $GRi,$s12,$GRk"
+ (+ pack GRk OP_2E GRi s12)
+ (sequence ()
+ (c-call VOID "@cpu@_signed_integer_divide"
+ GRi s12 (index-of GRk) 1)
+ (clobber GRk))
+ ((fr400 (unit u-idiv))
+ (fr500 (unit u-idiv)))
+)
+
+(dni udivi
+ "unsigned division reg/immed"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "udivi$pack $GRi,$s12,$GRk"
+ (+ pack GRk OP_1F GRi s12)
+ (sequence ()
+ (c-call VOID "@cpu@_unsigned_integer_divide"
+ GRi s12 (index-of GRk) 0)
+ (clobber GRk))
+ ((fr400 (unit u-idiv))
+ (fr500 (unit u-idiv)))
+)
+
+(dni nudivi
+ "non excepting unsigned division reg/immed"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) NON-EXCEPTING
+ (MACH simple,tomcat,fr500,frv))
+ "nudivi$pack $GRi,$s12,$GRk"
+ (+ pack GRk OP_2F GRi s12)
+ (sequence ()
+ (c-call VOID "@cpu@_unsigned_integer_divide"
+ GRi s12 (index-of GRk) 1)
+ (clobber GRk))
+ ((fr400 (unit u-idiv))
+ (fr500 (unit u-idiv)))
+)
+
+(define-pmacro (multiply-r-simm name signop op comment)
+ (dni name
+ (comment)
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$s12,$GRdoublek")
+ (+ pack GRdoublek op GRi s12)
+ (set GRdoublek (mul DI (signop DI GRi) (signop DI s12)))
+ ((fr400 (unit u-imul))
+ (fr500 (unit u-imul)))
+ )
+)
+
+(multiply-r-simm smuli ext OP_18 "signed multiply reg/immed")
+(multiply-r-simm umuli zext OP_1A "unsigned multiply reg/immed")
+
+(define-pmacro (int-shift-r-simm name op comment)
+ (dni (.sym name i)
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str (.sym name i) "$pack $GRi,$s12,$GRk")
+ (+ pack GRk op GRi s12)
+ (set GRk (name GRi (and s12 #x1f)))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-shift-r-simm sll OP_28 "shift left logical reg/immed")
+(int-shift-r-simm srl OP_2A "shift right logical reg/immed")
+(int-shift-r-simm sra OP_2C "shift right arith reg/immed")
+
+(dni scani
+ "scan immediate"
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "scani$pack $GRi,$s12,$GRk"
+ (+ pack GRk OP_47 GRi s12)
+ (scan-semantics GRi s12 GRk)
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+)
+
+; Format: INT, Logic, Shift cc r-simm
+;
+(define-pmacro (int-arith-cc-r-simm name operation op comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$s10,$GRk,$ICCi_1")
+ (+ pack GRk op GRi ICCi_1 s10)
+ (sequence ((BI tmp) (QI cc) (SI result))
+ (set cc ICCi_1)
+ (set tmp ((.sym operation -oflag) GRi s10 (const 0)))
+ (set-v cc tmp)
+ (set tmp ((.sym operation -cflag) GRi s10 (const 0)))
+ (set-c cc tmp)
+ (set result (operation GRi s10))
+ (set-z-and-n cc result)
+ (set GRk result)
+ (set ICCi_1 cc))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-arith-cc-r-simm addicc add OP_11 "add reg/immed, set icc")
+(int-arith-cc-r-simm subicc sub OP_15 "sub reg/immed, set icc")
+
+(define-pmacro (int-logic-cc-r-simm name op comment)
+ (dni (.sym name icc)
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str (.sym name icc) "$pack $GRi,$s10,$GRk,$ICCi_1")
+ (+ pack GRk op GRi ICCi_1 s10)
+ (sequence ((SI tmp))
+ (set tmp (name GRi s10))
+ (set GRk tmp)
+ (set-z-and-n ICCi_1 tmp))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-logic-cc-r-simm and OP_21 "and reg/immed, set icc")
+(int-logic-cc-r-simm or OP_23 "or reg/immed, set icc")
+(int-logic-cc-r-simm xor OP_25 "xor reg/immed, set icc")
+
+(define-pmacro (multiply-cc-r-simm name signop op comment)
+ (dni name
+ (comment)
+ ((UNIT MULT-DIV) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$s10,$GRdoublek,$ICCi_1")
+ (+ pack GRdoublek op GRi ICCi_1 s10)
+ (multiply-cc-semantics signop GRi s10 GRdoublek ICCi_1)
+ ((fr400 (unit u-imul))
+ (fr500 (unit u-imul)))
+ )
+)
+
+(multiply-cc-r-simm smulicc ext OP_19 "signed multiply reg/immed")
+(multiply-cc-r-simm umulicc zext OP_1B "unsigned multiply reg/immed")
+
+(define-pmacro (int-shift-cc-r-simm name l-r op comment)
+ (dni (.sym name icc)
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str (.sym name icc) "$pack $GRi,$s10,$GRk,$ICCi_1")
+ (+ pack GRk op GRi ICCi_1 s10)
+ (sequence ((WI shift) (SI tmp) (QI cc))
+ (set shift (and s10 #x1f))
+ (set cc (c-call QI (.str "@cpu@_set_icc_for_shift_" l-r)
+ GRi shift ICCi_1))
+ (set tmp (name GRi shift))
+ (set GRk tmp)
+ (set-z-and-n cc tmp)
+ (set ICCi_1 cc))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-shift-cc-r-simm sll left OP_29 "shift left logical reg/immed, set icc")
+(int-shift-cc-r-simm srl right OP_2B "shift right logical reg/immed, set icc")
+(int-shift-cc-r-simm sra right OP_2D "shift right arith reg/immed, set icc")
+
+(define-pmacro (int-arith-x-r-simm name operation op comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$s10,$GRk,$ICCi_1")
+ (+ pack GRk op GRi ICCi_1 s10)
+ (set GRk ((.sym operation c) GRi s10 (cbit ICCi_1)))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-arith-x-r-simm addxi add OP_12 "Add reg/immed, with carry")
+(int-arith-x-r-simm subxi sub OP_16 "Sub reg/immed, with carry")
+
+(define-pmacro (int-arith-x-cc-r-simm name operation op comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ (.str name "$pack $GRi,$s10,$GRk,$ICCi_1")
+ (+ pack GRk op GRi ICCi_1 s10)
+ (sequence ((WI tmp) (QI cc))
+ (set cc ICCi_1)
+ (set tmp ((.sym operation c) GRi s10 (cbit cc)))
+ (set-v cc ((.sym operation -oflag) GRi s10 (cbit cc)))
+ (set-c cc ((.sym operation -cflag) GRi s10 (cbit cc)))
+ (set-z-and-n cc tmp)
+ (set GRk tmp)
+ (set ICCi_1 cc))
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+ )
+)
+
+(int-arith-x-cc-r-simm addxicc add OP_13 "Add reg/immed, with carry")
+(int-arith-x-cc-r-simm subxicc sub OP_17 "Sub reg/immed, with carry")
+
+; Byte compare insns
+
+(dni cmpb
+ "Compare bytes"
+ ((UNIT I01) (FR400-MAJOR I-1) (MACH fr400))
+ "cmpb$pack $GRi,$GRj,$ICCi_1"
+ (+ pack (GRk-null) OP_00 GRi ICCi_1 OPE2_0C GRj)
+ (sequence ((QI cc))
+ (set-n cc (eq (and GRi #xff000000) (and GRj #xff000000)))
+ (set-z cc (eq (and GRi #x00ff0000) (and GRj #x00ff0000)))
+ (set-v cc (eq (and GRi #x0000ff00) (and GRj #x0000ff00)))
+ (set-c cc (eq (and GRi #x000000ff) (and GRj #x000000ff)))
+ (set ICCi_1 cc))
+ ((fr400 (unit u-integer)))
+)
+
+(dni cmpba
+ "OR of Compare bytes"
+ ((UNIT I01) (FR400-MAJOR I-1) (MACH fr400))
+ "cmpba$pack $GRi,$GRj,$ICCi_1"
+ (+ pack (GRk-null) OP_00 GRi ICCi_1 OPE2_0D GRj)
+ (sequence ((QI cc))
+ (set cc 0)
+ (set-c cc
+ (orif (eq (and GRi #xff000000) (and GRj #xff000000))
+ (orif (eq (and GRi #x00ff0000) (and GRj #x00ff0000))
+ (orif (eq (and GRi #x0000ff00)
+ (and GRj #x0000ff00))
+ (eq (and GRi #x000000ff)
+ (and GRj #x000000ff))))))
+ (set ICCi_1 cc))
+ ((fr400 (unit u-integer)))
+)
+
+; Format: Load immediate
+;
+(dni setlo
+ "set low order bits"
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "setlo$pack $ulo16,$GRklo"
+ (+ pack GRk OP_3D (misc-null-4) u16)
+ (set GRklo u16)
+ ((fr400 (unit u-set-hilo))
+ (fr500 (unit u-set-hilo)))
+)
+
+(dni sethi
+ "set high order bits"
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "sethi$pack $uhi16,$GRkhi"
+ (+ pack GRkhi OP_3E (misc-null-4) u16)
+ (set GRkhi u16)
+ ((fr400 (unit u-set-hilo))
+ (fr500 (unit u-set-hilo)))
+)
+
+(dni setlos
+ "set low order bits and extend sign"
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "setlos$pack $slo16,$GRk"
+ (+ pack GRk OP_3F (misc-null-4) s16)
+ (set GRk s16)
+ ((fr400 (unit u-integer))
+ (fr500 (unit u-integer)))
+)
+
+(define-pmacro (load-gr-r name mode op ope comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2))
+ (.str name "$pack @($GRi,$GRj),$GRk")
+ (+ pack GRk op GRi ope GRj)
+ (set GRk (c-call mode (.str "@cpu@_read_mem_" mode) pc (add GRi GRj)))
+ ((fr400 (unit u-gr-load))
+ (fr500 (unit u-gr-load)))
+ )
+)
+
+(load-gr-r ldsb QI OP_02 OPE1_00 "Load signed byte")
+(load-gr-r ldub UQI OP_02 OPE1_01 "Load unsigned byte")
+(load-gr-r ldsh HI OP_02 OPE1_02 "Load signed half")
+(load-gr-r lduh UHI OP_02 OPE1_03 "Load unsigned half")
+(load-gr-r ld SI OP_02 OPE1_04 "Load word")
+
+(define-pmacro (load-fr-r name mode op ope comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) FR-ACCESS)
+ (.str name "$pack @($GRi,$GRj),$FRintk")
+ (+ pack FRintk op GRi ope GRj)
+ (set FRintk (c-call mode (.str "@cpu@_read_mem_" mode) pc (add GRi GRj)))
+ ((fr400 (unit u-fr-load))
+ (fr500 (unit u-fr-load)))
+ )
+)
+
+(load-fr-r ldbf UQI OP_02 OPE1_08 "Load byte float")
+(load-fr-r ldhf UHI OP_02 OPE1_09 "Load half float")
+(load-fr-r ldf SI OP_02 OPE1_0A "Load word float")
+
+(define-pmacro (load-cpr-r name mode op ope reg attr comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) attr)
+ (.str name "$pack @($GRi,$GRj),$" reg "k")
+ (+ pack (.sym reg k) op GRi ope GRj)
+ (set (.sym reg k)
+ (c-call mode (.str "@cpu@_read_mem_" mode) pc (add GRi GRj)))
+ ()
+ )
+)
+
+(load-cpr-r ldc SI OP_02 OPE1_0D CPR (MACH frv) "Load coprocessor word")
+
+; These correspond to enumerators in frv-sim.h
+(define-pmacro (ne-UQI-size) 0)
+(define-pmacro (ne-QI-size) 1)
+(define-pmacro (ne-UHI-size) 2)
+(define-pmacro (ne-HI-size) 3)
+(define-pmacro (ne-SI-size) 4)
+(define-pmacro (ne-DI-size) 5)
+(define-pmacro (ne-XI-size) 6)
+
+(define-pmacro (ne-load-semantics base dispix targ idisp size is_float action)
+ (sequence ((BI do_op))
+ (set do_op
+ (c-call BI "@cpu@_check_non_excepting_load"
+ (index-of base) dispix (index-of targ)
+ idisp size is_float))
+ (if do_op action))
+)
+
+(define-pmacro (ne-load-gr-r name mode op ope size comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) NON-EXCEPTING
+ (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack @($GRi,$GRj),$GRk")
+ (+ pack GRk op GRi ope GRj)
+ (ne-load-semantics GRi (index-of GRj) GRk 0 size 0
+ (set GRk
+ (c-call mode (.str "@cpu@_read_mem_" mode)
+ pc (add GRi GRj))))
+ ((fr500 (unit u-gr-load)))
+ )
+)
+
+(ne-load-gr-r nldsb QI OP_02 OPE1_20 (ne-QI-size) "Load signed byte")
+(ne-load-gr-r nldub UQI OP_02 OPE1_21 (ne-UQI-size) "Load unsigned byte")
+(ne-load-gr-r nldsh HI OP_02 OPE1_22 (ne-HI-size) "Load signed half")
+(ne-load-gr-r nlduh UHI OP_02 OPE1_23 (ne-UHI-size) "Load unsigned half")
+(ne-load-gr-r nld SI OP_02 OPE1_24 (ne-SI-size) "Load word")
+
+(define-pmacro (ne-load-fr-r name mode op ope size comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) NON-EXCEPTING FR-ACCESS
+ (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack @($GRi,$GRj),$FRintk")
+ (+ pack FRintk op GRi ope GRj)
+ (ne-load-semantics GRi (index-of GRj) FRintk 0 size 1
+ (set FRintk
+ (c-call mode (.str "@cpu@_read_mem_" mode)
+ pc (add GRi GRj))))
+ ((fr500 (unit u-fr-load)))
+ )
+)
+
+(ne-load-fr-r nldbf UQI OP_02 OPE1_28 (ne-UQI-size) "Load byte float")
+(ne-load-fr-r nldhf UHI OP_02 OPE1_29 (ne-UHI-size) "Load half float")
+(ne-load-fr-r nldf SI OP_02 OPE1_2A (ne-SI-size) "Load word float")
+
+; Semantics for a load-double insn
+;
+(define-pmacro (load-double-semantics not_gr mode regtype address arg)
+ (if (orif not_gr (ne (index-of (.sym regtype doublek)) 0))
+ (sequence ()
+ (set address (add GRi arg))
+ (set (.sym regtype doublek)
+ (c-call mode (.str "@cpu@_read_mem_" mode) pc address))))
+)
+
+(define-pmacro (load-double-r-r
+ name not_gr mode op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) attr)
+ (.str name "$pack @($GRi,$GRj),$" regtype "doublek")
+ (+ pack (.sym regtype doublek) op GRi ope GRj)
+ (sequence ((WI address))
+ (load-double-semantics not_gr mode regtype address GRj))
+ profile
+ )
+)
+
+(load-double-r-r ldd 0 DI OP_02 OPE1_05 GR NA
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load double word")
+(load-double-r-r lddf 1 DF OP_02 OPE1_0B FR FR-ACCESS
+ ((fr400 (unit u-fr-load)) (fr500 (unit u-fr-load)))
+ "Load double float")
+(load-double-r-r lddc 1 DI OP_02 OPE1_0E CPR (MACH frv) ()
+ "Load coprocessor double")
+
+(define-pmacro (ne-load-double-r-r
+ name not_gr mode op ope regtype size is_float attr profile
+ comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) NON-EXCEPTING attr
+ (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack @($GRi,$GRj),$" regtype "doublek")
+ (+ pack (.sym regtype doublek) op GRi ope GRj)
+ (sequence ((WI address))
+ (ne-load-semantics GRi (index-of GRj) (.sym regtype doublek)
+ 0 size is_float
+ (load-double-semantics not_gr mode
+ regtype
+ address GRj)))
+ profile
+ )
+)
+
+(ne-load-double-r-r nldd 0 DI OP_02 OPE1_25 GR (ne-DI-size) 0 NA
+ ((fr500 (unit u-gr-load))) "Load double word")
+(ne-load-double-r-r nlddf 1 DF OP_02 OPE1_2B FR (ne-DI-size) 1 FR-ACCESS
+ ((fr500 (unit u-fr-load))) "Load double float")
+
+; Semantics for a load-quad insn
+;
+(define-pmacro (load-quad-semantics regtype address arg)
+ (sequence ()
+ (set address (add GRi arg))
+ (c-call VOID (.str "@cpu@_load_quad_" regtype)
+ pc address (index-of (.sym regtype k))))
+)
+
+(define-pmacro (load-quad-r-r name op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) attr)
+ (.str name "$pack @($GRi,$GRj),$" regtype "k")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (sequence ((WI address))
+ (load-quad-semantics regtype address GRj))
+ ; TODO regtype-k not referenced for profiling
+ profile
+ )
+)
+
+(load-quad-r-r ldq OP_02 OPE1_06 GR NA ((fr500 (unit u-gr-load)))
+ "Load quad word")
+(load-quad-r-r ldqf OP_02 OPE1_0C FRint FR-ACCESS ((fr500 (unit u-fr-load)))
+ "Load quad float")
+(load-quad-r-r ldqc OP_02 OPE1_0F CPR NA () "Load coprocessor quad")
+
+(define-pmacro (ne-load-quad-r-r
+ name op ope regtype size is_float attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) NON-EXCEPTING attr)
+ (.str name "$pack @($GRi,$GRj),$" regtype "k")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (sequence ((WI address))
+ (ne-load-semantics GRi (index-of GRj) (.sym regtype k)
+ 0 size is_float
+ (load-quad-semantics regtype address GRj)))
+ ; TODO regtype-k not referenced for profiling
+ profile
+ )
+)
+
+(ne-load-quad-r-r nldq OP_02 OPE1_26 GR (ne-XI-size) 0 NA
+ ((fr500 (unit u-gr-load))) "Load quad word")
+(ne-load-quad-r-r nldqf OP_02 OPE1_2C FRint (ne-XI-size) 1 FR-ACCESS
+ ((fr500 (unit u-fr-load))) "Load quad float")
+
+(define-pmacro (load-gr-u-semantics mode)
+ (sequence ((UWI address))
+ (set address (add GRi GRj))
+ (set GRk (c-call mode (.str "@cpu@_read_mem_" mode) pc address))
+ (if (ne (index-of GRi) (index-of GRk))
+ (sequence ()
+ (set GRi address)
+ (c-call VOID "@cpu@_force_update"))))
+)
+
+(define-pmacro (load-gr-u name mode op ope comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2))
+ (.str name "$pack @($GRi,$GRj),$GRk")
+ (+ pack GRk op GRi ope GRj)
+ (load-gr-u-semantics mode)
+ ((fr400 (unit u-gr-load))
+ (fr500 (unit u-gr-load)))
+ )
+)
+
+(load-gr-u ldsbu QI OP_02 OPE1_10 "Load signed byte, update index")
+(load-gr-u ldubu UQI OP_02 OPE1_11 "Load unsigned byte, update index")
+(load-gr-u ldshu HI OP_02 OPE1_12 "Load signed half, update index")
+(load-gr-u lduhu UHI OP_02 OPE1_13 "Load unsigned half, update index")
+(load-gr-u ldu SI OP_02 OPE1_14 "Load word, update index")
+
+(define-pmacro (ne-load-gr-u name mode op ope size comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) NON-EXCEPTING
+ (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack @($GRi,$GRj),$GRk")
+ (+ pack GRk op GRi ope GRj)
+ (ne-load-semantics GRi (index-of GRj) GRk 0 size 0 (load-gr-u-semantics mode))
+ ((fr500 (unit u-gr-load)))
+ )
+)
+
+(ne-load-gr-u nldsbu QI OP_02 OPE1_30 (ne-QI-size) "Load signed byte, update index")
+(ne-load-gr-u nldubu UQI OP_02 OPE1_31 (ne-UQI-size) "Load unsigned byte, update index")
+(ne-load-gr-u nldshu HI OP_02 OPE1_32 (ne-HI-size) "Load signed half, update index")
+(ne-load-gr-u nlduhu UHI OP_02 OPE1_33 (ne-UHI-size) "Load unsigned half, update index")
+(ne-load-gr-u nldu SI OP_02 OPE1_34 (ne-SI-size) "Load word, update index")
+
+(define-pmacro (load-non-gr-u-semantics mode regtype)
+ (sequence ((UWI address))
+ (set address (add GRi GRj))
+ (set (.sym regtype k)
+ (c-call mode (.str "@cpu@_read_mem_" mode) pc address))
+ (set GRi address)
+ (c-call VOID "@cpu@_force_update"))
+)
+
+(define-pmacro (load-fr-u name mode op ope comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) FR-ACCESS)
+ (.str name "$pack @($GRi,$GRj),$FRintk")
+ (+ pack FRintk op GRi ope GRj)
+ (load-non-gr-u-semantics mode FRint)
+ ((fr400 (unit u-fr-load))
+ (fr500 (unit u-fr-load)))
+ )
+)
+
+(load-fr-u ldbfu UQI OP_02 OPE1_18 "Load byte float, update index")
+(load-fr-u ldhfu UHI OP_02 OPE1_19 "Load half float, update index")
+(load-fr-u ldfu SI OP_02 OPE1_1A "Load word float, update index")
+
+(define-pmacro (load-cpr-u name mode op ope comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv))
+ (.str name "$pack @($GRi,$GRj),$CPRk")
+ (+ pack CPRk op GRi ope GRj)
+ (load-non-gr-u-semantics mode CPR)
+ ()
+ )
+)
+
+(load-cpr-u ldcu SI OP_02 OPE1_1D "Load coprocessor word float,update index")
+
+(define-pmacro (ne-load-non-gr-u name mode op ope regtype size comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) NON-EXCEPTING FR-ACCESS
+ (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack @($GRi,$GRj),$" regtype "k")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (ne-load-semantics GRi (index-of GRj) (.sym regtype k) 0 size 1
+ (load-non-gr-u-semantics mode regtype))
+ ((fr500 (unit u-fr-load)))
+ )
+)
+
+(ne-load-non-gr-u nldbfu UQI OP_02 OPE1_38 FRint (ne-UQI-size) "Load byte float, update index")
+(ne-load-non-gr-u nldhfu UHI OP_02 OPE1_39 FRint (ne-UHI-size) "Load half float, update index")
+(ne-load-non-gr-u nldfu SI OP_02 OPE1_3A FRint (ne-SI-size) "Load word float, update index")
+
+(define-pmacro (load-double-gr-u-semantics)
+ (sequence ((WI address))
+ (load-double-semantics 0 DI GR address GRj)
+ (if (ne (index-of GRi) (index-of GRdoublek))
+ (sequence ()
+ (set GRi address)
+ (c-call VOID "@cpu@_force_update"))))
+)
+
+(define-pmacro (load-double-gr-u name op ope comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2))
+ (.str name "$pack @($GRi,$GRj),$GRdoublek")
+ (+ pack GRdoublek op GRi ope GRj)
+ (load-double-gr-u-semantics)
+ ((fr400 (unit u-gr-load))
+ (fr500 (unit u-gr-load)))
+ )
+)
+
+(load-double-gr-u lddu OP_02 OPE1_15 "Load double word, update index")
+
+(define-pmacro (ne-load-double-gr-u name op ope size comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) NON-EXCEPTING
+ (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack @($GRi,$GRj),$GRdoublek")
+ (+ pack GRdoublek op GRi ope GRj)
+ (ne-load-semantics GRi (index-of GRj) GRdoublek 0 size 0
+ (load-double-gr-u-semantics))
+ ((fr500 (unit u-gr-load)))
+
+ )
+)
+
+(ne-load-double-gr-u nlddu OP_02 OPE1_35 (ne-DI-size) "Load double word, update index")
+
+(define-pmacro (load-double-non-gr-u-semantics mode regtype)
+ (sequence ((WI address))
+ (load-double-semantics 1 mode regtype address GRj)
+ (set GRi address)
+ (c-call VOID "@cpu@_force_update"))
+)
+
+(define-pmacro (load-double-non-gr-u
+ name mode op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) attr)
+ (.str name "$pack @($GRi,$GRj),$" regtype "doublek")
+ (+ pack (.sym regtype doublek) op GRi ope GRj)
+ (load-double-non-gr-u-semantics mode regtype)
+ profile
+ )
+)
+
+(load-double-non-gr-u lddfu DF OP_02 OPE1_1B FR FR-ACCESS
+ ((fr400 (unit u-fr-load)) (fr500 (unit u-fr-load)))
+ "Load double float, update index")
+(load-double-non-gr-u lddcu DI OP_02 OPE1_1E CPR (MACH frv)
+ () "Load coprocessor double float, update index")
+
+(define-pmacro (ne-load-double-non-gr-u name mode op ope regtype size comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) NON-EXCEPTING FR-ACCESS
+ (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack @($GRi,$GRj),$" regtype "doublek")
+ (+ pack (.sym regtype doublek) op GRi ope GRj)
+ (ne-load-semantics GRi (index-of GRj) (.sym regtype doublek) 0 size 1
+ (load-double-non-gr-u-semantics mode regtype))
+ ((fr500 (unit u-fr-load)))
+ )
+)
+
+(ne-load-double-non-gr-u nlddfu DF OP_02 OPE1_3B FR (ne-DI-size) "Load double float, update index")
+
+(define-pmacro (load-quad-gr-u-semantics)
+ (sequence ((WI address))
+ (load-quad-semantics GR address GRj)
+ (if (ne (index-of GRi) (index-of GRk))
+ (sequence ()
+ (set GRi address)
+ (c-call VOID "@cpu@_force_update"))))
+)
+
+(define-pmacro (load-quad-gr-u name op ope comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv))
+ (.str name "$pack @($GRi,$GRj),$GRk")
+ (+ pack GRk op GRi ope GRj)
+ (load-quad-gr-u-semantics)
+ ; TODO - GRk not referenced here for profiling
+ ((fr500 (unit u-gr-load)))
+ )
+)
+
+(load-quad-gr-u ldqu OP_02 OPE1_16 "Load quad word, update index")
+
+(define-pmacro (ne-load-quad-gr-u name op ope size comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) NON-EXCEPTING)
+ (.str name "$pack @($GRi,$GRj),$GRk")
+ (+ pack GRk op GRi ope GRj)
+ (ne-load-semantics GRi (index-of GRj) GRk 0 size 0
+ (load-quad-gr-u-semantics))
+ ; TODO - GRk not referenced here for profiling
+ ((fr500 (unit u-gr-load)))
+ )
+)
+
+(ne-load-quad-gr-u nldqu OP_02 OPE1_36 (ne-XI-size) "Load quad word, update index")
+
+(define-pmacro (load-quad-non-gr-u-semantics regtype)
+ (sequence ((WI address))
+ (load-quad-semantics regtype address GRj)
+ (set GRi address)
+ (c-call VOID "@cpu@_force_update"))
+)
+
+(define-pmacro (load-quad-non-gr-u name op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) attr)
+ (.str name "$pack @($GRi,$GRj),$" regtype "k")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (load-quad-non-gr-u-semantics regtype)
+ profile
+ )
+)
+
+(load-quad-non-gr-u ldqfu OP_02 OPE1_1C FRint FR-ACCESS
+ ((fr500 (unit u-fr-load))) "Load quad float, update index")
+(load-quad-non-gr-u ldqcu OP_02 OPE1_1F CPR NA
+ () "Load coprocessor quad word, update index")
+
+(define-pmacro (ne-load-quad-non-gr-u name op ope regtype size comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) NON-EXCEPTING FR-ACCESS)
+ (.str name "$pack @($GRi,$GRj),$" regtype "k")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (ne-load-semantics GRi (index-of GRj) (.sym regtype k) 0 size 1
+ (load-quad-non-gr-u-semantics regtype))
+ ((fr500 (unit u-fr-load)))
+ )
+)
+
+(ne-load-quad-non-gr-u nldqfu OP_02 OPE1_3C FRint (ne-XI-size) "Load quad float,update index")
+
+(define-pmacro (load-r-simm name mode op regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) attr)
+ (.str name "$pack @($GRi,$d12),$" regtype "k")
+ (+ pack (.sym regtype k) op GRi d12)
+ (set (.sym regtype k)
+ (c-call mode (.str "@cpu@_read_mem_" mode) pc (add GRi d12)))
+ profile
+ )
+)
+
+(load-r-simm ldsbi QI OP_30 GR NA
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load signed byte")
+(load-r-simm ldshi HI OP_31 GR NA
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load signed half")
+(load-r-simm ldi SI OP_32 GR NA
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load word")
+(load-r-simm ldubi UQI OP_35 GR NA
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load unsigned byte")
+(load-r-simm lduhi UHI OP_36 GR NA
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load unsigned half")
+
+(load-r-simm ldbfi UQI OP_38 FRint FR-ACCESS
+ ((fr400 (unit u-fr-load)) (fr500 (unit u-fr-load)))
+ "Load byte float")
+(load-r-simm ldhfi UHI OP_39 FRint FR-ACCESS
+ ((fr400 (unit u-fr-load)) (fr500 (unit u-fr-load)))
+ "Load half float")
+(load-r-simm ldfi SI OP_3A FRint FR-ACCESS
+ ((fr400 (unit u-fr-load)) (fr500 (unit u-fr-load)))
+ "Load word float")
+
+(define-pmacro (ne-load-r-simm
+ name mode op regtype size is_float attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) NON-EXCEPTING attr
+ (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack @($GRi,$d12),$" regtype "k")
+ (+ pack (.sym regtype k) op GRi d12)
+ (ne-load-semantics GRi -1 (.sym regtype k) d12 size is_float
+ (set (.sym regtype k)
+ (c-call mode (.str "@cpu@_read_mem_" mode)
+ pc (add GRi d12))))
+ profile
+ )
+)
+
+(ne-load-r-simm nldsbi QI OP_40 GR (ne-QI-size) 0 NA
+ ((fr500 (unit u-gr-load))) "Load signed byte")
+(ne-load-r-simm nldubi UQI OP_41 GR (ne-UQI-size) 0 NA
+ ((fr500 (unit u-gr-load))) "Load unsigned byte")
+(ne-load-r-simm nldshi HI OP_42 GR (ne-HI-size) 0 NA
+ ((fr500 (unit u-gr-load))) "Load signed half")
+(ne-load-r-simm nlduhi UHI OP_43 GR (ne-UHI-size) 0 NA
+ ((fr500 (unit u-gr-load))) "Load unsigned half")
+(ne-load-r-simm nldi SI OP_44 GR (ne-SI-size) 0 NA
+ ((fr500 (unit u-gr-load))) "Load word")
+
+(ne-load-r-simm nldbfi UQI OP_48 FRint (ne-UQI-size) 1 FR-ACCESS
+ ((fr500 (unit u-fr-load))) "Load byte float")
+(ne-load-r-simm nldhfi UHI OP_49 FRint (ne-UHI-size) 1 FR-ACCESS
+ ((fr500 (unit u-fr-load))) "Load half float")
+(ne-load-r-simm nldfi SI OP_4A FRint (ne-SI-size) 1 FR-ACCESS
+ ((fr500 (unit u-fr-load))) "Load word float")
+
+(define-pmacro (load-double-r-simm
+ name not_gr mode op regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) attr)
+ (.str name "$pack @($GRi,$d12),$" regtype "doublek")
+ (+ pack (.sym regtype doublek) op GRi d12)
+ (sequence ((WI address))
+ (load-double-semantics not_gr mode regtype address d12))
+ profile
+ )
+)
+
+(load-double-r-simm lddi 0 DI OP_33 GR NA
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load double word")
+(load-double-r-simm lddfi 1 DF OP_3B FR FR-ACCESS
+ ((fr400 (unit u-fr-load)) (fr500 (unit u-fr-load)))
+ "Load double float")
+
+(define-pmacro (ne-load-double-r-simm
+ name not_gr mode op regtype size is_float attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) NON-EXCEPTING attr
+ (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack @($GRi,$d12),$" regtype "doublek")
+ (+ pack (.sym regtype doublek) op GRi d12)
+ (sequence ((WI address))
+ (ne-load-semantics GRi -1 (.sym regtype doublek)
+ d12 size is_float
+ (load-double-semantics not_gr mode
+ regtype
+ address d12)))
+ profile
+ )
+)
+
+(ne-load-double-r-simm nlddi 0 DI OP_45 GR (ne-DI-size) 0 NA
+ ((fr500 (unit u-gr-load))) "Load double word")
+(ne-load-double-r-simm nlddfi 1 DF OP_4B FR (ne-DI-size) 1 FR-ACCESS
+ ((fr500 (unit u-fr-load))) "Load double float")
+
+(define-pmacro (load-quad-r-simm name op regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) attr)
+ (.str name "$pack @($GRi,$d12),$" regtype "k")
+ (+ pack (.sym regtype k) op GRi d12)
+ (sequence ((WI address))
+ (load-quad-semantics regtype address d12))
+ profile
+ )
+)
+
+(load-quad-r-simm ldqi OP_34 GR NA
+ ((fr500 (unit u-gr-load))) "Load quad word")
+(load-quad-r-simm ldqfi OP_3C FRint FR-ACCESS
+ ((fr500 (unit u-fr-load))) "Load quad float")
+
+(define-pmacro (ne-load-quad-r-simm
+ name op regtype size is_float attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) NON-EXCEPTING attr)
+ (.str name "$pack @($GRi,$d12),$" regtype "k")
+ (+ pack (.sym regtype k) op GRi d12)
+ (sequence ((WI address))
+ (ne-load-semantics GRi -1 (.sym regtype k) d12 size is_float
+ (load-quad-semantics regtype address d12)))
+ profile
+ )
+)
+
+(ne-load-quad-r-simm nldqi OP_46 GR (ne-XI-size) 0 NA
+ ((fr500 (unit u-gr-load))) "Load quad word")
+(ne-load-quad-r-simm nldqfi OP_4C FRint (ne-XI-size) 1 FR-ACCESS
+ ((fr500 (unit u-fr-load))) "Load quad float")
+
+(define-pmacro (store-r-r name mode op ope reg attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+ (.str name "$pack $" reg "k,@($GRi,$GRj)")
+ (+ pack (.sym reg k) op GRi ope GRj)
+ (c-call VOID (.str "@cpu@_write_mem_" mode)
+ pc (add GRi GRj) (.sym reg k))
+ profile
+ )
+)
+
+(store-r-r stb QI OP_03 OPE1_00 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store unsigned byte")
+(store-r-r sth HI OP_03 OPE1_01 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store unsigned half")
+(store-r-r st SI OP_03 OPE1_02 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store word")
+
+(store-r-r stbf QI OP_03 OPE1_08 FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store byte float")
+(store-r-r sthf HI OP_03 OPE1_09 FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store half float")
+(store-r-r stf SI OP_03 OPE1_0A FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store word float")
+
+(store-r-r stc SI OP_03 OPE1_25 CPR (MACH frv) () "Store coprocessor word")
+
+(define-pmacro (r-store name mode op ope reg size is_float profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (MACH frv))
+ (.str name "$pack $" reg "k,@($GRi,$GRj)")
+ (+ pack (.sym reg k) op GRi ope GRj)
+ (sequence ((WI address))
+ (set address (add GRi GRj))
+ (c-call VOID (.str "@cpu@_write_mem_" mode)
+ pc address (.sym reg k))
+ (c-call VOID "@cpu@_check_recovering_store"
+ address (index-of (.sym reg k)) size is_float))
+ profile
+ )
+)
+
+(r-store rstb QI OP_03 OPE1_20 GR 1 0
+ ((fr500 (unit u-gr-r-store))) "Store unsigned byte")
+(r-store rsth HI OP_03 OPE1_21 GR 2 0
+ ((fr500 (unit u-gr-r-store))) "Store unsigned half")
+(r-store rst SI OP_03 OPE1_22 GR 4 0
+ ((fr500 (unit u-gr-r-store))) "Store word")
+
+(r-store rstbf QI OP_03 OPE1_28 FRint 1 1
+ ((fr500 (unit u-fr-r-store))) "Store byte float")
+(r-store rsthf HI OP_03 OPE1_29 FRint 2 1
+ ((fr500 (unit u-fr-r-store))) "Store half float")
+(r-store rstf SI OP_03 OPE1_2A FRint 4 1
+ ((fr500 (unit u-fr-r-store))) "Store word float")
+
+; Semantics for a store-double insn
+;
+(define-pmacro (store-double-semantics mode regtype address arg)
+ (sequence ()
+ (set address (add GRi arg))
+ (c-call VOID (.str "@cpu@_write_mem_" mode)
+ pc address (.sym regtype doublek)))
+)
+
+(define-pmacro (store-double-r-r name mode op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj)")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (sequence ((WI address))
+ (store-double-semantics mode regtype address GRj))
+ profile
+ )
+)
+
+(store-double-r-r std DI OP_03 OPE1_03 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store double word")
+(store-double-r-r stdf DF OP_03 OPE1_0B FR FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store double float")
+
+(store-double-r-r stdc DI OP_03 OPE1_26 CPR (MACH frv)
+ () "Store coprocessor double word")
+
+(define-pmacro (r-store-double
+ name mode op ope regtype is_float attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) attr)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj)")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (sequence ((WI address))
+ (store-double-semantics mode regtype address GRj)
+ (c-call VOID "@cpu@_check_recovering_store"
+ address (index-of (.sym regtype k)) 8 is_float))
+ profile
+ )
+)
+
+(r-store-double rstd DI OP_03 OPE1_23 GR 0 NA
+ ((fr500 (unit u-gr-r-store))) "Store double word")
+(r-store-double rstdf DF OP_03 OPE1_2B FR 1 FR-ACCESS
+ ((fr500 (unit u-fr-r-store))) "Store double float")
+
+; Semantics for a store-quad insn
+;
+(define-pmacro (store-quad-semantics regtype address arg)
+ (sequence ()
+ (set address (add GRi arg))
+ (c-call VOID (.str "@cpu@_store_quad_" regtype)
+ pc address (index-of (.sym regtype k))))
+)
+
+(define-pmacro (store-quad-r-r name op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) attr)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj)")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (sequence ((WI address))
+ (store-quad-semantics regtype address GRj))
+ profile
+ )
+)
+
+(store-quad-r-r stq OP_03 OPE1_04 GR NA
+ ((fr500 (unit u-gr-store))) "Store quad word")
+(store-quad-r-r stqf OP_03 OPE1_0C FRint FR-ACCESS
+ ((fr500 (unit u-fr-store)))
+ "Store quad float")
+(store-quad-r-r stqc OP_03 OPE1_27 CPR NA
+ () "Store coprocessor quad word")
+
+(define-pmacro (r-store-quad name op ope regtype is_float attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) attr)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj)")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (sequence ((WI address))
+ (store-quad-semantics regtype address GRj)
+ (c-call VOID "@cpu@_check_recovering_store"
+ address (index-of (.sym regtype k)) 16 is_float))
+ profile
+ )
+)
+
+(r-store-quad rstq OP_03 OPE1_24 GR 0 NA
+ ((fr500 (unit u-gr-r-store))) "Store quad word")
+(r-store-quad rstqf OP_03 OPE1_2C FRint 1 FR-ACCESS
+ ((fr500 (unit u-fr-r-store))) "Store quad float")
+
+(define-pmacro (store-r-r-u name mode op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj)")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (sequence ((UWI address))
+ (set address (add GRi GRj))
+ (c-call VOID (.str "@cpu@_write_mem_" mode)
+ pc address (.sym regtype k))
+ (set GRi address))
+ profile
+ )
+)
+
+(store-r-r-u stbu QI OP_03 OPE1_10 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store unsigned byte, update index")
+(store-r-r-u sthu HI OP_03 OPE1_11 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store unsigned half, update index")
+(store-r-r-u stu WI OP_03 OPE1_12 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store word, update index")
+
+(store-r-r-u stbfu QI OP_03 OPE1_18 FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store byte float, update index")
+(store-r-r-u sthfu HI OP_03 OPE1_19 FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store half float, update index")
+(store-r-r-u stfu SI OP_03 OPE1_1A FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store word float, update index")
+
+(store-r-r-u stcu SI OP_03 OPE1_2D CPR (MACH frv) ()
+ "Store coprocessor word, update index")
+
+(define-pmacro (store-double-r-r-u
+ name mode op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj)")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (sequence ((WI address))
+ (store-double-semantics mode regtype address GRj)
+ (set GRi address))
+ profile
+ )
+)
+
+(store-double-r-r-u stdu DI OP_03 OPE1_13 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store double word, update index")
+(store-double-r-r-u stdfu DF OP_03 OPE1_1B FR FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store double float,update index")
+(store-double-r-r-u stdcu DI OP_03 OPE1_2E CPR (MACH frv) ()
+ "Store coprocessor double word, update index")
+
+(define-pmacro (store-quad-r-r-u name op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) attr)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj)")
+ (+ pack (.sym regtype k) op GRi ope GRj)
+ (sequence ((WI address))
+ (store-quad-semantics regtype address GRj)
+ (set GRi address))
+ profile
+ )
+)
+
+(store-quad-r-r-u stqu OP_03 OPE1_14 GR NA
+ ((fr500 (unit u-gr-store)))
+ "Store quad word, update index")
+(store-quad-r-r-u stqfu OP_03 OPE1_1C FRint FR-ACCESS
+ ((fr500 (unit u-fr-store)))
+ "Store quad float, update index")
+(store-quad-r-r-u stqcu OP_03 OPE1_2F CPR NA ()
+ "Store coprocessor quad word, update index")
+
+(define-pmacro (conditional-load name mode op ope regtype profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) CONDITIONAL)
+ (.str name "$pack @($GRi,$GRj),$" regtype "k,$CCi,$cond")
+ (+ pack (.sym regtype k) op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (set (.sym regtype k)
+ (c-call mode (.str "@cpu@_read_mem_" mode) pc (add GRi GRj))))
+ profile
+ )
+)
+
+(conditional-load cldsb QI OP_5E OPE4_0 GR
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load signed byte")
+(conditional-load cldub UQI OP_5E OPE4_1 GR
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load unsigned byte")
+(conditional-load cldsh HI OP_5E OPE4_2 GR
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load signed half")
+(conditional-load clduh UHI OP_5E OPE4_3 GR
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load unsigned half")
+(conditional-load cld SI OP_5F OPE4_0 GR
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load word")
+
+(conditional-load cldbf UQI OP_60 OPE4_0 FRint
+ ((fr400 (unit u-fr-load)) (fr500 (unit u-fr-load)))
+ "Load byte float")
+(conditional-load cldhf UHI OP_60 OPE4_1 FRint
+ ((fr400 (unit u-fr-load)) (fr500 (unit u-fr-load)))
+ "Load half float")
+(conditional-load cldf SI OP_60 OPE4_2 FRint
+ ((fr400 (unit u-fr-load)) (fr500 (unit u-fr-load)))
+ "Load word float")
+
+(define-pmacro (conditional-load-double
+ name not_gr mode op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) CONDITIONAL attr)
+ (.str name "$pack @($GRi,$GRj),$" regtype "doublek,$CCi,$cond")
+ (+ pack (.sym regtype doublek) op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (load-double-semantics not_gr mode regtype address GRj)))
+ profile
+ )
+)
+
+(conditional-load-double cldd 0 DI OP_5F OPE4_1 GR NA
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load double word")
+(conditional-load-double clddf 1 DF OP_60 OPE4_3 FR FR-ACCESS
+ ((fr400 (unit u-gr-load)) (fr500 (unit u-gr-load)))
+ "Load double float")
+
+(dni cldq
+ "conditional load quad integer"
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) CONDITIONAL)
+ "cldq$pack @($GRi,$GRj),$GRk,$CCi,$cond"
+ (+ pack GRk OP_5F GRi CCi cond OPE4_2 GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (load-quad-semantics GR address GRj)))
+ ((fr500 (unit u-gr-load)))
+)
+
+(define-pmacro (conditional-load-gr-u name mode op ope comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) CONDITIONAL)
+ (.str name "$pack @($GRi,$GRj),$GRk,$CCi,$cond")
+ (+ pack GRk op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (set address (add GRi GRj))
+ (set GRk
+ (c-call mode (.str "@cpu@_read_mem_" mode)
+ pc address))
+ (if (ne (index-of GRi) (index-of GRk))
+ (set GRi address))))
+ ((fr400 (unit u-gr-load))
+ (fr500 (unit u-gr-load)))
+ )
+)
+
+(conditional-load-gr-u cldsbu QI OP_61 OPE4_0 "Load signed byte, update")
+(conditional-load-gr-u cldubu UQI OP_61 OPE4_1 "Load unsigned byte, update")
+(conditional-load-gr-u cldshu HI OP_61 OPE4_2 "Load signed half, update")
+(conditional-load-gr-u clduhu UHI OP_61 OPE4_3 "Load unsigned half, update")
+(conditional-load-gr-u cldu SI OP_62 OPE4_0 "Load word, update")
+
+(define-pmacro (conditional-load-non-gr-u name mode op ope regtype comment)
+ (dni name
+ (comment)
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) CONDITIONAL FR-ACCESS)
+ (.str name "$pack @($GRi,$GRj),$" regtype "k,$CCi,$cond")
+ (+ pack (.sym regtype k) op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (set address (add GRi GRj))
+ (set (.sym regtype k)
+ (c-call mode (.str "@cpu@_read_mem_" mode)
+ pc address))
+ (set GRi address)))
+ ((fr400 (unit u-fr-load))
+ (fr500 (unit u-fr-load)))
+ )
+)
+
+(conditional-load-non-gr-u cldbfu UQI OP_63 OPE4_0 FRint "Load byte float, update")
+(conditional-load-non-gr-u cldhfu UHI OP_63 OPE4_1 FRint "Load half float, update")
+(conditional-load-non-gr-u cldfu SI OP_63 OPE4_2 FRint "Load word float, update")
+
+
+(dni clddu
+ "Load double word, update"
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) CONDITIONAL)
+ "clddu$pack @($GRi,$GRj),$GRdoublek,$CCi,$cond"
+ (+ pack GRdoublek OP_62 GRi CCi cond OPE4_1 GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (load-double-semantics 0 DI GR address GRj)
+ (if (ne (index-of GRi) (index-of GRdoublek))
+ (set GRi address))))
+ ((fr400 (unit u-gr-load))
+ (fr500 (unit u-gr-load)))
+)
+
+(dni clddfu
+ "Load double float, update"
+ ((UNIT LOAD) (FR500-MAJOR I-2) (FR400-MAJOR I-2) CONDITIONAL FR-ACCESS)
+ "clddfu$pack @($GRi,$GRj),$FRdoublek,$CCi,$cond"
+ (+ pack FRdoublek OP_63 GRi CCi cond OPE4_3 GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (load-double-semantics 1 DF FR address GRj)
+ (set GRi address)))
+ ((fr400 (unit u-fr-load))
+ (fr500 (unit u-fr-load)))
+)
+
+(dni cldqu
+ "conditional load quad integer and update index"
+ ((UNIT LOAD) (FR500-MAJOR I-2) (MACH frv) CONDITIONAL)
+ "cldqu$pack @($GRi,$GRj),$GRk,$CCi,$cond"
+ (+ pack GRk OP_62 GRi CCi cond OPE4_2 GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (load-quad-semantics GR address GRj)
+ (if (ne (index-of GRi) (index-of GRk))
+ (set GRi address))))
+ ((fr500 (unit u-gr-load)))
+)
+
+(define-pmacro (conditional-store name mode op ope regtype profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj),$CCi,$cond")
+ (+ pack (.sym regtype k) op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (c-call VOID (.str "@cpu@_write_mem_" mode)
+ pc (add GRi GRj) (.sym regtype k)))
+ profile
+ )
+)
+
+(conditional-store cstb QI OP_64 OPE4_0 GR
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store unsigned byte")
+(conditional-store csth HI OP_64 OPE4_1 GR
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store unsigned half")
+(conditional-store cst SI OP_64 OPE4_2 GR
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store word")
+
+(conditional-store cstbf QI OP_66 OPE4_0 FRint
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store byte float")
+(conditional-store csthf HI OP_66 OPE4_1 FRint
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store half float")
+(conditional-store cstf SI OP_66 OPE4_2 FRint
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store word float")
+
+(define-pmacro (conditional-store-double
+ name mode op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL attr)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj),$CCi,$cond")
+ (+ pack (.sym regtype k) op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (store-double-semantics mode regtype address GRj)))
+ profile
+ )
+)
+
+(conditional-store-double cstd DI OP_64 OPE4_3 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store double word")
+(conditional-store-double cstdf DF OP_66 OPE4_3 FR FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store double float")
+
+(dni cstq
+ "conditionally store quad word"
+ ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) CONDITIONAL)
+ "cstq$pack $GRk,@($GRi,$GRj),$CCi,$cond"
+ (+ pack GRk OP_65 GRi CCi cond OPE4_0 GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (store-quad-semantics GR address GRj)))
+ ((fr500 (unit u-gr-store)))
+)
+
+(define-pmacro (conditional-store-u
+ name mode op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL attr)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj),$CCi,$cond")
+ (+ pack (.sym regtype k) op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (set address (add GRi GRj))
+ (c-call VOID (.str "@cpu@_write_mem_" mode)
+ pc address (.sym regtype k))
+ (set GRi address)))
+ profile
+ )
+)
+
+(conditional-store-u cstbu QI OP_67 OPE4_0 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store unsigned byte, update index")
+(conditional-store-u csthu HI OP_67 OPE4_1 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store unsigned half, update index")
+(conditional-store-u cstu SI OP_67 OPE4_2 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store word, update index")
+
+(conditional-store-u cstbfu QI OP_68 OPE4_0 FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store byte float, update index")
+(conditional-store-u csthfu HI OP_68 OPE4_1 FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store half float, update index")
+(conditional-store-u cstfu SI OP_68 OPE4_2 FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store word float, update index")
+
+(define-pmacro (conditional-store-double-u
+ name mode op ope regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) CONDITIONAL attr)
+ (.str name "$pack $" regtype "k,@($GRi,$GRj),$CCi,$cond")
+ (+ pack (.sym regtype k) op GRi CCi cond ope GRj)
+ (if (eq CCi (or cond 2))
+ (sequence ((WI address))
+ (store-double-semantics mode regtype address GRj)
+ (set GRi address)))
+ profile
+ )
+)
+
+(conditional-store-double-u cstdu DI OP_67 OPE4_3 GR NA
+ ((fr400 (unit u-gr-store))
+ (fr500 (unit u-gr-store)))
+ "Store double word, update index")
+(conditional-store-double-u cstdfu DF OP_68 OPE4_3 FR FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store double float, update index")
+
+(define-pmacro (store-r-simm name mode op regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+ (.str name "$pack $" regtype "k,@($GRi,$d12)")
+ (+ pack (.sym regtype k) op GRi d12)
+ (c-call VOID (.str "@cpu@_write_mem_" mode)
+ pc (add GRi d12) (.sym regtype k))
+ profile
+ )
+)
+
+(store-r-simm stbi QI OP_50 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store unsigned byte")
+(store-r-simm sthi HI OP_51 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store unsigned half")
+(store-r-simm sti SI OP_52 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store word")
+
+(store-r-simm stbfi QI OP_4E FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store byte float")
+(store-r-simm sthfi HI OP_4F FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store half float")
+(store-r-simm stfi SI OP_55 FRint FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store word float")
+
+(define-pmacro (store-double-r-simm name mode op regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (FR400-MAJOR I-3) attr)
+ (.str name "$pack $" regtype "k,@($GRi,$d12)")
+ (+ pack (.sym regtype k) op GRi d12)
+ (sequence ((WI address))
+ (store-double-semantics mode regtype address d12))
+ profile
+ )
+)
+
+(store-double-r-simm stdi DI OP_53 GR NA
+ ((fr400 (unit u-gr-store)) (fr500 (unit u-gr-store)))
+ "Store double word")
+(store-double-r-simm stdfi DF OP_56 FR FR-ACCESS
+ ((fr400 (unit u-fr-store)) (fr500 (unit u-fr-store)))
+ "Store double float")
+
+(define-pmacro (store-quad-r-simm name op regtype attr profile comment)
+ (dni name
+ (comment)
+ ((UNIT I0) (FR500-MAJOR I-3) (MACH frv) attr)
+ (.str name "$pack $" regtype "k,@($GRi,$d12)")
+ (+ pack (.sym regtype k) op GRi d12)
+ (sequence ((WI address))
+ (store-quad-semantics regtype address d12))
+ profile
+ )
+)
+
+(store-quad-r-simm stqi OP_54 GR NA ((fr500 (unit u-gr-store)))
+ "Store quad word")
+(store-quad-r-simm stqfi OP_57 FRint FR-ACCESS ()
+ "Store quad float")
+
+(define-pmacro (swap-semantics base offset arg)
+ (sequence ((WI tmp) (WI address))
+ (set tmp arg)
+ (set address (add base offset))
+ (set arg (c-call WI "@cpu@_read_mem_WI" pc address))
+ (c-call VOID "@cpu@_write_mem_WI" pc address tmp))
+)
+
+(dni swap
+ "Swap contents of memory with GR"
+ ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2))
+ "swap$pack @($GRi,$GRj),$GRk"
+ (+ pack GRk OP_03 GRi OPE1_05 GRj)
+ (swap-semantics GRi GRj GRk)
+ ((fr400 (unit u-swap))
+ (fr500 (unit u-swap)))
+)
+
+(dni "swapi"
+ "Swap contents of memory with GR"
+ ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2))
+ ("swapi$pack @($GRi,$d12),$GRk")
+ (+ pack GRk OP_4D GRi d12)
+ (swap-semantics GRi d12 GRk)
+ ((fr400 (unit u-swap))
+ (fr500 (unit u-swap)))
+)
+
+(dni cswap
+ "Conditionally swap contents of memory with GR"
+ ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2) CONDITIONAL)
+ "cswap$pack @($GRi,$GRj),$GRk,$CCi,$cond"
+ (+ pack GRk OP_65 GRi CCi cond OPE4_2 GRj)
+ (if (eq CCi (or cond 2))
+ (swap-semantics GRi GRj GRk))
+ ((fr400 (unit u-swap))
+ (fr500 (unit u-swap)))
+)
+
+(define-pmacro (register-transfer
+ name op ope reg_src reg_targ pipe major1 major2 attr1 attr2
+ profile comment)
+ (dni name
+ (comment)
+ ((UNIT pipe) major1 major2 attr1 attr2)
+ (.str name "$pack $" reg_src ",$" reg_targ)
+ (+ pack reg_targ op (rs-null) ope reg_src)
+ (set reg_targ reg_src)
+ profile
+ )
+)
+
+(register-transfer movgf OP_03 OPE1_15
+ GRj FRintk I0 (FR500-MAJOR I-4) (FR400-MAJOR I-4)
+ FR-ACCESS NA
+ ((fr400 (unit u-gr2fr)) (fr500 (unit u-gr2fr)))
+ "transfer gr to fr")
+(register-transfer movfg OP_03 OPE1_0D
+ FRintk GRj I0 (FR500-MAJOR I-4) (FR400-MAJOR I-4)
+ FR-ACCESS NA
+ ((fr400 (unit u-fr2gr)) (fr500 (unit u-fr2gr)))
+ "transfer fr to gr")
+
+(define-pmacro (nextreg hw r offset) (reg hw (add (index-of r) offset)))
+
+(define-pmacro (register-transfer-double-from-gr-semantics cond)
+ (if cond
+ (if (eq (index-of GRj) 0)
+ (sequence ()
+ (set FRintk 0)
+ (set (nextreg h-fr_int FRintk 1) 0))
+ (sequence ()
+ (set FRintk GRj)
+ (set (nextreg h-fr_int FRintk 1) (nextreg h-gr GRj 1)))))
+)
+
+(dni movgfd
+ "move GR for FR double"
+ ((UNIT I0) (FR500-MAJOR I-4) (FR400-MAJOR I-4) FR-ACCESS)
+ "movgfd$pack $GRj,$FRintk"
+ (+ pack FRintk OP_03 (rs-null) OPE1_16 GRj)
+ (register-transfer-double-from-gr-semantics 1)
+ ; TODO -- doesn't handle second register in the pair
+ ((fr400 (unit u-gr2fr))
+ (fr500 (unit u-gr2fr)))
+)
+
+(define-pmacro (register-transfer-double-to-gr-semantics cond)
+ (if (andif (ne (index-of GRj) 0) cond)
+ (sequence ()
+ (set GRj FRintk)
+ (set (nextreg h-gr GRj 1) (nextreg h-fr_int FRintk 1))))
+)
+
+(dni movfgd
+ "move FR for GR double"
+ ((UNIT I0) (FR500-MAJOR I-4) (FR400-MAJOR I-4) FR-ACCESS)
+ "movfgd$pack $FRintk,$GRj"
+ (+ pack FRintk OP_03 (rs-null) OPE1_0E GRj)
+ (register-transfer-double-to-gr-semantics 1)
+ ; TODO -- doesn't handle second register in the pair
+ ((fr400 (unit u-fr2gr))
+ (fr500 (unit u-fr2gr)))
+)
+
+(dni movgfq
+ "move GR for FR quad"
+ ((UNIT I0) (FR500-MAJOR I-4) (MACH frv) FR-ACCESS)
+ "movgfq$pack $GRj,$FRintk"
+ (+ pack FRintk OP_03 (rs-null) OPE1_17 GRj)
+ (if (eq (index-of GRj) 0)
+ (sequence ()
+ (set FRintk 0)
+ (set (reg h-fr_int (add (index-of FRintk) 1)) 0)
+ (set (reg h-fr_int (add (index-of FRintk) 2)) 0)
+ (set (reg h-fr_int (add (index-of FRintk) 3)) 0))
+ (sequence ()
+ (set FRintk GRj)
+ (set (reg h-fr_int (add (index-of FRintk) 1))
+ (reg h-gr (add (index-of GRj) 1)))
+ (set (reg h-fr_int (add (index-of FRintk) 2))
+ (reg h-gr (add (index-of GRj) 2)))
+ (set (reg h-fr_int (add (index-of FRintk) 3))
+ (reg h-gr (add (index-of GRj) 3)))))
+ ()
+)
+
+(dni movfgq
+ "move FR for GR quad"
+ ((UNIT I0) (FR500-MAJOR I-4) (MACH frv) FR-ACCESS)
+ "movfgq$pack $FRintk,$GRj"
+ (+ pack FRintk OP_03 (rs-null) OPE1_0F GRj)
+ (if (ne (index-of GRj) 0)
+ (sequence ()
+ (set GRj FRintk)
+ (set (reg h-gr (add (index-of GRj) 1))
+ (reg h-fr_int (add (index-of FRintk) 1)))
+ (set (reg h-gr (add (index-of GRj) 2))
+ (reg h-fr_int (add (index-of FRintk) 2)))
+ (set (reg h-gr (add (index-of GRj) 3))
+ (reg h-fr_int (add (index-of FRintk) 3)))))
+ ()
+)
+
+(define-pmacro (conditional-register-transfer
+ name op ope reg_src reg_targ pipe major1 major2 mach
+ profile comment)
+ (dni name
+ (comment)
+ ((UNIT pipe) major1 major2 CONDITIONAL FR-ACCESS mach)
+ (.str name "$pack $" reg_src ",$" reg_targ ",$CCi,$cond")
+ (+ pack reg_targ op (rs-null) CCi cond ope reg_src)
+ (if (eq CCi (or cond 2))
+ (set reg_targ reg_src))
+ profile
+ )
+)
+
+(conditional-register-transfer cmovgf OP_69 OPE4_0 GRj FRintk I0
+ (FR500-MAJOR I-4) (FR400-MAJOR I-4)
+ NA
+ ((fr400 (unit u-gr2fr)) (fr500 (unit u-gr2fr)))
+ "transfer gr to fr")
+(conditional-register-transfer cmovfg OP_69 OPE4_2 FRintk GRj I0
+ (FR500-MAJOR I-4) (FR400-MAJOR I-4)
+ NA
+ ((fr400 (unit u-fr2gr)) (fr500 (unit u-fr2gr)))
+ "transfer fr to gr")
+
+
+(dni cmovgfd
+ "Conditional move GR to FR double"
+ ((UNIT I0) (FR500-MAJOR I-4) (FR400-MAJOR I-4) CONDITIONAL FR-ACCESS)
+ "cmovgfd$pack $GRj,$FRintk,$CCi,$cond"
+ (+ pack FRintk OP_69 (rs-null) CCi cond OPE4_1 GRj)
+ (register-transfer-double-from-gr-semantics (eq CCi (or cond 2)))
+ ; TODO -- doesn't handle extra registers in double
+ ((fr400 (unit u-gr2fr))
+ (fr500 (unit u-gr2fr)))
+)
+
+(dni cmovfgd
+ "Conditional move FR to GR double"
+ ((UNIT I0) (FR500-MAJOR I-4) (FR400-MAJOR I-4) CONDITIONAL FR-ACCESS)
+ "cmovfgd$pack $FRintk,$GRj,$CCi,$cond"
+ (+ pack FRintk OP_69 (rs-null) CCi cond OPE4_3 GRj)
+ (register-transfer-double-to-gr-semantics (eq CCi (or cond 2)))
+ ; TODO -- doesn't handle second register in the pair
+ ((fr400 (unit u-fr2gr))
+ (fr500 (unit u-fr2gr)))
+)
+
+(define-pmacro (register-transfer-spr
+ name op ope reg_src reg_targ unitname comment)
+ (dni name
+ (comment)
+ ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2))
+ (.str name "$pack $" reg_src ",$" reg_targ)
+ (+ pack reg_targ op ope reg_src)
+ (set reg_targ reg_src)
+ ((fr400 (unit unitname))
+ (fr500 (unit unitname)))
+ )
+)
+
+(register-transfer-spr movgs OP_03 OPE1_06 GRj spr u-gr2spr "transfer gr->spr")
+(register-transfer-spr movsg OP_03 OPE1_07 spr GRj u-spr2gr "transfer spr->gr")
+
+; Integer Branch Conditions
+(define-pmacro (Inev cc) (const BI 0))
+(define-pmacro (Ira cc) (const BI 1))
+(define-pmacro (Ieq cc) ( zbit cc))
+(define-pmacro (Ine cc) (not (zbit cc)))
+(define-pmacro (Ile cc) ( orif (zbit cc) (xor (nbit cc) (vbit cc))))
+(define-pmacro (Igt cc) (not (orif (zbit cc) (xor (nbit cc) (vbit cc)))))
+(define-pmacro (Ilt cc) ( xor (nbit cc) (vbit cc)))
+(define-pmacro (Ige cc) (not (xor (nbit cc) (vbit cc))))
+(define-pmacro (Ils cc) ( orif (cbit cc) (zbit cc)))
+(define-pmacro (Ihi cc) (not (orif (cbit cc) (zbit cc))))
+(define-pmacro (Ic cc) ( cbit cc))
+(define-pmacro (Inc cc) (not (cbit cc)))
+(define-pmacro (In cc) ( nbit cc))
+(define-pmacro (Ip cc) (not (nbit cc)))
+(define-pmacro (Iv cc) ( vbit cc))
+(define-pmacro (Inv cc) (not (vbit cc)))
+
+; Float Branch Conditions
+(define-pmacro (Fnev cc) (const BI 0))
+(define-pmacro (Fra cc) (const BI 1))
+(define-pmacro (Fne cc) (orif (lbit cc) (orif (gbit cc) (ubit cc))))
+(define-pmacro (Feq cc) (ebit cc))
+(define-pmacro (Flg cc) (orif (lbit cc) (gbit cc)))
+(define-pmacro (Fue cc) (orif (ebit cc) (ubit cc)))
+(define-pmacro (Ful cc) (orif (lbit cc) (ubit cc)))
+(define-pmacro (Fge cc) (orif (ebit cc) (gbit cc)))
+(define-pmacro (Flt cc) (lbit cc))
+(define-pmacro (Fuge cc) (orif (ebit cc) (orif (gbit cc) (ubit cc))))
+(define-pmacro (Fug cc) (orif (gbit cc) (ubit cc)))
+(define-pmacro (Fle cc) (orif (ebit cc) (lbit cc)))
+(define-pmacro (Fgt cc) (gbit cc))
+(define-pmacro (Fule cc) (orif (ebit cc) (orif (lbit cc) (ubit cc))))
+(define-pmacro (Fu cc) (ubit cc))
+(define-pmacro (Fo cc) (orif (ebit cc) (orif (lbit cc) (gbit cc))))
+
+(define-pmacro (conditional-branch-i prefix cc op cond comment)
+ (dni (.sym prefix cc)
+ (comment)
+ ((UNIT B01) (FR500-MAJOR B-1) (FR400-MAJOR B-1))
+ (.str (.sym prefix cc) "$pack $ICCi_2,$hint,$label16")
+ (+ pack (.sym ICC_ cc) ICCi_2 op hint label16)
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" label16 hint)
+ (if (cond ICCi_2)
+ (set pc label16)))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+ )
+)
+
+(dni bra
+ "integer branch equal"
+ ((UNIT B01) (FR500-MAJOR B-1) (FR400-MAJOR B-1))
+ "bra$pack $hint_taken$label16"
+ (+ pack ICC_ra (ICCi_2-null) OP_06 hint_taken label16)
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" label16 hint_taken)
+ (set pc label16))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni bno
+ "integer branch never"
+ ((UNIT B01) (FR500-MAJOR B-1) (FR400-MAJOR B-1))
+ "bno$pack$hint_not_taken"
+ (+ pack ICC_nev (ICCi_2-null) OP_06 hint_not_taken (label16-null))
+ (c-call VOID "@cpu@_model_branch" label16 hint_not_taken)
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(conditional-branch-i b eq OP_06 Ieq "integer branch equal")
+(conditional-branch-i b ne OP_06 Ine "integer branch not equal")
+(conditional-branch-i b le OP_06 Ile "integer branch less or equal")
+(conditional-branch-i b gt OP_06 Igt "integer branch greater")
+(conditional-branch-i b lt OP_06 Ilt "integer branch less")
+(conditional-branch-i b ge OP_06 Ige "integer branch greater or equal")
+(conditional-branch-i b ls OP_06 Ils "integer branch less or equal unsigned")
+(conditional-branch-i b hi OP_06 Ihi "integer branch greater unsigned")
+(conditional-branch-i b c OP_06 Ic "integer branch carry set")
+(conditional-branch-i b nc OP_06 Inc "integer branch carry clear")
+(conditional-branch-i b n OP_06 In "integer branch negative")
+(conditional-branch-i b p OP_06 Ip "integer branch positive")
+(conditional-branch-i b v OP_06 Iv "integer branch overflow set")
+(conditional-branch-i b nv OP_06 Inv "integer branch overflow clear")
+
+(define-pmacro (conditional-branch-f prefix cc op cond comment)
+ (dni (.sym prefix cc)
+ (comment)
+ ((UNIT B01) (FR500-MAJOR B-1) (FR400-MAJOR B-1) FR-ACCESS)
+ (.str (.sym prefix cc) "$pack $FCCi_2,$hint,$label16")
+ (+ pack (.sym FCC_ cc) FCCi_2 op hint label16)
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" label16 hint)
+ (if (cond FCCi_2) (set pc label16)))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+ )
+)
+
+(dni fbra
+ "float branch equal"
+ ((UNIT B01) (FR500-MAJOR B-1) (FR400-MAJOR B-1) FR-ACCESS)
+ "fbra$pack $hint_taken$label16"
+ (+ pack FCC_ra (FCCi_2-null) OP_07 hint_taken label16)
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" label16 hint_taken)
+ (set pc label16))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni fbno
+ "float branch never"
+ ((UNIT B01) (FR500-MAJOR B-1) (FR400-MAJOR B-1) FR-ACCESS)
+ "fbno$pack$hint_not_taken"
+ (+ pack FCC_nev (FCCi_2-null) OP_07 hint_not_taken (label16-null))
+ (c-call VOID "@cpu@_model_branch" label16 hint_not_taken)
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(conditional-branch-f fb ne OP_07 Fne "float branch not equal")
+(conditional-branch-f fb eq OP_07 Feq "float branch equal")
+(conditional-branch-f fb lg OP_07 Flg "float branch less or greater")
+(conditional-branch-f fb ue OP_07 Fue "float branch unordered or equal")
+(conditional-branch-f fb ul OP_07 Ful "float branch unordered or less")
+(conditional-branch-f fb ge OP_07 Fge "float branch greater or equal")
+(conditional-branch-f fb lt OP_07 Flt "float branch less")
+(conditional-branch-f fb uge OP_07 Fuge "float branch unordered, greater,equal")
+(conditional-branch-f fb ug OP_07 Fug "float branch unordered or greater")
+(conditional-branch-f fb le OP_07 Fle "float branch less or equal")
+(conditional-branch-f fb gt OP_07 Fgt "float branch greater")
+(conditional-branch-f fb ule OP_07 Fule "float branch unordered, less or equal")
+(conditional-branch-f fb u OP_07 Fu "float branch unordered")
+(conditional-branch-f fb o OP_07 Fo "float branch ordered")
+
+(define-pmacro (ctrlr-branch-semantics cond ccond)
+ (sequence ((SI tmp))
+ (set tmp (sub (spr-lcr) 1))
+ (set (spr-lcr) tmp)
+ (if cond
+ (if (eq ccond 0)
+ (if (ne tmp 0)
+ (set pc (spr-lr)))
+ (if (eq tmp 0)
+ (set pc (spr-lr))))))
+)
+
+(dni bctrlr
+ "LCR conditional branch to lr"
+ ((UNIT B0) (FR500-MAJOR B-2) (FR400-MAJOR B-2))
+ ("bctrlr$pack $ccond,$hint")
+ (+ pack (cond-null) (ICCi_2-null) OP_0E hint OPE3_01 ccond (s12-null))
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint)
+ (ctrlr-branch-semantics (const BI 1) ccond))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(define-pmacro (conditional-branch-cclr prefix cc i-f op ope cond attr comment)
+ (dni (.sym prefix cc lr)
+ (comment)
+ ((UNIT B01) (FR500-MAJOR B-3) (FR400-MAJOR B-3) attr)
+ (.str (.sym prefix cc lr) "$pack $" i-f "CCi_2,$hint")
+ (+ pack (.sym i-f CC_ cc) (.sym i-f CCi_2) op hint ope
+ (ccond-null) (s12-null))
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint)
+ (if (cond (.sym i-f CCi_2)) (set pc (spr-lr))))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+ )
+)
+
+(dni bralr
+ "integer cclr branch always"
+ ((UNIT B01) (FR500-MAJOR B-3) (FR400-MAJOR B-3))
+ "bralr$pack$hint_taken"
+ (+ pack ICC_ra (ICCi_2-null) OP_0E hint_taken OPE3_02 (ccond-null) (s12-null))
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint_taken)
+ (set pc (spr-lr)))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni bnolr
+ "integer cclr branch never"
+ ((UNIT B01) (FR500-MAJOR B-3) (FR400-MAJOR B-3))
+ "bnolr$pack$hint_not_taken"
+ (+ pack ICC_nev (ICCi_2-null) OP_0E hint_not_taken OPE3_02 (ccond-null) (s12-null))
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint_not_taken)
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(conditional-branch-cclr b eq I OP_0E OPE3_02 Ieq NA "integer cclr branch equal")
+(conditional-branch-cclr b ne I OP_0E OPE3_02 Ine NA "integer cclr branch not equal")
+(conditional-branch-cclr b le I OP_0E OPE3_02 Ile NA "integer cclr branch less or equal")
+(conditional-branch-cclr b gt I OP_0E OPE3_02 Igt NA "integer cclr branch greater")
+(conditional-branch-cclr b lt I OP_0E OPE3_02 Ilt NA "integer cclr branch less")
+(conditional-branch-cclr b ge I OP_0E OPE3_02 Ige NA "integer cclr branch greater or equal")
+(conditional-branch-cclr b ls I OP_0E OPE3_02 Ils NA "integer cclr branch less or equal unsigned")
+(conditional-branch-cclr b hi I OP_0E OPE3_02 Ihi NA "integer cclr branch greater unsigned")
+(conditional-branch-cclr b c I OP_0E OPE3_02 Ic NA "integer cclr branch carry set")
+(conditional-branch-cclr b nc I OP_0E OPE3_02 Inc NA "integer cclr branch carry clear")
+(conditional-branch-cclr b n I OP_0E OPE3_02 In NA "integer cclr branch negative")
+(conditional-branch-cclr b p I OP_0E OPE3_02 Ip NA "integer cclr branch positive")
+(conditional-branch-cclr b v I OP_0E OPE3_02 Iv NA "integer cclr branch overflow set")
+(conditional-branch-cclr b nv I OP_0E OPE3_02 Inv NA "integer cclr branch overflow clear")
+
+(dni fbralr
+ "float cclr branch always"
+ ((UNIT B01) (FR500-MAJOR B-3) (FR400-MAJOR B-3) FR-ACCESS)
+ "fbralr$pack$hint_taken"
+ (+ pack FCC_ra (FCCi_2-null) OP_0E hint_taken OPE3_06 (ccond-null) (s12-null))
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint_taken)
+ (set pc (spr-lr)))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni fbnolr
+ "float cclr branch never"
+ ((UNIT B01) (FR500-MAJOR B-3) (FR400-MAJOR B-3) FR-ACCESS)
+ "fbnolr$pack$hint_not_taken"
+ (+ pack FCC_nev (FCCi_2-null) OP_0E hint_not_taken OPE3_06 (ccond-null) (s12-null))
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint_not_taken)
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(conditional-branch-cclr fb eq F OP_0E OPE3_06 Feq FR-ACCESS "float cclr branch equal")
+(conditional-branch-cclr fb ne F OP_0E OPE3_06 Fne FR-ACCESS "float cclr branch not equal")
+(conditional-branch-cclr fb lg F OP_0E OPE3_06 Flg FR-ACCESS "float branch less or greater")
+(conditional-branch-cclr fb ue F OP_0E OPE3_06 Fue FR-ACCESS "float branch unordered or equal")
+(conditional-branch-cclr fb ul F OP_0E OPE3_06 Ful FR-ACCESS "float branch unordered or less")
+(conditional-branch-cclr fb ge F OP_0E OPE3_06 Fge FR-ACCESS "float branch greater or equal")
+(conditional-branch-cclr fb lt F OP_0E OPE3_06 Flt FR-ACCESS "float branch less")
+(conditional-branch-cclr fb uge F OP_0E OPE3_06 Fuge FR-ACCESS "float branch unordered, greater, equal")
+(conditional-branch-cclr fb ug F OP_0E OPE3_06 Fug FR-ACCESS "float branch unordered or greater")
+(conditional-branch-cclr fb le F OP_0E OPE3_06 Fle FR-ACCESS "float branch less or equal")
+(conditional-branch-cclr fb gt F OP_0E OPE3_06 Fgt FR-ACCESS "float branch greater")
+(conditional-branch-cclr fb ule F OP_0E OPE3_06 Fule FR-ACCESS "float branch unordered, less or equal")
+(conditional-branch-cclr fb u F OP_0E OPE3_06 Fu FR-ACCESS "float branch unordered")
+(conditional-branch-cclr fb o F OP_0E OPE3_06 Fo FR-ACCESS "float branch ordered")
+
+(define-pmacro (conditional-branch-ctrlr prefix cc i-f op ope cond attr comment)
+ (dni (.sym prefix cc lr)
+ (comment)
+ ((UNIT B0) (FR500-MAJOR B-2) (FR400-MAJOR B-2) attr)
+ (.str (.sym prefix cc lr) "$pack $" i-f "CCi_2,$ccond,$hint")
+ (+ pack (.sym i-f CC_ cc) (.sym i-f CCi_2) op hint ope ccond (s12-null))
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint)
+ (ctrlr-branch-semantics (cond (.sym i-f CCi_2)) ccond))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+ )
+)
+
+(dni bcralr
+ "integer ctrlr branch always"
+ ((UNIT B0) (FR500-MAJOR B-2) (FR400-MAJOR B-2))
+ "bcralr$pack $ccond$hint_taken"
+ (+ pack ICC_ra (ICCi_2-null) OP_0E hint_taken OPE3_03 ccond (s12-null))
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint_taken)
+ (ctrlr-branch-semantics (const BI 1) ccond))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni bcnolr
+ "integer ctrlr branch never"
+ ((UNIT B0) (FR500-MAJOR B-2) (FR400-MAJOR B-2))
+ "bcnolr$pack$hint_not_taken"
+ (+ pack ICC_nev (ICCi_2-null) OP_0E hint_not_taken OPE3_03 (ccond-null) (s12-null))
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint_not_taken)
+ (ctrlr-branch-semantics (const BI 0) ccond))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(conditional-branch-ctrlr bc eq I OP_0E OPE3_03 Ieq NA "integer ctrlr branch equal")
+(conditional-branch-ctrlr bc ne I OP_0E OPE3_03 Ine NA "integer ctrlr branch not equal")
+(conditional-branch-ctrlr bc le I OP_0E OPE3_03 Ile NA "integer ctrlr branch less equal")
+(conditional-branch-ctrlr bc gt I OP_0E OPE3_03 Igt NA "integer ctrlr branch greater")
+(conditional-branch-ctrlr bc lt I OP_0E OPE3_03 Ilt NA "integer ctrlr branch less")
+(conditional-branch-ctrlr bc ge I OP_0E OPE3_03 Ige NA "integer ctrlr branch greater equal")
+(conditional-branch-ctrlr bc ls I OP_0E OPE3_03 Ils NA "integer ctrlr branch less equal unsigned")
+(conditional-branch-ctrlr bc hi I OP_0E OPE3_03 Ihi NA "integer ctrlr branch greater unsigned")
+(conditional-branch-ctrlr bc c I OP_0E OPE3_03 Ic NA "integer ctrlr branch carry set")
+(conditional-branch-ctrlr bc nc I OP_0E OPE3_03 Inc NA "integer ctrlr branch carry clear")
+(conditional-branch-ctrlr bc n I OP_0E OPE3_03 In NA "integer ctrlr branch negative")
+(conditional-branch-ctrlr bc p I OP_0E OPE3_03 Ip NA "integer ctrlr branch positive")
+(conditional-branch-ctrlr bc v I OP_0E OPE3_03 Iv NA "integer ctrlr branch overflow set")
+(conditional-branch-ctrlr bc nv I OP_0E OPE3_03 Inv NA "integer ctrlr branch overflow clear")
+
+(dni fcbralr
+ "float ctrlr branch always"
+ ((UNIT B0) (FR500-MAJOR B-2) (FR400-MAJOR B-2) FR-ACCESS)
+ "fcbralr$pack $ccond$hint_taken"
+ (+ pack FCC_ra (FCCi_2-null) OP_0E hint_taken OPE3_07 ccond (s12-null))
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint_taken)
+ (ctrlr-branch-semantics (const BI 1) ccond))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni fcbnolr
+ "float ctrlr branch never"
+ ((UNIT B0) (FR500-MAJOR B-2) (FR400-MAJOR B-2) FR-ACCESS)
+ "fcbnolr$pack$hint_not_taken"
+ (+ pack FCC_nev (FCCi_2-null) OP_0E hint_not_taken OPE3_07 (ccond-null) (s12-null))
+ (sequence ()
+ (c-call VOID "@cpu@_model_branch" (spr-lr) hint_not_taken)
+ (ctrlr-branch-semantics (const BI 0) ccond))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(conditional-branch-ctrlr fcb eq F OP_0E OPE3_07 Feq FR-ACCESS "float cclr branch equal")
+(conditional-branch-ctrlr fcb ne F OP_0E OPE3_07 Fne FR-ACCESS "float cclr branch not equal")
+(conditional-branch-ctrlr fcb lg F OP_0E OPE3_07 Flg FR-ACCESS "float branch less or greater")
+(conditional-branch-ctrlr fcb ue F OP_0E OPE3_07 Fue FR-ACCESS "float branch unordered or equal")
+(conditional-branch-ctrlr fcb ul F OP_0E OPE3_07 Ful FR-ACCESS "float branch unordered or less")
+(conditional-branch-ctrlr fcb ge F OP_0E OPE3_07 Fge FR-ACCESS "float branch greater or equal")
+(conditional-branch-ctrlr fcb lt F OP_0E OPE3_07 Flt FR-ACCESS "float branch less")
+(conditional-branch-ctrlr fcb uge F OP_0E OPE3_07 Fuge FR-ACCESS "float branch unordered, greater, equal")
+(conditional-branch-ctrlr fcb ug F OP_0E OPE3_07 Fug FR-ACCESS "float branch unordered or greater")
+(conditional-branch-ctrlr fcb le F OP_0E OPE3_07 Fle FR-ACCESS "float branch less or equal")
+(conditional-branch-ctrlr fcb gt F OP_0E OPE3_07 Fgt FR-ACCESS "float branch greater")
+(conditional-branch-ctrlr fcb ule F OP_0E OPE3_07 Fule FR-ACCESS "float branch unordered, less or equal")
+(conditional-branch-ctrlr fcb u F OP_0E OPE3_07 Fu FR-ACCESS "float branch unordered")
+(conditional-branch-ctrlr fcb o F OP_0E OPE3_07 Fo FR-ACCESS "float branch ordered")
+
+(define-pmacro (jump-and-link-semantics base offset LI)
+ (sequence ()
+ (if (eq LI 1)
+ (c-call VOID "@cpu@_set_write_next_vliw_addr_to_LR" 1))
+ ; Target address gets aligned here
+ (set pc (and (add base offset) #xfffffffc))
+ (c-call VOID "@cpu@_model_branch" pc #x2)) ; hint branch taken
+)
+
+(dni jmpl
+ "jump and link"
+ ((UNIT I0) (FR500-MAJOR I-5) (FR400-MAJOR I-5))
+ "jmpl$pack @($GRi,$GRj)"
+ (+ pack (misc-null-1) (LI-off) OP_0C GRi (misc-null-2) GRj)
+ (jump-and-link-semantics GRi GRj LI)
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni calll
+ "call and link"
+ ((UNIT I0) (FR500-MAJOR I-5) (FR400-MAJOR I-5))
+ "calll$pack @($GRi,$GRj)"
+ (+ pack (misc-null-1) (LI-on) OP_0C GRi (misc-null-2) GRj)
+ (jump-and-link-semantics GRi GRj LI)
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni jmpil
+ "jump immediate and link"
+ ((UNIT I0) (FR500-MAJOR I-5) (FR400-MAJOR I-5))
+ "jmpil$pack @($GRi,$s12)"
+ (+ pack (misc-null-1) (LI-off) OP_0D GRi s12)
+ (jump-and-link-semantics GRi s12 LI)
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni callil
+ "call immediate and link"
+ ((UNIT I0) (FR500-MAJOR I-5) (FR400-MAJOR I-5))
+ "callil$pack @($GRi,$s12)"
+ (+ pack (misc-null-1) (LI-on) OP_0D GRi s12)
+ (jump-and-link-semantics GRi s12 LI)
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni call
+ "call and link"
+ ((UNIT B0) (FR500-MAJOR B-4) (FR400-MAJOR B-4))
+ "call$pack $label24"
+ (+ pack OP_0F label24)
+ (sequence ()
+ (c-call VOID "@cpu@_set_write_next_vliw_addr_to_LR" 1)
+ (set pc label24)
+ (c-call VOID "@cpu@_model_branch" pc #x2)) ; hint branch taken
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni rett
+ "return from trap"
+ ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2) PRIVILEGED)
+ "rett$pack $debug"
+ (+ pack (misc-null-1) debug OP_05 (rs-null) (s12-null))
+ ; frv_rett handles operating vs user mode
+ (sequence ()
+ (set pc (c-call UWI "frv_rett" pc debug))
+ (c-call VOID "@cpu@_model_branch" pc #x2)) ; hint branch taken
+ ()
+)
+
+(dni rei
+ "run exception instruction"
+ ((UNIT C) (FR500-MAJOR C-1) (MACH frv) PRIVILEGED)
+ "rei$pack $eir"
+ (+ pack (rd-null) OP_37 eir (s12-null))
+ (nop) ; for now
+ ()
+)
+
+(define-pmacro (trap-semantics cond base offset)
+ (if cond
+ (sequence ()
+ ; This is defered to frv_itrap because for the breakpoint
+ ; case we want to change as little of the machine state as
+ ; possible.
+ ;
+ ; PCSR=PC
+ ; PSR.PS=PSR.S
+ ; PSR.ET=0
+ ; if PSR.ESR==1
+ ; SR0 through SR3=GR4 through GR7
+ ; TBR.TT=0x80 + ((GRi + s12) & 0x7f)
+ ; PC=TBR
+ ; We still should indicate what is modified by this insn.
+ (clobber (spr-pcsr))
+ (clobber psr_ps)
+ (clobber psr_et)
+ (clobber tbr_tt)
+ (if (ne psr_esr (const 0))
+ (sequence ()
+ (clobber (spr-sr0))
+ (clobber (spr-sr1))
+ (clobber (spr-sr2))
+ (clobber (spr-sr3))))
+ ; frv_itrap handles operating vs user mode
+ (c-call VOID "frv_itrap" pc base offset)))
+)
+
+(define-pmacro (trap-r prefix cc i-f op ope cond attr comment)
+ (dni (.sym prefix cc)
+ (comment)
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1) attr)
+ (.str (.sym prefix cc) "$pack $" i-f "CCi_2,$GRi,$GRj")
+ (+ pack (.sym i-f CC_ cc) (.sym i-f CCi_2) op GRi (misc-null-3) ope GRj)
+ (trap-semantics (cond (.sym i-f CCi_2)) GRi GRj)
+ ((fr400 (unit u-trap))
+ (fr500 (unit u-trap)))
+ )
+)
+
+(dni tra
+ "integer trap always"
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1))
+ "tra$pack $GRi,$GRj"
+ (+ pack ICC_ra (ICCi_2-null) OP_04 GRi (misc-null-3) OPE4_0 GRj)
+ (trap-semantics (const BI 1) GRi GRj)
+ ((fr400 (unit u-trap))
+ (fr500 (unit u-trap)))
+)
+
+(dni tno
+ "integer trap never"
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1))
+ "tno$pack"
+ (+ pack ICC_nev (ICCi_2-null) OP_04 (GRi-null) (misc-null-3) OPE4_0 (GRj-null))
+ (trap-semantics (const BI 0) GRi GRj)
+ ((fr400 (unit u-trap))
+ (fr500 (unit u-trap)))
+)
+
+(trap-r t eq I OP_04 OPE4_0 Ieq NA "integer trap equal")
+(trap-r t ne I OP_04 OPE4_0 Ine NA "integer trap not equal")
+(trap-r t le I OP_04 OPE4_0 Ile NA "integer trap less or equal")
+(trap-r t gt I OP_04 OPE4_0 Igt NA "integer trap greater")
+(trap-r t lt I OP_04 OPE4_0 Ilt NA "integer trap less")
+(trap-r t ge I OP_04 OPE4_0 Ige NA "integer trap greater or equal")
+(trap-r t ls I OP_04 OPE4_0 Ils NA "integer trap less or equal unsigned")
+(trap-r t hi I OP_04 OPE4_0 Ihi NA "integer trap greater unsigned")
+(trap-r t c I OP_04 OPE4_0 Ic NA "integer trap carry set")
+(trap-r t nc I OP_04 OPE4_0 Inc NA "integer trap carry clear")
+(trap-r t n I OP_04 OPE4_0 In NA "integer trap negative")
+(trap-r t p I OP_04 OPE4_0 Ip NA "integer trap positive")
+(trap-r t v I OP_04 OPE4_0 Iv NA "integer trap overflow set")
+(trap-r t nv I OP_04 OPE4_0 Inv NA "integer trap overflow clear")
+
+(dni ftra
+ "float trap always"
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1) FR-ACCESS)
+ "ftra$pack $GRi,$GRj"
+ (+ pack FCC_ra (FCCi_2-null) OP_04 GRi (misc-null-3) OPE4_1 GRj)
+ (trap-semantics (const BI 1) GRi GRj)
+ ((fr400 (unit u-trap))
+ (fr500 (unit u-trap)))
+)
+
+(dni ftno
+ "flost trap never"
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1) FR-ACCESS)
+ "ftno$pack"
+ (+ pack FCC_nev (FCCi_2-null) OP_04 (GRi-null) (misc-null-3) OPE4_1 (GRj-null))
+ (trap-semantics (const BI 0) GRi GRj)
+ ((fr400 (unit u-trap))
+ (fr500 (unit u-trap)))
+)
+
+(trap-r ft ne F OP_04 OPE4_1 Fne FR-ACCESS "float trap not equal")
+(trap-r ft eq F OP_04 OPE4_1 Feq FR-ACCESS "float trap equal")
+(trap-r ft lg F OP_04 OPE4_1 Flg FR-ACCESS "float trap greater or less")
+(trap-r ft ue F OP_04 OPE4_1 Fue FR-ACCESS "float trap unordered or equal")
+(trap-r ft ul F OP_04 OPE4_1 Ful FR-ACCESS "float trap unordered or less")
+(trap-r ft ge F OP_04 OPE4_1 Fge FR-ACCESS "float trap greater or equal")
+(trap-r ft lt F OP_04 OPE4_1 Flt FR-ACCESS "float trap less")
+(trap-r ft uge F OP_04 OPE4_1 Fuge FR-ACCESS "float trap unordered greater or equal")
+(trap-r ft ug F OP_04 OPE4_1 Fug FR-ACCESS "float trap unordered or greater")
+(trap-r ft le F OP_04 OPE4_1 Fle FR-ACCESS "float trap less or equal")
+(trap-r ft gt F OP_04 OPE4_1 Fgt FR-ACCESS "float trap greater")
+(trap-r ft ule F OP_04 OPE4_1 Fule FR-ACCESS "float trap unordered less or equal")
+(trap-r ft u F OP_04 OPE4_1 Fu FR-ACCESS "float trap unordered")
+(trap-r ft o F OP_04 OPE4_1 Fo FR-ACCESS "float trap ordered")
+
+(define-pmacro (trap-immed prefix cc i-f op cond attr comment)
+ (dni (.sym prefix cc)
+ (comment)
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1) attr)
+ (.str (.sym prefix cc) "$pack $" i-f "CCi_2,$GRi,$s12")
+ (+ pack (.sym i-f CC_ cc) (.sym i-f CCi_2) op GRi s12)
+ (trap-semantics (cond (.sym i-f CCi_2)) GRi s12)
+ ((fr400 (unit u-trap))
+ (fr500 (unit u-trap)))
+ )
+)
+
+(dni tira
+ "integer trap always"
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1))
+ "tira$pack $GRi,$s12"
+ (+ pack ICC_ra (ICCi_2-null) OP_1C GRi s12)
+ (trap-semantics (const BI 1) GRi s12)
+ ((fr400 (unit u-trap))
+ (fr500 (unit u-trap)))
+)
+
+(dni tino
+ "integer trap never"
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1))
+ "tino$pack"
+ (+ pack ICC_nev (ICCi_2-null) OP_1C (GRi-null) (s12-null))
+ (trap-semantics (const BI 0) GRi s12)
+ ((fr400 (unit u-trap))
+ (fr500 (unit u-trap)))
+)
+
+(trap-immed ti eq I OP_1C Ieq NA "integer trap equal")
+(trap-immed ti ne I OP_1C Ine NA "integer trap not equal")
+(trap-immed ti le I OP_1C Ile NA "integer trap less or equal")
+(trap-immed ti gt I OP_1C Igt NA "integer trap greater")
+(trap-immed ti lt I OP_1C Ilt NA "integer trap less")
+(trap-immed ti ge I OP_1C Ige NA "integer trap greater or equal")
+(trap-immed ti ls I OP_1C Ils NA "integer trap less or equal unsigned")
+(trap-immed ti hi I OP_1C Ihi NA "integer trap greater unsigned")
+(trap-immed ti c I OP_1C Ic NA "integer trap carry set")
+(trap-immed ti nc I OP_1C Inc NA "integer trap carry clear")
+(trap-immed ti n I OP_1C In NA "integer trap negative")
+(trap-immed ti p I OP_1C Ip NA "integer trap positive")
+(trap-immed ti v I OP_1C Iv NA "integer trap overflow set")
+(trap-immed ti nv I OP_1C Inv NA "integer trap overflow clear")
+
+(dni ftira
+ "float trap always"
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1) FR-ACCESS)
+ "ftira$pack $GRi,$s12"
+ (+ pack FCC_ra (ICCi_2-null) OP_1D GRi s12)
+ (trap-semantics (const BI 1) GRi s12)
+ ((fr400 (unit u-trap))
+ (fr500 (unit u-trap)))
+)
+
+(dni ftino
+ "float trap never"
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1) FR-ACCESS)
+ "ftino$pack"
+ (+ pack FCC_nev (FCCi_2-null) OP_1D (GRi-null) (s12-null))
+ (trap-semantics (const BI 0) GRi s12)
+ ((fr400 (unit u-trap))
+ (fr500 (unit u-trap)))
+)
+
+(trap-immed fti ne F OP_1D Fne FR-ACCESS "float trap not equal")
+(trap-immed fti eq F OP_1D Feq FR-ACCESS "float trap equal")
+(trap-immed fti lg F OP_1D Flg FR-ACCESS "float trap greater or less")
+(trap-immed fti ue F OP_1D Fue FR-ACCESS "float trap unordered or equal")
+(trap-immed fti ul F OP_1D Ful FR-ACCESS "float trap unordered or less")
+(trap-immed fti ge F OP_1D Fge FR-ACCESS "float trap greater or equal")
+(trap-immed fti lt F OP_1D Flt FR-ACCESS "float trap less")
+(trap-immed fti uge F OP_1D Fuge FR-ACCESS "float trap unordered greater or equal")
+(trap-immed fti ug F OP_1D Fug FR-ACCESS "float trap unordered or greater")
+(trap-immed fti le F OP_1D Fle FR-ACCESS "float trap less or equal")
+(trap-immed fti gt F OP_1D Fgt FR-ACCESS "float trap greater")
+(trap-immed fti ule F OP_1D Fule FR-ACCESS "float trap unordered less or equal")
+(trap-immed fti u F OP_1D Fu FR-ACCESS "float trap unordered")
+(trap-immed fti o F OP_1D Fo FR-ACCESS "float trap ordered")
+
+(dni break
+ "break trap"
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1))
+ "break$pack"
+ (+ pack (rd-null) OP_04 (rs-null) (misc-null-3) OPE4_3 (GRj-null))
+ (sequence ()
+ ; This is defered to frv_break because for the breakpoint
+ ; case we want to change as little of the machine state as
+ ; possible.
+ ;
+ ; BPCSR=PC
+ ; BPSR.BS=PSR.S
+ ; BPSR.BET=PSR.ET
+ ; PSR.S=1
+ ; PSR.ET=0
+ ; TBR.TT=0xff
+ ; PC=TBR
+ ; We still should indicate what is modified by this insn.
+ (clobber (spr-bpcsr))
+ (clobber bpsr_bs)
+ (clobber bpsr_bet)
+ (clobber psr_s)
+ (clobber psr_et)
+ (clobber tbr_tt)
+ (c-call VOID "frv_break"))
+ ()
+)
+
+(dni mtrap
+ "media trap"
+ ((UNIT C) (FR500-MAJOR C-1) (FR400-MAJOR C-1) FR-ACCESS)
+ "mtrap$pack"
+ (+ pack (rd-null) OP_04 (rs-null) (misc-null-3) OPE4_2 (GRj-null))
+ (c-call VOID "frv_mtrap")
+ ()
+)
+
+(define-pmacro (condition-code-logic name operation ope comment)
+ (dni name
+ (comment)
+ ((UNIT B01) (FR500-MAJOR B-6) (FR400-MAJOR B-6))
+ (.str name "$pack $CRi,$CRj,$CRk")
+ (+ pack (misc-null-6) CRk OP_0A (misc-null-7) CRi ope (misc-null-8) CRj)
+ (set CRk (c-call UQI "@cpu@_cr_logic" operation CRi CRj))
+ ()
+ )
+)
+(define-pmacro (op-andcr) 0)
+(define-pmacro (op-orcr) 1)
+(define-pmacro (op-xorcr) 2)
+(define-pmacro (op-nandcr) 3)
+(define-pmacro (op-norcr) 4)
+(define-pmacro (op-andncr) 5)
+(define-pmacro (op-orncr) 6)
+(define-pmacro (op-nandncr) 7)
+(define-pmacro (op-norncr) 8)
+
+(define-pmacro (cr-true) 3)
+(define-pmacro (cr-false) 2)
+(define-pmacro (cr-undefined) 0)
+
+(condition-code-logic andcr (op-andcr) OPE1_08 "and condition code regs")
+(condition-code-logic orcr (op-orcr) OPE1_09 "or condition code regs")
+(condition-code-logic xorcr (op-xorcr) OPE1_0A "xor condition code regs")
+(condition-code-logic nandcr (op-nandcr) OPE1_0C "nand condition code regs")
+(condition-code-logic norcr (op-norcr) OPE1_0D "nor condition code regs")
+(condition-code-logic andncr (op-andncr) OPE1_10 "andn condition code regs")
+(condition-code-logic orncr (op-orncr) OPE1_11 "orn condition code regs")
+(condition-code-logic nandncr (op-nandncr) OPE1_14 "nandn condition code regs")
+(condition-code-logic norncr (op-norncr) OPE1_15 "norn condition code regs")
+
+(dni notcr
+ ("not cccr register")
+ ((UNIT B01) (FR500-MAJOR B-6) (FR400-MAJOR B-6))
+ (.str notcr "$pack $CRj,$CRk")
+ (+ pack (misc-null-6) CRk OP_0A (rs-null) OPE1_0B (misc-null-8) CRj)
+ (set CRk (xor CRj 1))
+ ()
+)
+
+(define-pmacro (check-semantics cond cr)
+ (if cond (set cr (cr-true)) (set cr (cr-false)))
+)
+
+(define-pmacro (check-int-condition-code prefix cc op cond comment)
+ (dni (.sym prefix cc)
+ (comment)
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5))
+ (.str (.sym prefix cc) "$pack $ICCi_3,$CRj_int")
+ (+ pack (.sym ICC_ cc) CRj_int op (misc-null-5) ICCi_3)
+ (check-semantics (cond ICCi_3) CRj_int)
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+ )
+)
+
+(dni ckra
+ "check integer cc always"
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5))
+ "ckra$pack $CRj_int"
+ (+ pack ICC_ra CRj_int OP_08 (misc-null-5) (ICCi_3-null))
+ (check-semantics (const BI 1) CRj_int)
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+)
+
+(dni ckno
+ "check integer cc never"
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5))
+ "ckno$pack $CRj_int"
+ (+ pack ICC_nev CRj_int OP_08 (misc-null-5) (ICCi_3-null))
+ (check-semantics (const BI 0) CRj_int)
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+)
+
+(check-int-condition-code ck eq OP_08 Ieq "check integer cc equal")
+(check-int-condition-code ck ne OP_08 Ine "check integer cc not equal")
+(check-int-condition-code ck le OP_08 Ile "check integer cc less or equal")
+(check-int-condition-code ck gt OP_08 Igt "check integer cc greater")
+(check-int-condition-code ck lt OP_08 Ilt "check integer cc less")
+(check-int-condition-code ck ge OP_08 Ige "check integer cc greater or equal")
+(check-int-condition-code ck ls OP_08 Ils "check integer cc less or equal unsigned")
+(check-int-condition-code ck hi OP_08 Ihi "check integer cc greater unsigned")
+(check-int-condition-code ck c OP_08 Ic "check integer cc carry set")
+(check-int-condition-code ck nc OP_08 Inc "check integer cc carry clear")
+(check-int-condition-code ck n OP_08 In "check integer cc negative")
+(check-int-condition-code ck p OP_08 Ip "check integer cc positive")
+(check-int-condition-code ck v OP_08 Iv "check integer cc overflow set")
+(check-int-condition-code ck nv OP_08 Inv "check integer cc overflow clear")
+
+(define-pmacro (check-float-condition-code prefix cc op cond comment)
+ (dni (.sym prefix cc)
+ (comment)
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5) FR-ACCESS)
+ (.str (.sym prefix cc) "$pack $FCCi_3,$CRj_float")
+ (+ pack (.sym FCC_ cc) CRj_float op (misc-null-5) FCCi_3)
+ (check-semantics (cond FCCi_3) CRj_float)
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+ )
+)
+
+(dni fckra
+ "check float cc always"
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5) FR-ACCESS)
+ "fckra$pack $CRj_float"
+ (+ pack FCC_ra CRj_float OP_09 (misc-null-5) FCCi_3)
+ (check-semantics (const BI 1) CRj_float)
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+)
+
+(dni fckno
+ "check float cc never"
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5) FR-ACCESS)
+ "fckno$pack $CRj_float"
+ (+ pack FCC_nev CRj_float OP_09 (misc-null-5) FCCi_3)
+ (check-semantics (const BI 0) CRj_float)
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+)
+
+(check-float-condition-code fck ne OP_09 Fne "check float cc not equal")
+(check-float-condition-code fck eq OP_09 Feq "check float cc equal")
+(check-float-condition-code fck lg OP_09 Flg "check float cc greater or less")
+(check-float-condition-code fck ue OP_09 Fue "check float cc unordered or equal")
+(check-float-condition-code fck ul OP_09 Ful "check float cc unordered or less")
+(check-float-condition-code fck ge OP_09 Fge "check float cc greater or equal")
+(check-float-condition-code fck lt OP_09 Flt "check float cc less")
+(check-float-condition-code fck uge OP_09 Fuge "check float cc unordered greater or equal")
+(check-float-condition-code fck ug OP_09 Fug "check float cc unordered or greater")
+(check-float-condition-code fck le OP_09 Fle "check float cc less or equal")
+(check-float-condition-code fck gt OP_09 Fgt "check float cc greater")
+(check-float-condition-code fck ule OP_09 Fule "check float cc unordered less or equal")
+(check-float-condition-code fck u OP_09 Fu "check float cc unordered")
+(check-float-condition-code fck o OP_09 Fo "check float cc ordered")
+
+(define-pmacro (conditional-check-int-condition-code prefix cc op ope test comment)
+ (dni (.sym prefix cc)
+ (comment)
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5) CONDITIONAL)
+ (.str (.sym prefix cc) "$pack $ICCi_3,$CRj_int,$CCi,$cond")
+ (+ pack (.sym ICC_ cc) CRj_int op (rs-null) CCi cond ope
+ (misc-null-9) ICCi_3)
+ (if (eq CCi (or cond 2))
+ (check-semantics (test ICCi_3) CRj_int)
+ (set CRj_int (cr-undefined)))
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+ )
+)
+
+(dni cckra
+ "conditional check integer cc always"
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5) CONDITIONAL)
+ "cckra$pack $CRj_int,$CCi,$cond"
+ (+ pack ICC_ra CRj_int OP_6A (rs-null) CCi cond OPE4_0
+ (misc-null-9) (ICCi_3-null))
+ (if (eq CCi (or cond 2))
+ (check-semantics (const BI 1) CRj_int)
+ (set CRj_int (cr-undefined)))
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+)
+
+(dni cckno
+ "conditional check integer cc never"
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5) CONDITIONAL)
+ "cckno$pack $CRj_int,$CCi,$cond"
+ (+ pack ICC_nev CRj_int OP_6A (rs-null) CCi cond OPE4_0
+ (misc-null-9) (ICCi_3-null))
+ (if (eq CCi (or cond 2))
+ (check-semantics (const BI 0) CRj_int)
+ (set CRj_int (cr-undefined)))
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+)
+
+(conditional-check-int-condition-code cck eq OP_6A OPE4_0 Ieq "check integer cc equal")
+(conditional-check-int-condition-code cck ne OP_6A OPE4_0 Ine "check integer cc not equal")
+(conditional-check-int-condition-code cck le OP_6A OPE4_0 Ile "check integer cc less or equal")
+(conditional-check-int-condition-code cck gt OP_6A OPE4_0 Igt "check integer cc greater")
+(conditional-check-int-condition-code cck lt OP_6A OPE4_0 Ilt "check integer cc less")
+(conditional-check-int-condition-code cck ge OP_6A OPE4_0 Ige "check integer cc greater or equal")
+(conditional-check-int-condition-code cck ls OP_6A OPE4_0 Ils "check integer cc less or equal unsigned")
+(conditional-check-int-condition-code cck hi OP_6A OPE4_0 Ihi "check integer cc greater unsigned")
+(conditional-check-int-condition-code cck c OP_6A OPE4_0 Ic "check integer cc carry set")
+(conditional-check-int-condition-code cck nc OP_6A OPE4_0 Inc "check integer cc carry clear")
+(conditional-check-int-condition-code cck n OP_6A OPE4_0 In "check integer cc negative")
+(conditional-check-int-condition-code cck p OP_6A OPE4_0 Ip "check integer cc positive")
+(conditional-check-int-condition-code cck v OP_6A OPE4_0 Iv "check integer cc overflow set")
+(conditional-check-int-condition-code cck nv OP_6A OPE4_0 Inv "check integer cc overflow clear")
+
+(define-pmacro (conditional-check-float-condition-code prefix cc op ope test comment)
+ (dni (.sym prefix cc)
+ (comment)
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5) CONDITIONAL FR-ACCESS)
+ (.str (.sym prefix cc) "$pack $FCCi_3,$CRj_float,$CCi,$cond")
+ (+ pack (.sym FCC_ cc) CRj_float op (rs-null) CCi cond ope
+ (misc-null-9) FCCi_3)
+ (if (eq CCi (or cond 2))
+ (check-semantics (test FCCi_3) CRj_float)
+ (set CRj_float (cr-undefined)))
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+ )
+)
+
+(dni cfckra
+ "conditional check float cc always"
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5) CONDITIONAL FR-ACCESS)
+ "cfckra$pack $CRj_float,$CCi,$cond"
+ (+ pack FCC_ra CRj_float OP_6A (rs-null) CCi cond OPE4_1
+ (misc-null-9) (FCCi_3-null))
+ (if (eq CCi (or cond 2))
+ (check-semantics (const BI 1) CRj_float)
+ (set CRj_float (cr-undefined)))
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+)
+
+(dni cfckno
+ "conditional check float cc never"
+ ((UNIT B01) (FR500-MAJOR B-5) (FR400-MAJOR B-5) CONDITIONAL FR-ACCESS)
+ "cfckno$pack $CRj_float,$CCi,$cond"
+ (+ pack FCC_nev CRj_float OP_6A (rs-null) CCi cond OPE4_1
+ (misc-null-9) (FCCi_3-null))
+ (if (eq CCi (or cond 2))
+ (check-semantics (const BI 0) CRj_float)
+ (set CRj_float (cr-undefined)))
+ ((fr400 (unit u-check))
+ (fr500 (unit u-check)))
+)
+
+(conditional-check-float-condition-code cfck ne OP_6A OPE4_1 Fne "check float cc not equal")
+(conditional-check-float-condition-code cfck eq OP_6A OPE4_1 Feq "check float cc equal")
+(conditional-check-float-condition-code cfck lg OP_6A OPE4_1 Flg "check float cc greater or less")
+(conditional-check-float-condition-code cfck ue OP_6A OPE4_1 Fue "check float cc unordered or equal")
+(conditional-check-float-condition-code cfck ul OP_6A OPE4_1 Ful "check float cc unordered or less")
+(conditional-check-float-condition-code cfck ge OP_6A OPE4_1 Fge "check float cc greater or equal")
+(conditional-check-float-condition-code cfck lt OP_6A OPE4_1 Flt "check float cc less")
+(conditional-check-float-condition-code cfck uge OP_6A OPE4_1 Fuge "check float cc unordered greater or equal")
+(conditional-check-float-condition-code cfck ug OP_6A OPE4_1 Fug "check float cc unordered or greater")
+(conditional-check-float-condition-code cfck le OP_6A OPE4_1 Fle "check float cc less or equal")
+(conditional-check-float-condition-code cfck gt OP_6A OPE4_1 Fgt "check float cc greater")
+(conditional-check-float-condition-code cfck ule OP_6A OPE4_1 Fule "check float cc unordered less or equal")
+(conditional-check-float-condition-code cfck u OP_6A OPE4_1 Fu "check float cc unordered")
+(conditional-check-float-condition-code cfck o OP_6A OPE4_1 Fo "check float cc ordered")
+
+(dni cjmpl
+ "conditional jump and link"
+ ((UNIT I0) (FR500-MAJOR I-5) (FR400-MAJOR I-5) CONDITIONAL)
+ "cjmpl$pack @($GRi,$GRj),$CCi,$cond"
+ (+ pack (misc-null-1) (LI-off) OP_6A GRi CCi cond OPE4_2 GRj)
+ (if (eq CCi (or cond 2))
+ (jump-and-link-semantics GRi GRj LI))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(dni ccalll
+ "conditional call and link"
+ ((UNIT I0) (FR500-MAJOR I-5) (FR400-MAJOR I-5) CONDITIONAL)
+ "ccalll$pack @($GRi,$GRj),$CCi,$cond"
+ (+ pack (misc-null-1) (LI-on) OP_6A GRi CCi cond OPE4_2 GRj)
+ (if (eq CCi (or cond 2))
+ (jump-and-link-semantics GRi GRj LI))
+ ((fr400 (unit u-branch))
+ (fr500 (unit u-branch)))
+)
+
+(define-pmacro (cache-invalidate name cache all op ope profile comment)
+ (dni name
+ (comment)
+ ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2))
+ (.str name "$pack @($GRi,$GRj)")
+ (+ pack (rd-null) op GRi ope GRj)
+ (c-call VOID (.str "@cpu@_" cache "_cache_invalidate") (add GRi GRj) all)
+ profile
+ )
+)
+
+(cache-invalidate ici insn 0 OP_03 OPE1_38
+ ((fr400 (unit u-ici)) (fr500 (unit u-ici)))
+ "invalidate insn cache")
+(cache-invalidate dci data 0 OP_03 OPE1_3C
+ ((fr400 (unit u-dci)) (fr500 (unit u-dci)))
+ "invalidate data cache")
+
+(define-pmacro (cache-invalidate-entry name cache op ope profile comment)
+ (dni name
+ (comment)
+ ((UNIT C) (FR400-MAJOR C-2) (MACH fr400))
+ (.str name "$pack @($GRi,$GRj),$ae")
+ (+ pack (misc-null-1) ae op GRi ope GRj)
+ (if (eq ae 0)
+ (c-call VOID (.str "@cpu@_" cache "_cache_invalidate") (add GRi GRj) -1) ; Invalid ae setting for this insn
+ (c-call VOID (.str "@cpu@_" cache "_cache_invalidate") (add GRi GRj) ae))
+ profile
+ )
+)
+
+(cache-invalidate-entry icei insn OP_03 OPE1_39
+ ((fr400 (unit u-ici)))
+ "invalidate insn cache entry")
+(cache-invalidate-entry dcei data OP_03 OPE1_3A
+ ((fr400 (unit u-dci)))
+ "invalidate data cache entry")
+
+(dni dcf
+ "Data cache flush"
+ ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2))
+ "dcf$pack @($GRi,$GRj)"
+ (+ pack (rd-null) OP_03 GRi OPE1_3D GRj)
+ (c-call VOID "@cpu@_data_cache_flush" (add GRi GRj) 0)
+ ((fr400 (unit u-dcf))
+ (fr500 (unit u-dcf)))
+)
+
+(dni dcef
+ "Data cache entry flush"
+ ((UNIT C) (FR400-MAJOR C-2) (MACH fr400))
+ "dcef$pack @($GRi,$GRj),$ae"
+ (+ pack (misc-null-1) ae OP_03 GRi OPE1_3B GRj)
+ (if (eq ae 0)
+ (c-call VOID "@cpu@_data_cache_flush" (add GRi GRj) -1)
+ (c-call VOID "@cpu@_data_cache_flush" (add GRi GRj) ae))
+ ((fr400 (unit u-dcf)))
+)
+
+(define-pmacro (write-TLB name insn op ope comment)
+ (dni name
+ (comment)
+ ((UNIT C) (FR500-MAJOR C-2) (MACH frv) PRIVILEGED)
+ (.str insn "$pack $GRk,@($GRi,$GRj)")
+ (+ pack GRk op GRi ope GRj)
+ (nop) ; for now
+ ()
+ )
+)
+
+(write-TLB witlb witlb OP_03 OPE1_32 "write for insn TLB")
+(write-TLB wdtlb wdtlb OP_03 OPE1_36 "write for data TLB")
+
+(define-pmacro (invalidate-TLB name insn op ope comment)
+ (dni name
+ (comment)
+ ((UNIT C) (FR500-MAJOR C-2) (MACH frv) PRIVILEGED)
+ (.str insn "$pack @($GRi,$GRj)")
+ (+ pack (rd-null) op GRi ope GRj)
+ (nop) ; for now
+ ()
+ )
+)
+
+(invalidate-TLB itlbi itlbi OP_03 OPE1_33 "invalidate insn TLB")
+(invalidate-TLB dtlbi dtlbi OP_03 OPE1_37 "invalidate data TLB")
+
+(define-pmacro (cache-preload name cache op ope profile comment)
+ (dni name
+ (comment)
+ ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2))
+ (.str name "$pack $GRi,$GRj,$lock")
+ (+ pack (misc-null-1) lock op GRi ope GRj)
+ (c-call VOID (.str "@cpu@_" cache "_cache_preload") GRi GRj lock)
+ profile
+ )
+)
+
+(cache-preload icpl insn OP_03 OPE1_30
+ ((fr400 (unit u-icpl)) (fr500 (unit u-icpl)))
+ "preload insn cache")
+(cache-preload dcpl data OP_03 OPE1_34
+ ((fr400 (unit u-dcpl)) (fr500 (unit u-dcpl)))
+ "preload data cache")
+
+(define-pmacro (cache-unlock name cache op ope profile comment)
+ (dni name
+ (comment)
+ ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2))
+ (.str name "$pack $GRi")
+ (+ pack (rd-null) op GRi ope (GRj-null))
+ (c-call VOID (.str "@cpu@_" cache "_cache_unlock") GRi)
+ profile
+ )
+)
+
+(cache-unlock icul insn OP_03 OPE1_31
+ ((fr400 (unit u-icul)) (fr500 (unit u-icul)))
+ "unlock insn cache")
+(cache-unlock dcul data OP_03 OPE1_35
+ ((fr400 (unit u-dcul)) (fr500 (unit u-dcul)))
+ "unlock data cache")
+
+(define-pmacro (barrier name insn op ope profile comment)
+ (dni name
+ (comment)
+ ((UNIT C) (FR500-MAJOR C-2) (FR400-MAJOR C-2))
+ (.str insn "$pack")
+ (+ pack (rd-null) op (rs-null) ope (GRj-null))
+ (nop) ; sufficient implementation
+ profile
+ )
+)
+
+(barrier bar bar OP_03 OPE1_3E
+ ((fr400 (unit u-barrier)) (fr500 (unit u-barrier)))
+ "barrier")
+(barrier membar membar OP_03 OPE1_3F
+ ((fr400 (unit u-membar)) (fr500 (unit u-membar)))
+ "memory barrier")
+
+; Coprocessor operations
+(define-pmacro (cop-op num op)
+ (dni (.sym cop num)
+ "Coprocessor operation"
+ ((UNIT C) (FR500-MAJOR C-2) (MACH frv))
+ (.str "cop" num "$pack $s6_1,$CPRi,$CPRj,$CPRk")
+ (+ pack CPRk op CPRi s6_1 CPRj)
+ (nop) ; sufficient implementation
+ ()
+ )
+)
+
+(cop-op 1 OP_7E)
+(cop-op 2 OP_7F)
+
+(define-pmacro (clear-ne-flag-semantics target_index is_float)
+ (c-call VOID "@cpu@_clear_ne_flags" target_index is_float)
+)
+
+(define-pmacro (clear-ne-flag-r name op ope reg is_float attr comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-6) (MACH simple,tomcat,fr500,frv) attr)
+ (.str name "$pack $" reg "k")
+ (+ pack (.sym reg k) op (rs-null) ope (GRj-null))
+ (clear-ne-flag-semantics (index-of (.sym reg k)) is_float)
+ ()
+ )
+)
+
+(clear-ne-flag-r clrgr OP_0A OPE1_00 GR 0 NA "Clear GR NE flag")
+(clear-ne-flag-r clrfr OP_0A OPE1_02 FR 1 FR-ACCESS "Clear FR NE flag")
+
+(define-pmacro (clear-ne-flag-all name op ope is_float attr comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-6) (MACH simple,tomcat,fr500,frv) attr)
+ (.str name "$pack")
+ (+ pack (rd-null) op (rs-null) ope (GRj-null))
+ (clear-ne-flag-semantics -1 is_float)
+ ()
+ )
+)
+
+(clear-ne-flag-all clrga OP_0A OPE1_01 0 NA "Clear GR NE flag ALL")
+(clear-ne-flag-all clrfa OP_0A OPE1_03 1 FR-ACCESS "Clear FR NE flag ALL")
+
+(define-pmacro (commit-semantics target_index is_float)
+ (c-call VOID "@cpu@_commit" target_index is_float)
+)
+
+(define-pmacro (commit-r name op ope reg is_float attr comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-6) (MACH frv,fr500) attr)
+ (.str name "$pack $" reg "k")
+ (+ pack (.sym reg k) op (rs-null) ope (GRj-null))
+ (commit-semantics (index-of (.sym reg k)) is_float)
+ ()
+ )
+)
+
+(commit-r commitgr OP_0A OPE1_04 GR 0 NA "commit exceptions, specific GR")
+(commit-r commitfr OP_0A OPE1_06 FR 1 FR-ACCESS "commit exceptions, specific FR")
+
+(define-pmacro (commit name op ope is_float attr comment)
+ (dni name
+ (comment)
+ ((UNIT I01) (FR500-MAJOR I-6) (MACH frv,fr500) attr)
+ (.str name "$pack")
+ (+ pack (rd-null) op (rs-null) ope (GRj-null))
+ (commit-semantics -1 is_float)
+ ()
+ )
+)
+
+(commit commitga OP_0A OPE1_05 0 NA "commit exceptions, any GR")
+(commit commitfa OP_0A OPE1_07 1 FR-ACCESS "commit exceptions, any FR")
+
+(define-pmacro (floating-point-conversion
+ name op ope conv mode src targ attr comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv) attr)
+ (.str name "$pack $" src ",$" targ)
+ (+ pack targ op (rs-null) ope src)
+ (set targ (conv mode src))
+ ((fr500 (unit u-float-convert)))
+ )
+)
+
+(floating-point-conversion fitos OP_79 OPE1_00 float SF FRintj FRk NA "Convert Integer to Single")
+(floating-point-conversion fstoi OP_79 OPE1_01 fix SI FRj FRintk NA "Convert Single to Integer")
+(floating-point-conversion fitod OP_7A OPE1_00 float DF FRintj FRdoublek (MACH frv) "Convert Integer to Double")
+(floating-point-conversion fdtoi OP_7A OPE1_01 fix SI FRdoublej FRintk (MACH frv) "Convert Double to Integer")
+
+(define-pmacro (floating-point-dual-conversion
+ name op ope conv mode src src_hw targ targ_hw attr comment)
+ (dni name
+ (comment)
+ ((MACH frv) (UNIT FM01) (FR500-MAJOR F-1) attr)
+ (.str name "$pack $" src ",$" targ)
+ (+ pack targ op (rs-null) ope src)
+ (sequence ()
+ (set targ (conv mode src))
+ (set (nextreg targ_hw targ 1)
+ (conv mode (nextreg src_hw src 1))))
+ ((fr500 (unit u-float-dual-convert)))
+ )
+)
+
+(floating-point-dual-conversion fditos OP_79 OPE1_10 float SF FRintj h-fr_int FRk h-fr NA "Dual Convert Integer to Single")
+(floating-point-dual-conversion fdstoi OP_79 OPE1_11 fix SI FRj h-fr FRintk h-fr_int NA "Dual Convert Single to Integer")
+
+(define-pmacro (ne-floating-point-dual-conversion
+ name op ope conv mode src src_hw targ targ_hw attr comment)
+ (dni name
+ (comment)
+ ((MACH frv) (UNIT FM01) (FR500-MAJOR F-1) NON-EXCEPTING attr)
+ (.str name "$pack $" src ",$" targ)
+ (+ pack targ op (rs-null) ope src)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of targ))
+ (set targ (conv mode src))
+ (c-call VOID "@cpu@_set_ne_index" (add (index-of targ) 1))
+ (set (nextreg targ_hw targ 1)
+ (conv mode (nextreg src_hw src 1))))
+ ((fr500 (unit u-float-dual-convert)))
+ )
+)
+
+(ne-floating-point-dual-conversion nfditos OP_79 OPE1_30 float SF FRintj h-fr_int FRk h-fr NA "Non excepting dual Convert Integer to Single")
+(ne-floating-point-dual-conversion nfdstoi OP_79 OPE1_31 fix SI FRj h-fr FRintk h-fr_int NA "Non excepting dual Convert Single to Integer")
+
+(define-pmacro (conditional-floating-point-conversion
+ name op ope conv mode src targ comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack $" src ",$" targ ",$CCi,$cond")
+ (+ pack targ op (rs-null) CCi cond ope src)
+ (if (eq CCi (or cond 2))
+ (set targ (conv mode src)))
+ ((fr500 (unit u-float-convert)))
+ )
+)
+
+(conditional-floating-point-conversion cfitos OP_6B OPE4_0 float SF FRintj FRk "Conditional convert Integer to Single")
+(conditional-floating-point-conversion cfstoi OP_6B OPE4_1 fix SI FRj FRintk "Conditional convert Single to Integer")
+
+(define-pmacro (ne-floating-point-conversion
+ name op ope conv mode src targ comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack $" src ",$" targ)
+ (+ pack targ op (rs-null) ope src)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of targ))
+ (set targ (conv mode src)))
+ ((fr500 (unit u-float-convert)))
+ )
+)
+
+(ne-floating-point-conversion nfitos OP_79 OPE1_20 float SF FRintj FRk "NE convert Integer to Single")
+(ne-floating-point-conversion nfstoi OP_79 OPE1_21 fix SI FRj FRintk "NE convert Single to Integer")
+
+(register-transfer fmovs OP_79 OPE1_02
+ FRj FRk FM01 (FR500-MAJOR F-1) NA
+ (MACH simple,tomcat,fr500,frv) NA
+ ((fr500 (unit u-fr2fr)))
+ "Move Single Float")
+(register-transfer fmovd OP_7A OPE1_02
+ ; TODO -- unit doesn't handle extra register
+ FRdoublej FRdoublek FM01 (FR500-MAJOR F-1) NA
+ (MACH frv) NA
+ ((fr500 (unit u-fr2fr)))
+ "Move Double Float")
+
+(dni fdmovs
+ "Dual move single float"
+ ((MACH frv) (UNIT FM01) (FR500-MAJOR F-1))
+ "fdmovs$pack $FRj,$FRk"
+ (+ pack FRk OP_79 (rs-null) OPE1_12 FRj)
+ (sequence ()
+ (set FRk FRj)
+ (set (nextreg h-fr FRk 1) (nextreg h-fr FRj 1)))
+ ; TODO -- unit doesn't handle extra register
+ ((fr500 (unit u-fr2fr)))
+)
+
+(conditional-register-transfer cfmovs OP_6C OPE4_0 FRj FRk FM01
+ (FR500-MAJOR F-1) NA
+ (MACH simple,tomcat,fr500,frv)
+ ((fr500 (unit u-fr2fr)))
+ "Conditional move Single Float")
+
+(define-pmacro (floating-point-neg name src targ op ope attr comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-1) attr)
+ (.str name "$pack $" src ",$" targ)
+ (+ pack src op (rs-null) ope targ)
+ (set targ (neg src))
+ ((fr500 (unit u-float-arith)))
+ )
+)
+
+(floating-point-neg fnegs FRj FRk OP_79 OPE1_03 (MACH simple,tomcat,fr500,frv) "Floating point negate, single")
+(floating-point-neg fnegd FRdoublej FRdoublek OP_7A OPE1_03 (MACH frv) "Floating point negate, double")
+
+(dni fdnegs
+ "Floating point dual negate, single"
+ ((MACH frv) (UNIT FM01) (FR500-MAJOR F-1))
+ "fdnegs$pack $FRj,$FRk"
+ (+ pack FRk OP_79 (rs-null) OPE1_13 FRj)
+ (sequence ()
+ (set FRk (neg FRj))
+ (set (nextreg h-fr FRk 1) (neg (nextreg h-fr FRj 1))))
+ ((fr500 (unit u-float-dual-arith)))
+)
+
+(dni cfnegs
+ "Conditional floating point negate, single"
+ ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
+ "cfnegs$pack $FRj,$FRk,$CCi,$cond"
+ (+ pack FRj OP_6C (rs-null) CCi cond OPE4_1 FRk)
+ (if (eq CCi (or cond 2))
+ (set FRk (neg FRj)))
+ ((fr500 (unit u-float-arith)))
+)
+
+(define-pmacro (float-abs name src targ op ope attr comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-1) attr)
+ (.str name "$pack $" src ",$" targ )
+ (+ pack targ op (rs-null) ope src)
+ (set targ (abs src))
+ ((fr500 (unit u-float-arith)))
+ )
+)
+
+(float-abs fabss FRj FRk OP_79 OPE1_04 (MACH simple,tomcat,fr500,frv) "Float absolute value, single")
+(float-abs fabsd FRdoublej FRdoublek OP_7A OPE1_04 (MACH frv) "Float absolute value, double")
+
+(dni fdabss
+ "Floating point dual absolute value, single"
+ ((MACH frv) (UNIT FM01) (FR500-MAJOR F-1))
+ "fdabss$pack $FRj,$FRk"
+ (+ pack FRk OP_79 (rs-null) OPE1_14 FRj)
+ (sequence ()
+ (set FRk (abs FRj))
+ (set (nextreg h-fr FRk 1) (abs (nextreg h-fr FRj 1))))
+ ((fr500 (unit u-float-dual-arith)))
+)
+
+(dni cfabss
+ "Conditional floating point absolute value, single"
+ ((UNIT FM01) (FR500-MAJOR F-1) (MACH simple,tomcat,fr500,frv))
+ "cfabss$pack $FRj,$FRk,$CCi,$cond"
+ (+ pack FRj OP_6C (rs-null) CCi cond OPE4_2 FRk)
+ (if (eq CCi (or cond 2))
+ (set FRk (abs FRj)))
+ ((fr500 (unit u-float-arith)))
+)
+
+(dni fsqrts
+ "Square root single"
+ ((UNIT FM01) (FR500-MAJOR F-4) (MACH simple,tomcat,fr500,frv))
+ "fsqrts$pack $FRj,$FRk"
+ (+ pack FRk OP_79 (rs-null) OPE1_05 FRj)
+ (set FRk (sqrt SF FRj))
+ ((fr500 (unit u-float-sqrt)))
+)
+
+(dni fdsqrts
+ "Dual square root single"
+ ((MACH frv) (UNIT FM01) (FR500-MAJOR F-4))
+ "fdsqrts$pack $FRj,$FRk"
+ (+ pack FRk OP_79 (rs-null) OPE1_15 FRj)
+ (sequence ()
+ (set FRk (sqrt SF FRj))
+ (set (nextreg h-fr FRk 1) (sqrt (nextreg h-fr FRj 1))))
+ ((fr500 (unit u-float-dual-sqrt)))
+)
+
+(dni nfdsqrts
+ "Non excepting Dual square root single"
+ ((MACH frv) (UNIT FM01) (FR500-MAJOR F-4) NON-EXCEPTING)
+ "nfdsqrts$pack $FRj,$FRk"
+ (+ pack FRk OP_79 (rs-null) OPE1_35 FRj)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of FRk))
+ (set FRk (sqrt SF FRj))
+ (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1))
+ (set (nextreg h-fr FRk 1) (sqrt (nextreg h-fr FRj 1))))
+ ((fr500 (unit u-float-dual-sqrt)))
+)
+
+(dni fsqrtd
+ "Square root double"
+ ((UNIT FM01) (FR500-MAJOR F-4) (MACH frv))
+ "fsqrtd$pack $FRdoublej,$FRdoublek"
+ (+ pack FRdoublek OP_7A (rs-null) OPE1_05 FRdoublej)
+ (set FRdoublek (sqrt DF FRdoublej))
+ ((fr500 (unit u-float-sqrt)))
+)
+
+(dni cfsqrts
+ "Conditional square root single"
+ ((UNIT FM01) (FR500-MAJOR F-4) (MACH simple,tomcat,fr500,frv))
+ "cfsqrts$pack $FRj,$FRk,$CCi,$cond"
+ (+ pack FRk OP_6E (rs-null) CCi cond OPE4_2 FRj)
+ (if (eq CCi (or cond 2))
+ (set FRk (sqrt SF FRj)))
+ ((fr500 (unit u-float-sqrt)))
+)
+
+(dni nfsqrts
+ "Non exception square root, single"
+ ((UNIT FM01) (FR500-MAJOR F-4) (MACH simple,tomcat,fr500,frv))
+ "nfsqrts$pack $FRj,$FRk"
+ (+ pack FRk OP_79 (rs-null) OPE1_25 FRj)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of FRk))
+ (set FRk (sqrt SF FRj)))
+ ((fr500 (unit u-float-sqrt)))
+)
+
+(define-pmacro (float-binary-op-s name operation op ope major comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack $FRi,$FRj,$FRk")
+ (+ pack FRk op FRi ope FRj)
+ (set FRk (operation FRi FRj))
+ ((fr500 (unit u-float-arith)))
+ )
+)
+
+(float-binary-op-s fadds add OP_79 OPE1_06 F-2 "add single float")
+(float-binary-op-s fsubs sub OP_79 OPE1_07 F-2 "sub single float")
+(float-binary-op-s fmuls mul OP_79 OPE1_08 F-3 "mul single float")
+
+(dni fdivs
+ "div single float"
+ ((UNIT FM01) (FR500-MAJOR F-4) (MACH simple,tomcat,fr500,frv))
+ "fdivs$pack $FRi,$FRj,$FRk"
+ (+ pack FRk OP_79 FRi OPE1_09 FRj)
+ (set FRk (div FRi FRj))
+ ((fr500 (unit u-float-div)))
+)
+
+(define-pmacro (float-binary-op-d name operation op ope major comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR major) (MACH frv))
+ (.str name "$pack $FRdoublei,$FRdoublej,$FRdoublek")
+ (+ pack FRdoublek op FRdoublei ope FRdoublej)
+ (set FRdoublek (operation FRdoublei FRdoublej))
+ ((fr500 (unit u-float-arith)))
+ )
+)
+
+(float-binary-op-d faddd add OP_7A OPE1_06 F-2 "add double float")
+(float-binary-op-d fsubd sub OP_7A OPE1_07 F-2 "sub double float")
+(float-binary-op-d fmuld mul OP_7A OPE1_08 F-3 "mul double float")
+(float-binary-op-d fdivd div OP_7A OPE1_09 F-4 "div double float")
+
+(define-pmacro (conditional-float-binary-op name operation op ope major comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack $FRi,$FRj,$FRk,$CCi,$cond")
+ (+ pack FRk op FRi CCi cond ope FRj)
+ (if (eq CCi (or cond 2))
+ (set FRk (operation FRi FRj)))
+ ((fr500 (unit u-float-arith)))
+ )
+)
+
+(conditional-float-binary-op cfadds add OP_6D OPE4_0 F-2 "cond add single")
+(conditional-float-binary-op cfsubs sub OP_6D OPE4_1 F-2 "cond sub single")
+(conditional-float-binary-op cfmuls mul OP_6E OPE4_0 F-3 "cond mul single")
+(conditional-float-binary-op cfdivs div OP_6E OPE4_1 F-4 "cond div single")
+
+(define-pmacro (ne-float-binary-op name operation op ope major comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR major) (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack $FRi,$FRj,$FRk")
+ (+ pack FRk op FRi ope FRj)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of FRk))
+ (set FRk (operation FRi FRj)))
+ ((fr500 (unit u-float-arith)))
+ )
+)
+
+(ne-float-binary-op nfadds add OP_79 OPE1_26 F-2 "ne add single")
+(ne-float-binary-op nfsubs sub OP_79 OPE1_27 F-2 "ne sub single")
+(ne-float-binary-op nfmuls mul OP_79 OPE1_28 F-3 "ne mul single")
+(ne-float-binary-op nfdivs div OP_79 OPE1_29 F-4 "ne div single")
+
+(define-pmacro (fcc-eq) 8)
+(define-pmacro (fcc-lt) 4)
+(define-pmacro (fcc-gt) 2)
+(define-pmacro (fcc-uo) 1)
+
+(define-pmacro (compare-and-set-fcc arg1 arg2 fcc)
+ (if (gt arg1 arg2)
+ (set fcc (fcc-gt))
+ (if (eq arg1 arg2)
+ (set fcc (fcc-eq))
+ (if (lt arg1 arg2)
+ (set fcc (fcc-lt))
+ (set fcc (fcc-uo)))))
+)
+
+(dni fcmps
+ "compare single float"
+ ((UNIT FM01) (FR500-MAJOR F-2) (MACH simple,tomcat,fr500,frv))
+ "fcmps$pack $FRi,$FRj,$FCCi_2"
+ (+ pack (cond-null) FCCi_2 OP_79 FRi OPE1_0A FRj)
+ (compare-and-set-fcc FRi FRj FCCi_2)
+ ((fr500 (unit u-float-compare)))
+)
+
+(dni fcmpd
+ "compare double float"
+ ((UNIT FM01) (FR500-MAJOR F-2) (MACH frv))
+ "fcmpd$pack $FRdoublei,$FRdoublej,$FCCi_2"
+ (+ pack (cond-null) FCCi_2 OP_7A FRdoublei OPE1_0A FRdoublej)
+ (compare-and-set-fcc FRdoublei FRdoublej FCCi_2)
+ ((fr500 (unit u-float-compare)))
+)
+
+(dni cfcmps
+ "Conditional compare single, float"
+ ((UNIT FM01) (FR500-MAJOR F-2) (MACH simple,tomcat,fr500,frv))
+ "cfcmps$pack $FRi,$FRj,$FCCi_2,$CCi,$cond"
+ (+ pack (cond-null) FCCi_2 OP_6D FRi CCi cond OPE4_2 FRj)
+ (if (eq CCi (or cond 2))
+ (compare-and-set-fcc FRi FRj FCCi_2))
+ ((fr500 (unit u-float-compare)))
+)
+
+(dni fdcmps
+ "float dual compare single"
+ ((UNIT FM01) (FR500-MAJOR F-6) (MACH simple,tomcat,fr500,frv))
+ "fdcmps$pack $FRi,$FRj,$FCCi_2"
+ (+ pack (cond-null) FCCi_2 OP_79 FRi OPE1_1A FRj)
+ (sequence ()
+ (compare-and-set-fcc FRi FRj FCCi_2)
+ (compare-and-set-fcc (nextreg h-fr FRi 1) (nextreg h-fr FRj 1)
+ (nextreg h-fccr FCCi_2 1)))
+ ((fr500 (unit u-float-dual-compare)))
+)
+
+(define-pmacro (float-mul-with-add name add_sub arg1 arg2 targ op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv))
+ (.str name "$pack $" arg1 ",$" arg2 ",$" targ)
+ (+ pack targ op arg1 ope arg2)
+ (set targ (add_sub (mul arg1 arg2) targ))
+ ((fr500 (unit u-float-dual-arith)))
+ )
+)
+
+(float-mul-with-add fmadds add FRi FRj FRk OP_79 OPE1_0B "mul with add, single")
+(float-mul-with-add fmsubs sub FRi FRj FRk OP_79 OPE1_0C "mul with sub, single")
+
+(float-mul-with-add fmaddd add FRdoublei FRdoublej FRdoublek OP_7A OPE1_0B "mul with add, double")
+(float-mul-with-add fmsubd sub FRdoublei FRdoublej FRdoublek OP_7A OPE1_0C "mul with sub, double")
+
+(dni fdmadds
+ "Float dual multiply with add"
+ ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv))
+ "fdmadds$pack $FRi,$FRj,$FRk"
+ (+ pack FRk OP_79 FRi OPE1_1B FRj)
+ (sequence ()
+ (set FRk (add (mul FRi FRj) FRk))
+ (set (nextreg h-fr FRk 1)
+ (add (mul (nextreg h-fr FRi 1) (nextreg h-fr FRj 1))
+ (nextreg h-fr FRk 1))))
+ ; TODO dual registers not referenced for profiling
+ ((fr500 (unit u-float-dual-arith)))
+)
+
+(dni nfdmadds
+ "Non excepting float dual multiply with add"
+ ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv))
+ "nfdmadds$pack $FRi,$FRj,$FRk"
+ (+ pack FRk OP_79 FRi OPE1_3B FRj)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of FRk))
+ (set FRk (add (mul FRi FRj) FRk))
+ (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1))
+ (set (nextreg h-fr FRk 1)
+ (add (mul (nextreg h-fr FRi 1) (nextreg h-fr FRj 1))
+ (nextreg h-fr FRk 1))))
+ ; TODO dual registers not referenced for profiling
+ ((fr500 (unit u-float-dual-arith)))
+)
+
+(define-pmacro (conditional-float-mul-with-add
+ name add_sub arg1 arg2 targ op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv) CONDITIONAL)
+ (.str name "$pack $FRi,$FRj,$FRk,$CCi,$cond")
+ (+ pack FRk op FRi CCi cond ope FRj)
+ (if (eq CCi (or cond 2))
+ (set targ (add_sub (mul arg1 arg2) targ)))
+ ((fr500 (unit u-float-dual-arith)))
+ )
+)
+
+(conditional-float-mul-with-add cfmadds add FRi FRj FRk OP_6F OPE4_0 "conditional mul with add, single")
+(conditional-float-mul-with-add cfmsubs sub FRi FRj FRk OP_6F OPE4_1 "conditional mul with sub, single")
+
+(define-pmacro (ne-float-mul-with-add name add_sub arg1 arg2 targ op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv) NON-EXCEPTING)
+ (.str name "$pack $" arg1 ",$" arg2 ",$" targ)
+ (+ pack targ op arg1 ope arg2)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of targ))
+ (set targ (add_sub (mul arg1 arg2) targ)))
+ ((fr500 (unit u-float-dual-arith)))
+ )
+)
+
+(ne-float-mul-with-add nfmadds add FRi FRj FRk OP_79 OPE1_2B "non excepting mul with add, single")
+(ne-float-mul-with-add nfmsubs sub FRi FRj FRk OP_79 OPE1_2C "non excepting mul with sub, single")
+
+(define-pmacro (float-parallel-mul-add-semantics cond add_sub arg1 arg2 targ)
+ (if cond
+ (sequence ()
+ (set targ (mul arg1 arg2))
+ (set (nextreg h-fr targ 1)
+ (add_sub (nextreg h-fr arg1 1) (nextreg h-fr arg2 1)))))
+)
+
+(define-pmacro (float-parallel-mul-add
+ name add_sub arg1 arg2 targ op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-5) (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack $" arg1 ",$" arg2 ",$" targ)
+ (+ pack targ op arg1 ope arg2)
+ (float-parallel-mul-add-semantics 1 add_sub arg1 arg2 targ)
+ ((fr500 (unit u-float-dual-arith)))
+ )
+)
+
+(float-parallel-mul-add fmas add FRi FRj FRk OP_79 OPE1_0E "parallel mul/add, single")
+(float-parallel-mul-add fmss sub FRi FRj FRk OP_79 OPE1_0F "parallel mul/sub, single")
+
+(define-pmacro (float-dual-parallel-mul-add-semantics add_sub arg1 arg2 targ)
+ (sequence ()
+ (set targ (mul arg1 arg2))
+ (set (nextreg h-fr targ 1)
+ (add_sub (nextreg h-fr arg1 1) (nextreg h-fr arg2 1)))
+ (set (nextreg h-fr targ 2)
+ (mul (nextreg h-fr arg1 2) (nextreg h-fr arg2 2)))
+ (set (nextreg h-fr targ 3)
+ (add_sub (nextreg h-fr arg1 3) (nextreg h-fr arg2 3))))
+)
+
+(define-pmacro (float-dual-parallel-mul-add
+ name add_sub arg1 arg2 targ op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv))
+ (.str name "$pack $" arg1 ",$" arg2 ",$" targ)
+ (+ pack targ op arg1 ope arg2)
+ (float-dual-parallel-mul-add-semantics add_sub arg1 arg2 targ)
+ ()
+ )
+)
+
+(float-dual-parallel-mul-add fdmas add FRi FRj FRk OP_79 OPE1_1C "dual parallel mul/add, single")
+(float-dual-parallel-mul-add fdmss sub FRi FRj FRk OP_79 OPE1_1D "dual parallel mul/sub, single")
+
+(define-pmacro (ne-float-dual-parallel-mul-add-semantics add_sub arg1 arg2 targ)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of targ))
+ (c-call VOID "@cpu@_set_ne_index" (add (index-of targ) 1))
+ (c-call VOID "@cpu@_set_ne_index" (add (index-of targ) 2))
+ (c-call VOID "@cpu@_set_ne_index" (add (index-of targ) 3))
+ (set targ (mul arg1 arg2))
+ (set (nextreg h-fr targ 1)
+ (add_sub (nextreg h-fr arg1 1) (nextreg h-fr arg2 1)))
+ (set (nextreg h-fr targ 2)
+ (mul (nextreg h-fr arg1 2) (nextreg h-fr arg2 2)))
+ (set (nextreg h-fr targ 3)
+ (add_sub (nextreg h-fr arg1 3) (nextreg h-fr arg2 3))))
+)
+
+(define-pmacro (ne-float-dual-parallel-mul-add
+ name add_sub arg1 arg2 targ op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv))
+ (.str name "$pack $" arg1 ",$" arg2 ",$" targ)
+ (+ pack targ op arg1 ope arg2)
+ (ne-float-dual-parallel-mul-add-semantics add_sub arg1 arg2 targ)
+ ()
+ )
+)
+
+(ne-float-dual-parallel-mul-add nfdmas add FRi FRj FRk OP_79 OPE1_3C "non excepting dual parallel mul/add, single")
+(ne-float-dual-parallel-mul-add nfdmss sub FRi FRj FRk OP_79 OPE1_3D "non excepting dual parallel mul/sub, single")
+
+(define-pmacro (conditional-float-parallel-mul-add name add_sub op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-5) CONDITIONAL (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack $FRi,$FRj,$FRk,$CCi,$cond")
+ (+ pack FRk op FRi CCi cond ope FRj)
+ (float-parallel-mul-add-semantics (eq CCi (or cond 2))
+ add_sub FRi FRj FRk)
+ ((fr500 (unit u-float-dual-arith)))
+ )
+)
+
+(conditional-float-parallel-mul-add cfmas add OP_6F OPE4_2 "conditional parallel mul/add, single")
+(conditional-float-parallel-mul-add cfmss sub OP_6F OPE4_3 "conditional parallel mul/sub, single")
+
+(define-pmacro (float-parallel-mul-add-double-semantics add_sub arg1 arg2 targ)
+ (sequence ()
+ (set targ (ftrunc SF (mul DF (fext DF arg1) (fext DF arg2))))
+ (set (nextreg h-fr targ 1)
+ (ftrunc SF (add_sub DF
+ (fext DF (nextreg h-fr arg1 1))
+ (fext DF (nextreg h-fr arg2 1))))))
+)
+
+(define-pmacro (float-parallel-mul-add-double
+ name add_sub arg1 arg2 targ op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-5) (MACH frv))
+ (.str name "$pack $" arg1 ",$" arg2 ",$" targ)
+ (+ pack targ op arg1 ope arg2)
+ (float-parallel-mul-add-double-semantics add_sub arg1 arg2 targ)
+ ()
+ )
+)
+
+(float-parallel-mul-add-double fmad add FRi FRj FRk OP_7A OPE1_0E "parallel mul/add, double")
+(float-parallel-mul-add-double fmsd sub FRi FRj FRk OP_7A OPE1_0F "parallel mul/sub, double")
+
+(define-pmacro (ne-float-parallel-mul-add name add_sub op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR F-5) (MACH simple,tomcat,fr500,frv))
+ (.str name "$pack $FRi,$FRj,$FRk")
+ (+ pack FRk op FRi ope FRj)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of FRk))
+ (set FRk (mul FRi FRj))
+ (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1))
+ (set (nextreg h-fr FRk 1)
+ (add_sub (nextreg h-fr FRi 1) (nextreg h-fr FRj 1))))
+ ((fr500 (unit u-float-dual-arith)))
+ )
+)
+
+(ne-float-parallel-mul-add nfmas add OP_79 OPE1_2E "ne parallel mul/add,single")
+(ne-float-parallel-mul-add nfmss sub OP_79 OPE1_2F "ne parallel mul/sub,single")
+
+(define-pmacro (float-dual-arith name major oper1 oper2 op ope attr comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR major) attr)
+ (.str name "$pack $FRi,$FRj,$FRk")
+ (+ pack FRk op FRi ope FRj)
+ (sequence ()
+ (set FRk (oper1 FRi FRj))
+ (set (nextreg h-fr FRk 1)
+ (oper2 (nextreg h-fr FRi 1) (nextreg h-fr FRj 1))))
+ ((fr500 (unit u-float-dual-arith)))
+ )
+)
+
+(float-dual-arith fdadds F-6 add add OP_79 OPE1_16 (MACH simple,tomcat,fr500,frv) "dual add, single")
+(float-dual-arith fdsubs F-6 sub sub OP_79 OPE1_17 (MACH simple,tomcat,fr500,frv) "dual sub, single")
+(float-dual-arith fdmuls F-7 mul mul OP_79 OPE1_18 (MACH simple,tomcat,fr500,frv) "dual mul, single")
+(float-dual-arith fddivs F-7 div div OP_79 OPE1_19 (MACH frv) "dual div,single")
+(float-dual-arith fdsads F-6 add sub OP_79 OPE1_1E (MACH simple,tomcat,fr500,frv) "dual add/sub, single")
+
+(dni fdmulcs
+ "Float dual cross multiply single"
+ ((UNIT FM01) (FR500-MAJOR F-7) (MACH simple,tomcat,fr500,frv))
+ "fdmulcs$pack $FRi,$FRj,$FRk"
+ (+ pack FRk OP_79 FRi OPE1_1F FRj)
+ (sequence ()
+ (set FRk (mul FRi (nextreg h-fr FRj 1)))
+ (set (nextreg h-fr FRk 1) (mul (nextreg h-fr FRi 1) FRj)))
+ ((fr500 (unit u-float-dual-arith)))
+)
+
+(dni nfdmulcs
+ "NE float dual cross multiply single"
+ ((UNIT FM01) (FR500-MAJOR F-7) (MACH simple,tomcat,fr500,frv))
+ "nfdmulcs$pack $FRi,$FRj,$FRk"
+ (+ pack FRk OP_79 FRi OPE1_3F FRj)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of FRk))
+ (set FRk (mul FRi (nextreg h-fr FRj 1)))
+ (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1))
+ (set (nextreg h-fr FRk 1) (mul (nextreg h-fr FRi 1) FRj)))
+ ((fr500 (unit u-float-dual-arith)))
+)
+
+(define-pmacro (ne-float-dual-arith name major oper1 oper2 op ope attr comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR major) attr)
+ (.str name "$pack $FRi,$FRj,$FRk")
+ (+ pack FRk op FRi ope FRj)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of FRk))
+ (set FRk (oper1 FRi FRj))
+ (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1))
+ (set (nextreg h-fr FRk 1)
+ (oper2 (nextreg h-fr FRi 1) (nextreg h-fr FRj 1))))
+ ((fr500 (unit u-float-dual-arith)))
+ )
+)
+
+(ne-float-dual-arith nfdadds F-6 add add OP_79 OPE1_36 (MACH simple,tomcat,fr500,frv) "ne dual add, single")
+(ne-float-dual-arith nfdsubs F-6 sub sub OP_79 OPE1_37 (MACH simple,tomcat,fr500,frv) "ne dual sub, single")
+(ne-float-dual-arith nfdmuls F-7 mul mul OP_79 OPE1_38 (MACH simple,tomcat,fr500,frv) "ne dual mul, single")
+(ne-float-dual-arith nfddivs F-7 div div OP_79 OPE1_39 (MACH frv) "ne dual div,single")
+(ne-float-dual-arith nfdsads F-6 add sub OP_79 OPE1_3E (MACH simple,tomcat,fr500,frv) "ne dual add/sub, single")
+
+(dni nfdcmps
+ "non-excepting dual float compare"
+ ((UNIT FM01) (FR500-MAJOR F-6) (MACH simple,tomcat,frv))
+ "nfdcmps$pack $FRi,$FRj,$FCCi_2"
+ (+ pack (cond-null) FCCi_2 OP_79 FRi OPE1_3A FRj)
+ (sequence ()
+ (c-call VOID "@cpu@_set_ne_index" (index-of FRk))
+ (compare-and-set-fcc FRi FRj FCCi_2)
+ (c-call VOID "@cpu@_set_ne_index" (add (index-of FRk) 1))
+ (compare-and-set-fcc (nextreg h-fr FRi 1) (nextreg h-fr FRj 1)
+ (nextreg h-fccr FCCi_2 1)))
+ ((fr500 (unit u-float-dual-compare)))
+)
+
+; Media Instructions
+;
+(define-pmacro (halfword hilo arg offset)
+ (reg (.sym h-fr_ hilo) (add (index-of arg) offset)))
+
+(dni mhsetlos
+ "Media set lower signed 12 bits"
+ ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+ "mhsetlos$pack $u12,$FRklo"
+ (+ pack FRklo OP_78 OPE1_20 u12)
+ (set FRklo u12)
+ ((fr400 (unit u-media-hilo)))
+)
+
+(dni mhsethis
+ "Media set upper signed 12 bits"
+ ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+ "mhsethis$pack $u12,$FRkhi"
+ (+ pack FRkhi OP_78 OPE1_22 u12)
+ (set FRkhi u12)
+ ((fr400 (unit u-media-hilo)))
+)
+
+(dni mhdsets
+ "Media dual set halfword signed 12 bits"
+ ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+ "mhdsets$pack $u12,$FRintk"
+ (+ pack FRintk OP_78 OPE1_24 u12)
+ (sequence ()
+ ; hack to get FRintk passed to modelling functions
+ (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+ (set (halfword hi FRintk 0) u12)
+ (set (halfword lo FRintk 0) u12))
+ ((fr400 (unit u-media-1)))
+)
+
+(define-pmacro (set-5-semantics target value)
+ (sequence ((HI tmp))
+ (set tmp target)
+ (set tmp (and tmp #x07ff))
+ (set tmp (or tmp (sll (and s5 #x1f) 11)))
+ (set target tmp))
+)
+
+(define-pmacro (media-set-5 name hilo op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+ (.str name "$pack $s5,$FRk" hilo)
+ (+ pack (.sym FRk hilo) op (FRi-null) ope (misc-null-11) s5)
+ (set-5-semantics (.sym FRk hilo) s5)
+ ((fr400 (unit u-media-hilo)))
+ )
+)
+
+(media-set-5 mhsetloh lo OP_78 OPE1_21 "Media set upper 5 bits lo")
+(media-set-5 mhsethih hi OP_78 OPE1_23 "Media set upper 5 bits hi")
+
+(dni mhdseth
+ "Media dual set halfword upper 5 bits"
+ ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+ "mhdseth$pack $s5,$FRintk"
+ (+ pack FRintk OP_78 (FRi-null) OPE1_25 (misc-null-11) s5)
+ (sequence ()
+ ; hack to get FRintk passed to modelling functions
+ (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+ (set-5-semantics (halfword hi FRintk 0) s5)
+ (set-5-semantics (halfword lo FRintk 0) s5))
+ ((fr400 (unit u-media-1)))
+)
+
+(define-pmacro (media-logic-r-r name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+ (.str name "$pack $FRinti,$FRintj,$FRintk")
+ (+ pack FRintk op FRinti ope FRintj)
+ (set FRintk (operation FRinti FRintj))
+ ((fr400 (unit u-media-1))
+ (fr500 (unit u-media)))
+ )
+)
+
+(media-logic-r-r mand and OP_7B OPE1_00 "and reg/reg")
+(media-logic-r-r mor or OP_7B OPE1_01 "or reg/reg")
+(media-logic-r-r mxor xor OP_7B OPE1_02 "xor reg/reg")
+
+(define-pmacro (conditional-media-logic name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1) CONDITIONAL)
+ (.str name "$pack $FRinti,$FRintj,$FRintk,$CCi,$cond")
+ (+ pack FRintk op FRinti CCi cond ope FRintj)
+ (if (eq CCi (or cond 2))
+ (set FRintk (operation FRinti FRintj)))
+ ((fr400 (unit u-media-1))
+ (fr500 (unit u-media)))
+ )
+)
+
+(conditional-media-logic cmand and OP_70 OPE4_0 "conditional and reg/reg")
+(conditional-media-logic cmor or OP_70 OPE4_1 "conditional or reg/reg")
+(conditional-media-logic cmxor xor OP_70 OPE4_2 "conditional xor reg/reg")
+
+(dni mnot
+ ("mnot")
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+ ("mnot$pack $FRintj,$FRintk")
+ (+ pack FRintk OP_7B (rs-null) OPE1_03 FRintj)
+ (set FRintk (inv FRintj))
+ ((fr400 (unit u-media-1))
+ (fr500 (unit u-media)))
+)
+
+(dni cmnot
+ ("cmnot")
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1) CONDITIONAL)
+ ("cmnot$pack $FRintj,$FRintk,$CCi,$cond")
+ (+ pack FRintk OP_70 (rs-null) CCi cond OPE4_3 FRintj)
+ (if (eq CCi (or cond 2))
+ (set FRintk (inv FRintj)))
+ ((fr400 (unit u-media-1))
+ (fr500 (unit u-media)))
+)
+
+(define-pmacro (media-rotate-r-r name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-1))
+ (.str name "$pack $FRinti,$u6,$FRintk")
+ (+ pack FRintk op FRinti ope u6)
+ (set FRintk (operation FRinti (and u6 #x1f)))
+ ((fr400 (unit u-media-3))
+ (fr500 (unit u-media)))
+ )
+)
+
+(media-rotate-r-r mrotli rol OP_7B OPE1_04 "rotate left reg/reg")
+(media-rotate-r-r mrotri ror OP_7B OPE1_05 "rotate right reg/reg")
+
+(define-pmacro (media-cut-r-r name arg op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2))
+ (.str name "$pack $FRinti,$" arg ",$FRintk")
+ (+ pack FRintk op FRinti ope arg)
+ (set FRintk (c-call SI "@cpu@_cut" FRinti (nextreg h-fr_int FRinti 1) arg))
+ ((fr400 (unit u-media-3))
+ (fr500 (unit u-media)))
+ )
+)
+
+(media-cut-r-r mwcut FRintj OP_7B OPE1_06 "media cut")
+(media-cut-r-r mwcuti u6 OP_7B OPE1_07 "media cut")
+
+(define-pmacro (media-cut-acc name arg op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-1))
+ (.str name "$pack $ACC40Si,$" arg ",$FRintk")
+ (+ pack FRintk op ACC40Si ope arg)
+ (set FRintk (c-call SI "@cpu@_media_cut" ACC40Si arg))
+ ((fr400 (unit u-media-4))
+ (fr500 (unit u-media)))
+ )
+)
+
+(media-cut-acc mcut FRintj OP_7B OPE1_2C "media accumulator cut reg")
+(media-cut-acc mcuti s6 OP_7B OPE1_2E "media accumulator cut immed")
+
+(define-pmacro (media-cut-acc-ss name arg op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-1))
+ (.str name "$pack $ACC40Si,$" arg ",$FRintk")
+ (+ pack FRintk op ACC40Si ope arg)
+ (set FRintk (c-call SI "@cpu@_media_cut_ss" ACC40Si arg))
+ ((fr400 (unit u-media-4))
+ (fr500 (unit u-media)))
+ )
+)
+
+(media-cut-acc-ss mcutss FRintj OP_7B OPE1_2D "media accumulator cut reg with saturation")
+(media-cut-acc-ss mcutssi s6 OP_7B OPE1_2F "media accumulator cut immed with saturation")
+
+; Dual Media Instructions
+;
+(define-pmacro (register-unaligned register alignment)
+ (and (index-of register) (sub alignment 1))
+)
+
+(dni mdcutssi
+ "Media dual cut with signed saturation"
+ ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+ "mdcutssi$pack $ACC40Si,$s6,$FRintkeven"
+ (+ pack FRintkeven OP_78 ACC40Si OPE1_0E s6)
+ (if (register-unaligned ACC40Si 2)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (register-unaligned FRintkeven 2)
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (sequence ()
+ (set FRintkeven (c-call SI "@cpu@_media_cut_ss" ACC40Si s6))
+ (set (nextreg h-fr_int FRintkeven 1)
+ (c-call SI "@cpu@_media_cut_ss"
+ (nextreg h-acc40S ACC40Si 1) s6)))))
+ ((fr400 (unit u-media-4-acc-dual
+ (out FRintk FRintkeven))))
+)
+
+; The (add (xxxx) (mul arg 0)) is a hack to get a reference to arg generated
+; so it will be passed to the unit modelers. YUCK!!!!!
+(define-pmacro (extract-hilo reg1 off1 reg2 off2 arg1hi arg1lo arg2hi arg2lo)
+ (sequence ()
+ (set arg1hi (add (halfword hi reg1 off1) (mul reg1 0)))
+ (set arg1lo (add (halfword lo reg1 off1) (mul reg1 0)))
+ (set arg2hi (add (halfword hi reg2 off2) (mul reg2 0)))
+ (set arg2lo (add (halfword lo reg2 off2) (mul reg2 0))))
+)
+
+(dni maveh
+ "Media dual average"
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+ "maveh$pack $FRinti,$FRintj,$FRintk"
+ (+ pack FRintk OP_7B FRinti OPE1_08 FRintj)
+ (set FRintk (c-call SI "@cpu@_media_average" FRinti FRintj))
+ ((fr400 (unit u-media-1))
+ (fr500 (unit u-media)))
+)
+
+(define-pmacro (media-dual-shift name operation op ope profile comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-1))
+ (.str name "$pack $FRinti,$u6,$FRintk")
+ (+ pack FRintk op FRinti ope u6)
+ (sequence ()
+ ; hack to get these referenced for profiling
+ (set FRinti (c-raw-call SI "frv_ref_SI" FRinti))
+ (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+ (set (halfword hi FRintk 0)
+ (operation (halfword hi FRinti 0) (and u6 #xf)))
+ (set (halfword lo FRintk 0)
+ (operation (halfword lo FRinti 0) (and u6 #xf))))
+ profile
+ )
+)
+
+(media-dual-shift msllhi sll OP_7B OPE1_09
+ ((fr400 (unit u-media-3)) (fr500 (unit u-media)))
+ "Media dual shift left logical")
+(media-dual-shift msrlhi srl OP_7B OPE1_0A
+ ((fr400 (unit u-media-3)) (fr500 (unit u-media)))
+ "Media dual shift right logical")
+(media-dual-shift msrahi sra OP_7B OPE1_0B
+ ((fr400 (unit u-media-6)) (fr500 (unit u-media)))
+ "Media dual shift right arithmetic")
+
+(define-pmacro (media-dual-word-rotate-r-r name operation op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+ (.str name "$pack $FRintieven,$s6,$FRintkeven")
+ (+ pack FRintkeven op FRintieven ope s6)
+ (if (orif (register-unaligned FRintieven 2)
+ (register-unaligned FRintkeven 2))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (sequence ()
+ (set FRintkeven (operation FRintieven (and s6 #x1f)))
+ (set (nextreg h-fr_int FRintkeven 1)
+ (operation (nextreg h-fr_int FRintieven 1)
+ (and s6 #x1f)))))
+ ((fr400 (unit u-media-3-quad
+ (in FRinti FRintieven)
+ (out FRintk FRintkeven))))
+ )
+)
+
+(media-dual-word-rotate-r-r mdrotli rol OP_78 OPE1_0B "rotate left reg/reg")
+
+(dni mcplhi
+ "Media dual couple, halfword"
+ ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+ "mcplhi$pack $FRinti,$u6,$FRintk"
+ (+ pack FRintk OP_78 FRinti OPE1_0C u6)
+ (sequence ((HI arg1) (HI arg2) (HI shift))
+ (set FRinti (c-raw-call SI "frv_ref_SI" FRinti))
+ (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+ (set shift (and u6 #xf))
+ (set arg1 (sll (halfword hi FRinti 0) shift))
+ (if (ne shift 0)
+ (sequence ()
+ (set arg2 (halfword hi FRinti 1))
+ (set arg2 (srl HI (sll HI arg2 (sub 15 shift))
+ (sub 15 shift)))
+ (set arg1 (or HI arg1 arg2))))
+ (set (halfword hi FRintk 0) arg1))
+ ((fr400 (unit u-media-3-dual)))
+)
+
+(dni mcpli
+ "Media dual couple, word"
+ ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+ "mcpli$pack $FRinti,$u6,$FRintk"
+ (+ pack FRintk OP_78 FRinti OPE1_0D u6)
+ (sequence ((SI tmp) (SI shift))
+ (set shift (and u6 #x1f))
+ (set tmp (sll FRinti shift))
+ (if (ne shift 0)
+ (sequence ((SI tmp1))
+ (set tmp1 (srl (sll (nextreg h-fr_int FRinti 1)
+ (sub 31 shift))
+ (sub 31 shift)))
+ (set tmp (or tmp tmp1))))
+ (set FRintk tmp))
+ ((fr400 (unit u-media-3-dual)))
+)
+
+(define-pmacro (saturate arg max min result)
+ (if (gt arg max)
+ (set result max)
+ (if (lt arg min)
+ (set result min)
+ (set result arg)))
+)
+
+(dni msaths
+ "Media dual saturation signed"
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+ "msaths$pack $FRinti,$FRintj,$FRintk"
+ (+ pack FRintk OP_7B FRinti OPE1_0C FRintj)
+ (sequence ((HI argihi) (HI argilo) (HI argjhi) (HI argjlo))
+ (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo)
+ (saturate argihi argjhi (inv argjhi) (halfword hi FRintk 0))
+ (saturate argilo argjlo (inv argjlo) (halfword lo FRintk 0)))
+ ((fr400 (unit u-media-1))
+ (fr500 (unit u-media)))
+)
+
+(dni mqsaths
+ "Media quad saturation signed"
+ ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+ "mqsaths$pack $FRintieven,$FRintjeven,$FRintkeven"
+ (+ pack FRintkeven OP_78 FRintieven OPE1_0F FRintjeven)
+ (if (orif (register-unaligned FRintieven 2)
+ (orif (register-unaligned FRintjeven 2)
+ (register-unaligned FRintkeven 2)))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (sequence ((HI argihi) (HI argilo) (HI argjhi) (HI argjlo))
+ ; hack to get FRintkeven referenced as a target for profiling
+ (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+ (extract-hilo FRintieven 0 FRintjeven 0 argihi argilo argjhi argjlo)
+ (saturate argihi argjhi (inv argjhi) (halfword hi FRintkeven 0))
+ (saturate argilo argjlo (inv argjlo) (halfword lo FRintkeven 0))
+ (extract-hilo FRintieven 1 FRintjeven 1 argihi argilo argjhi argjlo)
+ (saturate argihi argjhi (inv argjhi) (halfword hi FRintkeven 1))
+ (saturate argilo argjlo (inv argjlo) (halfword lo FRintkeven 1))))
+ ((fr400 (unit u-media-1-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)
+ (out FRintk FRintkeven))))
+)
+
+(define-pmacro (saturate-unsigned arg max result)
+ (if (gt arg max)
+ (set result max)
+ (set result arg))
+)
+
+(dni msathu
+ "Media dual saturation unsigned"
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+ "msathu$pack $FRinti,$FRintj,$FRintk"
+ (+ pack FRintk OP_7B FRinti OPE1_0D FRintj)
+ (sequence ((UHI argihi) (UHI argilo) (UHI argjhi) (UHI argjlo))
+ (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo)
+ (saturate-unsigned argihi argjhi (halfword hi FRintk 0))
+ (saturate-unsigned argilo argjlo (halfword lo FRintk 0)))
+ ((fr400 (unit u-media-1))
+ (fr500 (unit u-media)))
+)
+
+(define-pmacro (media-dual-compare name mode op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+ (.str name "$pack $FRinti,$FRintj,$FCCk")
+ (+ pack (cond-null) FCCk op FRinti ope FRintj)
+ (if (register-unaligned FCCk 2)
+ (c-call VOID "@cpu@_media_cr_not_aligned")
+ (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo))
+ (extract-hilo FRinti 0 FRintj 0
+ argihi argilo argjhi argjlo)
+ (compare-and-set-fcc argihi argjhi FCCk)
+ (compare-and-set-fcc argilo argjlo (nextreg h-fccr FCCk 1))))
+ ; TODO - doesn't handle second FCC
+ ((fr400 (unit u-media-7))
+ (fr500 (unit u-media)))
+ )
+)
+
+(media-dual-compare mcmpsh HI OP_7B OPE1_0E "Media dual compare signed")
+(media-dual-compare mcmpuh UHI OP_7B OPE1_0F "Media dual compare unsigned")
+
+; Bits for the MSR.SIE field
+(define-pmacro (msr-sie-nil) 0)
+(define-pmacro (msr-sie-fri-hi) 8)
+(define-pmacro (msr-sie-fri-lo) 4)
+(define-pmacro (msr-sie-fri-1-hi) 2)
+(define-pmacro (msr-sie-fri-1-lo) 1)
+(define-pmacro (msr-sie-acci) 8)
+(define-pmacro (msr-sie-acci-1) 4)
+(define-pmacro (msr-sie-acci-2) 2)
+(define-pmacro (msr-sie-acci-3) 1)
+
+(define-pmacro (saturate-v arg max min sie result)
+ (if (gt DI arg max)
+ (sequence ()
+ (set result max)
+ (c-call VOID "@cpu@_media_overflow" sie))
+ (if (lt DI arg min)
+ (sequence ()
+ (set result min)
+ (c-call VOID "@cpu@_media_overflow" sie))
+ (set result arg)))
+)
+
+(dni mabshs
+ "Media dual absolute value, halfword"
+ ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+ "mabshs$pack $FRintj,$FRintk"
+ (+ pack FRintk OP_78 (FRi-null) OPE1_0A FRintj)
+ (sequence ((HI arghi) (HI arglo))
+ (set FRintj (c-raw-call SI "frv_ref_SI" FRintj))
+ (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+ (set arghi (halfword hi FRintj 0))
+ (set arglo (halfword lo FRintj 0))
+ (saturate-v (abs arghi) 32767 -32768 (msr-sie-fri-hi)
+ (halfword hi FRintk 0))
+ (saturate-v (abs arglo) 32767 -32768 (msr-sie-fri-lo)
+ (halfword lo FRintk 0)))
+ ((fr400 (unit u-media-1)))
+)
+
+(define-pmacro (media-arith-sat-semantics
+ operation arg1 arg2 res mode max min sie)
+ (sequence ((DI tmp))
+ (set tmp (operation arg1 arg2))
+ (saturate-v tmp max min sie res))
+)
+
+(define-pmacro (media-dual-arith-sat-semantics operation mode max min)
+ (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo))
+ (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo)
+ (media-arith-sat-semantics operation argihi argjhi
+ (halfword hi FRintk 0) mode max min
+ (msr-sie-fri-hi))
+ (media-arith-sat-semantics operation argilo argjlo
+ (halfword lo FRintk 0) mode max min
+ (msr-sie-fri-lo)))
+)
+
+(define-pmacro (media-dual-arith-sat name operation mode max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1))
+ (.str name "$pack $FRinti,$FRintj,$FRintk")
+ (+ pack FRintk op FRinti ope FRintj)
+ (media-dual-arith-sat-semantics operation mode max min)
+ ((fr400 (unit u-media-1))
+ (fr500 (unit u-media)))
+ )
+)
+
+(media-dual-arith-sat maddhss add HI 32767 -32768 OP_7B OPE1_10 "Media dual add signed with saturation")
+(media-dual-arith-sat maddhus add UHI 65535 0 OP_7B OPE1_11 "Media dual add unsigned with saturation")
+
+(media-dual-arith-sat msubhss sub HI 32767 -32768 OP_7B OPE1_12 "Media dual sub signed with saturation")
+(media-dual-arith-sat msubhus sub UHI 65535 0 OP_7B OPE1_13 "Media dual sub unsigned with saturation")
+
+(define-pmacro (conditional-media-dual-arith-sat
+ name operation mode max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-1) CONDITIONAL)
+ (.str name "$pack $FRinti,$FRintj,$FRintk,$CCi,$cond")
+ (+ pack FRintk op FRinti CCi cond ope FRintj)
+ (if (eq CCi (or cond 2))
+ (media-dual-arith-sat-semantics operation mode max min))
+ ((fr400 (unit u-media-1))
+ (fr500 (unit u-media)))
+ )
+)
+
+(conditional-media-dual-arith-sat cmaddhss add HI 32767 -32768 OP_71 OPE4_0 "Conditional Media dual add signed with saturation")
+(conditional-media-dual-arith-sat cmaddhus add UHI 65535 0 OP_71 OPE4_1 "Conditional Media dual add unsigned with saturation")
+
+(conditional-media-dual-arith-sat cmsubhss sub HI 32767 -32768 OP_71 OPE4_2 "Conditional Media dual sub signed with saturation")
+(conditional-media-dual-arith-sat cmsubhus sub UHI 65535 0 OP_71 OPE4_3 "Conditional Media dual sub unsigned with saturation")
+
+(define-pmacro (media-quad-arith-sat-semantics cond operation mode max min)
+ (if (orif (register-unaligned FRintieven 2)
+ (orif (register-unaligned FRintjeven 2)
+ (register-unaligned FRintkeven 2)))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (if cond
+ (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo))
+ ; hack to get FRintkeven referenced as a target for profiling
+ (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+ (extract-hilo FRintieven 0 FRintjeven 0
+ argihi argilo argjhi argjlo)
+ (media-arith-sat-semantics operation argihi argjhi
+ (halfword hi FRintkeven 0) mode
+ max min (msr-sie-fri-hi))
+ (media-arith-sat-semantics operation argilo argjlo
+ (halfword lo FRintkeven 0) mode
+ max min (msr-sie-fri-lo))
+ (extract-hilo FRintieven 1 FRintjeven 1
+ argihi argilo argjhi argjlo)
+ (media-arith-sat-semantics operation argihi argjhi
+ (halfword hi FRintkeven 1) mode
+ max min (msr-sie-fri-1-hi))
+ (media-arith-sat-semantics operation argilo argjlo
+ (halfword lo FRintkeven 1) mode
+ max min (msr-sie-fri-1-lo)))))
+)
+
+(define-pmacro (media-quad-arith-sat name operation mode max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-2))
+ (.str name "$pack $FRintieven,$FRintjeven,$FRintkeven")
+ (+ pack FRintkeven op FRintieven ope FRintjeven)
+ (media-quad-arith-sat-semantics 1 operation mode max min)
+ ((fr400 (unit u-media-1-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)
+ (out FRintk Frintkeven)))
+ (fr500 (unit u-media-quad-arith
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)
+ (out FRintk Frintkeven))))
+ )
+)
+
+(media-quad-arith-sat mqaddhss add HI 32767 -32768 OP_7B OPE1_18 "Media quad add signed with saturation")
+(media-quad-arith-sat mqaddhus add UHI 65535 0 OP_7B OPE1_19 "Media quad add unsigned with saturation")
+
+(media-quad-arith-sat mqsubhss sub HI 32767 -32768 OP_7B OPE1_1A "Media quad sub signed with saturation")
+(media-quad-arith-sat mqsubhus sub UHI 65535 0 OP_7B OPE1_1B "Media quad sub unsigned with saturation")
+
+(define-pmacro (conditional-media-quad-arith-sat
+ name operation mode max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-1) (FR400-MAJOR M-2) CONDITIONAL)
+ (.str name "$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond")
+ (+ pack FRintkeven op FRintieven CCi cond ope FRintjeven)
+ (media-quad-arith-sat-semantics (eq CCi (or cond 2))
+ operation mode max min)
+ ((fr400 (unit u-media-1-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)
+ (out FRintk Frintkeven)))
+ (fr500 (unit u-media-quad-arith
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)
+ (out FRintk Frintkeven))))
+ )
+)
+
+(conditional-media-quad-arith-sat cmqaddhss add HI 32767 -32768 OP_73 OPE4_0 "Conditional Media quad add signed with saturation")
+(conditional-media-quad-arith-sat cmqaddhus add UHI 65535 0 OP_73 OPE4_1 "Conditional Media quad add unsigned with saturation")
+
+(conditional-media-quad-arith-sat cmqsubhss sub HI 32767 -32768 OP_73 OPE4_2 "Conditional Media quad sub signed with saturation")
+(conditional-media-quad-arith-sat cmqsubhus sub UHI 65535 0 OP_73 OPE4_3 "Conditional Media quad sub unsigned with saturation")
+
+(define-pmacro (media-acc-arith-sat name operation mode max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+ (.str name "$pack $ACC40Si,$ACC40Sk")
+ (+ pack ACC40Sk op ACC40Si ope (ACCj-null))
+ (if (register-unaligned ACC40Si 2)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (media-arith-sat-semantics operation ACC40Si
+ (nextreg h-acc40S ACC40Si 1)
+ ACC40Sk mode max min (msr-sie-acci)))
+ ((fr400 (unit u-media-2-acc)))
+ )
+)
+
+(media-acc-arith-sat maddaccs add DI #x7fffffffff (inv DI #x7fffffffff)
+ OP_78 OPE1_04 "Media accumulator addition")
+(media-acc-arith-sat msubaccs sub DI #x7fffffffff (inv DI #x7fffffffff)
+ OP_78 OPE1_05 "Media accumulator subtraction")
+
+(define-pmacro (media-dual-acc-arith-sat name operation mode max min op ope
+ comment)
+ (dni name
+ (comment)
+ ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+ (.str name "$pack $ACC40Si,$ACC40Sk")
+ (+ pack ACC40Sk op ACC40Si ope (ACCj-null))
+ (if (register-unaligned ACC40Si 4)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (register-unaligned ACC40Sk 2)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (sequence ()
+ (media-arith-sat-semantics operation ACC40Si
+ (nextreg h-acc40S ACC40Si 1)
+ ACC40Sk mode max min
+ (msr-sie-acci))
+ (media-arith-sat-semantics operation
+ (nextreg h-acc40S ACC40Si 2)
+ (nextreg h-acc40S ACC40Si 3)
+ (nextreg h-acc40S ACC40Sk 1)
+ mode max min
+ (msr-sie-acci-1)))))
+ ((fr400 (unit u-media-2-acc-dual)))
+ )
+)
+
+(media-dual-acc-arith-sat mdaddaccs add DI #x7fffffffff (inv DI #x7fffffffff)
+ OP_78 OPE1_06 "Media accumulator addition")
+(media-dual-acc-arith-sat mdsubaccs sub DI #x7fffffffff (inv DI #x7fffffffff)
+ OP_78 OPE1_07 "Media accumulator subtraction")
+
+(dni masaccs
+ "Media add and subtract signed accumulator with saturation"
+ ((UNIT FM01) (MACH fr400) (FR400-MAJOR M-1))
+ "masaccs$pack $ACC40Si,$ACC40Sk"
+ (+ pack ACC40Sk OP_78 ACC40Si OPE1_08 (ACCj-null))
+ (if (register-unaligned ACC40Si 2)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (register-unaligned ACC40Sk 2)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (sequence ()
+ (media-arith-sat-semantics add ACC40Si
+ (nextreg h-acc40S ACC40Si 1)
+ ACC40Sk DI
+ #x7fffffffff
+ (inv DI #x7fffffffff)
+ (msr-sie-acci))
+ (media-arith-sat-semantics sub ACC40Si
+ (nextreg h-acc40S ACC40Si 1)
+ (nextreg h-acc40S ACC40Sk 1)
+ DI
+ #x7fffffffff
+ (inv DI #x7fffffffff)
+ (msr-sie-acci-1)))))
+ ((fr400 (unit u-media-2-add-sub)))
+ )
+
+(dni mdasaccs
+ "Media add and subtract signed accumulator with saturation"
+ ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+ "mdasaccs$pack $ACC40Si,$ACC40Sk"
+ (+ pack ACC40Sk OP_78 ACC40Si OPE1_09 (ACCj-null))
+ (if (register-unaligned ACC40Si 4)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (register-unaligned ACC40Sk 4)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (sequence ()
+ (media-arith-sat-semantics add ACC40Si
+ (nextreg h-acc40S ACC40Si 1)
+ ACC40Sk DI
+ #x7fffffffff
+ (inv DI #x7fffffffff)
+ (msr-sie-acci))
+ (media-arith-sat-semantics sub ACC40Si
+ (nextreg h-acc40S ACC40Si 1)
+ (nextreg h-acc40S ACC40Sk 1)
+ DI
+ #x7fffffffff
+ (inv DI #x7fffffffff)
+ (msr-sie-acci-1))
+ (media-arith-sat-semantics add
+ (nextreg h-acc40S ACC40Si 2)
+ (nextreg h-acc40S ACC40Si 3)
+ (nextreg h-acc40S ACC40Sk 2)
+ DI
+ #x7fffffffff
+ (inv DI #x7fffffffff)
+ (msr-sie-acci-2))
+ (media-arith-sat-semantics sub
+ (nextreg h-acc40S ACC40Si 2)
+ (nextreg h-acc40S ACC40Si 3)
+ (nextreg h-acc40S ACC40Sk 3)
+ DI
+ #x7fffffffff
+ (inv DI #x7fffffffff)
+ (msr-sie-acci-3)))))
+ ((fr400 (unit u-media-2-add-sub-dual)))
+ )
+
+(define-pmacro (media-multiply-semantics conv arg1 arg2 res)
+ (set res (mul DI (conv DI arg1) (conv DI arg2)))
+)
+
+(define-pmacro (media-dual-multiply-semantics cond mode conv rhs1 rhs2)
+ (if (register-unaligned ACC40Sk 2)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if cond
+ (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo))
+ (extract-hilo FRinti 0 FRintj 0
+ argihi argilo argjhi argjlo)
+ (media-multiply-semantics conv argihi rhs1 ACC40Sk)
+ (media-multiply-semantics conv argilo rhs2
+ (nextreg h-acc40S ACC40Sk 1)))))
+)
+
+(define-pmacro (media-dual-multiply name mode conv rhs1 rhs2 op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1) PRESERVE-OVF)
+ (.str name "$pack $FRinti,$FRintj,$ACC40Sk")
+ (+ pack ACC40Sk op FRinti ope FRintj)
+ (media-dual-multiply-semantics 1 mode conv rhs1 rhs2)
+ ((fr400 (unit u-media-2))
+ (fr500 (unit u-media-dual-mul)))
+ )
+)
+
+(media-dual-multiply mmulhs HI ext argjhi argjlo OP_7B OPE1_14 "Media dual multiply signed")
+(media-dual-multiply mmulhu UHI zext argjhi argjlo OP_7B OPE1_15 "Media dual multiply unsigned")
+
+(media-dual-multiply mmulxhs HI ext argjlo argjhi OP_7B OPE1_28 "Media dual cross multiply signed")
+(media-dual-multiply mmulxhu UHI zext argjlo argjhi OP_7B OPE1_29 "Media dual cross multiply unsigned")
+
+(define-pmacro (conditional-media-dual-multiply
+ name mode conv rhs1 rhs2 op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1)
+ PRESERVE-OVF CONDITIONAL)
+ (.str name "$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond")
+ (+ pack ACC40Sk op FRinti CCi cond ope FRintj)
+ (media-dual-multiply-semantics (eq CCi (or cond 2)) mode conv rhs1 rhs2)
+ ((fr400 (unit u-media-2))
+ (fr500 (unit u-media-dual-mul)))
+ )
+)
+
+(conditional-media-dual-multiply cmmulhs HI ext argjhi argjlo OP_72 OPE4_0 "Conditional Media dual multiply signed")
+(conditional-media-dual-multiply cmmulhu UHI zext argjhi argjlo OP_72 OPE4_1 "Conditional Media dual multiply unsigned")
+
+(define-pmacro (media-quad-multiply-semantics cond mode conv rhs1 rhs2)
+ (if (register-unaligned ACC40Sk 4)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (orif (register-unaligned FRintieven 2)
+ (register-unaligned FRintjeven 2))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (if cond
+ (sequence ((mode argihi) (mode argilo)
+ (mode argjhi) (mode argjlo))
+ (extract-hilo FRintieven 0 FRintjeven 0
+ argihi argilo argjhi argjlo)
+ (media-multiply-semantics conv argihi rhs1 ACC40Sk)
+ (media-multiply-semantics conv argilo rhs2
+ (nextreg h-acc40S ACC40Sk 1))
+ (extract-hilo FRintieven 1 FRintjeven 1
+ argihi argilo argjhi argjlo)
+ (media-multiply-semantics conv argihi rhs1
+ (nextreg h-acc40S ACC40Sk 2))
+ (media-multiply-semantics conv argilo rhs2
+ (nextreg h-acc40S ACC40Sk 3))))))
+)
+
+(define-pmacro (media-quad-multiply name mode conv rhs1 rhs2 op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2) PRESERVE-OVF)
+ (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk")
+ (+ pack ACC40Sk op FRintieven ope FRintjeven)
+ (media-quad-multiply-semantics 1 mode conv rhs1 rhs2)
+ ((fr400 (unit u-media-2-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)))
+ (fr500 (unit u-media-quad-mul
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven))))
+ )
+)
+
+(media-quad-multiply mqmulhs HI ext argjhi argjlo OP_7B OPE1_1C "Media quad multiply signed")
+(media-quad-multiply mqmulhu UHI zext argjhi argjlo OP_7B OPE1_1D "Media quad multiply unsigned")
+
+(media-quad-multiply mqmulxhs HI ext argjlo argjhi OP_7B OPE1_2A "Media quad cross multiply signed")
+(media-quad-multiply mqmulxhu UHI zext argjlo argjhi OP_7B OPE1_2B "Media quad cross multiply unsigned")
+
+(define-pmacro (conditional-media-quad-multiply
+ name mode conv rhs1 rhs2 op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2)
+ PRESERVE-OVF CONDITIONAL)
+ (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond")
+ (+ pack ACC40Sk op FRintieven CCi cond ope FRintjeven)
+ (media-quad-multiply-semantics (eq CCi (or cond 2)) mode conv rhs1 rhs2)
+ ((fr400 (unit u-media-2-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)))
+ (fr500 (unit u-media-quad-mul
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven))))
+ )
+)
+
+(conditional-media-quad-multiply cmqmulhs HI ext argjhi argjlo OP_74 OPE4_0 "Conditional Media quad multiply signed")
+(conditional-media-quad-multiply cmqmulhu UHI zext argjhi argjlo OP_74 OPE4_1 "Conditional Media quad multiply unsigned")
+
+(define-pmacro (media-multiply-acc-semantics
+ conv arg1 addop arg2 res max min sie)
+ (sequence ((DI tmp))
+ (set tmp (addop res (mul DI (conv DI arg1) (conv DI arg2))))
+ (saturate-v tmp max min sie res))
+)
+
+(define-pmacro (media-dual-multiply-acc-semantics
+ cond mode conv addop rhw res max min)
+ (if (register-unaligned res 2)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if cond
+ (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo))
+ (extract-hilo FRinti 0 FRintj 0
+ argihi argilo argjhi argjlo)
+ (media-multiply-acc-semantics conv argihi addop argjhi
+ res
+ max min (msr-sie-acci))
+ (media-multiply-acc-semantics conv argilo addop argjlo
+ (nextreg rhw res 1)
+ max min (msr-sie-acci-1)))))
+)
+
+(define-pmacro (media-dual-multiply-acc
+ name mode conv addop rhw res max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1))
+ (.str name "$pack $FRinti,$FRintj,$" res)
+ (+ pack res op FRinti ope FRintj)
+ (media-dual-multiply-acc-semantics 1 mode conv addop rhw res max min)
+ ((fr400 (unit u-media-2))
+ (fr500 (unit u-media-dual-mul)))
+ )
+)
+
+(media-dual-multiply-acc mmachs HI ext add h-acc40S ACC40Sk
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_7B OPE1_16
+ "Media dual multiply and accumulate signed")
+
+(media-dual-multiply-acc mmachu UHI zext add h-acc40U ACC40Uk
+ (const DI #xffffffffff) (const DI 0)
+ OP_7B OPE1_17
+ "Media dual multiply and accumulate unsigned")
+
+(media-dual-multiply-acc mmrdhs HI ext sub h-acc40S ACC40Sk
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_7B OPE1_30
+ "Media dual multiply and reduce signed")
+
+(media-dual-multiply-acc mmrdhu UHI zext sub h-acc40U ACC40Uk
+ (const DI #xffffffffff) (const DI 0)
+ OP_7B OPE1_31
+ "Media dual multiply and reduce unsigned")
+
+(define-pmacro (conditional-media-dual-multiply-acc
+ name mode conv addop rhw res max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1) CONDITIONAL)
+ (.str name "$pack $FRinti,$FRintj,$" res ",$CCi,$cond")
+ (+ pack res op FRinti CCi cond ope FRintj)
+ (media-dual-multiply-acc-semantics (eq CCi (or cond 2))
+ mode conv addop rhw res max min)
+ ((fr400 (unit u-media-2))
+ (fr500 (unit u-media-dual-mul)))
+ )
+)
+
+(conditional-media-dual-multiply-acc cmmachs HI ext add h-acc40S ACC40Sk
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_72 OPE4_2
+ "Conditional Media dual multiply and accumulate signed")
+
+(conditional-media-dual-multiply-acc cmmachu UHI zext add h-acc40U ACC40Uk
+ (const DI #xffffffffff) (const DI 0)
+ OP_72 OPE4_3
+ "Conditional Media dual multiply and accumulate unsigned")
+
+(define-pmacro (media-quad-multiply-acc-semantics
+ cond mode conv addop rhw res max min)
+ (if (register-unaligned res 4)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (orif (register-unaligned FRintieven 2)
+ (register-unaligned FRintjeven 2))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (if cond
+ (sequence ((mode argihi) (mode argilo)
+ (mode argjhi) (mode argjlo))
+ (extract-hilo FRintieven 0 FRintjeven 0
+ argihi argilo argjhi argjlo)
+ (media-multiply-acc-semantics conv argihi addop argjhi
+ res
+ max min (msr-sie-acci))
+ (media-multiply-acc-semantics conv argilo addop argjlo
+ (nextreg rhw res 1)
+ max min (msr-sie-acci-1))
+ (extract-hilo FRintieven 1 FRintjeven 1
+ argihi argilo argjhi argjlo)
+ (media-multiply-acc-semantics conv argihi addop argjhi
+ (nextreg rhw res 2)
+ max min (msr-sie-acci-2))
+ (media-multiply-acc-semantics conv argilo addop argjlo
+ (nextreg rhw res 3)
+ max min
+ (msr-sie-acci-3))))))
+)
+
+(define-pmacro (media-quad-multiply-acc
+ name mode conv addop rhw res max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2))
+ (.str name "$pack $FRintieven,$FRintjeven,$" res)
+ (+ pack res op FRintieven ope FRintjeven)
+ (media-quad-multiply-acc-semantics 1 mode conv addop rhw res max min)
+ ((fr400 (unit u-media-2-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)))
+ (fr500 (unit u-media-quad-mul
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven))))
+ )
+)
+
+(media-quad-multiply-acc mqmachs HI ext add h-acc40S ACC40Sk
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_7B OPE1_1E
+ "Media quad multiply and accumulate signed")
+
+(media-quad-multiply-acc mqmachu UHI zext add h-acc40U ACC40Uk
+ (const DI #xffffffffff) (const DI 0)
+ OP_7B OPE1_1F
+ "Media quad multiply and accumulate unsigned")
+
+(define-pmacro (conditional-media-quad-multiply-acc
+ name mode conv addop rhw res max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2) CONDITIONAL)
+ (.str name "$pack $FRintieven,$FRintjeven,$" res ",$CCi,$cond")
+ (+ pack res op FRintieven CCi cond ope FRintjeven)
+ (media-quad-multiply-acc-semantics (eq CCi (or cond 2))
+ mode conv addop rhw res max min)
+ ((fr400 (unit u-media-2-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)))
+ (fr500 (unit u-media-quad-mul
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven))))
+ )
+)
+
+(conditional-media-quad-multiply-acc cmqmachs HI ext add h-acc40S ACC40Sk
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_74 OPE4_2
+ "Conditional Media quad multiply and accumulate signed")
+
+(conditional-media-quad-multiply-acc cmqmachu UHI zext add h-acc40U ACC40Uk
+ (const DI #xffffffffff) (const DI 0)
+ OP_74 OPE4_3
+ "Conditional media quad multiply and accumulate unsigned")
+
+(define-pmacro (media-quad-multiply-cross-acc-semantics
+ cond mode conv addop rhw res max min)
+ (if (register-unaligned res 4)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (orif (register-unaligned FRintieven 2)
+ (register-unaligned FRintjeven 2))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (if cond
+ (sequence ((mode argihi) (mode argilo)
+ (mode argjhi) (mode argjlo))
+ (extract-hilo FRintieven 0 FRintjeven 0
+ argihi argilo argjhi argjlo)
+ (media-multiply-acc-semantics conv argihi addop argjhi
+ (nextreg rhw res 2)
+ max min (msr-sie-acci-2))
+ (media-multiply-acc-semantics conv argilo addop argjlo
+ (nextreg rhw res 3)
+ max min (msr-sie-acci-3))
+ (extract-hilo FRintieven 1 FRintjeven 1
+ argihi argilo argjhi argjlo)
+ (media-multiply-acc-semantics conv argihi addop argjhi
+ res
+ max min (msr-sie-acci))
+ (media-multiply-acc-semantics conv argilo addop argjlo
+ (nextreg rhw res 1)
+ max min
+ (msr-sie-acci-1))))))
+)
+
+(define-pmacro (media-quad-multiply-cross-acc
+ name mode conv addop rhw res max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+ (.str name "$pack $FRintieven,$FRintjeven,$" res)
+ (+ pack res op FRintieven ope FRintjeven)
+ (media-quad-multiply-cross-acc-semantics 1 mode conv addop rhw res
+ max min)
+ ((fr400 (unit u-media-2-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven))))
+ )
+)
+
+(media-quad-multiply-cross-acc mqxmachs HI ext add h-acc40S ACC40Sk
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_78 OPE1_00
+ "Media quad multiply and cross accumulate signed")
+
+(define-pmacro (media-quad-cross-multiply-cross-acc-semantics
+ cond mode conv addop rhw res max min)
+ (if (register-unaligned res 4)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (orif (register-unaligned FRintieven 2)
+ (register-unaligned FRintjeven 2))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (if cond
+ (sequence ((mode argihi) (mode argilo)
+ (mode argjhi) (mode argjlo))
+ (extract-hilo FRintieven 0 FRintjeven 0
+ argihi argilo argjhi argjlo)
+ (media-multiply-acc-semantics conv argihi addop argjlo
+ (nextreg rhw res 2)
+ max min (msr-sie-acci-2))
+ (media-multiply-acc-semantics conv argilo addop argjhi
+ (nextreg rhw res 3)
+ max min (msr-sie-acci-3))
+ (extract-hilo FRintieven 1 FRintjeven 1
+ argihi argilo argjhi argjlo)
+ (media-multiply-acc-semantics conv argihi addop argjlo
+ res
+ max min (msr-sie-acci))
+ (media-multiply-acc-semantics conv argilo addop argjhi
+ (nextreg rhw res 1)
+ max min
+ (msr-sie-acci-1))))))
+)
+
+(define-pmacro (media-quad-cross-multiply-cross-acc
+ name mode conv addop rhw res max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+ (.str name "$pack $FRintieven,$FRintjeven,$" res)
+ (+ pack res op FRintieven ope FRintjeven)
+ (media-quad-cross-multiply-cross-acc-semantics 1 mode conv addop rhw res
+ max min)
+ ((fr400 (unit u-media-2-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven))))
+ )
+)
+
+(media-quad-cross-multiply-cross-acc mqxmacxhs HI ext add h-acc40S ACC40Sk
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_78 OPE1_01
+ "Media quad cross multiply and cross accumulate signed")
+
+(define-pmacro (media-quad-cross-multiply-acc-semantics
+ cond mode conv addop rhw res max min)
+ (if (register-unaligned res 4)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (orif (register-unaligned FRintieven 2)
+ (register-unaligned FRintjeven 2))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (if cond
+ (sequence ((mode argihi) (mode argilo)
+ (mode argjhi) (mode argjlo))
+ (extract-hilo FRintieven 0 FRintjeven 0
+ argihi argilo argjhi argjlo)
+ (media-multiply-acc-semantics conv argihi addop argjlo
+ res
+ max min (msr-sie-acci))
+ (media-multiply-acc-semantics conv argilo addop argjhi
+ (nextreg rhw res 1)
+ max min (msr-sie-acci-1))
+ (extract-hilo FRintieven 1 FRintjeven 1
+ argihi argilo argjhi argjlo)
+ (media-multiply-acc-semantics conv argihi addop argjlo
+ (nextreg rhw res 2)
+ max min (msr-sie-acci-2))
+ (media-multiply-acc-semantics conv argilo addop argjhi
+ (nextreg rhw res 3)
+ max min
+ (msr-sie-acci-3))))))
+)
+
+(define-pmacro (media-quad-cross-multiply-acc
+ name mode conv addop rhw res max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM0) (MACH fr400) (FR400-MAJOR M-2))
+ (.str name "$pack $FRintieven,$FRintjeven,$" res)
+ (+ pack res op FRintieven ope FRintjeven)
+ (media-quad-cross-multiply-acc-semantics 1 mode conv addop rhw res
+ max min)
+ ((fr400 (unit u-media-2-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven))))
+ )
+)
+
+(media-quad-cross-multiply-acc mqmacxhs HI ext add h-acc40S ACC40Sk
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_78 OPE1_02
+ "Media quad cross multiply and accumulate signed")
+
+(define-pmacro (media-complex-semantics
+ conv lhs1 rhs1 lhs2 rhs2 res max min sie)
+ (sequence ((DI tmp1) (DI tmp2))
+ (media-multiply-semantics conv lhs1 rhs1 tmp1)
+ (media-multiply-semantics conv lhs2 rhs2 tmp2)
+ (set tmp1 (sub tmp1 tmp2))
+ (saturate-v tmp1 max min sie res))
+)
+
+(define-pmacro (media-complex-semantics-i
+ conv lhs1 rhs1 lhs2 rhs2 res max min sie)
+ (sequence ((DI tmp1) (DI tmp2))
+ (media-multiply-semantics conv lhs1 rhs1 tmp1)
+ (media-multiply-semantics conv lhs2 rhs2 tmp2)
+ (set tmp1 (add tmp1 tmp2))
+ (saturate-v tmp1 max min sie res))
+)
+
+(define-pmacro (media-dual-complex-semantics mode conv rhs1 rhs2 max min)
+ (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo))
+ (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo)
+ (media-complex-semantics conv argihi rhs1 argilo rhs2 ACC40Sk
+ max min (msr-sie-acci)))
+)
+
+(define-pmacro (media-dual-complex-semantics-i mode conv rhs1 rhs2 max min)
+ (sequence ((mode argihi) (mode argilo) (mode argjhi) (mode argjlo))
+ (extract-hilo FRinti 0 FRintj 0 argihi argilo argjhi argjlo)
+ (media-complex-semantics-i conv argihi rhs1 argilo rhs2 ACC40Sk
+ max min (msr-sie-acci)))
+)
+
+(define-pmacro (media-dual-complex
+ name mode conv rhs1 rhs2 max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1))
+ (.str name "$pack $FRinti,$FRintj,$ACC40Sk")
+ (+ pack ACC40Sk op FRinti ope FRintj)
+ (media-dual-complex-semantics mode conv rhs1 rhs2 max min)
+ ((fr400 (unit u-media-2))
+ (fr500 (unit u-media)))
+ )
+)
+
+(define-pmacro (media-dual-complex-i
+ name mode conv rhs1 rhs2 max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1))
+ (.str name "$pack $FRinti,$FRintj,$ACC40Sk")
+ (+ pack ACC40Sk op FRinti ope FRintj)
+ (media-dual-complex-semantics-i mode conv rhs1 rhs2 max min)
+ ((fr400 (unit u-media-2))
+ (fr500 (unit u-media-dual-mul)))
+ )
+)
+
+(media-dual-complex mcpxrs HI ext argjhi argjlo
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_7B OPE1_20
+ "Media dual complex real signed with saturation")
+
+(media-dual-complex mcpxru UHI zext argjhi argjlo
+ (const DI #xffffffffff) (const DI 0)
+ OP_7B OPE1_21
+ "Media dual complex real unsigned with saturation")
+
+(media-dual-complex-i mcpxis HI ext argjlo argjhi
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_7B OPE1_22
+ "Media dual complex imaginary signed with saturation")
+
+(media-dual-complex-i mcpxiu UHI zext argjlo argjhi
+ (const DI #xffffffffff) (const DI 0)
+ OP_7B OPE1_23
+ "Media dual complex imaginary unsigned with saturation")
+
+(define-pmacro (conditional-media-dual-complex
+ name mode conv rhs1 rhs2 max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1) CONDITIONAL)
+ (.str name "$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond")
+ (+ pack ACC40Sk op FRinti CCi cond ope FRintj)
+ (if (eq CCi (or cond 2))
+ (media-dual-complex-semantics mode conv rhs1 rhs2 max min))
+ ((fr400 (unit u-media-2))
+ (fr500 (unit u-media)))
+ )
+)
+
+(define-pmacro (conditional-media-dual-complex-i
+ name mode conv rhs1 rhs2 max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-1) CONDITIONAL)
+ (.str name "$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond")
+ (+ pack ACC40Sk op FRinti CCi cond ope FRintj)
+ (if (eq CCi (or cond 2))
+ (media-dual-complex-semantics-i mode conv rhs1 rhs2 max min))
+ ((fr400 (unit u-media-2))
+ (fr500 (unit u-media-dual-mul)))
+ )
+)
+
+(conditional-media-dual-complex cmcpxrs HI ext argjhi argjlo
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_75 OPE4_0
+ "Conditional Media dual complex real signed with saturation")
+
+(conditional-media-dual-complex cmcpxru UHI zext argjhi argjlo
+ (const DI #xffffffffff) (const DI 0)
+ OP_75 OPE4_1
+ "Conditional Media dual complex real unsigned with saturation")
+
+(conditional-media-dual-complex-i cmcpxis HI ext argjlo argjhi
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_75 OPE4_2
+ "Conditional Media dual complex imaginary signed with saturation")
+
+(conditional-media-dual-complex-i cmcpxiu UHI zext argjlo argjhi
+ (const DI #xffffffffff) (const DI 0)
+ OP_75 OPE4_3
+ "Conditional Media dual complex imaginary unsigned with saturation")
+
+(define-pmacro (media-quad-complex
+ name mode conv rhs1 rhs2 max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2))
+ (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk")
+ (+ pack ACC40Sk op FRintieven ope FRintjeven)
+ (if (register-unaligned ACC40Sk 2)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (orif (register-unaligned FRintieven 2)
+ (register-unaligned FRintjeven 2))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (sequence ((mode argihi) (mode argilo)
+ (mode argjhi) (mode argjlo))
+ (extract-hilo FRintieven 0 FRintjeven 0
+ argihi argilo argjhi argjlo)
+ (media-complex-semantics conv argihi rhs1 argilo rhs2
+ ACC40Sk
+ max min (msr-sie-acci))
+ (extract-hilo FRintieven 1 FRintjeven 1
+ argihi argilo argjhi argjlo)
+ (media-complex-semantics conv argihi rhs1 argilo rhs2
+ (nextreg h-acc40S ACC40Sk 1)
+ max min (msr-sie-acci-1)))))
+ ((fr400 (unit u-media-2-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)))
+ (fr500 (unit u-media-quad-complex
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven))))
+ )
+)
+
+(define-pmacro (media-quad-complex-i
+ name mode conv rhs1 rhs2 max min op ope comment)
+ (dni name
+ (comment)
+ ((UNIT FM01) (FR500-MAJOR M-4) (FR400-MAJOR M-2))
+ (.str name "$pack $FRintieven,$FRintjeven,$ACC40Sk")
+ (+ pack ACC40Sk op FRintieven ope FRintjeven)
+ (if (register-unaligned ACC40Sk 2)
+ (c-call VOID "@cpu@_media_acc_not_aligned")
+ (if (orif (register-unaligned FRintieven 2)
+ (register-unaligned FRintjeven 2))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (sequence ((mode argihi) (mode argilo)
+ (mode argjhi) (mode argjlo))
+ (extract-hilo FRintieven 0 FRintjeven 0
+ argihi argilo argjhi argjlo)
+ (media-complex-semantics-i conv argihi rhs1 argilo rhs2
+ ACC40Sk
+ max min (msr-sie-acci))
+ (extract-hilo FRintieven 1 FRintjeven 1
+ argihi argilo argjhi argjlo)
+ (media-complex-semantics-i conv argihi rhs1 argilo rhs2
+ (nextreg h-acc40S ACC40Sk 1)
+ max min (msr-sie-acci-1)))))
+ ((fr400 (unit u-media-2-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)))
+ (fr500 (unit u-media-quad-complex
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven))))
+ )
+)
+
+(media-quad-complex mqcpxrs HI ext argjhi argjlo
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_7B OPE1_24
+ "Media quad complex real signed with saturation")
+
+(media-quad-complex mqcpxru UHI zext argjhi argjlo
+ (const DI #xffffffffff) (const DI 0)
+ OP_7B OPE1_25
+ "Media quad complex real unsigned with saturation")
+
+(media-quad-complex-i mqcpxis HI ext argjlo argjhi
+ (const DI #x7fffffffff) (const DI #xffffff8000000000)
+ OP_7B OPE1_26
+ "Media quad complex imaginary signed with saturation")
+
+(media-quad-complex-i mqcpxiu UHI zext argjlo argjhi
+ (const DI #xffffffffff) (const DI 0)
+ OP_7B OPE1_27
+ "Media quad complex imaginary unsigned with saturation")
+
+(define-pmacro (media-pack src1 src2 targ offset)
+ (sequence ()
+ (set (halfword hi targ offset) (halfword lo src1 offset))
+ (set (halfword lo targ offset) (halfword lo src2 offset)))
+)
+
+(define-pmacro (media-expand-halfword-to-word-semantics cond)
+ (if cond
+ (sequence ((UHI tmp))
+ (if (and u6 1)
+ (set tmp (halfword lo FRinti 0))
+ (set tmp (halfword hi FRinti 0)))
+ (set (halfword hi FRintk 0) tmp)
+ (set (halfword lo FRintk 0) tmp)))
+)
+
+(dni mexpdhw
+ "Media expand halfword to word"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-1))
+ "mexpdhw$pack $FRinti,$u6,$FRintk"
+ (+ pack FRintk OP_7B FRinti OPE1_32 u6)
+ (media-expand-halfword-to-word-semantics 1)
+ ((fr400 (unit u-media-3))
+ (fr500 (unit u-media)))
+)
+
+(dni cmexpdhw
+ "Conditional media expand halfword to word"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-1) CONDITIONAL)
+ "cmexpdhw$pack $FRinti,$u6,$FRintk,$CCi,$cond"
+ (+ pack FRintk OP_76 FRinti CCi cond OPE4_2 u6)
+ (media-expand-halfword-to-word-semantics (eq CCi (or cond 2)))
+ ((fr400 (unit u-media-3))
+ (fr500 (unit u-media)))
+)
+
+(define-pmacro (media-expand-halfword-to-double-semantics cond)
+ (if (register-unaligned FRintkeven 2)
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (if cond
+ (sequence ((UHI tmp))
+ ; a hack to get FRintkeven referenced for profiling
+ (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+ (if (and u6 1)
+ (set tmp (halfword lo FRinti 0))
+ (set tmp (halfword hi FRinti 0)))
+ (set (halfword hi FRintkeven 0) tmp)
+ (set (halfword lo FRintkeven 0) tmp)
+ (set (halfword hi FRintkeven 1) tmp)
+ (set (halfword lo FRintkeven 1) tmp))))
+)
+
+(dni mexpdhd
+ "Media expand halfword to double"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2))
+ "mexpdhd$pack $FRinti,$u6,$FRintkeven"
+ (+ pack FRintkeven OP_7B FRinti OPE1_33 u6)
+ (media-expand-halfword-to-double-semantics 1)
+ ((fr400 (unit u-media-dual-expand
+ (out FRintk FRintkeven)))
+ (fr500 (unit u-media-dual-expand
+ (out FRintk FRintkeven))))
+)
+
+(dni cmexpdhd
+ "Conditional media expand halfword to double"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2) CONDITIONAL)
+ "cmexpdhd$pack $FRinti,$u6,$FRintkeven,$CCi,$cond"
+ (+ pack FRintkeven OP_76 FRinti CCi cond OPE4_3 u6)
+ (media-expand-halfword-to-double-semantics (eq CCi (or cond 2)))
+ ((fr400 (unit u-media-dual-expand
+ (out FRintk FRintkeven)))
+ (fr500 (unit u-media-dual-expand
+ (out FRintk FRintkeven))))
+)
+
+(dni mpackh
+ "Media halfword pack"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-1))
+ "mpackh$pack $FRinti,$FRintj,$FRintk"
+ (+ pack FRintk OP_7B FRinti OPE1_34 FRintj)
+ (media-pack FRinti FRintj FRintk 0)
+ ((fr400 (unit u-media-3))
+ (fr500 (unit u-media)))
+)
+
+(dni mdpackh
+ "Media dual pack"
+ ((UNIT FM01) (FR500-MAJOR M-5) (FR400-MAJOR M-2))
+ "mdpackh$pack $FRintieven,$FRintjeven,$FRintkeven"
+ (+ pack FRintkeven OP_7B FRintieven OPE1_36 FRintjeven)
+ (if (orif (register-unaligned FRintieven 2)
+ (orif (register-unaligned FRintjeven 2)
+ (register-unaligned FRintkeven 2)))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (sequence ()
+ ; hack to get these referenced for profiling
+ (set FRintieven (c-raw-call SI "frv_ref_SI" FRintieven))
+ (set FRintjeven (c-raw-call SI "frv_ref_SI" FRintjeven))
+ (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+ (media-pack FRintieven FRintjeven FRintkeven 0)
+ (media-pack FRintieven FRintjeven FRintkeven 1)))
+ ((fr400 (unit u-media-3-quad
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)
+ (out FRintk FRintkeven)))
+ (fr500 (unit u-media-quad-arith
+ (in FRinti FRintieven)
+ (in FRintj FRintjeven)
+ (out FRintk FRintkeven))))
+)
+
+(define-pmacro (media-unpack src soff targ toff)
+ (sequence ()
+ (set (halfword hi targ toff) (halfword hi src soff))
+ (set (halfword lo targ toff) (halfword hi src soff))
+ (set (halfword hi targ (add toff 1)) (halfword lo src soff))
+ (set (halfword lo targ (add toff 1)) (halfword lo src soff)))
+)
+
+(dni munpackh
+ "Media halfword unpack"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2))
+ "munpackh$pack $FRinti,$FRintkeven"
+ (+ pack FRintkeven OP_7B FRinti OPE1_35 (FRj-null))
+ (if (register-unaligned FRintkeven 2)
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (sequence ()
+ ; hack to get these referenced for profiling
+ (set FRinti (c-raw-call SI "frv_ref_SI" FRinti))
+ (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+ (media-unpack FRinti 0 FRintkeven 0)))
+ ((fr400 (unit u-media-dual-expand
+ (out FRintk FRintkeven)))
+ (fr500 (unit u-media-dual-expand
+ (out FRintk FRintkeven))))
+)
+
+(dni mdunpackh
+ "Media dual unpack"
+ ((UNIT FM01) (FR500-MAJOR M-7) (MACH simple,tomcat,frv))
+ "mdunpackh$pack $FRintieven,$FRintk"
+ (+ pack FRintk OP_7B FRintieven OPE1_37 (FRj-null))
+ (if (orif (register-unaligned FRintieven 2) (register-unaligned FRintk 4))
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (sequence ()
+ ; hack to get these referenced for profiling
+ (set FRintieven (c-raw-call SI "frv_ref_SI" FRintieven))
+ (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+ (media-unpack FRintieven 0 FRintk 0)
+ (media-unpack FRintieven 1 FRintk 2)))
+ ((fr500 (unit u-media-dual-unpack
+ (in FRinti FRintieven))))
+)
+
+(define-pmacro (ubyte num arg offset)
+ (reg (.sym h-fr_ num) (add (index-of arg) offset)))
+
+(define-pmacro (mbtoh-semantics cond)
+ (if (register-unaligned FRintkeven 2)
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (if cond
+ (sequence ()
+ (set (halfword hi FRintkeven 0) (ubyte 3 FRintj 0))
+ (set (halfword lo FRintkeven 0) (ubyte 2 FRintj 0))
+ (set (halfword hi FRintkeven 1) (ubyte 1 FRintj 0))
+ (set (halfword lo FRintkeven 1) (ubyte 0 FRintj 0)))))
+)
+
+(dni mbtoh
+ "Media convert byte to halfword"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2))
+ "mbtoh$pack $FRintj,$FRintkeven"
+ (+ pack FRintkeven OP_7B (FRi-null) OPE1_38 FRintj)
+ (sequence ()
+ ; hack to get these referenced for profiling
+ (set FRintj (c-raw-call SI "frv_ref_SI" FRintj))
+ (set FRintkeven (c-raw-call SI "frv_ref_SI" FRintkeven))
+ (mbtoh-semantics 1))
+ ((fr400 (unit u-media-dual-expand
+ (in FRinti FRintieven)))
+ (fr500 (unit u-media-dual-btoh
+ (in FRinti FRintieven))))
+)
+
+(dni cmbtoh
+ "Conditional media convert byte to halfword"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2) CONDITIONAL)
+ "cmbtoh$pack $FRintj,$FRintkeven,$CCi,$cond"
+ (+ pack FRintkeven OP_77 (FRi-null) CCi cond OPE4_0 FRintj)
+ (mbtoh-semantics (eq CCi (or cond 2)))
+ ((fr400 (unit u-media-dual-expand
+ (out FRintk FRintkeven)))
+ (fr500 (unit u-media-dual-btoh
+ (out FRintk FRintkeven))))
+)
+
+(define-pmacro (mhtob-semantics cond)
+ (if (register-unaligned FRintjeven 2)
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (if cond
+ (sequence ()
+ (set (ubyte 3 FRintk 0) (halfword hi FRintjeven 0))
+ (set (ubyte 2 FRintk 0) (halfword lo FRintjeven 0))
+ (set (ubyte 1 FRintk 0) (halfword hi FRintjeven 1))
+ (set (ubyte 0 FRintk 0) (halfword lo FRintjeven 1)))))
+)
+
+(dni mhtob
+ "Media convert halfword to byte"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2))
+ "mhtob$pack $FRintjeven,$FRintk"
+ (+ pack FRintk OP_7B (FRi-null) OPE1_39 FRintjeven)
+ (sequence ()
+ ; hack to get these referenced for profiling
+ (set FRintjeven (c-raw-call SI "frv_ref_SI" FRintjeven))
+ (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+ (mhtob-semantics 1))
+ ((fr400 (unit u-media-dual-htob
+ (in FRintj FRintjeven)))
+ (fr500 (unit u-media-dual-htob
+ (in FRintj FRintjeven))))
+)
+
+(dni cmhtob
+ "Conditional media convert halfword to byte"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-2) CONDITIONAL)
+ "cmhtob$pack $FRintjeven,$FRintk,$CCi,$cond"
+ (+ pack FRintk OP_77 (FRi-null) CCi cond OPE4_1 FRintjeven)
+ (sequence ()
+ ; hack to get these referenced for profiling
+ (set FRintjeven (c-raw-call SI "frv_ref_SI" FRintjeven))
+ (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+ (mhtob-semantics (eq CCi (or cond 2))))
+ ((fr400 (unit u-media-dual-htob
+ (in FRintj FRintjeven)))
+ (fr500 (unit u-media-dual-htob
+ (in FRintj FRintjeven))))
+)
+
+(define-pmacro (mbtohe-semantics cond)
+ (if (register-unaligned FRintk 4)
+ (c-call VOID "@cpu@_media_register_not_aligned")
+ (if cond
+ (sequence ()
+ (set (halfword hi FRintk 0) (ubyte 3 FRintj 0))
+ (set (halfword lo FRintk 0) (ubyte 3 FRintj 0))
+ (set (halfword hi FRintk 1) (ubyte 2 FRintj 0))
+ (set (halfword lo FRintk 1) (ubyte 2 FRintj 0))
+ (set (halfword hi FRintk 2) (ubyte 1 FRintj 0))
+ (set (halfword lo FRintk 2) (ubyte 1 FRintj 0))
+ (set (halfword hi FRintk 3) (ubyte 0 FRintj 0))
+ (set (halfword lo FRintk 3) (ubyte 0 FRintj 0)))))
+)
+
+(dni mbtohe
+ "Media convert byte to halfword extended"
+ ((UNIT FM01) (FR500-MAJOR M-7) (MACH simple,tomcat,frv))
+ "mbtohe$pack $FRintj,$FRintk"
+ (+ pack FRintk OP_7B (FRi-null) OPE1_3A FRintj)
+ (sequence ()
+ ; hack to get these referenced for profiling
+ (set FRintj (c-raw-call SI "frv_ref_SI" FRintj))
+ (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+ (mbtohe-semantics 1))
+ ((fr500 (unit u-media-dual-btohe)))
+)
+
+(dni cmbtohe
+ "Conditional media convert byte to halfword extended"
+ ((UNIT FM01) (FR500-MAJOR M-7) CONDITIONAL (MACH simple,tomcat,frv))
+ "cmbtohe$pack $FRintj,$FRintk,$CCi,$cond"
+ (+ pack FRintk OP_77 (FRi-null) CCi cond OPE4_2 FRintj)
+ (sequence ()
+ ; hack to get these referenced for profiling
+ (set FRintj (c-raw-call SI "frv_ref_SI" FRintj))
+ (set FRintk (c-raw-call SI "frv_ref_SI" FRintk))
+ (mbtohe-semantics (eq CCi (or cond 2))))
+ ((fr500 (unit u-media-dual-btohe)))
+)
+
+(dni mclracc
+ "Media clear accumulator(s)"
+ ((UNIT FM01) (FR500-MAJOR M-3))
+ "mclracc$pack $ACC40Sk,$A"
+ (+ pack ACC40Sk OP_7B A (misc-null-10) OPE1_3B (FRj-null))
+ (c-call VOID "@cpu@_clear_accumulators" (index-of ACC40Sk) A)
+ ((fr400 (unit u-media-4))
+ (fr500 (unit u-media)))
+)
+
+(dni mrdacc
+ "Media read accumulator"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-1))
+ "mrdacc$pack $ACC40Si,$FRintk"
+ (+ pack FRintk OP_7B ACC40Si OPE1_3C (FRj-null))
+ (set FRintk ACC40Si)
+ ((fr400 (unit u-media-4))
+ (fr500 (unit u-media)))
+)
+
+(dni mrdaccg
+ "Media read accumulator guard"
+ ((UNIT FM01) (FR500-MAJOR M-2) (FR400-MAJOR M-1))
+ "mrdaccg$pack $ACCGi,$FRintk"
+ (+ pack FRintk OP_7B ACCGi OPE1_3E (FRj-null))
+ (set FRintk ACCGi)
+ ((fr400 (unit u-media-4-accg))
+ (fr500 (unit u-media)))
+)
+
+(dni mwtacc
+ "Media write accumulator"
+ ((UNIT FM01) (FR500-MAJOR M-3) (FR400-MAJOR M-1))
+ "mwtacc$pack $FRinti,$ACC40Sk"
+ (+ pack ACC40Sk OP_7B FRinti OPE1_3D (FRj-null))
+ (set ACC40Sk (or (and ACC40Sk (const DI #xffffffff00000000))
+ FRinti))
+ ((fr400 (unit u-media-4))
+ (fr500 (unit u-media)))
+)
+
+(dni mwtaccg
+ "Media write accumulator guard"
+ ((UNIT FM01) (FR500-MAJOR M-3) (FR400-MAJOR M-1))
+ "mwtaccg$pack $FRinti,$ACCGk"
+ (+ pack ACCGk OP_7B FRinti OPE1_3F (FRj-null))
+ (set ACCGk FRinti)
+ ((fr400 (unit u-media-4-accg))
+ (fr500 (unit u-media)))
+)
+
+(define-pmacro (media-cop num op)
+ (dni (.sym mcop num)
+ "Media custom instruction"
+ ((UNIT FM01) (FR500-MAJOR M-1) (MACH frv))
+ (.str "mcop" num "$pack $FRi,$FRj,$FRk")
+ (+ pack FRk op FRi OPE1_00 FRj)
+ (c-call VOID "@cpu@_media_cop" num)
+ ()
+ )
+)
+
+(media-cop 1 OP_7C)
+(media-cop 2 OP_7D)
+
+; nop
+; A nop is defined to be a "ori gr0,0,gr0"
+; This needn't be a macro-insn, but making it one greatly simplifies decode.c
+; On the other hand spending a little time in the decoder is often worth it.
+;
+(dnmi nop "nop"
+ ((UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "nop$pack"
+ (emit ori pack (GRi 0) (s12 0) (GRk 0))
+)
+
+; Floating point NOP
+(dni fnop
+ "Floating point nop"
+ ((UNIT FM01) (FR500-MAJOR F-8) (MACH simple,tomcat,fr500,frv))
+ "fnop$pack"
+ (+ pack (rd-null) OP_79 (FRi-null) OPE1_0D (FRj-null))
+ (nop)
+ ()
+)
+
+; Media NOP
+; A special case of mclracc
+(dnmi mnop "Media nop"
+ (NO-DIS (UNIT FM01) (FR500-MAJOR M-3))
+ "mnop$pack"
+ (emit mclracc pack (ACC40Sk 63) (A 1))
+)
+
+; A return instruction
+(dnmi ret "return"
+ (NO-DIS (UNIT B01) (FR500-MAJOR B-3) (FR400-MAJOR B-3))
+ "ret$pack"
+ (emit bralr pack (hint_taken 2))
+)
+
+(dnmi cmp "compare"
+ (NO-DIS (UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "cmp$pack $GRi,$GRj,$ICCi_1"
+ (emit subcc pack GRi GRj (GRk 0) ICCi_1)
+)
+
+(dnmi cmpi "compare immediate"
+ (NO-DIS (UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "cmpi$pack $GRi,$s10,$ICCi_1"
+ (emit subicc pack GRi s10 (GRk 0) ICCi_1)
+)
+
+(dnmi ccmp "conditional compare"
+ (NO-DIS (UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ "ccmp$pack $GRi,$GRj,$CCi,$cond"
+ (emit csubcc pack GRi GRj (GRk 0) CCi cond)
+)
+
+(dnmi mov "move"
+ (NO-DIS (UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1))
+ "mov$pack $GRi,$GRk"
+ (emit ori pack GRi (s12 0) GRk)
+)
+
+(dnmi cmov "conditional move"
+ (NO-DIS (UNIT I01) (FR500-MAJOR I-1) (FR400-MAJOR I-1) CONDITIONAL)
+ "cmov$pack $GRi,$GRk,$CCi,$cond"
+ (emit cor pack GRi (GRj 0) GRk CCi cond)
+)
diff --git a/cpu/frv.opc b/cpu/frv.opc
new file mode 100644
index 00000000000..fb9434e3460
--- /dev/null
+++ b/cpu/frv.opc
@@ -0,0 +1,971 @@
+/* Fujitsu FRV opcode support, for GNU Binutils. -*- C -*-
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by Red Hat Inc; developed under contract from Fujitsu.
+
+ This file is part of the GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/* This file is an addendum to frv.cpu. Heavy use of C code isn't
+ appropriate in .cpu files, so it resides here. This especially applies
+ to assembly/disassembly where parsing/printing can be quite involved.
+ Such things aren't really part of the specification of the cpu, per se,
+ so .cpu files provide the general framework and .opc files handle the
+ nitty-gritty details as necessary.
+
+ Each section is delimited with start and end markers.
+
+ <arch>-opc.h additions use: "-- opc.h"
+ <arch>-opc.c additions use: "-- opc.c"
+ <arch>-asm.c additions use: "-- asm.c"
+ <arch>-dis.c additions use: "-- dis.c"
+ <arch>-ibd.h additions use: "-- ibd.h"
+*/
+
+/* -- opc.h */
+
+#undef CGEN_DIS_HASH_SIZE
+#define CGEN_DIS_HASH_SIZE 128
+#undef CGEN_DIS_HASH
+#define CGEN_DIS_HASH(buffer, value) (((value) >> 18) & 127)
+
+/* Allows reason codes to be output when assembler errors occur. */
+#define CGEN_VERBOSE_ASSEMBLER_ERRORS
+
+/* Vliw support. */
+#define FRV_VLIW_SIZE 4 /* fr500 has largest vliw size of 4. */
+typedef CGEN_ATTR_VALUE_TYPE VLIW_COMBO[FRV_VLIW_SIZE];
+
+typedef struct
+{
+ int next_slot;
+ int constraint_violation;
+ unsigned long mach;
+ unsigned long elf_flags;
+ CGEN_ATTR_VALUE_TYPE *unit_mapping;
+ VLIW_COMBO *current_vliw;
+ CGEN_ATTR_VALUE_TYPE major[FRV_VLIW_SIZE];
+} FRV_VLIW;
+
+int frv_is_branch_major PARAMS ((CGEN_ATTR_VALUE_TYPE, unsigned long));
+int frv_is_float_major PARAMS ((CGEN_ATTR_VALUE_TYPE, unsigned long));
+int frv_is_media_major PARAMS ((CGEN_ATTR_VALUE_TYPE, unsigned long));
+int frv_is_branch_insn PARAMS ((const CGEN_INSN *));
+int frv_is_float_insn PARAMS ((const CGEN_INSN *));
+int frv_is_media_insn PARAMS ((const CGEN_INSN *));
+void frv_vliw_reset PARAMS ((FRV_VLIW *, unsigned long mach, unsigned long elf_flags));
+int frv_vliw_add_insn PARAMS ((FRV_VLIW *, const CGEN_INSN *));
+int spr_valid PARAMS ((long));
+/* -- */
+
+/* -- opc.c */
+#include "elf/frv.h"
+
+static int match_unit
+ PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE, CGEN_ATTR_VALUE_TYPE));
+static int match_vliw
+ PARAMS ((VLIW_COMBO *, VLIW_COMBO *, int));
+static VLIW_COMBO * add_next_to_vliw
+ PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE));
+static int find_major_in_vliw
+ PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE));
+static int fr400_check_insn_major_constraints
+ PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE));
+static int fr500_check_insn_major_constraints
+ PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE));
+static int check_insn_major_constraints
+ PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE));
+
+int
+frv_is_branch_major (CGEN_ATTR_VALUE_TYPE major, unsigned long mach)
+{
+ switch (mach)
+ {
+ case bfd_mach_fr400:
+ if (major >= FR400_MAJOR_B_1 && major <= FR400_MAJOR_B_6)
+ return 1; /* is a branch */
+ break;
+ default:
+ if (major >= FR500_MAJOR_B_1 && major <= FR500_MAJOR_B_6)
+ return 1; /* is a branch */
+ break;
+ }
+
+ return 0; /* not a branch */
+}
+
+int
+frv_is_float_major (CGEN_ATTR_VALUE_TYPE major, unsigned long mach)
+{
+ switch (mach)
+ {
+ case bfd_mach_fr400:
+ return 0; /* No float insns */
+ default:
+ if (major >= FR500_MAJOR_F_1 && major <= FR500_MAJOR_F_8)
+ return 1; /* is a float insn */
+ break;
+ }
+
+ return 0; /* not a branch */
+}
+
+int
+frv_is_media_major (CGEN_ATTR_VALUE_TYPE major, unsigned long mach)
+{
+ switch (mach)
+ {
+ case bfd_mach_fr400:
+ if (major >= FR400_MAJOR_M_1 && major <= FR400_MAJOR_M_2)
+ return 1; /* is a media insn */
+ break;
+ default:
+ if (major >= FR500_MAJOR_M_1 && major <= FR500_MAJOR_M_8)
+ return 1; /* is a media insn */
+ break;
+ }
+
+ return 0; /* not a branch */
+}
+
+int
+frv_is_branch_insn (const CGEN_INSN *insn)
+{
+ if (frv_is_branch_major (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR400_MAJOR),
+ bfd_mach_fr400))
+ return 1;
+ if (frv_is_branch_major (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR500_MAJOR),
+ bfd_mach_fr500))
+ return 1;
+
+ return 0;
+}
+
+int
+frv_is_float_insn (const CGEN_INSN *insn)
+{
+ if (frv_is_float_major (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR400_MAJOR),
+ bfd_mach_fr400))
+ return 1;
+ if (frv_is_float_major (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR500_MAJOR),
+ bfd_mach_fr500))
+ return 1;
+
+ return 0;
+}
+
+int
+frv_is_media_insn (const CGEN_INSN *insn)
+{
+ if (frv_is_media_major (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR400_MAJOR),
+ bfd_mach_fr400))
+ return 1;
+ if (frv_is_media_major (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR500_MAJOR),
+ bfd_mach_fr500))
+ return 1;
+
+ return 0;
+}
+
+/* This table represents the allowable packing for vliw insns for the fr400.
+ The fr400 has only 2 vliw slots. Represent this by not allowing any insns
+ in slots 2 and 3.
+ Subsets of any given row are also allowed. */
+static VLIW_COMBO fr400_allowed_vliw[] =
+{
+ /* slot0 slot1 slot2 slot3 */
+ { UNIT_I0, UNIT_I1, UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_B0, UNIT_NIL, UNIT_NIL },
+ { UNIT_FM0, UNIT_FM1, UNIT_NIL, UNIT_NIL },
+ { UNIT_FM0, UNIT_B0, UNIT_NIL, UNIT_NIL },
+ { UNIT_B0, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_C, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL }
+};
+
+/* This table represents the allowable packing for vliw insns for the fr500.
+ Subsets of any given row are also allowed. */
+static VLIW_COMBO fr500_allowed_vliw[] =
+{
+ /* slot0 slot1 slot2 slot3 */
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1 },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_B0 },
+ { UNIT_I0, UNIT_FM0, UNIT_FM1, UNIT_B0 },
+ { UNIT_I0, UNIT_FM0, UNIT_B0, UNIT_B1 },
+ { UNIT_I0, UNIT_I1, UNIT_B0, UNIT_B1 },
+ { UNIT_I0, UNIT_B0, UNIT_B1, UNIT_NIL },
+ { UNIT_FM0, UNIT_FM1, UNIT_B0, UNIT_B1 },
+ { UNIT_FM0, UNIT_B0, UNIT_B1, UNIT_NIL },
+ { UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL },
+ { UNIT_C, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL }
+};
+
+/* Some insns are assigned specialized implementation units which map to
+ different actual implementation units on different machines. These
+ tables perform that mapping. */
+static CGEN_ATTR_VALUE_TYPE fr400_unit_mapping[] =
+{
+/* unit in insn actual unit */
+/* NIL */ UNIT_NIL,
+/* I0 */ UNIT_I0,
+/* I1 */ UNIT_I1,
+/* I01 */ UNIT_I01,
+/* FM0 */ UNIT_FM0,
+/* FM1 */ UNIT_FM1,
+/* FM01 */ UNIT_FM01,
+/* B0 */ UNIT_B0, /* branches only in B0 unit. */
+/* B1 */ UNIT_B0,
+/* B01 */ UNIT_B0,
+/* C */ UNIT_C,
+/* MULT-DIV */ UNIT_I0, /* multiply and divide only in I0 unit. */
+/* LOAD */ UNIT_I0 /* load only in I0 unit. */
+};
+
+static CGEN_ATTR_VALUE_TYPE fr500_unit_mapping[] =
+{
+/* unit in insn actual unit */
+/* NIL */ UNIT_NIL,
+/* I0 */ UNIT_I0,
+/* I1 */ UNIT_I1,
+/* I01 */ UNIT_I01,
+/* FM0 */ UNIT_FM0,
+/* FM1 */ UNIT_FM1,
+/* FM01 */ UNIT_FM01,
+/* B0 */ UNIT_B0,
+/* B1 */ UNIT_B1,
+/* B01 */ UNIT_B01,
+/* C */ UNIT_C,
+/* MULT-DIV */ UNIT_I01, /* multiply and divide in I0 or I1 unit. */
+/* LOAD */ UNIT_I01 /* load in I0 or I1 unit. */
+};
+
+void
+frv_vliw_reset (FRV_VLIW *vliw, unsigned long mach, unsigned long elf_flags)
+{
+ vliw->next_slot = 0;
+ vliw->constraint_violation = 0;
+ vliw->mach = mach;
+ vliw->elf_flags = elf_flags;
+
+ switch (mach)
+ {
+ case bfd_mach_fr400:
+ vliw->current_vliw = fr400_allowed_vliw;
+ vliw->unit_mapping = fr400_unit_mapping;
+ break;
+ default:
+ vliw->current_vliw = fr500_allowed_vliw;
+ vliw->unit_mapping = fr500_unit_mapping;
+ break;
+ }
+}
+
+/* Return 1 if unit1 is a match for unit2.
+ Unit1 comes from the insn's UNIT attribute. unit2 comes from one of the
+ *_allowed_vliw tables above. */
+static int
+match_unit (FRV_VLIW *vliw,
+ CGEN_ATTR_VALUE_TYPE unit1, CGEN_ATTR_VALUE_TYPE unit2)
+{
+ /* Map any specialized implementation units to actual ones. */
+ unit1 = vliw->unit_mapping[unit1];
+
+ if (unit1 == unit2)
+ return 1;
+ if (unit1 < unit2)
+ return 0;
+
+ switch (unit1)
+ {
+ case UNIT_I01:
+ case UNIT_FM01:
+ case UNIT_B01:
+ /* The 01 versions of these units are within 2 enums of the 0 or 1
+ versions. */
+ if (unit1 - unit2 <= 2)
+ return 1;
+ break;
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+/* Return 1 if the vliws match, 0 otherwise. */
+
+static int
+match_vliw (VLIW_COMBO *vliw1, VLIW_COMBO *vliw2, int vliw_size)
+{
+ int i;
+
+ for (i = 0; i < vliw_size; ++i)
+ {
+ if ((*vliw1)[i] != (*vliw2)[i])
+ return 0;
+ }
+
+ return 1;
+}
+
+/* Find the next vliw vliw in the table that can accomodate the new insn.
+ If one is found then return it. Otherwise return NULL. */
+
+static VLIW_COMBO *
+add_next_to_vliw (FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE unit)
+{
+ int next = vliw->next_slot;
+ VLIW_COMBO *current = vliw->current_vliw;
+ VLIW_COMBO *potential;
+
+ if (next <= 0)
+ abort (); /* Should never happen */
+
+ /* The table is sorted by units allowed within slots, so vliws with
+ identical starting sequences are together. */
+ potential = current;
+ do
+ {
+ if (match_unit (vliw, unit, (*potential)[next]))
+ return potential;
+ ++potential;
+ }
+ while (match_vliw (potential, current, next));
+
+ return NULL;
+}
+
+/* Look for the given major insn type in the given vliw. Return 1 if found,
+ return 0 otherwise. */
+
+static int
+find_major_in_vliw (FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE major)
+{
+ int i;
+
+ for (i = 0; i < vliw->next_slot; ++i)
+ if (vliw->major[i] == major)
+ return 1;
+
+ return 0;
+}
+
+/* Check for constraints between the insns in the vliw due to major insn
+ types. */
+
+static int
+fr400_check_insn_major_constraints (
+ FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE major
+)
+{
+ /* In the cpu file, all media insns are represented as being allowed in
+ both media units. This makes it easier since this is the case for fr500.
+ Catch the invalid combinations here. Insns of major class FR400_MAJOR_M_2
+ cannot coexist with any other media insn in a vliw. */
+ switch (major)
+ {
+ case FR400_MAJOR_M_2:
+ return ! find_major_in_vliw (vliw, FR400_MAJOR_M_1)
+ && ! find_major_in_vliw (vliw, FR400_MAJOR_M_2);
+ default:
+ break;
+ }
+ return 1;
+}
+
+static int
+fr500_check_insn_major_constraints (
+ FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE major
+)
+{
+ /* TODO: A table might be faster for some of the more complex instances
+ here. */
+ switch (major)
+ {
+ case FR500_MAJOR_I_1:
+ case FR500_MAJOR_I_4:
+ case FR500_MAJOR_I_5:
+ case FR500_MAJOR_I_6:
+ case FR500_MAJOR_B_1:
+ case FR500_MAJOR_B_2:
+ case FR500_MAJOR_B_3:
+ case FR500_MAJOR_B_4:
+ case FR500_MAJOR_B_5:
+ case FR500_MAJOR_B_6:
+ case FR500_MAJOR_F_4:
+ case FR500_MAJOR_F_8:
+ case FR500_MAJOR_M_8:
+ return 1; /* OK */
+ case FR500_MAJOR_I_2:
+ /* Cannot coexist with I-3 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_I_3);
+ case FR500_MAJOR_I_3:
+ /* Cannot coexist with I-2 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_I_2);
+ case FR500_MAJOR_F_1:
+ case FR500_MAJOR_F_2:
+ /* Cannot coexist with F-5, F-6, or M-7 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_F_5)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_6)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7);
+ case FR500_MAJOR_F_3:
+ /* Cannot coexist with F-7, or M-7 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_F_7)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7);
+ case FR500_MAJOR_F_5:
+ /* Cannot coexist with F-1, F-2, F-6, F-7, or M-7 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_F_1)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_2)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_6)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_7)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7);
+ case FR500_MAJOR_F_6:
+ /* Cannot coexist with F-1, F-2, F-5, F-6, or M-7 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_F_1)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_2)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_5)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_6)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7);
+ case FR500_MAJOR_F_7:
+ /* Cannot coexist with F-3, F-5, F-7, or M-7 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_F_3)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_5)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_7)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7);
+ case FR500_MAJOR_M_1:
+ /* Cannot coexist with M-7 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_M_7);
+ case FR500_MAJOR_M_2:
+ case FR500_MAJOR_M_3:
+ /* Cannot coexist with M-5, M-6 or M-7 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_M_5)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_6)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7);
+ case FR500_MAJOR_M_4:
+ /* Cannot coexist with M-6 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_M_6);
+ case FR500_MAJOR_M_5:
+ /* Cannot coexist with M-2, M-3, M-5, M-6 or M-7 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_M_2)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_3)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_5)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_6)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7);
+ case FR500_MAJOR_M_6:
+ /* Cannot coexist with M-2, M-3, M-4, M-5, M-6 or M-7 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_M_2)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_3)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_4)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_5)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_6)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7);
+ case FR500_MAJOR_M_7:
+ /* Cannot coexist with M-1, M-2, M-3, M-5, M-6 or M-7 insn. */
+ return ! find_major_in_vliw (vliw, FR500_MAJOR_M_1)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_2)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_3)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_5)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_6)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_M_7)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_1)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_2)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_3)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_5)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_6)
+ && ! find_major_in_vliw (vliw, FR500_MAJOR_F_7);
+ default:
+ abort ();
+ break;
+ }
+ return 1;
+}
+
+static int
+check_insn_major_constraints (
+ FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE major
+)
+{
+ int rc;
+ switch (vliw->mach)
+ {
+ case bfd_mach_fr400:
+ rc = fr400_check_insn_major_constraints (vliw, major);
+ break;
+ default:
+ rc = fr500_check_insn_major_constraints (vliw, major);
+ break;
+ }
+ return rc;
+}
+
+/* Add in insn to the VLIW vliw if possible. Return 0 if successful,
+ non-zero otherwise. */
+int
+frv_vliw_add_insn (FRV_VLIW *vliw, const CGEN_INSN *insn)
+{
+ int index;
+ CGEN_ATTR_VALUE_TYPE major;
+ CGEN_ATTR_VALUE_TYPE unit;
+ VLIW_COMBO *new_vliw;
+
+ if (vliw->constraint_violation || CGEN_INSN_INVALID_P (insn))
+ return 1;
+
+ index = vliw->next_slot;
+ if (index >= FRV_VLIW_SIZE)
+ return 1;
+
+ unit = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_UNIT);
+ if (unit == UNIT_NIL)
+ abort (); /* no UNIT specified for this insn in frv.cpu */
+
+ if (vliw->mach == bfd_mach_fr400)
+ major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR400_MAJOR);
+ else
+ major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR500_MAJOR);
+
+ if (index <= 0)
+ {
+ /* Any insn can be added to slot 0. */
+ while (! match_unit (vliw, unit, (*vliw->current_vliw)[0]))
+ ++vliw->current_vliw;
+ vliw->major[0] = major;
+ vliw->next_slot = 1;
+ return 0;
+ }
+
+ /* If there are already insns in the vliw(s) check to see that
+ this one can be added. Do this by finding an allowable vliw
+ combination that can accept the new insn. */
+ if (! (vliw->elf_flags & EF_FRV_NOPACK))
+ {
+ new_vliw = add_next_to_vliw (vliw, unit);
+ if (new_vliw && check_insn_major_constraints (vliw, major))
+ {
+ vliw->current_vliw = new_vliw;
+ vliw->major[index] = major;
+ vliw->next_slot++;
+ return 0;
+ }
+
+ /* The frv machine supports all packing conbinations. If we fail,
+ to add the insn, then it could not be handled as if it was the fr500.
+ Just return as if it was handled ok. */
+ if (vliw->mach == bfd_mach_frv)
+ return 0;
+ }
+
+ vliw->constraint_violation = 1;
+ return 1;
+}
+
+int
+spr_valid (regno)
+ long regno;
+{
+ if (regno < 0) return 0;
+ if (regno <= 4095) return 1;
+ return 0;
+}
+/* -- */
+
+/* -- asm.c */
+static const char * parse_ulo16
+ PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
+static const char * parse_uslo16
+ PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
+static const char * parse_uhi16
+ PARAMS ((CGEN_CPU_DESC, const char **, int, unsigned long *));
+static long parse_register_number
+ PARAMS ((const char **));
+static const char * parse_spr
+ PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
+static const char * parse_d12
+ PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_s12
+ PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_u12
+ PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_even_register
+ PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
+
+static const char *
+parse_ulo16 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ unsigned long *valuep;
+{
+ const char *errmsg;
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+
+ if (**strp == '#' || **strp == '%')
+ {
+ if (strncasecmp (*strp + 1, "lo(", 3) == 0)
+ {
+ *strp += 4;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_LO16,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+ if (strncasecmp (*strp + 1, "gprello(", 8) == 0)
+ {
+ *strp += 9;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GPRELLO,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value >>= 16;
+ *valuep = value;
+ return errmsg;
+ }
+ }
+ return cgen_parse_signed_integer (cd, strp, opindex, valuep);
+}
+
+static const char *
+parse_uslo16 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ unsigned long *valuep;
+{
+ const char *errmsg;
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+
+ if (**strp == '#' || **strp == '%')
+ {
+ if (strncasecmp (*strp + 1, "lo(", 3) == 0)
+ {
+ *strp += 4;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_LO16,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gprello(", 8) == 0)
+ {
+ *strp += 9;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GPRELLO,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ *valuep = value;
+ return errmsg;
+ }
+ }
+ return cgen_parse_unsigned_integer (cd, strp, opindex, valuep);
+}
+
+static const char *
+parse_uhi16 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ unsigned long *valuep;
+{
+ const char *errmsg;
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+
+ if (**strp == '#' || **strp == '%')
+ {
+ if (strncasecmp (*strp + 1, "hi(", 3) == 0)
+ {
+ *strp += 4;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_HI16,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value >>= 16;
+ *valuep = value;
+ return errmsg;
+ }
+ else if (strncasecmp (*strp + 1, "gprelhi(", 8) == 0)
+ {
+ *strp += 9;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GPRELHI,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing ')'";
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value >>= 16;
+ *valuep = value;
+ return errmsg;
+ }
+ }
+ return cgen_parse_unsigned_integer (cd, strp, opindex, valuep);
+}
+
+static long
+parse_register_number (strp)
+ const char **strp;
+{
+ int regno;
+ if (**strp < '0' || **strp > '9')
+ return -1; /* error */
+
+ regno = **strp - '0';
+ for (++*strp; **strp >= '0' && **strp <= '9'; ++*strp)
+ regno = regno * 10 + (**strp - '0');
+
+ return regno;
+}
+
+static const char *
+parse_spr (cd, strp, table, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ CGEN_KEYWORD * table;
+ long *valuep;
+{
+ const char *save_strp;
+ long regno;
+
+ /* Check for spr index notation. */
+ if (strncasecmp (*strp, "spr[", 4) == 0)
+ {
+ *strp += 4;
+ regno = parse_register_number (strp);
+ if (**strp != ']')
+ return "missing `]'";
+ ++*strp;
+ if (! spr_valid (regno))
+ return "Special purpose register number is out of range";
+ *valuep = regno;
+ return NULL;
+ }
+
+ save_strp = *strp;
+ regno = parse_register_number (strp);
+ if (regno != -1)
+ {
+ if (! spr_valid (regno))
+ return "Special purpose register number is out of range";
+ *valuep = regno;
+ return NULL;
+ }
+
+ *strp = save_strp;
+ return cgen_parse_keyword (cd, strp, table, valuep);
+}
+
+static const char *
+parse_d12 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+{
+ const char *errmsg;
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+
+ /* Check for small data reference. */
+ if (**strp == '#' || **strp == '%')
+ {
+ if (strncasecmp (*strp + 1, "gprel12(", 8) == 0)
+ {
+ *strp += 9;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GPREL12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+ }
+ return cgen_parse_signed_integer (cd, strp, opindex, valuep);
+}
+
+static const char *
+parse_s12 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+{
+ const char *errmsg;
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+
+ /* Check for small data reference. */
+ if ((**strp == '#' || **strp == '%')
+ && strncasecmp (*strp + 1, "gprel12(", 8) == 0)
+ {
+ *strp += 9;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GPREL12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+ else
+ {
+ if (**strp == '#')
+ ++*strp;
+ return cgen_parse_signed_integer (cd, strp, opindex, valuep);
+ }
+}
+
+static const char *
+parse_u12 (cd, strp, opindex, valuep)
+ CGEN_CPU_DESC cd;
+ const char **strp;
+ int opindex;
+ long *valuep;
+{
+ const char *errmsg;
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+
+ /* Check for small data reference. */
+ if ((**strp == '#' || **strp == '%')
+ && strncasecmp (*strp + 1, "gprel12(", 8) == 0)
+ {
+ *strp += 9;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_FRV_GPRELU12,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+ else
+ {
+ if (**strp == '#')
+ ++*strp;
+ return cgen_parse_signed_integer (cd, strp, opindex, valuep);
+ }
+}
+
+static const char *
+parse_even_register (cd, strP, tableP, valueP)
+ CGEN_CPU_DESC cd;
+ const char ** strP;
+ CGEN_KEYWORD * tableP;
+ long * valueP;
+{
+ const char * errmsg;
+ const char * saved_star_strP = * strP;
+
+ errmsg = cgen_parse_keyword (cd, strP, tableP, valueP);
+
+ if (errmsg == NULL && ((* valueP) & 1))
+ {
+ errmsg = _("register number must be even");
+ * strP = saved_star_strP;
+ }
+
+ return errmsg;
+}
+/* -- */
+
+/* -- dis.c */
+static void print_spr
+ PARAMS ((CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned));
+static void print_hi
+ PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned, bfd_vma, int));
+static void print_lo
+ PARAMS ((CGEN_CPU_DESC, PTR, long, unsigned, bfd_vma, int));
+
+static void
+print_spr (cd, dis_info, names, regno, attrs)
+ CGEN_CPU_DESC cd;
+ PTR dis_info;
+ CGEN_KEYWORD *names;
+ long regno;
+ unsigned int attrs;
+{
+ /* Use the register index format for any unnamed registers. */
+ if (cgen_keyword_lookup_value (names, regno) == NULL)
+ {
+ disassemble_info *info = (disassemble_info *) dis_info;
+ (*info->fprintf_func) (info->stream, "spr[%ld]", regno);
+ }
+ else
+ print_keyword (cd, dis_info, names, regno, attrs);
+}
+
+static void
+print_hi (cd, dis_info, value, attrs, pc, length)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ PTR dis_info;
+ long value;
+ unsigned int attrs ATTRIBUTE_UNUSED;
+ bfd_vma pc ATTRIBUTE_UNUSED;
+ int length ATTRIBUTE_UNUSED;
+{
+ disassemble_info *info = (disassemble_info *) dis_info;
+ if (value)
+ (*info->fprintf_func) (info->stream, "0x%lx", value);
+ else
+ (*info->fprintf_func) (info->stream, "hi(0x%lx)", value);
+}
+
+static void
+print_lo (cd, dis_info, value, attrs, pc, length)
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+ PTR dis_info;
+ long value;
+ unsigned int attrs ATTRIBUTE_UNUSED;
+ bfd_vma pc ATTRIBUTE_UNUSED;
+ int length ATTRIBUTE_UNUSED;
+{
+ disassemble_info *info = (disassemble_info *) dis_info;
+ if (value)
+ (*info->fprintf_func) (info->stream, "0x%lx", value);
+ else
+ (*info->fprintf_func) (info->stream, "lo(0x%lx)", value);
+}
+
+/* -- */
diff --git a/cpu/simplify.inc b/cpu/simplify.inc
new file mode 100644
index 00000000000..12b05b7981f
--- /dev/null
+++ b/cpu/simplify.inc
@@ -0,0 +1,215 @@
+; Collection of macros, for GNU Binutils .cpu files. -*- Scheme -*-
+;
+; Copyright 2000 Free Software Foundation, Inc.
+;
+; Contributed by Red Hat Inc.
+;
+; This file is part of the GNU Binutils.
+;
+; This program is free software; you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or
+; (at your option) any later version.
+;
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with this program; if not, write to the Free Software
+; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+; Enums.
+
+; Define a normal enum without using name/value pairs.
+; This is currently the same as define-full-enum but it needn't remain
+; that way (it's define-full-enum that would change).
+
+(define-pmacro (define-normal-enum name comment attrs prefix vals)
+ "\
+Define a normal enum, fixed number of arguments.
+"
+ (define-full-enum name comment attrs prefix vals)
+)
+
+; Define a normal insn enum.
+
+(define-pmacro (define-normal-insn-enum name comment attrs prefix fld vals)
+ "\
+Define a normal instruction opcode enum.
+"
+ (define-full-insn-enum name comment attrs prefix fld vals)
+)
+
+; Instruction fields.
+
+; Normally, fields are unsigned have no encode/decode needs.
+
+(define-pmacro (define-normal-ifield name comment attrs start length)
+ "Define a normal instruction field.\n"
+ (define-full-ifield name comment attrs start length UINT #f #f)
+)
+
+; For those who don't like typing.
+
+(define-pmacro df
+ "Shorthand form of define-full-ifield.\n"
+ define-full-ifield
+)
+(define-pmacro dnf
+ "Shorthand form of define-normal-ifield.\n"
+ define-normal-ifield
+)
+
+; Define a normal multi-ifield.
+; FIXME: The define-normal version for ifields doesn't include the mode.
+
+(define-pmacro (define-normal-multi-ifield name comment attrs
+ mode subflds insert extract)
+ "Define a normal multi-part instruction field.\n"
+ (define-full-multi-ifield name comment attrs mode subflds insert extract)
+)
+
+; For those who don't like typing.
+
+(define-pmacro dnmf
+ "Shorthand form of define-normal-multi-ifield.\n"
+ define-normal-multi-ifield
+)
+
+; Simple multi-ifields: mode is UINT, default insert/extract support.
+
+(define-pmacro (dsmf name comment attrs subflds)
+ "Define a simple multi-part instruction field.\n"
+ (define-full-multi-ifield name comment attrs UINT subflds #f #f)
+)
+
+; Hardware.
+
+; Simpler version for most hardware elements.
+; Allow special assembler support specification but no semantic-name or
+; get/set specs.
+
+(define-pmacro (define-normal-hardware name comment attrs type
+ indices values handlers)
+ "\
+Define a normal hardware element.
+"
+ (define-full-hardware name comment attrs name type
+ indices values handlers () () ())
+)
+
+; For those who don't like typing.
+
+(define-pmacro dnh
+ "Shorthand form of define-normal-hardware.\n"
+ define-normal-hardware
+)
+
+; Simpler version of dnh that leaves out the indices, values, handlers,
+; get, set, and layout specs.
+; This is useful for 1 bit registers.
+; ??? While dsh and dnh aren't that distinguishable when perusing a .cpu file,
+; they both take a fixed number of positional arguments, and dsh is a proper
+; subset of dnh with all arguments in the same positions, so methinks things
+; are ok.
+
+(define-pmacro (define-simple-hardware name comment attrs type)
+ "\
+Define a simple hardware element (usually a scalar register).
+"
+ (define-full-hardware name comment attrs name type () () () () () ())
+)
+
+(define-pmacro dsh
+ "Shorthand form of define-simple-hardware.\n"
+ define-simple-hardware
+)
+
+; Operands.
+
+(define-pmacro (define-normal-operand name comment attrs type index)
+ "Define a normal operand.\n"
+ (define-full-operand name comment attrs type DFLT index () () ())
+)
+
+; For those who don't like typing.
+; FIXME: dno?
+
+(define-pmacro dnop
+ "Shorthand form of define-normal-operand.\n"
+ define-normal-operand
+)
+
+(define-pmacro (dndo x-name x-mode x-args
+ x-syntax x-base-ifield x-encoding x-ifield-assertion
+ x-getter x-setter)
+ "Define a normal derived operand."
+ (define-derived-operand
+ (name x-name)
+ (mode x-mode)
+ (args x-args)
+ (syntax x-syntax)
+ (base-ifield x-base-ifield)
+ (encoding x-encoding)
+ (ifield-assertion x-ifield-assertion)
+ (getter x-getter)
+ (setter x-setter)
+ )
+)
+
+; Instructions.
+
+; Define an instruction object, normal version.
+; At present all fields must be specified.
+; Fields ifield-assertion is absent.
+
+(define-pmacro (define-normal-insn name comment attrs syntax fmt semantics timing)
+ "Define a normal instruction.\n"
+ (define-full-insn name comment attrs syntax fmt () semantics timing)
+)
+
+; To reduce the amount of typing.
+; Note that this is the same name as the D'ni in MYST. Oooohhhh.....
+; this must be the right way to go. :-)
+
+(define-pmacro dni
+ "Shorthand form of define-normal-insn.\n"
+ define-normal-insn
+)
+
+; Macro instructions.
+
+; Define a macro-insn object, normal version.
+; This only supports expanding to one real insn.
+
+(define-pmacro (define-normal-macro-insn name comment attrs syntax expansion)
+ "Define a normal macro instruction.\n"
+ (define-full-minsn name comment attrs syntax expansion)
+)
+
+; To reduce the amount of typing.
+
+(define-pmacro dnmi
+ "Shorthand form of define-normal-macro-insn.\n"
+ define-normal-macro-insn
+)
+
+; Modes.
+; ??? Not currently available for use.
+;
+; Define Normal Mode
+;
+;(define-pmacro (define-normal-mode name comment attrs bits bytes
+; non-mode-c-type printf-type sem-mode ptr-to host?)
+; "Define a normal mode.\n"
+; (define-full-mode name comment attrs bits bytes
+; non-mode-c-type printf-type sem-mode ptr-to host?)
+;)
+;
+; For those who don't like typing.
+;(define-pmacro dnm
+; "Shorthand form of define-normal-mode.\n"
+; define-normal-mode
+;)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5e2bed1cfc3..30c3a8683f1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,1109 @@
+2003-06-06 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_fill_fxsave): Pass correct regnums
+ to regcache_collect().
+
+2003-06-05 J. Brobecker <brobecker@gnat.com>
+
+ * hppa-hpux-tdep.c (hppa_hpux_init_abi): New function, setting
+ pc_in_sigtramp multiarch method.
+ (hppa_hpux_som_init_abi): Use it.
+ (hppa_hpux_elf_init_abi): Likewise.
+ * config/pa/tm-hppah.h (PC_IN_SIGTRAMP): Remove, now that this
+ macro has been multiarched.
+ * config/pa/tm-hppa64.h (PC_IN_SIGTRAMP): Temporarily set this
+ macro here, as hppa64 isn't multiarched yet.
+
+2003-06-05 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (value_h): Add $(frame_h).
+ * value.h: Include "frame.h".
+ (struct value): Replace "frame_addr" with "frame_id".
+ (VALUE_FRAME_ID): Replace VALUE_FRAME.
+ * values.c (allocate_value): Use VALUE_FRAME_ID.
+ (value_copy): Use VALUE_FRAME_ID.
+ * findvar.c (value_from_register): Use VALUE_FRAME_ID.
+ * valops.c (value_assign): Update. Use frame_find_by_id.
+
+2003-06-05 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_push_arguments): Don't clear offset
+ in each pass.
+
+2003-06-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * thread-db.c (check_event): For create/death event breakpoints,
+ loop through all messages to ensure that we read the message
+ corresponding to the breakpoint we are at.
+
+2003-06-04 Michael Snyder <msnyder@redhat.com>
+
+ * h8300-tdep.c (h8300_gdbarch_init): Add h8300hn, h8300sn.
+
+2003-06-04 Mark Kettenis <kettenis@gnu.org>
+
+ * dwarf2-frame.c (struct comp_unit): Add member `dbase'.
+ (read_encoded_value): Handle DW_EH_PE_datarel encoding.
+ (dwarf2_build_frame_info): Set base for DW_EH_PE_datarel encodings
+ when handling .eh_frame sections.
+
+2003-06-04 J. Brobecker <brobecker@gnat.com>
+
+ * config/pa/nm-hppah.h (PREPARE_TO_PROCEED): Use the generic
+ prepare_to_proceed procedure instead of the hppa-specific one.
+ * hppa-tdep.c (hppa_prepare_to_proceed): Remove, no longer used.
+
+2003-06-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acconfig.h: Add HAVE_TKILL_SYSCALL definition check.
+ * config.in: Regenerated.
+ * configure.in: Add test for syscall function and check for
+ __NR_tkill macro in <syscall.h> to set HAVE_TKILL_SYSCALL.
+ * configure: Regenerated.
+ * lin-lwp.c [HAVE_TKILL_SYSCALL]: Include <unistd.h> and
+ <sys/syscall.h>.
+ (kill_lwp): New function that uses tkill syscall or
+ uses kill, depending on whether threading model is nptl or not.
+ All callers of kill() changed to use kill_lwp().
+ (lin_lwp_wait): Make special check when WIFEXITED occurs to
+ see if all threads have already exited in the nptl model.
+ (stop_and_resume_callback): New callback function used by the
+ lin_lwp_wait thread exit handling code.
+ (stop_wait_callback): Check for threads already having exited and
+ delete such threads fromt the lwp list when discovered.
+ (stop_callback): Don't assert retcode of kill call.
+
+ Roland McGrath <roland@redhat.com>
+ * i386-linux-nat.c (ps_get_thread_area): New function needed by
+ nptl libthread_db.
+
+2003-06-03 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_next_pc): Use alpha_read_insn.
+ (alpha_sigtramp_frame_this_id): Use get_frame_memory.
+ (alpha_sigtramp_frame_prev_register): Likewise.
+ (alpha_heuristic_frame_prev_register): Likewise.
+ * alpha-mdebug-tdep.c (alpha_mdebug_frame_prev_register): Likewise.
+
+ * alpha-mdebug-tdep.c (alpha_mdebug_after_prologue): Use
+ alpha-specific register id names.
+ (alpha_mdebug_frame_unwind_cache): Likewise.
+ (alpha_mdebug_frame_prev_register): Likewise.
+
+2003-06-03 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_dwarf2_init_abi): New.
+ * alpha-tdep.h (alpha_dwarf2_init_abi): Declare it.
+ * alpha-linux-tdep.c (alpha_linux_init_abi): Use it.
+ * alphafbsd-tdep.c (alphafbsd_init_abi): Register dwarf2 and mdebug
+ unwind routines.
+ * alphanbsd-tdep.c (alphanbsd_init_abi): Likewise.
+ * config/alpha/fbsd.mt (TDEPFILES): Add alpha-mdebug-tdep.o.
+ * config/alpha/nbsd.mt (TDEPFILES): Likewise.
+
+ * alpha-linux-tdep.c: Remove unnecessary includes.
+ * Makefile.in (alpha-linux-tdep.o): Update.
+
+2003-06-03 Richard Henderson <rth@redhat.com>
+
+ * alphabsd-tdep.c (alphabsd_supply_fpreg): Fix typo last change.
+ (alphabsd_fill_fpreg): Likewise.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * alphanbsd-tdep.c (alphanbsd_sigcontext_addr): Replace
+ references to struct frame_info fields by calls to the equivalent
+ accessors. Necessary now that frame_info is opaque.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * alphanbsd-tdep.c (alphanbsd_skip_sigtramp_frame): Delete.
+ (alphanbsd_init_abi): Do not set skip_sigtramp_frame in tdep
+ structure, field no longer exists.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * config/alpha/alpha-osf1.mt (TDEPFILES): Add alpha-mdebug-tdep.o.
+ * alpha-osf1-tdep.c (alpha_osf1_init_abi): Enable the mdebug module.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Replace
+ references to struct frame_info fields by calls to the equivalent
+ accessors. Necessary now that frame_info is opaque.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * alpha-osf1-tdep.c (alpha_osf1_skip_sigtramp_frame): Delete.
+ (alpha_osf1_init_abi): Do not set skip_sigtramp_frame in tdep
+ structure, field no longer exists.
+
+2003-06-03 Theodore A. Roth <troth@openavr.org>
+
+ * remote.c (init_remote_state): Compute sizeof_g_packet by
+ accumulation of the size of all registers instead of blindly using
+ DEPRECATED_REGISTER_BYTES.
+
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+
+ * config/h8300/tm-h8300.h (h8300sxmode): Declare.
+ * h8300-tdep.c (h8300_gdbarch_init): Set machine mode
+ for h8300sx.
+
+2003-06-03 J. Brobecker <brobecker@gnat.com>
+
+ * alpha-osf1-tdep.c (objfiles.h): #include, needed for symfile_objfile.
+ * Makefile.in (alpha-osf1-tdep.o): Update dependencies.
+
+2003-06-03 Andrew Cagney <cagney@redhat.com>
+
+ * sparc-tdep.c (sparc_convert_to_virtual): Delete function.
+ (sparc_convert_to_raw): Delete function.
+ (sparc_gdbarch_init): Do not set register_convert_to_raw or
+ register_convert_to_virtual.
+
+2003-06-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * thread-db.c (thread_db_mourn_inferior): Unpush thread target
+ layer if not dealing with a statically-linked threaded program.
+
+2003-06-03 Kris Warkentin <kewarken@qnx.com>
+
+ * solib.c (solib_open): Update comment to reflect actual search order.
+
+2003-06-03 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (get_frame_memory_signed): New function.
+ (get_frame_memory, get_frame_memory_unsigned): New function.
+ (get_frame_arch): New function.
+ * frame.h (get_frame_signed_memory, get_frame_arch): Declare.
+ (get_frame_memory, get_frame_unsigned_memory): Declare.
+ * d10v-tdep.c (d10v_frame_unwind_cache): Use
+ get_frame_memory_unsigned and get_frame_arch.
+ (d10v_frame_unwind_cache, saved_regs_unwinder): Ditto.
+
+2003-06-03 Raoul Gough <RaoulGough@yahoo.co.uk>
+
+ * MAINTAINERS (write after approval): Add myself.
+
+2003-06-03 Jim Blandy <jimb@redhat.com>
+
+ * s390-nat.c (supply_gregset, fill_gregset): On the s390x, the
+ elements of gregset_t are 64 bits each, but access registers
+ are still 32 bits, so they're packed two per gregset_t
+ element. Unpack/pack them properly.
+
+2003-06-02 David Carlton <carlton@bactrian.org>
+
+ * linespec.c (find_methods): Break out code into
+ add_matching_methods and add_constructors.
+ (add_matching_methods): New.
+ (add_constructors): Ditto.
+
+2003-06-02 Andrew Cagney <cagney@redhat.com>
+
+ * alpha-tdep.c (alpha_gdbarch_init): Set convert_register_p,
+ register_to_value, and value_to_register, instead of
+ register_convertible, register_convert_to_raw, and
+ register_convert_to_virtual.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_print_registers): Delete call to
+ REGISTER_CONVERTIBLE.
+ (sparc_gdbarch_init): Do not set register_convertible.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+
+2003-06-02 Elena Zannoni <ezannoni@redhat.com>
+
+ * target.h (TARGET_SYMFILE_POSTREAD): Delete unused macro.
+ * symfile.c (reread_symbols): Delete call to TARGET_SYMFILE_POSTREAD.
+ (syms_from_objfile): Ditto.
+
+2003-06-03 Andreas Schwab <schwab@suse.de>
+
+ * m68k-tdep.c (m68k_gdbarch_init): Use set_gdbarch_print_insn ...
+ (_initialize_m68k_tdep): ... instead of deprecated_tm_print_insn.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_register_reggroup_p): Zero is only
+ a member of all_reggroup.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_register_type): Change from _virtual_type.
+ (alpha_convert_flt_dbl, alpha_convert_dbl_flt): Remove.
+ (alpha_lds, alpha_sts): New.
+ (alpha_convert_register_p): Change from _register_convertible.
+ (alpha_register_to_value): Change from _convert_to_virtual;
+ restructure and fail for type sizes other than 4 or 8.
+ (alpha_value_to_register): Similarly.
+ (alpha_extract_return_value): Use alpha_sts.
+ (alpha_store_return_value): Use alpha_lds.
+ (alpha_gdbarch_init): Update hooks.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_register_virtual_type): Use alpha-specific
+ regnum identifiers.
+ (alpha_sigtramp_register_address): Likewise.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_supply_int_regs, alpha_fill_int_regs): New.
+ (alpha_supply_fp_regs, alpha_fill_fp_regs): New.
+ * alpha-tdep.h: Declare them.
+
+ * alpha-nat.c (fetch_osf_core_registers): Constify core_reg_mapping.
+ Remove zerobuf. Don't error on UNIQUE.
+ (fetch_elf_core_registers): Use alpha_supply_{int,fp}_regs.
+ (ALPHA_REGSET_UNIQUE): Provide default.
+ (supply_gregset): Use alpha_supply_int_regs.
+ (fill_gregset): Use alpha_fill_int_regs.
+ (supply_fpregset): Use alpha_supply_fp_regs.
+ (fill_fpregset): Use alpha_fill_fp_regs.
+ * alphabsd-tdep.c (NUM_GREGS, NUM_FPREGS): Remove.
+ (alphabsd_supply_reg): Use alpha_supply_int_regs.
+ (alphabsd_fill_reg): Use alpha_fill_int_regs.
+ (alphabsd_supply_fpreg): Use alpha_supply_fp_regs.
+ (alphabsd_fill_fpreg): Use alpha_fill_fp_regs.
+ * config/alpha/nm-linux.h (ALPHA_REGSET_UNIQUE): New.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_store_return_value): Avoid switch fallthru.
+
+ * alpha-tdep.c (alpha_extract_return_value): Use internal_error.
+ (alpha_store_return_value): Likewise.
+
+2003-06-02 David Carlton <carlton@math.stanford.edu>
+
+ * block.c (contained_in): Add 'const' to arguments.
+ (block_function): Ditto.
+ * block.h: Update declarations for block_function and
+ contained_in.
+
+2003-06-02 David Carlton <carlton@math.stanford.edu>
+
+ * objc-lang.c (find_imps): Delete unneeded variable 'sym_symtab'.
+ * c-valprint.c (c_val_print): Delete unneeded variable 's'.
+ * p-valprint.c (pascal_val_print): Ditto.
+ * ada-lang.c (standard_lookup): Delete unneded variable 'symtab'.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_push_dummy_call): Use
+ builtin_type_ieee_double_little instead of builtin_type_double.
+
+ * alpha-tdep.c (alpha_push_dummy_call): Handle ABI mandated
+ sign-extension of 32-bit values.
+ (alpha_store_return_value): Similarly.
+
+ * alpha-tdep.c (alpha_push_dummy_call): Handle COMPLEX types.
+ (alpha_extract_return_value): Likewise.
+ (alpha_store_return_value): Likewise.
+
+ * alpha-tdep.c (alpha_extract_return_value): Handle IEEE Quad floats.
+ (alpha_store_return_value): Error on IEEE Quad floats.
+
+ * alpha-tdep.c (alpha_extract_return_value): Convert to regcache.
+ (alpha_extract_struct_value_address): Likewise.
+ (alpha_store_return_value): Likewise.
+ (alpha_store_struct_return): Remove.
+ (alpha_gdbarch_init): Update hook registration to match.
+
+ * alpha-tdep.c (alpha_register_convert_to_virtual): Tidy use of
+ deprecated interfaces; use ALPHA_REGISTER_SIZE instead of gdbarch
+ macros where appropriate.
+ (alpha_register_convert_to_raw): Similarly. Use unpack_long.
+ (alpha_convert_flt_dbl, alpha_convert_dbl_flt): New.
+
+ * alpha-tdep.c (alpha_register_virtual_type): Use void_data_ptr
+ for SP, GP; void_func_ptr for PC; non-language-specific types
+ for all others.
+ * alpha-tdep.h (ALPHA_GP_REGNUM): New.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * top.h (lim_at_start): Declare.
+ * main.c (captured_main): Set it.
+ * top.c (lim_at_start): Define.
+ (command_loop): Use it instead of &environ.
+ * event-top.c (command_handler): Likewise.
+
+2003-06-01 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * mipsnbsd-tdep.c: Update copyright years.
+ (fetch_core_registers): Correct arguments to mipsnbsd_supply_fpreg.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * Makefile.in (ALLDEPFILES): Add alpha-mdebug-tdep.c.
+ (alpha-linux-tdep.o): Update dependencies.
+ (alpha-nat.o, alpha-tdep.o, alpha-mdebug-tdep.o): Likewise.
+ * alpha-mdebug-tdep.c: Remove unneeded includes.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_register_reggroup_p): New.
+ (alpha_gdbarch_init): Register it.
+
+2003-06-02 Andrew Cagney <cagney@redhat.com>
+
+ * dwarfread.c: Eliminate "register"
+ (decode_die_type): Eliminate assignment within "if".
+ (struct_type, decode_array_element_type): Ditto.
+ (dwarf_read_array_type, read_tag_pointer_type): Ditto.
+ (read_subroutine_type, enum_type, add_enum_psymbol): Ditto.
+ (decode_modified_type, completedieinfo): Ditto.
+ * block.c: Eliminate "register".
+ (blockvector_for_pc_sect): Eliminate assignment within "if".
+ * cp-support.h (struct symbol): Opaque declaration.
+ * breakpoint.c (handle_gnu_v3_exceptions): Use xfree, not free.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_gdbarch_init): Use set_gdbarch_print_insn ...
+ (_initialize_alpha_tdep): ... not deprecated_tm_print_insn.
+
+2003-06-01 Adam Fedor <fedor@gnu.org>
+
+ * gdbarch.sh (function_list): Add FETCH_POINTER_ARGUMENT.
+ * gdbarch.[ch]: Regenerate.
+ * hppa-tdep.c (hppa_fetch_pointer_argument): New function.
+ (hppa_gdbarch_init): Set it in the gdbarch vector.
+ * i386-tdep.c (i386_fetch_pointer_argument): New
+ (i386_gdbarch_init): Set it into gdbarch.
+ * rs6000-tdep.c (rs6000_fetch_pointer_argument): New.
+ (rs6000_gdbarch_init): Set it in gdbarch.
+ * sparc-tdep.c (sparc_fetch_pointer_argument): New
+ (sparc_gdbarch_init): Set it in gdbarch.
+
+2003-06-01 Andrew Cagney <cagney@redhat.com>
+
+ * defs.h (extract_address): Delete declaration.
+ * findvar.c (extract_address): Delete function.
+ * xstormy16-tdep.c (xstormy16_extract_return_value): Replace
+ extract_address with the inline equivalent,
+ extract_unsigned_integer.
+ (xstormy16_extract_struct_value_address): Ditto.
+ (xstormy16_pointer_to_address): Ditto.
+ * vax-tdep.c (vax_extract_struct_value_address): Ditto.
+ * v850-tdep.c (v850_push_arguments): Ditto.
+ (v850_extract_return_value): Ditto.
+ (v850_extract_struct_value_address): Ditto.
+ * sparcnbsd-tdep.c (sparcnbsd_get_longjmp_target_32): Ditto.
+ (sparcnbsd_get_longjmp_target_64): Ditto.
+ * sparc-tdep.c (sparc_frame_saved_pc): Ditto.
+ (get_longjmp_target): Ditto.
+ * sh-tdep.c (sh_extract_struct_value_address): Ditto.
+ (sh64_extract_struct_value_address): Ditto.
+ (sh_push_arguments): Ditto.
+ (sh64_push_arguments): Ditto.
+ * remote-vxsparc.c (vx_read_register): Ditto.
+ * ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Ditto.
+ * ns32k-tdep.c (ns32k_extract_struct_value_address): Ditto.
+ * mn10300-tdep.c (mn10300_extract_struct_value_address): Ditto.
+ * mipsv4-nat.c (get_longjmp_target): Ditto.
+ * mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Ditto.
+ * mips-nat.c (get_longjmp_target): Ditto.
+ * mips-linux-tdep.c (mips_linux_get_longjmp_target): Ditto.
+ * mcore-tdep.c (mcore_extract_struct_value_address): Ditto.
+ * m68k-tdep.c (m68k_get_longjmp_target): Ditto.
+ * m68hc11-tdep.c (m68hc11_extract_struct_value_address): Ditto.
+ * irix5-nat.c (get_longjmp_target): Ditto.
+ * irix4-nat.c (get_longjmp_target): Ditto.
+ * ia64-tdep.c (generic_elf_find_global_pointer): Ditto.
+ (ia64_push_arguments): Ditto.
+ * hpux-thread.c (hpux_thread_store_registers): Ditto.
+ * h8300-tdep.c (h8300_push_arguments): Ditto.
+ (h8300_store_return_value): Ditto.
+ (h8300_extract_struct_value_address): Ditto.
+ * frv-tdep.c (frv_extract_struct_value_address): Ditto.
+ (frv_push_arguments): Ditto.
+ * avr-tdep.c (avr_pointer_to_address): Ditto.
+ (avr_push_arguments): Ditto.
+ * arm-tdep.c (arm_push_dummy_call): Ditto.
+ (arm_get_longjmp_target): Ditto.
+ * arm-linux-tdep.c (arm_linux_push_arguments): Ditto.
+ * alpha-tdep.c (alpha_extract_struct_value_address): Ditto.
+ (alpha_get_longjmp_target): Ditto.
+
+ * solib-irix.c (extract_mips_address): Inline extract_address,
+ replacing it with extract_signed_integer.
+ * solib-svr4.c (SOLIB_EXTRACT_ADDRESS): Ditto.
+ (LM_NAME, IGNORE_FIRST_LINK_MAP_ENTRY): Ditto.
+ (first_link_map_member, open_symbol_file_object): Ditto.
+ (svr4_fetch_objfile_link_map, svr4_fetch_objfile_link_map): Ditto.
+ * solib-sunos.c (SOLIB_EXTRACT_ADDRESS): Ditto.
+ (LM_NEXT, LM_NAME): Ditto.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.h (ALPHA_FP_REGNUM): Remove.
+ * alpha-tdep.c (alpha_register_name): Remove vfp entry.
+ (alpha_cannot_fetch_register): Remove ALPHA_FP_REGNUM.
+ (alpha_cannot_store_register): Likewise.
+ * alphabsd-nat.c (fetch_inferior_registers): Don't set FP_REGNUM.
+ * alpha-nat.c (supply_gregset): Likewise.
+ * alphanbsd-tdep.c (fetch_core_registers): Likewise.
+
+2003-06-01 Andrew Cagney <cagney@redhat.com>
+
+ * infcall.c (call_function_by_hand): Update comment on
+ DEPRECATED_DUMMY_WRITE_SP.
+
+ * mips-tdep.c (mips_gdbarch_init): Do not set
+ deprecated_dummy_write_sp.
+ (mips_eabi_push_dummy_call): Set the SP register.
+ (mips_o64_push_dummy_call): Set the SP register.
+ (mips_o32_push_dummy_call): Set the SP register.
+ (mips_n32n64_push_dummy_call): Set the SP register.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-nat.c (fetch_osf_core_registers): Use ALPHA_REGISTER_SIZE
+ instead of ALPHA_MAX_REGISTER_RAW_SIZE.
+ (supply_gregset): Likewise.
+ * alpha-tdep.c (alpha_store_return_value): Likewise.
+ (alpha_get_longjmp_target): Likewise.
+ (alpha_register_name): Constify array.
+ (alpha_gdbarch_init): Remove deprecated_fp_regnum,
+ deprecated_register_size, deprecated_register_bytes,
+ deprecated_max_register_raw_size, deprecated_max_register_virtual_size.
+ * alpha-tdep.h (ALPHA_MAX_REGISTER_RAW_SIZE): Remove.
+ (ALPHA_MAX_REGISTER_VIRTUAL_SIZE): Remove.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_push_dummy_call): Store sp. Tidy copies
+ from arg_reg_buffer to regcache to avoid double conversion.
+
+2003-06-01 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (child_resume): Use I386_ESP_REGNUM instead of
+ SP_REGNUM.
+ * i386-linux-tdep.c (i386_linux_sigcontext_addr): Likewise.
+ * i386bsd-tdep.c (i386bsd_sigcontext_addr): Likewise.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * dwarf2-frame.c (struct dwarf2_cie): Add saw_z_augmentation.
+ (decode_frame_entry): Set it. Skip FDE augmentation.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * dwarf2-frame.c (dwarf2_frame_cache): Handle retaddr_column
+ not overlapping PC_REGNUM.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_push_dummy_call): Transmography from
+ alpha_push_arguments. Don't dump argument register data to
+ the target stack. Fix float and 128-bit long double semantics.
+ Store $t12 and $ra as specified by the ABI. Use regcache everywhere.
+ (alpha_fix_call_dummy): Remove.
+ (alpha_call_dummy_words): Remove.
+ (alpha_gdbarch_init): Kill deprecated call hooks; add push_dummy_call.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * alpha-linux-tdep.c (alpha_linux_init_abi): Install dwarf2 unwinder.
+
+2003-06-01 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (is_mips16_addr): New function.
+ (make_mips16_addr, unmake_mips16_addr): New functions.
+ (pc_is_mips16, mips_fetch_instruction): Use.
+ (gdb_print_insn_mips, mips_breakpoint_from_pc): Use.
+ (gdb_print_insn_mips): Eliminate TM_PRINT_INSN_MACH.
+ (mips_dump_tdep): Delete print of TM_PRINT_INSN_MACH,
+ UNMAKE_MIPS16_ADDR, MAKE_MIPS16_ADDR, IS_MIPS16_ADDR and
+ TARGET_MIPS.
+ * config/mips/tm-mips.h: Update copyright.
+ (TARGET_MIPS, TM_PRINT_INSN_MACH): Delete.
+ (DEPRECATED_REGISTER_SIZE, DEPRECATED_REGISTER_BYTES): Delete.
+ (IS_MIPS16_ADDR, MAKE_MIPS16_ADDR, UNMAKE_MIPS16_ADDR): Delete.
+ * config/mips/tm-irix6.h (DEPRECATED_REGISTER_BYTES): Delete.
+ (TM_PRINT_INSN_MACH): Delete.
+ * config/mips/tm-irix5.h (DEPRECATED_REGISTER_BYTES): Delete.
+
+ * configure.tgt: Replace mips64*vr4xxx*el-*-elf*,
+ mips64*vr4xxx*-*-elf*, mips64*vr4300*el-*-elf*,
+ mips64*vr4300*-*-elf*, mips64*vr4100*el-*-elf*,
+ mips64*vr4100*-*-elf*, mips64*vr5000*el-*-elf*, and
+ mips64*vr5000*-*-elf* with mips64 mips64*vr*-*-elf*. Delete
+ mips*tx39*el*-elf*. Map mips*-sony-* and mips64*-big-* onto
+ mips64. Map mips*-dec-*, mips*-big-*, mips*-little-*,
+ mips*-*-riscos* and mips*-*-sysv* onto mips.
+ * config/mips/mips64.mt: New file.
+ * config/mips/mips.mt: New file.
+ * config/mips/littlemips.mt: Delete file.
+ * config/mips/decstation.mt: Delete file.
+ * config/mips/vr4300el.mt: Delete file.
+ * config/mips/vr5000el.mt: Delete file.
+ * config/mips/vr5000.mt: Delete file.
+ * config/mips/vr4100.mt: Delete file.
+ * config/mips/vr4xxxel.mt: Delete file.
+ * config/mips/vr4300.mt: Delete file.
+ * config/mips/vr4xxx.mt: Delete file.
+ * config/mips/bigmips.mt: Delete file.
+ * config/mips/bigmips64.mt: Delete file.
+ * config/mips/tx39l.mt (TM_FILE): Set to "tm-tx39.h".
+ * config/mips/embedl64.mt (TM_FILE): Set to "tm-mips64.h".
+ * config/mips/embed64.mt (TM_FILE): Set to "tm-mips64.h"
+ * config/mips/embedl.mt (TM_FILE): Set to "tm-mips.h".
+ * config/mips/tm-tx39.h: Include "tm-mips.h" instead of
+ "tm-bigmips.h".
+ * config/mips/tm-irix3.h: Ditto.
+ * config/mips/tm-mipsv4.h: Ditto.
+ * config/mips/tm-embed.h: Ditto.
+ * config/mips/tm-irix6.h: Include "tm-mips64.h" instead of
+ "tm-bigmips64.h".
+ * config/mips/tm-vr5000el.h: Delete file.
+ * config/mips/tm-tx39l.h: Delete file.
+ * config/mips/tm-vr4300el.h: Delete file.
+ * config/mips/tm-vr4xxxel.h: Delete file.
+ * config/mips/tm-vr4300.h: Delete file.
+ * config/mips/tm-vr4100.h: Delete file.
+ * config/mips/tm-vr4xxx.h: Delete file.
+ * config/mips/tm-vr5000.h: Delete file.
+ * config/mips/tm-embedl64.h: Delete file.
+ * config/mips/tm-embedl.h: Delete file.
+ * config/mips/tm-embed64.h: Delete file.
+ * config/mips/tm-bigmips64.h: Delete file.
+ * config/mips/tm-bigmips.h: Delete file.
+
+2003-06-01 Mark Kettenis <kettenis@gnu.org>
+
+ Fix gdb/1216.
+ * shnbsd-nat.c: Include "sh-tdep.h".
+
+ From Richard Henderson <rth@redhat.com>:
+ * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Fix ptr arithmetic.
+
+2003-05-31 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (set_reg_offset): Add saved_regs parameter. Add
+ forward declaration.
+ (mips16_heuristic_proc_desc): Pass temp_saved_regs.
+ (mips16_heuristic_proc_desc): Pass temp_saved_regs.
+ (mips_find_saved_regs): Use set_reg_offset.
+ (mips_frame_init_saved_regs): Delete function.
+ (mips_pop_frame): Call mips_find_saved_regs instead of
+ DEPRECATED_FRAME_INIT_SAVED_REGS.
+
+2003-05-31 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Do not set
+ deprecated_max_register_raw_size, register_virtual_size, and
+ deprecated_max_register_virtual_size.
+
+2003-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c: Include "dwarf2-frame.h".
+ (i386_gdbarch_init): Hook in the DWARF CFI frame unwinder.
+ * Makefile.in (i386-tdep.o): Update dependencies.
+
+ * dwarf2-frame.c, dwarf2-frame.h: New files.
+ * Makefile.in (SFILES): Add dwarf2-frame.c.
+ (dwarf2_frame_h): Define.
+ (COMMON_OBS): Add dwarf2-frame.o.
+ (dwarf2-frame.o): Add dependencies.
+
+2003-05-31 Andreas Jaeger <aj@suse.de>
+
+ * x86-64-linux-nat.c: Fix comment.
+
+2003-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c (x86_64_push_dummy_call): Adjust for changed
+ function signature.
+
+ * i386-tdep.c (i386_sigtramp_frame_p): Only handle frames if we
+ have a sigcontext_addr handler.
+ * x86-64-tdep.c (x86_64_sigtramp_frame_p): Assert that we have a
+ sigcontext_addr handler.
+
+2003-05-31 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (print_gp_register_row): Replace do_gp_register_row.
+ (print_fp_register_row): Replace do_fp_register_row.
+ (mips_print_fp_register): Add "file" and "frame" parameters.
+ (mips_print_register): Add "file" and "frame" parameters.
+ (mips_print_registers_info): Replace mips_do_registers_info.
+ (mips_gdbarch_init): Set print_registers_info instead of
+ deprecated_do_registers_info.
+ (mips_read_fp_register_single): Add "frame" parameter.
+ (mips_read_fp_register_double): Add "frame" parameter.
+
+2003-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_register_name): Check for MMX registers first.
+ Fixes a bug where GDB would print the wrong register names for
+ targets without SSE.
+
+ * x86-64-tdep.c (X86_64_NUM_SAVED_REGS): Set to X86_64_NUM_GREGS.
+ (x86_64_sigtramp_frame_cache): Use `sc_reg_offset' to find saved
+ registers.
+
+ * x86-64-linux-tdep.c (x86_64_linux_sc_reg_offset): New variable.
+ (x86_64_linux_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs instead of TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+
+ From Michal Ludvig <mludvig@suse.cz>:
+ * i386-tdep.h (struct gdbarch_tdep): Add members `sc_reg_offset'
+ and `sc_num_regs'.
+ (I386_EAX_REGNUM, I386_EDX_REGNUM, I386_ESP_REGNUM,
+ I386_EBP_REGNUM, I386_EIP_REGNUM, I386_EFLAGS_REGNUM,
+ I386_ST0_REGNUM): Move here from...
+ * i386-tdep.c: ... here.
+ (I386_NUM_SAVED_REGS): Define to I386_NUM_REGS.
+ (i386_sigtramp_frame_cache): Use `sc_reg_offset' to find saved
+ registers if possible.
+ (i386_gdbarch_init): Initialize TDEP->sc_reg_offset.
+ * i386bsd-tdep.c (i386bsd_sc_pc_offset, i386bsd_sc_sp_offset):
+ Remove variables.
+ (i386bsd_sc_reg_offset): New variable.
+ (i386bsd_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs instead of TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+ (i386fbsd_sc_reg_offset): New variable.
+ (i386fbsdaout_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs.
+ (i386fbsd4_sc_pc_offset, i386fbsd4_sc_sp_offset): Remove
+ variables.
+ (i386fbsd4_sc_reg_offset): New variable.
+ (i3864bsd4_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs instead of TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+ * i386-linux-tdep.c (i386_linux_sc_reg_offset): New variable.
+ (i386_linux_init_abi): Set TDEP->sc_reg_offset and TDEP->sc_num_regs.
+ * i386nbsd-tdep.c (i386nbsd_sc_pc_offset, i386nbsd_sc_sp_offset):
+ Remove variables.
+ (i386nbsd_sc_reg_offset): New variable.
+ (i386nbsd_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs instead of TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+ * i386obsd-tdep.c (i386obsd_sc_pc_offset, i386obsd_sc_sp_offset):
+ Remove variables.
+ (i386obsd_sc_reg_offset): New variable.
+ (i386obsd_init_abi): Initialize TDEP->sc_reg_offset and
+ TDEP->sc_num_regs instead of TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+ * i386bsd-nat.c (_initialize_i386bsd_nat): Adjust for changes in
+ i386bsd-tdep.c, i386nbsd-tdep.c and i386obsd-tdep.c. Add check
+ for frame pointer offset in `struct sigcontext'.
+
+2003-05-31 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_gdbarch_init): Do not set the deprecated
+ architecture methods call_dummy_words, sizeof_call_dummy_words,
+ push_return_address, store_struct_return, and fix_call_dummy. Set
+ push_dummy_call instead of deprecated_push_arguments.
+ (mips_store_struct_return): Delete function.
+ (mips_fix_call_dummy): Delete function.
+ (mips_push_return_address): Delete function.
+ (mips_eabi_push_dummy_call): Replace mips_eabi_push_arguments, set
+ RA_REGNUM and T9_REGNUM.
+ (mips_n32n64_push_dummy_call): Ditto for
+ mips_n32n64_push_arguments.
+ (mips_o32_push_dummy_call): Ditto for mips_o32_push_arguments.
+ (mips_o64_push_dummy_call): Ditto for mips_o64_push_arguments.
+
+2003-05-31 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (PUSH_DUMMY_CALL): Add "func_addr" parameter. Rename
+ "dummy_addr" to "bp_addr".
+ * infcall.c (call_function_by_hand): Pass "funaddr" to
+ gdbarch_push_dummy_call.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * i386-tdep.c (i386_push_dummy_call): Update.
+ * arm-tdep.c (arm_push_dummy_call): Update.
+ * d10v-tdep.c (d10v_push_dummy_call): Update.
+
+2003-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.h (x86_64_num_regs, x86_64_num_gregs): Remove
+ variable declarations.
+ (x86_64_register_number, x86_64_register_name): Remove prototypes.
+ (x86_64_linux_frame_saved_pc, x86_64_linux+saved_pc_after_call,
+ x86_64_linux_in_sigtramp, x86_64_linux_frame_chain,
+ x86_64_init_frame_pc, x86_64_init_frame_pc,
+ x86_64_function_has_prologue): Remove prototypes.
+ (X86_64_NUM_GREGS): New define.
+ (x86_64_supply_fxsave, x86_64_fill_fxsave): New prototypes.
+ * x86-64-tdep.c: Don't include "dwarf2cfi.h". Include
+ "dummy_frame.h", "frame.h", "frame-base.h", "frame-unwind.h".
+ (RAX_REGNUM, RDX_REGNUM, RDI_REGNUM, EFLAGS_REGNUM, ST0_REGNUM,
+ XMM1_REGNUM): Remove defines.
+ (X86_64_RAX_REGNUM, X86_64_RDX_REGNUM, X86_64_RDI_REGNUM,
+ X86_64_RBP_REGNUM, X86_64_RSP_REGNUM, X86_64_RIP_REGNUM,
+ X86_64_EFLAGS_REGNUM, X86_64_ST0_REGNUM, X86_64_XMM0_REGNUM,
+ X86_64_XMM1_REGNUM): New defines.
+ (struct x86_64_register_info): Renamed from `struct
+ register_info'. Remove `size' member.
+ (x86_64_register_info_table): Remove variable.
+ (x86_64_register_info): New variable.
+ (X86_64_NUM_REGS): New define.
+ (X86_64_NUM_GREGS): Remove define.
+ (x86_64_num_regs, x86_64_num_gregs): Remove variables.
+ (x86_64_dwarf2gdb_regno_map, x86_64_dwarf2gdb_regno_map_length):
+ Remove variables.
+ (x86_54_dwarf2_reg_to_regnum): Remove function.
+ (x86_64_dwarf_regmap, x86_64_dwarf_regmap_len): New variables.
+ (x86_64_dwarf_reg_to_regnum): New function.
+ (x86_64_register_name): Rewrite.
+ (x86_64_register_raw_size): Remove function.
+ (x86_64_register_byte_table): Remove variable.
+ (x86_64_register_byte): Remove function.
+ (x86_64_register_virtual_type): Remove function.
+ (x86_64_register_type): New function.
+ (x86_64_register_convertible, x86_64_register_convert_to_virtual,
+ x86_64_register_convert_to_raw): Remove functions.
+ (x86_64_push_return_address, x86_64_pop_frame): Remove functon.
+ (x86_64_use_struct_convention): Make static. Adjust for renamed
+ defines.
+ (x86_64_frame_init_saved_regs): Remove function.
+ (x86_64_push_arguments): Make static. Change to accept a regcache
+ as argument.
+ (x86_64_store_return_value, x86_64_extract_return_value): Make
+ static. Rewrite based on i386 counterparts.
+ (x86_64_push_dummy_call): New function.
+ (X86_64_NUM_SAVED_REGS): New define.
+ (x86_64_register_number): Remove function.
+ (x86_64_store_struct_return): Remove function.
+ (x86_64_frameless_function_invocation,
+ x86_64_function_has_prologue): Remove functions.
+ (PROLOG_BUFSIZE): Remove define.
+ (struct x86_64_frame_cache): New structure.
+ (x86_64_alloc_frame_cache, x86_64_analyze_prologue,
+ x86_64_frame_cache, x86_64_frame_this_id,
+ x86_64_frame_prev_register, x86_64_frame_p,
+ x86_64_sigtramp_frame_cache, x86_64_sigtramp_frame_this_id,
+ x86_64_sigtramp_frame_prev_register, x86_sigtramp_frame_p): New
+ functions.
+ (x86_64_frame_unwind, x86_64_sigtramp_frame_unwind): New
+ variables.
+ (x86_64_skip_prologue): Rewrite in terms of
+ x86_64_analyze_prologue.
+ (x86_64_frame_base_address): New function.
+ (x86_64_frame_base): New variable.
+ (x86_64_save_dummy_frame_tos, x86_64_unwind_dummy_id): Rewrite.
+ (x86_64_init_abi): Set register_type and push_dummy_call. Don't
+ set deprecated_fp_regnum, deprecated_register_size,
+ deprecated_register_bytes, register_raw_size, register_byte,
+ register_virtual_type, register_convertiable,
+ register_convert_to_virtual, convert_to_raw,
+ deprecated_get_saved_register, deprecated_target_read_fp,
+ deprecated_push_arguments, deprecated_push_return_address,
+ deprecated_pop_frame, deprecated_store_struct_return,
+ deprecated_frame_init_saved_regs, deprecated_frame_chain,
+ frameless_function_invocation, deprecated_frame_saved_pc,
+ deprecated_saved_pc_after_call, frame_num_args, pc_in_sigtramp,
+ dwarf2_build_frame_info, deprecated_init_extra_frame_info,
+ deprecated_init_frame_pc and virtual_frame_pointer. Call
+ frame_unwind_append_predicate to register x86_64_sigtramp_frame_p
+ and x86_64_frame_p. Call frame_base_set_default to register
+ x86_64_frame_base.
+ (I387_FISEG_REGNUM, I387_FOSEG_REGNUM): New defines.
+ (x86_64_supply_fxsave, x86_64_fill_fxsave): New functions.
+ (_initialize_x86_64_tdep): Remove function.
+ * x86-64-linux-tdep.c: Don't include "dwarf2cfi.h".
+ (LINUX_SIGINFO_SIZE, LINUX_UCONTEXT_SIGCONTEXT_OFFSET,
+ LINUX_SIGCONTEXT_PC_OFFSET, LINUX_SIGCONTEXT_FP_OFFSET): Don't
+ define.
+ (X86_64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET): Define.
+ (x86_64_linux_sigcontext_addr): Rewrite.
+ (x86_64_linux_sigtramp_saved_pc, x86_64_linux_saved_pc_after_call,
+ x86_64_linux_frame_saved_pc): Remove functions.
+ (x86_64_linux_pc_in_sigtramp): Renamed from
+ x86_64_linux_in_sigtramp. Try harder to recognize a signal
+ trampoline.
+ (x86_64_linux_frame_chain, x86_64_init_frame_pc):
+ Remove_functions.
+ (x86_64_linux_init_abi): Set pc_in_sigtramp. Initialize
+ TDEP->sigcontext_addr, TDEP->sc_pc_offset and TDEP->sc_sp_offset.
+ * x86-64-linux-nat.c: Sync with i386-linux-tdep.c.
+ (x86_64_regmap): Rename to regmap.
+ (GETREGS_SUPPLIES): Use X86_64_NUM_GREGS instead of
+ x86_64_num_gregs.
+ (supply_gregset, fill_gregset): Likewise. Use regmap instead of
+ x86_64_regmap.
+ (x86_64_fxsave_offset): Remove function.
+ (supply_fpregset): Simply call x86_64_supply_fxsave.
+ (fill_fpregset): Simply call x86_64_fill_fxsave.
+ (fetch_inferior_registers, store_inferior_registers): Avoid
+ asignment in if-statement.
+ (LINUX_SYSCALL_LEN, LINUX_SYSCALL_REGNUM, SYS_Sigreturn,
+ SYS_rt_sigreturn, LINUX_SIGCONTEXT_EFLAGS_OFFSET,
+ LINUX_UCONTEXT_SIGCONTEXT_OFFSET): Remove defines.
+ (fetch_core_registers): Remove function.
+ (linux_elf_core_fns): Remove.
+ (offsetoff): Don't define.
+ (_initialize_x86_64_linux_nat, kernel_u_size): Remove functions.
+ * config/i386/x86-64linux.mt (TDEPFILES): Add i386-linux-tdep.o.
+ * config/i386/x86-64linux.mh (NATDEPFILES): Remove core-aout.o,
+ add core-regset.o.
+ * config/i386/nm-x86-64linux.h: Use NM_X86_64_LINUX_H for
+ protection against multiple includes instead of NM_X86_64_h. Add
+ various comments. Include "config/nm-linux.h". Don't include
+ <signal.h>.
+ (REGISTER_U_ADDR, KERNEL_U_SIZE, U_REGS_OFFSET, KERN_U_ADDR,
+ GET_THREAD_SIGNALS): Remove defines.
+ (x86_64_register_u_addr, kernel_u_size,
+ lin_thread_get_thread_signals): Remove prototypes.
+ (PTRACE_ARG3_TYPE, PTRACE_XFER_TYPE): Define to `long'.
+ [HAVE_LINK_H]: Don't include "solib.h".
+ [HAVE_LINK_H] (SVR4_SHARED_LIBS): Remove define.
+ * config/i386/tm-x86-64linux.h: Fix comments.
+ * Makefile.in (x86-64-linux-nat.o, x86_64-linux-tdep.o,
+ x86-64-tdep.o): Update dependencies.
+
+2003-05-30 Andrew Cagney <cagney@redhat.com>
+
+ * config/sparc/tm-sparc.h (sparc_extract_struct_value_address):
+ Change parameter type to a "struct regcache *".
+
+ * gdbarch.sh: Regardless of the multi-arch level, always define
+ the macro when not already defined.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+2003-05-30 Richard Henderson <rth@redhat.com>
+
+ * alpha-mdebug-tdep.c (alpha_mdebug_frame_p): Reject prologues.
+ (alpha_mdebug_frame_unwind_cache): Don't call the heuristic unwinder.
+ (alpha_mdebug_frame_this_id): Likewise.
+ (alpha_mdebug_frame_prev_register): Likewise.
+ (alpha_mdebug_frame_base_address): Likewise.
+ (alpha_mdebug_frame_locals_address): Likewise.
+ (alpha_mdebug_frame_args_address): Likewise.
+ (struct alpha_mdebug_unwind_cache): Remove in_prologue_cache.
+ * alpha-tdep.c (alpha_heuristic_proc_start): Use get_pc_function_start.
+ (alpha_heuristic_frame_unwind_cache): Make static; add missing
+ loop increment.
+ (alpha_heuristic_frame_this_id): Make static.
+ (alpha_heuristic_frame_prev_register): Likewise.
+ (alpha_heuristic_frame_base_address): Likewise.
+ * alpha-tdep.h: Update.
+
+2003-05-30 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h (i386bsd_sigcontext_addr): Remove prototype.
+ (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS, I386_SIZEOF_XREGS): Remove
+ defenitions.
+ (IS_FP_REGNUM, IS_SSE_REGNUM): Remove definitions.
+ * i386-tdep.c: Mark functions that are 64-bit safe as such.
+ (I386_EAX_REGNUM, I386_EDX_REGNUM, I386_ESP_REGNUM,
+ I386_EBP_REGNUM, I386_EIP_REGNUM, I386_EFLAGS_REGNUM,
+ I386_ST0_REGNUM): New defines.
+ (CODESTREAM_BUFSIZ, codestream_tell, codestream_peek,
+ codestream_get): Remove define.
+ (codestream_next_addr, condestream_addr, condestream_buf,
+ codestream_off, codestream_cnt): Remove variables.
+ (codestream_fill, codestream_seek, codestream_read): Remove
+ functions.
+ (i386_follow_jump): Rewrite to avoid usage of removed codestream
+ functionality.
+ (i386_get_frame_setup, i386_frameless_signal_p, i386_frame_chain,
+ i386_sigtramp_saved_pc, i386_sigtramp_saved_sp,
+ i386_frame_saved_pc, i386_saved_pc_after_call,
+ i386_frame_num_args, i386_frame_init_saved_regs,
+ i386_push_return_address, i386_do_pop_frame, i386_pop_frame,
+ i386_push_arguments): Remove functions.
+ (i386_skip_prologue): Rewrite to avoid usage of removed codestream
+ functionality. Use i386_analyze_prologue instead of
+ i386_get_frame_setup.
+ (I386_NUM_SAVED_REGS): New define.
+ (struct i386_frame_cache): New structure.
+ (i386_alloc_frame_cache, i386_analyze_struct_return,
+ i386_skip_probe, i386_analyze_frame_setup,
+ i386_analyze_register_saves, i386_analyze_prologue,
+ i386_unwind_pc, i386_frame_cache, i386_frame_this_id,
+ i386_frame_prev_register, i386_sigtramp_frame_cache,
+ i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register,
+ i386_frame_p, i386_sigtramp_frame_p, i386_frame_base_address,
+ i386_unwind_dummy_id, i386_save_dummy_tos, i386_push_dummy_call):
+ New functions.
+ (i386_frame_unwind, i386_sigtramp_frame_unwind, i386_frame_base):
+ New variables.
+ (LOW_RETURN_REGNUM, HIGH_RETURN_REGNUM): Define in terms of
+ I386_EAX_REGNUM and I386_EDX_REGNUM.
+ (i386_extract_return_value, i386_store_return_value): Use
+ I386_ST0_REGNUM where appropriate.
+ (i386_extract_struct_value_address): Rewrite to use extract_address.
+ (i386_svr4_pc_in_sigtramp): Add comment.
+ (i386_svr4_sigcontext_addr): Rewrite.
+ (i386_svr4_init_abi): Adjust TDEP->sc_pc_offset and
+ TDEP->sc_sp_offset.
+ (i386_gdbarch_init): Don't set deprecated_init_frame_pc. Set
+ sp_regnum, fp_regnum, pc_regnum, ps_regnum and fp0_regnum in terms
+ of new defines. Set push_dummy_call, don't set
+ deprecated_push_arguments, deprecated_push_return_address,
+ deprecated_pop_frame. Don't set parm_boundary. Don't set
+ deprecated_frame_chain, deprecated_frame_saved_pc,
+ deprecated_saved_pc_after_call. Set unwind_dummy_id,
+ save_dummy_frame_tos, unwind_pc. Call
+ frame_unwind_append_predicate and frame_base_set_default. Don't
+ set deprecated_dummy_write_pc. Don't set deprecated_fp_regnum.
+ Don't set frameless_function_invocation. Don't set
+ deprecated_register_bytes, deprecated_register_size,
+ deprecated_call_dummy_words and deprecated_sizeof_call_dummy.
+ * i386-linux-tdep.c: Fix formatting in some comments.
+ (LINUX_SIGTRAMP_INSN0, LINUX_SIGTRAMP_OFFSET0,
+ LINUX_SIGTRAMP_INSN1, LINUX_SIGTRAMP_OFFSET1,
+ LINUX_SIGTRAMP_INSN2, LINUX_SIGTRAMP_OFFSET2,
+ LINUX_RT_SIGTRAMP_INSN0, LINUX_RT_SIGTRAMP_OFFSET0,
+ LINUX_RT_SIGTRAMP_INSN1, LINUX_RT_SIGTRAMP_OFFSET1): Drop
+ redundant parentheses.
+ (I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET): New define.
+ (i386_linux_sigcontext_addr): Use it. Rewrite.
+ (find_minsym_and_objfile): Change name of second argument.
+ (skip_gnu_resolver): Renamed from skip_hurd_resolver. All callers
+ changed. Use frame_pc_unwind instead of
+ DEPRECATED_SAVED_PC_AFTER_CALL.
+ (i386_linux_init_abi): Don't set deprecated_register_bytes.
+ * i386bsd-tdep.c (i386bsd_sigcontext_addr): Rewrite.
+ * i386-nto-tdep.c (i386nto_sigcontext_addr): Adapt for new frame
+ unwinder.
+ * i386-cygwin-tdep.c: Don't include "gdbcore.h", "frame.h" and
+ "dummy-frame.h".
+ (i386_cygwin_frame_chain_valid, i386_cygwin_frame_chain): Removed.
+ (_initialize_i386_cygwin_tdep): New prototype.
+ (i386_cygwin_init_abi): Don't set deprecated_frame_chain and
+ deprecated_frame_chain_valid.
+ * i386-sol2-tdep.c (i386_sol2_init_abi): Don't set
+ TDEP->sigcontext_addr, TDEP->sc_pc_offset and TDEP->sc_sp_offset.
+ Rely on the SVR4 defaults.
+ * config/i386/i386sol2.mt (TDEPFILES): Remove i386bsd-tdep.o.
+ * Makefile.in (i386-tdep.o, i386-cygwin-tdep.o): Update dependencies.
+
+2003-05-30 Andrew Cagney <cagney@redhat.com>
+
+ * infcall.c (call_function_by_hand): Always call
+ DEPRECATED_FIX_CALL_DUMMY, even for AT_ENTRY_POINT case.
+
+2003-05-30 Richard Henderson <rth@redhat.com>
+
+ * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): Fix loop
+ increment.
+
+2003-05-29 Jim Blandy <jimb@redhat.com>
+
+ Use gdbarch methods for solib stuff on PowerPC Linux.
+ * config/powerpc/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE,
+ SKIP_TRAMPOLINE_CODE): #undef these, so the gdbarch methods will
+ show through.
+ * ppc-linux-tdep.c (ppc_linux_init_abi): Register
+ IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE methods here,
+ giving the same effect as the #definitions above.
+
+2003-05-29 Adam Fedor <fedor@gnu.org>
+
+ * objc-lang.c (CONVERT_FUNCPTR): Remove macro
+ (find_implementation_from_class): Replace it with the standard
+ case i.e. do nothing.
+
+2003-05-29 Richard Henderson <rth@redhat.com>
+
+ * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): New.
+ (alpha_linux_sigtramp_offset): Use it. Make static.
+ (alpha_linux_sigcontext_addr): Handle __NR_rt_sigreturn;
+ update for new frame model.
+ * alpha-mdebug-tdep.c: New file.
+ * alpha-osf1-tdep.c (alpha_call_dummy_address): Move from alpha-tdep.c.
+ (alpha_osf1_init_abi): Install it.
+ * alpha-tdep.c (PROC_*): Move to alpha-mdebug-tdep.c.
+ (linked_proc_desc_table): Remove.
+ (alpha_frame_past_sigtramp_frame): Remove.
+ (alpha_dynamic_sigtramp_offset): Remove.
+ (ALPHA_PROC_SIGTRAMP_MAGIC): Remove.
+ (alpha_proc_desc_is_dyn_sigtramp): Remove.
+ (alpha_set_proc_desc_is_dyn_sigtramp): Remove.
+ (push_sigtramp_desc): Remove.
+ (alpha_cannot_fetch_register): Use ALPHA_FP_REGNUM.
+ (alpha_cannot_store_register): Likewise.
+ (alpha_sigcontext_addr): Remove.
+ (alpha_find_saved_regs): Remove.
+ (alpha_frame_init_saved_regs): Remove.
+ (alpha_init_frame_pc_first): Remove.
+ (read_next_frame_reg): Remove.
+ (alpha_frame_saved_pc): Remove.
+ (alpha_saved_pc_after_call): Remove.
+ (temp_proc_desc, temp_saved_regs): Remove.
+ (alpha_about_to_return): Remove.
+ (cached_proc_desc): Remove.
+ (alpha_frame_chain): Remove.
+ (alpha_print_extra_frame_info): Remove.
+ (alpha_init_extra_frame_info): Remove.
+ (alpha_frame_locals_address): Remove.
+ (alpha_frame_args_address): Remove.
+ (alpha_push_arguments): Use ALPHA_REGISTER_BYTES not sizeof CORE_ADDR.
+ (alpha_push_dummy_frame): Remove.
+ (alpha_pop_frame): Remove.
+ (alpha_after_prologue): Rename from after_prologue; remove mdebug bits.
+ (alpha_read_insn): New.
+ (alpha_skip_prologue): Merge alpha_skip_prologue_internal; adjust
+ for different insn encodings.
+ (alpha_in_lenient_prologue): Remove.
+ (struct alpha_sigtramp_unwind_cache): New.
+ (alpha_sigtramp_frame_unwind_cache): New.
+ (alpha_sigtramp_register_address): New.
+ (alpha_sigtramp_frame_this_id): New.
+ (alpha_sigtramp_frame_prev_register): New.
+ (alpha_sigtramp_frame_unwind): New.
+ (alpha_sigtramp_frame_p): New.
+ (struct alpha_heuristic_unwind_cache): New.
+ (alpha_heuristic_proc_start): Rename from heuristic_proc_start;
+ don't count nop insns that occur between functions.
+ (alpha_heuristic_frame_unwind_cache): New; incorporate much of
+ heuristic_proc_desc, but without the mdebug wrapping.
+ (alpha_heuristic_frame_this_id): New.
+ (alpha_heuristic_frame_prev_register): New.
+ (alpha_heuristic_frame_unwind): New.
+ (alpha_heuristic_frame_p): New.
+ (alpha_heuristic_frame_base_address): New.
+ (alpha_heuristic_frame_base): New.
+ (alpha_unwind_dummy_id): New.
+ (alpha_unwind_pc): New.
+ (alpha_gdbarch_init): Don't set skip_sigtramp_frame. Kill use of
+ frame related deprecated initializations; install replacements.
+ (alpha_dump_tdep): Remove.
+ * alpha-tdep.h (struct gdbarch_tdep): Remove skip_sigtramp_frame.
+ (alpha_read_insn, alpha_after_prologue,
+ alpha_heuristic_frame_unwind_cache, alpha_heuristic_frame_this_id,
+ alpha_heuristic_frame_prev_register,
+ alpha_heuristic_frame_base_address, alpha_mdebug_init_abi): Declare.
+ * config/alpha/alpha-linux.mt (TDEPFILES): Add alpha-mdebug-tdep.o.
+ * config/alpha/tm-alpha.h (PRINT_EXTRA_FRAME_INFO): Remove.
+ * config/alpha/tm-alphalinux.h (SIGTRAMP_START, SIGTRAMP_END): Remove.
+
+2003-05-29 Andrew Cagney <cagney@redhat.com>
+
+ * gdb_assert.h (gdb_assert_fail): Provide different definitions
+ dependant on the availability of ASSERT_FUNCTION.
+ (ASSERT_FUNCTION): Do not define when there is no function name.
+
+2003-05-29 Kevin Buettner <kevinb@redhat.com>
+
+ From Jimi X <jimix@watson.ibm.com>:
+ * rs6000-tdep.c (skip_prologue): Improve support for 64-bit code.
+
+2003-05-28 Jim Blandy <jimb@redhat.com>
+
+ * ppc-linux-nat.c (store_altivec_registers): Don't cast fourth
+ argument to ptrace to int; the system headers should give it the
+ right type, and pointers don't fit in ints on powerpc64-*-*.
+
+2003-05-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * dwarf2read.c (process_die): Handle DW_TAG_try_block and
+ DW_TAG_catch_block.
+
2003-05-26 Elena Zannoni <ezannoni@redhat.com>
* stabsread.c (dbx_lookup_type): Make static.
@@ -461,10 +1567,10 @@
2003-05-15 David Carlton <carlton@bactrian.org>
Committed by Elena Zannoni <ezannoni@redhat.com>
- * symtab.c (lookup_symbol_aux): Delete calls to
- lookup_symbol_aux_minsyms.
- (lookup_symbol_aux_minsyms): Comment out function and
- prototype. Delete lookup by mangled name.
+ * symtab.c (lookup_symbol_aux): Delete calls to
+ lookup_symbol_aux_minsyms.
+ (lookup_symbol_aux_minsyms): Comment out function and
+ prototype. Delete lookup by mangled name.
2003-05-14 Kevin Buettner <kevinb@redhat.com>
@@ -1330,7 +2436,7 @@
2003-04-18 Jim Blandy <jimb@redhat.com>
* s390-tdep.c (s390_frame_align): New function.
- (s390_gdbarch_init): Register it with the gdbarch object.
+ (s390_gdbarch_init): Register it with the gdbarch object.
2003-04-17 Richard Henderson <rth@redhat.com>
@@ -1345,7 +2451,7 @@
2003-04-17 Elena Zannoni <ezannoni@redhat.com>
* values.c (value_being_returned): Don't fetch the return
- value if the return type is void.
+ value if the return type is void.
2003-04-17 Jeff Johnston <jjohnstn@redhat.com>
@@ -1357,6 +2463,30 @@
td_thr_events_t, td_notify_t, td_thr_iter_f, and td_thrinfo_t
as types.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2003-04-16 Kevin Buettner <kevinb@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): For the SysV ABI, set
@@ -1870,7 +3000,7 @@
2003-04-08 Elena Zannoni <ezannoni@redhat.com>
- * infrun.c (stop_soon): Rename from stop_soon_quietly.
+ * infrun.c (stop_soon): Rename from stop_soon_quietly.
(struct inferior_status): Rename stop_soon_quietly field to stop_soon.
(clear_proceed_status): Rename stop_soon_quietly to stop_soon.
(start_remote): Ditto.
@@ -1879,7 +3009,7 @@
(restore_inferior_status): Ditto.
* infcmd.c (attach_command): Ditto.
* fork-child.c (startup_inferior): Ditto.
- * inferior.h (stop_soon): Rename from stop_soon_quietly.
+ * inferior.h (stop_soon): Rename from stop_soon_quietly.
* alpha-tdep.c (heuristic_proc_start): Ditto.
* mips-tdep.c (heuristic_proc_start): Ditto.
* solib-svr4.c (svr4_solib_create_inferior_hook): Ditto.
@@ -1913,11 +3043,11 @@
2003-04-07 Elena Zannoni <ezannoni@redhat.com>
* disasm.c (dump_insns): Move variables inside loop, or they will
- be freed more than once, causing wild memory corruptions.
+ be freed more than once, causing wild memory corruptions.
(gdb_disassembly): Look for the substring "-thread",
- instead of "-threads" in the target name, to make sure to find
- the 'multi-thread' target. Also, make sure we do the right thing
- with the "core" target.
+ instead of "-threads" in the target name, to make sure to find
+ the 'multi-thread' target. Also, make sure we do the right thing
+ with the "core" target.
2003-04-07 Kevin Buettner <kevinb@redhat.com>
@@ -2078,9 +3208,9 @@
2003-04-04 Elena Zannoni <ezannoni@redhat.com>
- * x86-64-tdep.c (x86_64_push_arguments): Handle correctly the
- signed integer case.
- (classify_argument): Handle enumerations and references.
+ * x86-64-tdep.c (x86_64_push_arguments): Handle correctly the
+ signed integer case.
+ (classify_argument): Handle enumerations and references.
2003-04-04 Andrew Cagney <cagney@redhat.com>
@@ -2118,15 +3248,15 @@
* language.c (language_demangle): New function.
(unk_lang_demangle): Likewise.
(unknown_language_defn, auto_language_defn, local_language_defn):
- Add ukn_lang_demangle.
+ Add ukn_lang_demangle.
* ada-lang.c (ada_language_defn): Add NULL for la_demangle element.
- * f-lang.c, m2-lang.c, p-lang.c, scm-lang.c: Likewise.
+ * f-lang.c, m2-lang.c, p-lang.c, scm-lang.c: Likewise.
* c-lang.c (c_language_defn, asm_language_defn): Likewise.
(cplus_language_defn): Add cplus_demangle for la_demangle element.
* jv-lang.c (java_demangle): New function
(java_language_defn): Use it for la_demangle element.
- * objc-lang.c (objc_demangle): Add options argument
- (objc_language_defn): Use objc_demangle for la_demangle element.
+ * objc-lang.c (objc_demangle): Add options argument
+ (objc_language_defn): Use objc_demangle for la_demangle element.
* maint.c (maintenance_demangle): Replace switch with
call to language_demangle.
* utils.c (fprintf_symbol_filtered): Likewise.
@@ -2360,7 +3490,7 @@
2003-03-30 Andrew Cagney <cagney@redhat.com>
2002-11-10 Klee Dienes <kdienes@apple.com>
- * value.h (struct value): Update comment.
+ * value.h (struct value): Update comment.
2003-03-30 Andrew Cagney <cagney@redhat.com>
@@ -2519,7 +3649,7 @@
2003-03-28 Bob Rossi <bob_rossi@cox.net>
- * MAINTAINERS (write after approval): Add myself.
+ * MAINTAINERS (write after approval): Add myself.
2003-03-27 Theodore A. Roth <troth@openavr.org>
@@ -3148,12 +4278,12 @@
2003-03-13 D. Venkatasubramanian <dvenkat@noida.hcltech.com>
- * MAINTAINERS (write after approval): Alphabetically
+ * MAINTAINERS (write after approval): Alphabetically
listing corrected.
2003-03-13 D. Venkatasubramanian <dvenkat@noida.hcltech.com>
- * MAINTAINERS (write after approval): Add myself.
+ * MAINTAINERS (write after approval): Add myself.
2003-03-12 Andrew Cagney <cagney@redhat.com>
@@ -4075,7 +5205,7 @@
2003-02-20 Adam Fedor <fedor@gnu.org>
* objc-lang.h (find_methods): Remove declaration.
- * objc-lang.c (find_methods): Make static.
+ * objc-lang.c (find_methods): Make static.
2003-02-20 Christopher Faylor <cgf@redhat.com>
@@ -4271,10 +5401,10 @@
2003-02-18 Elena Zannoni <ezannoni@redhat.com>
From Jim Ingham <jingham@apple.com>:
- * dbxread.c (process_one_symbol): Use last_function_start rather
- than function_start_offset to find the real beginning of the
- current function. The latter is just the text section offset on
- some systems, the former is always the real function start.
+ * dbxread.c (process_one_symbol): Use last_function_start rather
+ than function_start_offset to find the real beginning of the
+ current function. The latter is just the text section offset on
+ some systems, the former is always the real function start.
2003-02-17 Andrew Cagney <cagney@redhat.com>
@@ -4289,7 +5419,7 @@
2003-02-14 Elena Zannoni <ezannoni@redhat.com>
- From Brian Ford <ford@vss.fsi.com>
+ From Brian Ford <ford@vss.fsi.com>
* cli/cli-decode.c (lookup_cmd_composition) [TUI]: Properly
conditionalize tui_active test.
@@ -4327,8 +5457,8 @@
2003-02-12 Jason Molenda (jmolenda@apple.com)
- * symmisc.c (print_objfile_statistics): Include information about
- the number of psymtabs and symtabs in each object file.
+ * symmisc.c (print_objfile_statistics): Include information about
+ the number of psymtabs and symtabs in each object file.
2003-02-13 Keith R Seitz <keiths@redhat.com>
@@ -4452,9 +5582,9 @@
(threads_continue_all_with_signals): Ditto.
2003-02-05 Jim Ingham <jingham@apple.com>
- Keith Seitz <keiths@redhat.com>
- Elena Zannoni <ezannoni@redhat.com>
- Andrew Cagney <ac131313@redhat.com>
+ Keith Seitz <keiths@redhat.com>
+ Elena Zannoni <ezannoni@redhat.com>
+ Andrew Cagney <ac131313@redhat.com>
* Makefile.in (SUBDIR_CLI_OBS): Add "cli-interp.o".
(SUBDIR_CLI_SRCS): Add "cli/cli-interp.c".
@@ -4713,11 +5843,11 @@
From Kevin Buettner <kevinb@redhat.com>:
* ui-out.h (make_cleanup_ui_out_table_begin_end): New function.
- * ui-out.c (make_cleanup_ui_out_table_begin_end)
- (do_cleanup_table_end): New functions.
- * breakpoint.c (print_it_typical, print_one_breakpoint, mention):
- Use cleanups to invoke_ui_out_tuple_end().
- (breakpoint_1): Use cleanup to invoke ui_out_table_end().
+ * ui-out.c (make_cleanup_ui_out_table_begin_end)
+ (do_cleanup_table_end): New functions.
+ * breakpoint.c (print_it_typical, print_one_breakpoint, mention):
+ Use cleanups to invoke_ui_out_tuple_end().
+ (breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
@@ -4754,8 +5884,8 @@
2003-02-01 Andrew Cagney <ac131313@redhat.com>
From 2002-11-09 Jason Molenda (jason-cl@molenda.com)
- * stack.c (print_frame_info_base): Output complete FRAME tuple
- for synthesized frames.
+ * stack.c (print_frame_info_base): Output complete FRAME tuple
+ for synthesized frames.
2003-02-02 Andrew Cagney <ac131313@redhat.com>
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 08af70eac6f..7a8ae989fd3 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -327,6 +327,7 @@ Klee Dienes kdienes@apple.com
Richard Earnshaw rearnsha@arm.com
Frank Ch. Eigler fche@redhat.com
Ben Elliston bje@redhat.com
+Raoul Gough RaoulGough@yahoo.co.uk
Anthony Green green@redhat.com
Matthew Green mrg@eterna.com.au
Chris Faylor cgf@redhat.com
@@ -351,6 +352,7 @@ Mark Kettenis kettenis@gnu.org
Jim Kingdon jkingdon@engr.sgi.com ++
Jonathan Larmour jlarmour@redhat.co.uk
Jeff Law law@redhat.com
+David Lecomber david@streamline-computing.com
Robert Lipe rjl@sco.com
H.J. Lu hjl@lucon.org
Michal Ludvig mludvig@suse.cz
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c52eadccfc1..823fa4619ea 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -513,8 +513,8 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
charset.c cli-out.c coffread.c coff-pe-read.c \
complaints.c completer.c corefile.c \
cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \
- dbxread.c demangle.c disasm.c doublest.c \
- dummy-frame.c dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c \
+ dbxread.c demangle.c disasm.c doublest.c dummy-frame.c \
+ dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.c \
elfread.c environ.c eval.c event-loop.c event-top.c expprint.c \
f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c frame.c \
frame-base.c \
@@ -638,6 +638,7 @@ dummy_frame_h = dummy-frame.h
dwarf2cfi_h = dwarf2cfi.h
dwarf2expr_h = dwarf2expr.h
dwarf2loc_h = dwarf2loc.h
+dwarf2_frame_h = dwarf2-frame.h
environ_h = environ.h
event_loop_h = event-loop.h
event_top_h = event-top.h
@@ -734,7 +735,7 @@ typeprint_h = typeprint.h
ui_file_h = ui-file.h
ui_out_h = ui-out.h
valprint_h = valprint.h
-value_h = value.h $(doublest_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
+value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) $(expression_h)
varobj_h = varobj.h $(symtab_h) $(gdbtypes_h)
vax_tdep_h = vax-tdep.h
version_h = version.h
@@ -853,7 +854,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \
exec.o bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \
dbxread.o coffread.o coff-pe-read.o elfread.o \
dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
- dwarf2expr.o dwarf2loc.o \
+ dwarf2expr.o dwarf2loc.o dwarf2-frame.o \
c-lang.o f-lang.o objc-lang.o \
ui-out.o cli-out.o \
varobj.o wrapper.o \
@@ -1355,7 +1356,7 @@ ALLDEPFILES = \
aix-thread.c \
alpha-nat.c alphabsd-nat.c \
alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \
- alpha-osf1-tdep.c alphafbsd-tdep.c \
+ alpha-osf1-tdep.c alphafbsd-tdep.c alpha-mdebug-tdep.c \
arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \
armnbsd-nat.c armnbsd-tdep.c \
avr-tdep.c \
@@ -1508,17 +1509,21 @@ ada-valprint.o: ada-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \
aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \
$(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \
$(ppc_tdep_h)
-alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(value_h) $(alpha_tdep_h) $(osabi_h)
-alpha-nat.o: alpha-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
- $(regcache_h) $(alpha_tdep_h) $(gregset_h) $(gdb_string_h)
+alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdb_assert_h) \
+ $(osabi_h) $(alpha_tdep_h)
+alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \
+ $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h)
alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \
- $(value_h) $(osabi_h) $(gdb_string_h) $(alpha_tdep_h)
-alpha-tdep.o: alpha-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
+ $(value_h) $(osabi_h) $(gdb_string_h) $(alpha_tdep_h) $(objfiles_h)
+alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
+ $(frame_unwind_h) $(frame_base_h) $(inferior_h) $(symtab_h) \
$(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) $(symfile_h) \
$(objfiles_h) $(gdb_string_h) $(linespec_h) $(regcache_h) \
- $(doublest_h) $(arch_utils_h) $(elf_bfd_h) $(alpha_tdep_h) \
- $(osabi_h) $(block_h)
+ $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) $(gdb_assert_h) \
+ $(elf_bfd_h) $(alpha_tdep_h) $(dwarf2_frame_h)
+alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_h) \
+ $(frame_unwind_h) $(frame_base_h) $(symtab_h) $(gdbcore_h) \
+ $(block_h) $(gdb_assert_h) $(alpha_tdep_h)
alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h)
alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(regcache_h) $(alpha_tdep_h) \
@@ -1674,6 +1679,10 @@ dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \
dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \
$(gdbcore_h) $(target_h) $(inferior_h) $(dwarf2expr_h) \
$(dwarf2loc_h) $(ax_h) $(ax_gdb_h) $(regcache_h) $(gdb_string_h)
+dwarf2-frame.o: $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) $(frame_h) \
+ $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \
+ $(symtab_h) $(objfiles_h) $(regcache_h) $(gdb_assert_h) \
+ $(gdb_string_h) $(dwarf2_frame_h)
dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
$(symfile_h) $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) \
$(demangle_h) $(expression_h) $(filenames_h) $(macrotab_h) \
@@ -1792,11 +1801,12 @@ i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h)
i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(i386_tdep_h) \
$(osabi_h)
i386-stub.o: i386-stub.c
-i386-tdep.o: i386-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
- $(gdbcore_h) $(objfiles_h) $(target_h) $(floatformat_h) $(symfile_h) \
- $(symtab_h) $(gdbcmd_h) $(command_h) $(arch_utils_h) $(regcache_h) \
- $(doublest_h) $(value_h) $(gdb_assert_h) $(i386_tdep_h) \
- $(i387_tdep_h) $(osabi_h)
+i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \
+ $(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \
+ $(frame_h) $(frame_base_h) $(frame_unwind_h) $(inferior_h) \
+ $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(osabi_h) $(regcache_h) \
+ $(reggroups_h) $(symfile_h) $(symtab_h) $(target_h) $(value_h) \
+ $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h)
i386b-nat.o: i386b-nat.c $(defs_h)
i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h) \
@@ -1811,7 +1821,7 @@ i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(i386_tdep_h) $(osabi_h)
i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
$(regcache_h) $(target_h) $(i386_tdep_h) $(osabi_h)
i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(gdb_string_h) \
- $(i386_tdep_h) $(osabi_h) $(gdbcore_h) $(frame_h) $(dummy_frame_h)
+ $(i386_tdep_h) $(osabi_h)
i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(gdbtypes_h) $(gdbcore_h) \
$(regcache_h) $(arch_utils_h) $(i386_tdep_h) $(i387_tdep_h) \
$(nbsd_tdep_h) $(solib_svr4_h) $(osabi_h)
@@ -2349,13 +2359,15 @@ wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \
$(regcache_h)
wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h)
x86-64-linux-nat.o: x86-64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(regcache_h) $(gdb_assert_h) $(x86_64_tdep_h)
+ $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(gregset_h) \
+ $(x86_64_tdep_h)
x86-64-linux-tdep.o: x86-64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(gdb_string_h) $(regcache_h) $(x86_64_tdep_h) $(dwarf2cfi_h) \
- $(osabi_h)
-x86-64-tdep.o: x86-64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \
- $(gdbcmd_h) $(arch_utils_h) $(regcache_h) $(symfile_h) $(objfiles_h) \
- $(x86_64_tdep_h) $(dwarf2cfi_h) $(gdb_assert_h) $(block_h)
+ $(regcache_h) $(osabi_h) $(gdb_string_h) $(x86_64_tdep_h)
+x86-64-tdep.o: x86-64-tdep.c $(defs_h) \
+ $(inferior_h) $(gdbcore_h) $(arch_utils_h) $(block_h) \
+ $(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
+ $(inferior_h) $(gdbcmd_h) $(gdbcode_h) $(objfiles_h) $(regcache_h) \
+ $(symfile_h) $(gdb_assert_h) $(x86_64_tdep_h) $(i387_tdep_h)
xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \
$(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \
$(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \
diff --git a/gdb/acconfig.h b/gdb/acconfig.h
index a9bf0a48048..a7d25e84bd5 100644
--- a/gdb/acconfig.h
+++ b/gdb/acconfig.h
@@ -95,6 +95,9 @@
/* Define if using Solaris thread debugging. */
#undef HAVE_THREAD_DB_LIB
+/* Define if you support the tkill syscall. */
+#undef HAVE_TKILL_SYSCALL
+
/* Define on a GNU/Linux system to work around problems in sys/procfs.h. */
#undef START_INFERIOR_TRAPS_EXPECTED
#undef sys_quotactl
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 12bda8049cf..c403af2c02d 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -3181,8 +3181,7 @@ static struct symbol *
standard_lookup (const char *name, domain_enum domain)
{
struct symbol *sym;
- struct symtab *symtab;
- sym = lookup_symbol (name, (struct block *) NULL, domain, 0, &symtab);
+ sym = lookup_symbol (name, (struct block *) NULL, domain, 0, NULL);
return sym;
}
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index c5d7481fbf9..de53b3e71b3 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -20,96 +20,125 @@
#include "defs.h"
#include "frame.h"
-#include "gdbcore.h"
-#include "value.h"
+#include "gdb_assert.h"
#include "osabi.h"
#include "alpha-tdep.h"
-/* Under GNU/Linux, signal handler invocations can be identified by the
- designated code sequence that is used to return from a signal
+/* Under GNU/Linux, signal handler invocations can be identified by
+ the designated code sequence that is used to return from a signal
handler. In particular, the return address of a signal handler
- points to the following sequence (the first instruction is quadword
- aligned):
-
- bis $30,$30,$16
- addq $31,0x67,$0
- call_pal callsys
-
- Each instruction has a unique encoding, so we simply attempt to
- match the instruction the pc is pointing to with any of the above
- instructions. If there is a hit, we know the offset to the start
- of the designated sequence and can then check whether we really are
- executing in a designated sequence. If not, -1 is returned,
- otherwise the offset from the start of the desingated sequence is
- returned.
-
- There is a slight chance of false hits: code could jump into the
- middle of the designated sequence, in which case there is no
- guarantee that we are in the middle of a sigreturn syscall. Don't
- think this will be a problem in praxis, though. */
-LONGEST
-alpha_linux_sigtramp_offset (CORE_ADDR pc)
+ points to a sequence that copies $sp to $16, loads $0 with the
+ appropriate syscall number, and finally enters the kernel.
+
+ This is somewhat complicated in that:
+ (1) the expansion of the "mov" assembler macro has changed over
+ time, from "bis src,src,dst" to "bis zero,src,dst",
+ (2) the kernel has changed from using "addq" to "lda" to load the
+ syscall number,
+ (3) there is a "normal" sigreturn and an "rt" sigreturn which
+ has a different stack layout.
+*/
+
+static long
+alpha_linux_sigtramp_offset_1 (CORE_ADDR pc)
{
- unsigned int i[3], w;
- long off;
+ switch (alpha_read_insn (pc))
+ {
+ case 0x47de0410: /* bis $30,$30,$16 */
+ case 0x47fe0410: /* bis $31,$30,$16 */
+ return 0;
- if (read_memory_nobpt (pc, (char *) &w, 4) != 0)
- return -1;
+ case 0x43ecf400: /* addq $31,103,$0 */
+ case 0x201f0067: /* lda $0,103($31) */
+ case 0x201f015f: /* lda $0,351($31) */
+ return 4;
+
+ case 0x00000083: /* call_pal callsys */
+ return 8;
- off = -1;
- switch (w)
- {
- case 0x47de0410:
- off = 0;
- break; /* bis $30,$30,$16 */
- case 0x43ecf400:
- off = 4;
- break; /* addq $31,0x67,$0 */
- case 0x00000083:
- off = 8;
- break; /* call_pal callsys */
default:
return -1;
}
+}
+
+static LONGEST
+alpha_linux_sigtramp_offset (CORE_ADDR pc)
+{
+ long i, off;
+
+ if (pc & 3)
+ return -1;
+
+ /* Guess where we might be in the sequence. */
+ off = alpha_linux_sigtramp_offset_1 (pc);
+ if (off < 0)
+ return -1;
+
+ /* Verify that the other two insns of the sequence are as we expect. */
pc -= off;
- if (pc & 0x7)
+ for (i = 0; i < 12; i += 4)
{
- /* designated sequence is not quadword aligned */
- return -1;
+ if (i == off)
+ continue;
+ if (alpha_linux_sigtramp_offset_1 (pc + i) != i)
+ return -1;
}
- if (read_memory_nobpt (pc, (char *) i, sizeof (i)) != 0)
- return -1;
-
- if (i[0] == 0x47de0410 && i[1] == 0x43ecf400 && i[2] == 0x00000083)
- return off;
- return -1;
+ return off;
}
static int
alpha_linux_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
- return (alpha_linux_sigtramp_offset (pc) >= 0);
+ return alpha_linux_sigtramp_offset (pc) >= 0;
}
static CORE_ADDR
-alpha_linux_sigcontext_addr (struct frame_info *frame)
+alpha_linux_sigcontext_addr (struct frame_info *next_frame)
{
- return (get_frame_base (frame) - 0x298); /* sizeof(struct sigcontext) */
+ CORE_ADDR pc;
+ ULONGEST sp;
+ long off;
+
+ pc = frame_pc_unwind (next_frame);
+ frame_unwind_unsigned_register (next_frame, ALPHA_SP_REGNUM, &sp);
+
+ off = alpha_linux_sigtramp_offset (pc);
+ gdb_assert (off >= 0);
+
+ /* __NR_rt_sigreturn has a couple of structures on the stack. This is:
+
+ struct rt_sigframe {
+ struct siginfo info;
+ struct ucontext uc;
+ };
+
+ offsetof (struct rt_sigframe, uc.uc_mcontext);
+ */
+ if (alpha_read_insn (pc - off + 4) == 0x201f015f)
+ return sp + 176;
+
+ /* __NR_sigreturn has the sigcontext structure at the top of the stack. */
+ return sp;
}
static void
-alpha_linux_init_abi (struct gdbarch_info info,
- struct gdbarch *gdbarch)
+alpha_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ struct gdbarch_tdep *tdep;
+
+ /* Hook into the DWARF CFI frame unwinder. */
+ alpha_dwarf2_init_abi (info, gdbarch);
+
+ /* Hook into the MDEBUG frame unwinder. */
+ alpha_mdebug_init_abi (info, gdbarch);
set_gdbarch_pc_in_sigtramp (gdbarch, alpha_linux_pc_in_sigtramp);
+ tdep = gdbarch_tdep (gdbarch);
tdep->dynamic_sigtramp_offset = alpha_linux_sigtramp_offset;
tdep->sigcontext_addr = alpha_linux_sigcontext_addr;
-
tdep->jb_pc = 2;
tdep->jb_elt_size = 8;
}
diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c
new file mode 100644
index 00000000000..d481986b8c3
--- /dev/null
+++ b/gdb/alpha-mdebug-tdep.c
@@ -0,0 +1,384 @@
+/* Target-dependent mdebug code for the ALPHA architecture.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "frame.h"
+#include "frame-unwind.h"
+#include "frame-base.h"
+#include "symtab.h"
+#include "gdbcore.h"
+#include "block.h"
+#include "gdb_assert.h"
+
+#include "alpha-tdep.h"
+
+/* FIXME: Some of this code should perhaps be merged with mips. */
+
+/* *INDENT-OFF* */
+/* Layout of a stack frame on the alpha:
+
+ | |
+ pdr members: | 7th ... nth arg, |
+ | `pushed' by caller. |
+ | |
+----------------|-------------------------------|<-- old_sp == vfp
+ ^ ^ ^ ^ | |
+ | | | | | |
+ | |localoff | Copies of 1st .. 6th |
+ | | | | | argument if necessary. |
+ | | | v | |
+ | | | --- |-------------------------------|<-- FRAME_LOCALS_ADDRESS
+ | | | | |
+ | | | | Locals and temporaries. |
+ | | | | |
+ | | | |-------------------------------|
+ | | | | |
+ |-fregoffset | Saved float registers. |
+ | | | | F9 |
+ | | | | . |
+ | | | | . |
+ | | | | F2 |
+ | | v | |
+ | | -------|-------------------------------|
+ | | | |
+ | | | Saved registers. |
+ | | | S6 |
+ |-regoffset | . |
+ | | | . |
+ | | | S0 |
+ | | | pdr.pcreg |
+ | v | |
+ | ----------|-------------------------------|
+ | | |
+ frameoffset | Argument build area, gets |
+ | | 7th ... nth arg for any |
+ | | called procedure. |
+ v | |
+ -------------|-------------------------------|<-- sp
+ | |
+*/
+/* *INDENT-ON* */
+
+#define PROC_LOW_ADDR(proc) ((proc)->pdr.adr)
+#define PROC_FRAME_OFFSET(proc) ((proc)->pdr.frameoffset)
+#define PROC_FRAME_REG(proc) ((proc)->pdr.framereg)
+#define PROC_REG_MASK(proc) ((proc)->pdr.regmask)
+#define PROC_FREG_MASK(proc) ((proc)->pdr.fregmask)
+#define PROC_REG_OFFSET(proc) ((proc)->pdr.regoffset)
+#define PROC_FREG_OFFSET(proc) ((proc)->pdr.fregoffset)
+#define PROC_PC_REG(proc) ((proc)->pdr.pcreg)
+#define PROC_LOCALOFF(proc) ((proc)->pdr.localoff)
+
+/* Locate the mdebug PDR for the given PC. Return null if one can't
+ be found; you'll have to fall back to other methods in that case. */
+
+static alpha_extra_func_info_t
+find_proc_desc (CORE_ADDR pc)
+{
+ struct block *b = block_for_pc (pc);
+ alpha_extra_func_info_t proc_desc = NULL;
+ struct symbol *sym = NULL;
+
+ if (b)
+ {
+ CORE_ADDR startaddr;
+ find_pc_partial_function (pc, NULL, &startaddr, NULL);
+
+ if (startaddr > BLOCK_START (b))
+ /* This is the "pathological" case referred to in a comment in
+ print_frame_info. It might be better to move this check into
+ symbol reading. */
+ sym = NULL;
+ else
+ sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0, NULL);
+ }
+
+ if (sym)
+ {
+ proc_desc = (alpha_extra_func_info_t) SYMBOL_VALUE (sym);
+
+ /* If we never found a PDR for this function in symbol reading,
+ then examine prologues to find the information. */
+ if (proc_desc->pdr.framereg == -1)
+ proc_desc = NULL;
+ }
+
+ return proc_desc;
+}
+
+/* This returns the PC of the first inst after the prologue. If we can't
+ find the prologue, then return 0. */
+
+static CORE_ADDR
+alpha_mdebug_after_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
+{
+ if (proc_desc)
+ {
+ /* If function is frameless, then we need to do it the hard way. I
+ strongly suspect that frameless always means prologueless... */
+ if (PROC_FRAME_REG (proc_desc) == ALPHA_SP_REGNUM
+ && PROC_FRAME_OFFSET (proc_desc) == 0)
+ return 0;
+ }
+
+ return alpha_after_prologue (pc);
+}
+
+/* Return non-zero if we *might* be in a function prologue. Return zero
+ if we are definitively *not* in a function prologue. */
+
+static int
+alpha_mdebug_in_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
+{
+ CORE_ADDR after_prologue_pc = alpha_mdebug_after_prologue (pc, proc_desc);
+ return (after_prologue_pc == 0 || pc < after_prologue_pc);
+}
+
+
+/* Frame unwinder that reads mdebug PDRs. */
+
+struct alpha_mdebug_unwind_cache
+{
+ alpha_extra_func_info_t proc_desc;
+ CORE_ADDR vfp;
+ CORE_ADDR *saved_regs;
+};
+
+/* Extract all of the information about the frame from PROC_DESC
+ and store the resulting register save locations in the structure. */
+
+static struct alpha_mdebug_unwind_cache *
+alpha_mdebug_frame_unwind_cache (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_mdebug_unwind_cache *info;
+ alpha_extra_func_info_t proc_desc;
+ ULONGEST vfp;
+ CORE_ADDR pc, reg_position;
+ unsigned long mask;
+ int ireg, returnreg;
+
+ if (*this_prologue_cache)
+ return *this_prologue_cache;
+
+ info = FRAME_OBSTACK_ZALLOC (struct alpha_mdebug_unwind_cache);
+ *this_prologue_cache = info;
+ pc = frame_pc_unwind (next_frame);
+
+ /* ??? We don't seem to be able to cache the lookup of the PDR
+ from alpha_mdebug_frame_p. It'd be nice if we could change
+ the arguments to that function. Oh well. */
+ proc_desc = find_proc_desc (pc);
+ info->proc_desc = proc_desc;
+ gdb_assert (proc_desc != NULL);
+
+ info->saved_regs = frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
+
+ /* The VFP of the frame is at FRAME_REG+FRAME_OFFSET. */
+ frame_unwind_unsigned_register (next_frame, PROC_FRAME_REG (proc_desc), &vfp);
+ vfp += PROC_FRAME_OFFSET (info->proc_desc);
+ info->vfp = vfp;
+
+ /* Fill in the offsets for the registers which gen_mask says were saved. */
+
+ reg_position = vfp + PROC_REG_OFFSET (proc_desc);
+ mask = PROC_REG_MASK (proc_desc);
+ returnreg = PROC_PC_REG (proc_desc);
+
+ /* Note that RA is always saved first, regardless of its actual
+ register number. */
+ if (mask & (1 << returnreg))
+ {
+ /* Clear bit for RA so we don't save it again later. */
+ mask &= ~(1 << returnreg);
+
+ info->saved_regs[returnreg] = reg_position;
+ reg_position += 8;
+ }
+
+ for (ireg = 0; ireg <= 31; ++ireg)
+ if (mask & (1 << ireg))
+ {
+ info->saved_regs[ireg] = reg_position;
+ reg_position += 8;
+ }
+
+ reg_position = vfp + PROC_FREG_OFFSET (proc_desc);
+ mask = PROC_FREG_MASK (proc_desc);
+
+ for (ireg = 0; ireg <= 31; ++ireg)
+ if (mask & (1 << ireg))
+ {
+ info->saved_regs[ALPHA_FP0_REGNUM + ireg] = reg_position;
+ reg_position += 8;
+ }
+
+ return info;
+}
+
+/* Given a GDB frame, determine the address of the calling function's
+ frame. This will be used to create a new GDB frame struct. */
+
+static void
+alpha_mdebug_frame_this_id (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ struct frame_id *this_id)
+{
+ struct alpha_mdebug_unwind_cache *info
+ = alpha_mdebug_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ *this_id = frame_id_build (info->vfp, frame_func_unwind (next_frame));
+}
+
+/* Retrieve the value of REGNUM in FRAME. Don't give up! */
+
+static void
+alpha_mdebug_frame_prev_register (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
+{
+ struct alpha_mdebug_unwind_cache *info
+ = alpha_mdebug_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ /* The PC of the previous frame is stored in the link register of
+ the current frame. Frob regnum so that we pull the value from
+ the correct place. */
+ if (regnum == ALPHA_PC_REGNUM)
+ regnum = PROC_PC_REG (info->proc_desc);
+
+ /* For all registers known to be saved in the current frame,
+ do the obvious and pull the value out. */
+ if (info->saved_regs[regnum])
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = info->saved_regs[regnum];
+ *realnump = -1;
+ if (bufferp != NULL)
+ get_frame_memory (next_frame, *addrp, bufferp, ALPHA_REGISTER_SIZE);
+ return;
+ }
+
+ /* The stack pointer of the previous frame is computed by popping
+ the current stack frame. */
+ if (regnum == ALPHA_SP_REGNUM)
+ {
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (bufferp != NULL)
+ store_unsigned_integer (bufferp, ALPHA_REGISTER_SIZE, info->vfp);
+ return;
+ }
+
+ /* Otherwise assume the next frame has the same register value. */
+ frame_register (next_frame, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
+}
+
+static const struct frame_unwind alpha_mdebug_frame_unwind = {
+ NORMAL_FRAME,
+ alpha_mdebug_frame_this_id,
+ alpha_mdebug_frame_prev_register
+};
+
+const struct frame_unwind *
+alpha_mdebug_frame_p (CORE_ADDR pc)
+{
+ alpha_extra_func_info_t proc_desc;
+
+ /* If this PC does not map to a PDR, then clearly this isn't an
+ mdebug frame. */
+ proc_desc = find_proc_desc (pc);
+ if (proc_desc == NULL)
+ return NULL;
+
+ /* If we're in the prologue, the PDR for this frame is not yet valid.
+ Say no here and we'll fall back on the heuristic unwinder. */
+ if (alpha_mdebug_in_prologue (pc, proc_desc))
+ return NULL;
+
+ return &alpha_mdebug_frame_unwind;
+}
+
+static CORE_ADDR
+alpha_mdebug_frame_base_address (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_mdebug_unwind_cache *info
+ = alpha_mdebug_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ return info->vfp;
+}
+
+static CORE_ADDR
+alpha_mdebug_frame_locals_address (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_mdebug_unwind_cache *info
+ = alpha_mdebug_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ return info->vfp - PROC_LOCALOFF (info->proc_desc);
+}
+
+static CORE_ADDR
+alpha_mdebug_frame_args_address (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_mdebug_unwind_cache *info
+ = alpha_mdebug_frame_unwind_cache (next_frame, this_prologue_cache);
+
+ return info->vfp - ALPHA_NUM_ARG_REGS * 8;
+}
+
+static const struct frame_base alpha_mdebug_frame_base = {
+ &alpha_mdebug_frame_unwind,
+ alpha_mdebug_frame_base_address,
+ alpha_mdebug_frame_locals_address,
+ alpha_mdebug_frame_args_address
+};
+
+static const struct frame_base *
+alpha_mdebug_frame_base_p (CORE_ADDR pc)
+{
+ alpha_extra_func_info_t proc_desc;
+
+ /* If this PC does not map to a PDR, then clearly this isn't an
+ mdebug frame. */
+ proc_desc = find_proc_desc (pc);
+ if (proc_desc == NULL)
+ return NULL;
+
+ return &alpha_mdebug_frame_base;
+}
+
+
+void
+alpha_mdebug_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ frame_unwind_append_predicate (gdbarch, alpha_mdebug_frame_p);
+ frame_base_append_predicate (gdbarch, alpha_mdebug_frame_base_p);
+}
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index af0a336cf6a..342deff22b4 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -68,7 +68,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
OSF/1.2 core files. OSF5 uses different names for the register
enum list, need to handle two cases. The actual values are the
same. */
- static int core_reg_mapping[ALPHA_NUM_REGS] =
+ static int const core_reg_mapping[ALPHA_NUM_REGS] =
{
#ifdef NCF_REGS
#define EFL NCF_REGS
@@ -94,19 +94,23 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size,
EF_PC, -1
#endif
};
- static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] =
- {0};
- for (regno = 0; regno < NUM_REGS; regno++)
+ for (regno = 0; regno < ALPHA_NUM_REGS; regno++)
{
if (CANNOT_FETCH_REGISTER (regno))
{
- supply_register (regno, zerobuf);
+ supply_register (regno, NULL);
continue;
}
addr = 8 * core_reg_mapping[regno];
if (addr < 0 || addr >= core_reg_size)
{
+ /* ??? UNIQUE is a new addition. Don't generate an error. */
+ if (regno == ALPHA_UNIQUE_REGNUM)
+ {
+ supply_register (regno, NULL);
+ continue;
+ }
if (bad_reg < 0)
bad_reg = regno;
}
@@ -131,31 +135,22 @@ fetch_elf_core_registers (char *core_reg_sect, unsigned core_reg_size,
return;
}
- if (which == 2)
+ switch (which)
{
- /* The FPU Registers. */
- memcpy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
- core_reg_sect, 31 * 8);
- memset (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM + 31)], 0, 8);
- memset (&deprecated_register_valid[FP0_REGNUM], 1, 32);
- }
- else
- {
- /* The General Registers. */
- memcpy (&deprecated_registers[REGISTER_BYTE (ALPHA_V0_REGNUM)],
- core_reg_sect, 31 * 8);
- memcpy (&deprecated_registers[REGISTER_BYTE (PC_REGNUM)],
- core_reg_sect + 31 * 8, 8);
- memset (&deprecated_registers[REGISTER_BYTE (ALPHA_ZERO_REGNUM)], 0, 8);
- memset (&deprecated_register_valid[ALPHA_V0_REGNUM], 1, 32);
- deprecated_register_valid[PC_REGNUM] = 1;
-
- if (core_reg_size >= 33 * 8)
- {
- memcpy (&deprecated_registers[REGISTER_BYTE (ALPHA_UNIQUE_REGNUM)],
- core_reg_sect + 32 * 8, 8);
- deprecated_register_valid[ALPHA_UNIQUE_REGNUM] = 1;
- }
+ case 0: /* integer registers */
+ /* PC is in slot 32; UNIQUE is in slot 33, if present. */
+ alpha_supply_int_regs (-1, core_reg_sect, core_reg_sect + 31*8,
+ (core_reg_size >= 33 * 8
+ ? core_reg_sect + 32*8 : NULL));
+ break;
+
+ case 2: /* floating-point registers */
+ /* FPCR is in slot 32. */
+ alpha_supply_fp_regs (-1, core_reg_sect, core_reg_sect + 31*8);
+ break;
+
+ default:
+ break;
}
}
@@ -193,6 +188,11 @@ kernel_u_size (void)
/* Prototypes for supply_gregset etc. */
#include "gregset.h"
+/* Locate the UNIQUE value within the gregset_t. */
+#ifndef ALPHA_REGSET_UNIQUE
+#define ALPHA_REGSET_UNIQUE(ptr) NULL
+#endif
+
/*
* See the comment in m68k-tdep.c regarding the utility of these functions.
*/
@@ -200,33 +200,21 @@ kernel_u_size (void)
void
supply_gregset (gdb_gregset_t *gregsetp)
{
- register int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp);
- static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] =
- {0};
+ void *unique = ALPHA_REGSET_UNIQUE (gregsetp);
- for (regi = 0; regi < 31; regi++)
- supply_register (regi, (char *) (regp + regi));
-
- supply_register (PC_REGNUM, (char *) (regp + 31));
-
- /* Fill inaccessible registers with zero. */
- supply_register (ALPHA_ZERO_REGNUM, zerobuf);
- supply_register (DEPRECATED_FP_REGNUM, zerobuf);
+ /* PC is in slot 32. */
+ alpha_supply_int_regs (-1, regp, regp + 31, unique);
}
void
fill_gregset (gdb_gregset_t *gregsetp, int regno)
{
- int regi;
register long *regp = ALPHA_REGSET_BASE (gregsetp);
+ void *unique = ALPHA_REGSET_UNIQUE (gregsetp);
- for (regi = 0; regi < 31; regi++)
- if ((regno == -1) || (regno == regi))
- *(regp + regi) = *(long *) &deprecated_registers[REGISTER_BYTE (regi)];
-
- if ((regno == -1) || (regno == PC_REGNUM))
- *(regp + 31) = *(long *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
+ /* PC is in slot 32. */
+ alpha_fill_int_regs (regno, regp, regp + 31, unique);
}
/*
@@ -237,27 +225,19 @@ fill_gregset (gdb_gregset_t *gregsetp, int regno)
void
supply_fpregset (gdb_fpregset_t *fpregsetp)
{
- register int regi;
register long *regp = ALPHA_REGSET_BASE (fpregsetp);
- for (regi = 0; regi < 32; regi++)
- supply_register (regi + FP0_REGNUM, (char *) (regp + regi));
+ /* FPCR is in slot 32. */
+ alpha_supply_fp_regs (-1, regp, regp + 31);
}
void
fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
{
- int regi;
register long *regp = ALPHA_REGSET_BASE (fpregsetp);
- for (regi = FP0_REGNUM; regi < FP0_REGNUM + 32; regi++)
- {
- if ((regno == -1) || (regno == regi))
- {
- *(regp + regi - FP0_REGNUM) =
- *(long *) &deprecated_registers[REGISTER_BYTE (regi)];
- }
- }
+ /* FPCR is in slot 32. */
+ alpha_fill_fp_regs (regno, regp, regp + 31);
}
#endif
diff --git a/gdb/alpha-osf1-tdep.c b/gdb/alpha-osf1-tdep.c
index 4eaa3c4013c..ca757de660f 100644
--- a/gdb/alpha-osf1-tdep.c
+++ b/gdb/alpha-osf1-tdep.c
@@ -24,22 +24,10 @@
#include "value.h"
#include "osabi.h"
#include "gdb_string.h"
+#include "objfiles.h"
#include "alpha-tdep.h"
-/* Under OSF/1, the __sigtramp routine is frameless and has a frame
- size of zero, but we are able to backtrace through it. */
-static CORE_ADDR
-alpha_osf1_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
-{
- char *name;
-
- find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (PC_IN_SIGTRAMP (pc, name))
- return frame->frame;
- return 0;
-}
-
static int
alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{
@@ -49,8 +37,36 @@ alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
static CORE_ADDR
alpha_osf1_sigcontext_addr (struct frame_info *frame)
{
- return (read_memory_integer (frame->next ? frame->next->frame
- : frame->frame, 8));
+ struct frame_info *next_frame = get_next_frame (frame);
+
+ if (next_frame != NULL)
+ return (read_memory_integer (get_frame_base (next_frame), 8));
+ else
+ return (read_memory_integer (get_frame_base (frame), 8));
+}
+
+/* This is the definition of CALL_DUMMY_ADDRESS. It's a heuristic that is used
+ to find a convenient place in the text segment to stick a breakpoint to
+ detect the completion of a target function call (ala call_function_by_hand).
+ */
+
+static CORE_ADDR
+alpha_call_dummy_address (void)
+{
+ CORE_ADDR entry;
+ struct minimal_symbol *sym;
+
+ entry = entry_point_address ();
+
+ if (entry != 0)
+ return entry;
+
+ sym = lookup_minimal_symbol ("_Prelude", NULL, symfile_objfile);
+
+ if (!sym || MSYMBOL_TYPE (sym) != mst_text)
+ return 0;
+ else
+ return SYMBOL_VALUE_ADDRESS (sym) + 4;
}
static void
@@ -59,13 +75,20 @@ alpha_osf1_init_abi (struct gdbarch_info info,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ /* Hook into the MDEBUG frame unwinder. */
+ alpha_mdebug_init_abi (info, gdbarch);
+
set_gdbarch_pc_in_sigtramp (gdbarch, alpha_osf1_pc_in_sigtramp);
/* The next/step support via procfs on OSF1 is broken when running
on multi-processor machines. We need to use software single stepping
instead. */
set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
- tdep->skip_sigtramp_frame = alpha_osf1_skip_sigtramp_frame;
+ /* Alpha OSF/1 inhibits execution of code on the stack. But there is
+ no need for a dummy on the Alpha. PUSH_ARGUMENTS takes care of all
+ argument handling and bp_call_dummy takes care of stopping the dummy. */
+ set_gdbarch_call_dummy_address (gdbarch, alpha_call_dummy_address);
+
tdep->sigcontext_addr = alpha_osf1_sigcontext_addr;
tdep->jb_pc = 2;
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index ad7ca747507..f88725ca9a0 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -20,7 +20,11 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "doublest.h"
#include "frame.h"
+#include "frame-unwind.h"
+#include "frame-base.h"
+#include "dwarf2-frame.h"
#include "inferior.h"
#include "symtab.h"
#include "value.h"
@@ -32,7 +36,7 @@
#include "gdb_string.h"
#include "linespec.h"
#include "regcache.h"
-#include "doublest.h"
+#include "reggroups.h"
#include "arch-utils.h"
#include "osabi.h"
#include "block.h"
@@ -41,234 +45,11 @@
#include "alpha-tdep.h"
-static gdbarch_init_ftype alpha_gdbarch_init;
-
-static gdbarch_register_name_ftype alpha_register_name;
-static gdbarch_register_raw_size_ftype alpha_register_raw_size;
-static gdbarch_register_virtual_size_ftype alpha_register_virtual_size;
-static gdbarch_register_virtual_type_ftype alpha_register_virtual_type;
-static gdbarch_register_byte_ftype alpha_register_byte;
-static gdbarch_cannot_fetch_register_ftype alpha_cannot_fetch_register;
-static gdbarch_cannot_store_register_ftype alpha_cannot_store_register;
-static gdbarch_register_convertible_ftype alpha_register_convertible;
-static gdbarch_register_convert_to_virtual_ftype
- alpha_register_convert_to_virtual;
-static gdbarch_register_convert_to_raw_ftype alpha_register_convert_to_raw;
-static gdbarch_deprecated_extract_return_value_ftype alpha_extract_return_value;
-static gdbarch_deprecated_extract_struct_value_address_ftype
- alpha_extract_struct_value_address;
-static gdbarch_use_struct_convention_ftype alpha_use_struct_convention;
-
-static gdbarch_breakpoint_from_pc_ftype alpha_breakpoint_from_pc;
-
-static gdbarch_frame_args_address_ftype alpha_frame_args_address;
-static gdbarch_frame_locals_address_ftype alpha_frame_locals_address;
-
-static gdbarch_skip_prologue_ftype alpha_skip_prologue;
-
-static gdbarch_get_longjmp_target_ftype alpha_get_longjmp_target;
-
-struct frame_extra_info
- {
- alpha_extra_func_info_t proc_desc;
- int localoff;
- int pc_reg;
- };
-
-/* FIXME: Some of this code should perhaps be merged with mips-tdep.c. */
-
-/* Prototypes for local functions. */
-
-static void alpha_find_saved_regs (struct frame_info *);
-
-static alpha_extra_func_info_t push_sigtramp_desc (CORE_ADDR low_addr);
-
-static CORE_ADDR read_next_frame_reg (struct frame_info *, int);
-
-static CORE_ADDR heuristic_proc_start (CORE_ADDR);
-
-static alpha_extra_func_info_t heuristic_proc_desc (CORE_ADDR,
- CORE_ADDR,
- struct frame_info *);
-
-static alpha_extra_func_info_t find_proc_desc (CORE_ADDR,
- struct frame_info *);
-
-#if 0
-static int alpha_in_lenient_prologue (CORE_ADDR, CORE_ADDR);
-#endif
-
-static void reinit_frame_cache_sfunc (char *, int, struct cmd_list_element *);
-
-static CORE_ADDR after_prologue (CORE_ADDR pc,
- alpha_extra_func_info_t proc_desc);
-
-static int alpha_in_prologue (CORE_ADDR pc,
- alpha_extra_func_info_t proc_desc);
-
-static int alpha_about_to_return (CORE_ADDR pc);
-
-void _initialize_alpha_tdep (void);
-
-/* Heuristic_proc_start may hunt through the text section for a long
- time across a 2400 baud serial line. Allows the user to limit this
- search. */
-static unsigned int heuristic_fence_post = 0;
-/* *INDENT-OFF* */
-/* Layout of a stack frame on the alpha:
-
- | |
- pdr members: | 7th ... nth arg, |
- | `pushed' by caller. |
- | |
-----------------|-------------------------------|<-- old_sp == vfp
- ^ ^ ^ ^ | |
- | | | | | |
- | |localoff | Copies of 1st .. 6th |
- | | | | | argument if necessary. |
- | | | v | |
- | | | --- |-------------------------------|<-- FRAME_LOCALS_ADDRESS
- | | | | |
- | | | | Locals and temporaries. |
- | | | | |
- | | | |-------------------------------|
- | | | | |
- |-fregoffset | Saved float registers. |
- | | | | F9 |
- | | | | . |
- | | | | . |
- | | | | F2 |
- | | v | |
- | | -------|-------------------------------|
- | | | |
- | | | Saved registers. |
- | | | S6 |
- |-regoffset | . |
- | | | . |
- | | | S0 |
- | | | pdr.pcreg |
- | v | |
- | ----------|-------------------------------|
- | | |
- frameoffset | Argument build area, gets |
- | | 7th ... nth arg for any |
- | | called procedure. |
- v | |
- -------------|-------------------------------|<-- sp
- | |
-*/
-/* *INDENT-ON* */
-
-#define PROC_LOW_ADDR(proc) ((proc)->pdr.adr) /* least address */
-/* These next two fields are kind of being hijacked. I wonder if
- iline is too small for the values it needs to hold, if GDB is
- running on a 32-bit host. */
-#define PROC_HIGH_ADDR(proc) ((proc)->pdr.iline) /* upper address bound */
-#define PROC_DUMMY_FRAME(proc) ((proc)->pdr.cbLineOffset) /*CALL_DUMMY frame */
-#define PROC_FRAME_OFFSET(proc) ((proc)->pdr.frameoffset)
-#define PROC_FRAME_REG(proc) ((proc)->pdr.framereg)
-#define PROC_REG_MASK(proc) ((proc)->pdr.regmask)
-#define PROC_FREG_MASK(proc) ((proc)->pdr.fregmask)
-#define PROC_REG_OFFSET(proc) ((proc)->pdr.regoffset)
-#define PROC_FREG_OFFSET(proc) ((proc)->pdr.fregoffset)
-#define PROC_PC_REG(proc) ((proc)->pdr.pcreg)
-#define PROC_LOCALOFF(proc) ((proc)->pdr.localoff)
-#define PROC_SYMBOL(proc) (*(struct symbol**)&(proc)->pdr.isym)
-#define _PROC_MAGIC_ 0x0F0F0F0F
-#define PROC_DESC_IS_DUMMY(proc) ((proc)->pdr.isym == _PROC_MAGIC_)
-#define SET_PROC_DESC_IS_DUMMY(proc) ((proc)->pdr.isym = _PROC_MAGIC_)
-
-struct linked_proc_info
- {
- struct alpha_extra_func_info info;
- struct linked_proc_info *next;
- }
- *linked_proc_desc_table = NULL;
-static CORE_ADDR
-alpha_frame_past_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (tdep->skip_sigtramp_frame != NULL)
- return (tdep->skip_sigtramp_frame (frame, pc));
-
- return (0);
-}
-
-static LONGEST
-alpha_dynamic_sigtramp_offset (CORE_ADDR pc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- /* Must be provided by OS/ABI variant code if supported. */
- if (tdep->dynamic_sigtramp_offset != NULL)
- return (tdep->dynamic_sigtramp_offset (pc));
-
- return (-1);
-}
-
-#define ALPHA_PROC_SIGTRAMP_MAGIC 0x0e0f0f0f
-
-/* Return TRUE if the procedure descriptor PROC is a procedure
- descriptor that refers to a dynamically generated signal
- trampoline routine. */
-static int
-alpha_proc_desc_is_dyn_sigtramp (struct alpha_extra_func_info *proc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (tdep->dynamic_sigtramp_offset != NULL)
- return (proc->pdr.isym == ALPHA_PROC_SIGTRAMP_MAGIC);
-
- return (0);
-}
-
-static void
-alpha_set_proc_desc_is_dyn_sigtramp (struct alpha_extra_func_info *proc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (tdep->dynamic_sigtramp_offset != NULL)
- proc->pdr.isym = ALPHA_PROC_SIGTRAMP_MAGIC;
-}
-
-/* Dynamically create a signal-handler caller procedure descriptor for
- the signal-handler return code starting at address LOW_ADDR. The
- descriptor is added to the linked_proc_desc_table. */
-
-static alpha_extra_func_info_t
-push_sigtramp_desc (CORE_ADDR low_addr)
-{
- struct linked_proc_info *link;
- alpha_extra_func_info_t proc_desc;
-
- link = (struct linked_proc_info *)
- xmalloc (sizeof (struct linked_proc_info));
- link->next = linked_proc_desc_table;
- linked_proc_desc_table = link;
-
- proc_desc = &link->info;
-
- proc_desc->numargs = 0;
- PROC_LOW_ADDR (proc_desc) = low_addr;
- PROC_HIGH_ADDR (proc_desc) = low_addr + 3 * 4;
- PROC_DUMMY_FRAME (proc_desc) = 0;
- PROC_FRAME_OFFSET (proc_desc) = 0x298; /* sizeof(struct sigcontext_struct) */
- PROC_FRAME_REG (proc_desc) = SP_REGNUM;
- PROC_REG_MASK (proc_desc) = 0xffff;
- PROC_FREG_MASK (proc_desc) = 0xffff;
- PROC_PC_REG (proc_desc) = 26;
- PROC_LOCALOFF (proc_desc) = 0;
- alpha_set_proc_desc_is_dyn_sigtramp (proc_desc);
- return (proc_desc);
-}
-
-
static const char *
alpha_register_name (int regno)
{
- static char *register_names[] =
+ static const char * const register_names[] =
{
"v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6",
"t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp",
@@ -278,832 +59,236 @@ alpha_register_name (int regno)
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "fpcr",
- "pc", "vfp", "unique",
+ "pc", "", "unique"
};
if (regno < 0)
- return (NULL);
+ return NULL;
if (regno >= (sizeof(register_names) / sizeof(*register_names)))
- return (NULL);
- return (register_names[regno]);
+ return NULL;
+ return register_names[regno];
}
static int
alpha_cannot_fetch_register (int regno)
{
- return (regno == DEPRECATED_FP_REGNUM || regno == ALPHA_ZERO_REGNUM);
+ return regno == ALPHA_ZERO_REGNUM;
}
static int
alpha_cannot_store_register (int regno)
{
- return (regno == DEPRECATED_FP_REGNUM || regno == ALPHA_ZERO_REGNUM);
-}
-
-static int
-alpha_register_convertible (int regno)
-{
- return (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 31);
+ return regno == ALPHA_ZERO_REGNUM;
}
static struct type *
-alpha_register_virtual_type (int regno)
+alpha_register_type (struct gdbarch *gdbarch, int regno)
{
- return ((regno >= FP0_REGNUM && regno < (FP0_REGNUM+31))
- ? builtin_type_double : builtin_type_long);
-}
+ if (regno == ALPHA_SP_REGNUM || regno == ALPHA_GP_REGNUM)
+ return builtin_type_void_data_ptr;
+ if (regno == ALPHA_PC_REGNUM)
+ return builtin_type_void_func_ptr;
-static int
-alpha_register_byte (int regno)
-{
- return (regno * 8);
-}
-
-static int
-alpha_register_raw_size (int regno)
-{
- return 8;
-}
+ /* Don't need to worry about little vs big endian until
+ some jerk tries to port to alpha-unicosmk. */
+ if (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 31)
+ return builtin_type_ieee_double_little;
-static int
-alpha_register_virtual_size (int regno)
-{
- return 8;
+ return builtin_type_int64;
}
-
-static CORE_ADDR
-alpha_sigcontext_addr (struct frame_info *fi)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+/* Is REGNUM a member of REGGROUP? */
- if (tdep->sigcontext_addr)
- return (tdep->sigcontext_addr (fi));
-
- return (0);
-}
-
-/* Guaranteed to set frame->saved_regs to some values (it never leaves it
- NULL). */
-
-static void
-alpha_find_saved_regs (struct frame_info *frame)
+static int
+alpha_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
+ struct reggroup *group)
{
- int ireg;
- CORE_ADDR reg_position;
- unsigned long mask;
- alpha_extra_func_info_t proc_desc;
- int returnreg;
-
- frame_saved_regs_zalloc (frame);
-
- /* If it is the frame for __sigtramp, the saved registers are located
- in a sigcontext structure somewhere on the stack. __sigtramp
- passes a pointer to the sigcontext structure on the stack.
- If the stack layout for __sigtramp changes, or if sigcontext offsets
- change, we might have to update this code. */
-#ifndef SIGFRAME_PC_OFF
-#define SIGFRAME_PC_OFF (2 * 8)
-#define SIGFRAME_REGSAVE_OFF (4 * 8)
-#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_REGSAVE_OFF + 32 * 8 + 8)
-#endif
- if ((get_frame_type (frame) == SIGTRAMP_FRAME))
- {
- CORE_ADDR sigcontext_addr;
-
- sigcontext_addr = alpha_sigcontext_addr (frame);
- if (sigcontext_addr == 0)
- {
- /* Don't know where the sigcontext is; just bail. */
- return;
- }
- for (ireg = 0; ireg < 32; ireg++)
- {
- reg_position = sigcontext_addr + SIGFRAME_REGSAVE_OFF + ireg * 8;
- get_frame_saved_regs (frame)[ireg] = reg_position;
- }
- for (ireg = 0; ireg < 32; ireg++)
- {
- reg_position = sigcontext_addr + SIGFRAME_FPREGSAVE_OFF + ireg * 8;
- get_frame_saved_regs (frame)[FP0_REGNUM + ireg] = reg_position;
- }
- get_frame_saved_regs (frame)[PC_REGNUM] = sigcontext_addr + SIGFRAME_PC_OFF;
- return;
- }
-
- proc_desc = get_frame_extra_info (frame)->proc_desc;
- if (proc_desc == NULL)
- /* I'm not sure how/whether this can happen. Normally when we can't
- find a proc_desc, we "synthesize" one using heuristic_proc_desc
- and set the saved_regs right away. */
- return;
-
- /* Fill in the offsets for the registers which gen_mask says
- were saved. */
-
- reg_position = get_frame_base (frame) + PROC_REG_OFFSET (proc_desc);
- mask = PROC_REG_MASK (proc_desc);
-
- returnreg = PROC_PC_REG (proc_desc);
-
- /* Note that RA is always saved first, regardless of its actual
- register number. */
- if (mask & (1 << returnreg))
- {
- get_frame_saved_regs (frame)[returnreg] = reg_position;
- reg_position += 8;
- mask &= ~(1 << returnreg); /* Clear bit for RA so we
- don't save again later. */
- }
-
- for (ireg = 0; ireg <= 31; ++ireg)
- if (mask & (1 << ireg))
- {
- get_frame_saved_regs (frame)[ireg] = reg_position;
- reg_position += 8;
- }
+ /* Filter out any registers eliminated, but whose regnum is
+ reserved for backward compatibility, e.g. the vfp. */
+ if (REGISTER_NAME (regnum) == NULL || *REGISTER_NAME (regnum) == '\0')
+ return 0;
- /* Fill in the offsets for the registers which float_mask says
- were saved. */
+ if (group == all_reggroup)
+ return 1;
- reg_position = get_frame_base (frame) + PROC_FREG_OFFSET (proc_desc);
- mask = PROC_FREG_MASK (proc_desc);
+ /* Zero should not be saved or restored. Technically it is a general
+ register (just as $f31 would be a float if we represented it), but
+ there's no point displaying it during "info regs", so leave it out
+ of all groups except for "all". */
+ if (regnum == ALPHA_ZERO_REGNUM)
+ return 0;
- for (ireg = 0; ireg <= 31; ++ireg)
- if (mask & (1 << ireg))
- {
- get_frame_saved_regs (frame)[FP0_REGNUM + ireg] = reg_position;
- reg_position += 8;
- }
+ /* All other registers are saved and restored. */
+ if (group == save_reggroup || group == restore_reggroup)
+ return 1;
- get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_saved_regs (frame)[returnreg];
-}
+ /* All other groups are non-overlapping. */
-static void
-alpha_frame_init_saved_regs (struct frame_info *fi)
-{
- if (get_frame_saved_regs (fi) == NULL)
- alpha_find_saved_regs (fi);
- get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi);
-}
+ /* Since this is really a PALcode memory slot... */
+ if (regnum == ALPHA_UNIQUE_REGNUM)
+ return group == system_reggroup;
-static CORE_ADDR
-alpha_init_frame_pc_first (int fromleaf, struct frame_info *prev)
-{
- return (fromleaf
- ? DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev))
- : get_next_frame (prev)
- ? DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev))
- : read_pc ());
-}
+ /* Force the FPCR to be considered part of the floating point state. */
+ if (regnum == ALPHA_FPCR_REGNUM)
+ return group == float_reggroup;
-static CORE_ADDR
-read_next_frame_reg (struct frame_info *fi, int regno)
-{
- for (; fi; fi = get_next_frame (fi))
- {
- /* We have to get the saved sp from the sigcontext
- if it is a signal handler frame. */
- if (regno == SP_REGNUM && !(get_frame_type (fi) == SIGTRAMP_FRAME))
- return get_frame_base (fi);
- else
- {
- if (get_frame_saved_regs (fi) == NULL)
- alpha_find_saved_regs (fi);
- if (get_frame_saved_regs (fi)[regno])
- return read_memory_integer (get_frame_saved_regs (fi)[regno], 8);
- }
- }
- return read_register (regno);
+ if (regnum >= ALPHA_FP0_REGNUM && regnum < ALPHA_FP0_REGNUM + 31)
+ return group == float_reggroup;
+ else
+ return group == general_reggroup;
}
-static CORE_ADDR
-alpha_frame_saved_pc (struct frame_info *frame)
+static int
+alpha_register_byte (int regno)
{
- alpha_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
- /* We have to get the saved pc from the sigcontext
- if it is a signal handler frame. */
- int pcreg = ((get_frame_type (frame) == SIGTRAMP_FRAME)
- ? PC_REGNUM
- : get_frame_extra_info (frame)->pc_reg);
-
- if (proc_desc && PROC_DESC_IS_DUMMY (proc_desc))
- return read_memory_integer (get_frame_base (frame) - 8, 8);
-
- return read_next_frame_reg (frame, pcreg);
+ return (regno * 8);
}
-static CORE_ADDR
-alpha_saved_pc_after_call (struct frame_info *frame)
+static int
+alpha_register_raw_size (int regno)
{
- CORE_ADDR pc = get_frame_pc (frame);
- CORE_ADDR tmp;
- alpha_extra_func_info_t proc_desc;
- int pcreg;
-
- /* Skip over shared library trampoline if necessary. */
- tmp = SKIP_TRAMPOLINE_CODE (pc);
- if (tmp != 0)
- pc = tmp;
-
- proc_desc = find_proc_desc (pc, get_next_frame (frame));
- pcreg = proc_desc ? PROC_PC_REG (proc_desc) : ALPHA_RA_REGNUM;
-
- if ((get_frame_type (frame) == SIGTRAMP_FRAME))
- return alpha_frame_saved_pc (frame);
- else
- return read_register (pcreg);
+ return 8;
}
-
-static struct alpha_extra_func_info temp_proc_desc;
-static CORE_ADDR temp_saved_regs[ALPHA_NUM_REGS];
-
-/* Nonzero if instruction at PC is a return instruction. "ret
- $zero,($ra),1" on alpha. */
-
static int
-alpha_about_to_return (CORE_ADDR pc)
+alpha_register_virtual_size (int regno)
{
- return read_memory_integer (pc, 4) == 0x6bfa8001;
+ return 8;
}
+/* The following represents exactly the conversion performed by
+ the LDS instruction. This applies to both single-precision
+ floating point and 32-bit integers. */
-
-/* This fencepost looks highly suspicious to me. Removing it also
- seems suspicious as it could affect remote debugging across serial
- lines. */
-
-static CORE_ADDR
-heuristic_proc_start (CORE_ADDR pc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- CORE_ADDR start_pc = pc;
- CORE_ADDR fence = start_pc - heuristic_fence_post;
-
- if (start_pc == 0)
- return 0;
-
- if (heuristic_fence_post == UINT_MAX
- || fence < tdep->vm_min_address)
- fence = tdep->vm_min_address;
-
- /* search back for previous return */
- for (start_pc -= 4;; start_pc -= 4)
- if (start_pc < fence)
- {
- /* It's not clear to me why we reach this point when
- stop_soon, but with this test, at least we
- don't print out warnings for every child forked (eg, on
- decstation). 22apr93 rich@cygnus.com. */
- if (stop_soon == NO_STOP_QUIETLY)
- {
- static int blurb_printed = 0;
-
- if (fence == tdep->vm_min_address)
- warning ("Hit beginning of text section without finding");
- else
- warning ("Hit heuristic-fence-post without finding");
-
- warning ("enclosing function for address 0x%s", paddr_nz (pc));
- if (!blurb_printed)
- {
- printf_filtered ("\
-This warning occurs if you are debugging a function without any symbols\n\
-(for example, in a stripped executable). In that case, you may wish to\n\
-increase the size of the search with the `set heuristic-fence-post' command.\n\
-\n\
-Otherwise, you told GDB there was a function where there isn't one, or\n\
-(more likely) you have encountered a bug in GDB.\n");
- blurb_printed = 1;
- }
- }
-
- return 0;
- }
- else if (alpha_about_to_return (start_pc))
- break;
-
- start_pc += 4; /* skip return */
- return start_pc;
-}
-
-static alpha_extra_func_info_t
-heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
- struct frame_info *next_frame)
+static void
+alpha_lds (void *out, const void *in)
{
- CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
- CORE_ADDR vfp = sp;
- CORE_ADDR cur_pc;
- int frame_size;
- int has_frame_reg = 0;
- unsigned long reg_mask = 0;
- int pcreg = -1;
- int regno;
-
- if (start_pc == 0)
- return NULL;
- memset (&temp_proc_desc, '\0', sizeof (temp_proc_desc));
- memset (&temp_saved_regs, '\0', SIZEOF_FRAME_SAVED_REGS);
- PROC_LOW_ADDR (&temp_proc_desc) = start_pc;
-
- if (start_pc + 200 < limit_pc)
- limit_pc = start_pc + 200;
- frame_size = 0;
- for (cur_pc = start_pc; cur_pc < limit_pc; cur_pc += 4)
+ ULONGEST mem = extract_unsigned_integer (in, 4);
+ ULONGEST frac = (mem >> 0) & 0x7fffff;
+ ULONGEST sign = (mem >> 31) & 1;
+ ULONGEST exp_msb = (mem >> 30) & 1;
+ ULONGEST exp_low = (mem >> 23) & 0x7f;
+ ULONGEST exp, reg;
+
+ exp = (exp_msb << 10) | exp_low;
+ if (exp_msb)
{
- char buf[4];
- unsigned long word;
- int status;
-
- status = read_memory_nobpt (cur_pc, buf, 4);
- if (status)
- memory_error (status, cur_pc);
- word = extract_unsigned_integer (buf, 4);
-
- if ((word & 0xffff0000) == 0x23de0000) /* lda $sp,n($sp) */
- {
- if (word & 0x8000)
- {
- /* Consider only the first stack allocation instruction
- to contain the static size of the frame. */
- if (frame_size == 0)
- frame_size += (-word) & 0xffff;
- }
- else
- /* Exit loop if a positive stack adjustment is found, which
- usually means that the stack cleanup code in the function
- epilogue is reached. */
- break;
- }
- else if ((word & 0xfc1f0000) == 0xb41e0000 /* stq reg,n($sp) */
- && (word & 0xffff0000) != 0xb7fe0000) /* reg != $zero */
- {
- int reg = (word & 0x03e00000) >> 21;
- reg_mask |= 1 << reg;
-
- /* Do not compute the address where the register was saved yet,
- because we don't know yet if the offset will need to be
- relative to $sp or $fp (we can not compute the address relative
- to $sp if $sp is updated during the execution of the current
- subroutine, for instance when doing some alloca). So just store
- the offset for the moment, and compute the address later
- when we know whether this frame has a frame pointer or not.
- */
- temp_saved_regs[reg] = (short) word;
-
- /* Starting with OSF/1-3.2C, the system libraries are shipped
- without local symbols, but they still contain procedure
- descriptors without a symbol reference. GDB is currently
- unable to find these procedure descriptors and uses
- heuristic_proc_desc instead.
- As some low level compiler support routines (__div*, __add*)
- use a non-standard return address register, we have to
- add some heuristics to determine the return address register,
- or stepping over these routines will fail.
- Usually the return address register is the first register
- saved on the stack, but assembler optimization might
- rearrange the register saves.
- So we recognize only a few registers (t7, t9, ra) within
- the procedure prologue as valid return address registers.
- If we encounter a return instruction, we extract the
- the return address register from it.
-
- FIXME: Rewriting GDB to access the procedure descriptors,
- e.g. via the minimal symbol table, might obviate this hack. */
- if (pcreg == -1
- && cur_pc < (start_pc + 80)
- && (reg == ALPHA_T7_REGNUM || reg == ALPHA_T9_REGNUM
- || reg == ALPHA_RA_REGNUM))
- pcreg = reg;
- }
- else if ((word & 0xffe0ffff) == 0x6be08001) /* ret zero,reg,1 */
- pcreg = (word >> 16) & 0x1f;
- else if (word == 0x47de040f || word == 0x47fe040f) /* bis sp,sp fp */
- {
- /* ??? I am not sure what instruction is 0x47fe040f, and I
- am suspecting that there was a typo and should have been
- 0x47fe040f. I'm keeping it in the test above until further
- investigation */
- has_frame_reg = 1;
- vfp = read_next_frame_reg (next_frame, ALPHA_GCC_FP_REGNUM);
- }
+ if (exp_low == 0x7f)
+ exp = 0x7ff;
}
- if (pcreg == -1)
- {
- /* If we haven't found a valid return address register yet,
- keep searching in the procedure prologue. */
- while (cur_pc < (limit_pc + 80) && cur_pc < (start_pc + 80))
- {
- char buf[4];
- unsigned long word;
-
- if (read_memory_nobpt (cur_pc, buf, 4))
- break;
- cur_pc += 4;
- word = extract_unsigned_integer (buf, 4);
-
- if ((word & 0xfc1f0000) == 0xb41e0000 /* stq reg,n($sp) */
- && (word & 0xffff0000) != 0xb7fe0000) /* reg != $zero */
- {
- int reg = (word & 0x03e00000) >> 21;
- if (reg == ALPHA_T7_REGNUM || reg == ALPHA_T9_REGNUM
- || reg == ALPHA_RA_REGNUM)
- {
- pcreg = reg;
- break;
- }
- }
- else if ((word & 0xffe0ffff) == 0x6be08001) /* ret zero,reg,1 */
- {
- pcreg = (word >> 16) & 0x1f;
- break;
- }
- }
- }
-
- if (has_frame_reg)
- PROC_FRAME_REG (&temp_proc_desc) = ALPHA_GCC_FP_REGNUM;
else
- PROC_FRAME_REG (&temp_proc_desc) = SP_REGNUM;
-
- /* At this point, we know which of the Stack Pointer or the Frame Pointer
- to use as the reference address to compute the saved registers address.
- But in both cases, the processing above has set vfp to this reference
- address, so just need to increment the offset of each saved register
- by this address. */
- for (regno = 0; regno < NUM_REGS; regno++)
{
- if (reg_mask & 1 << regno)
- temp_saved_regs[regno] += vfp;
+ if (exp_low != 0x00)
+ exp |= 0x380;
}
- PROC_FRAME_OFFSET (&temp_proc_desc) = frame_size;
- PROC_REG_MASK (&temp_proc_desc) = reg_mask;
- PROC_PC_REG (&temp_proc_desc) = (pcreg == -1) ? ALPHA_RA_REGNUM : pcreg;
- PROC_LOCALOFF (&temp_proc_desc) = 0; /* XXX - bogus */
- return &temp_proc_desc;
+ reg = (sign << 63) | (exp << 52) | (frac << 29);
+ store_unsigned_integer (out, 8, reg);
}
-/* This returns the PC of the first inst after the prologue. If we can't
- find the prologue, then return 0. */
+/* Similarly, this represents exactly the conversion performed by
+ the STS instruction. */
-static CORE_ADDR
-after_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
+static inline void
+alpha_sts (void *out, const void *in)
{
- struct symtab_and_line sal;
- CORE_ADDR func_addr, func_end;
-
- if (!proc_desc)
- proc_desc = find_proc_desc (pc, NULL);
-
- if (proc_desc)
- {
- if (alpha_proc_desc_is_dyn_sigtramp (proc_desc))
- return PROC_LOW_ADDR (proc_desc); /* "prologue" is in kernel */
-
- /* If function is frameless, then we need to do it the hard way. I
- strongly suspect that frameless always means prologueless... */
- if (PROC_FRAME_REG (proc_desc) == SP_REGNUM
- && PROC_FRAME_OFFSET (proc_desc) == 0)
- return 0;
- }
-
- if (!find_pc_partial_function (pc, NULL, &func_addr, &func_end))
- return 0; /* Unknown */
-
- sal = find_pc_line (func_addr, 0);
-
- if (sal.end < func_end)
- return sal.end;
-
- /* The line after the prologue is after the end of the function. In this
- case, tell the caller to find the prologue the hard way. */
+ ULONGEST reg, mem;
- return 0;
+ reg = extract_unsigned_integer (in, 8);
+ mem = ((reg >> 32) & 0xc0000000) | ((reg >> 29) & 0x3fffffff);
+ store_unsigned_integer (out, 4, mem);
}
-/* Return non-zero if we *might* be in a function prologue. Return zero if we
- are definitively *not* in a function prologue. */
+/* The alpha needs a conversion between register and memory format if the
+ register is a floating point register and memory format is float, as the
+ register format must be double or memory format is an integer with 4
+ bytes or less, as the representation of integers in floating point
+ registers is different. */
static int
-alpha_in_prologue (CORE_ADDR pc, alpha_extra_func_info_t proc_desc)
+alpha_convert_register_p (int regno)
{
- CORE_ADDR after_prologue_pc;
-
- after_prologue_pc = after_prologue (pc, proc_desc);
-
- if (after_prologue_pc == 0
- || pc < after_prologue_pc)
- return 1;
- else
- return 0;
+ return (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 31);
}
-static alpha_extra_func_info_t
-find_proc_desc (CORE_ADDR pc, struct frame_info *next_frame)
+static void
+alpha_register_to_value (int regnum, struct type *valtype, char *in, char *out)
{
- alpha_extra_func_info_t proc_desc;
- struct block *b;
- struct symbol *sym;
- CORE_ADDR startaddr;
-
- /* Try to get the proc_desc from the linked call dummy proc_descs
- if the pc is in the call dummy.
- This is hairy. In the case of nested dummy calls we have to find the
- right proc_desc, but we might not yet know the frame for the dummy
- as it will be contained in the proc_desc we are searching for.
- So we have to find the proc_desc whose frame is closest to the current
- stack pointer. */
-
- if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
- {
- struct linked_proc_info *link;
- CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
- alpha_extra_func_info_t found_proc_desc = NULL;
- long min_distance = LONG_MAX;
-
- for (link = linked_proc_desc_table; link; link = link->next)
- {
- long distance = (CORE_ADDR) PROC_DUMMY_FRAME (&link->info) - sp;
- if (distance > 0 && distance < min_distance)
- {
- min_distance = distance;
- found_proc_desc = &link->info;
- }
- }
- if (found_proc_desc != NULL)
- return found_proc_desc;
- }
-
- b = block_for_pc (pc);
-
- find_pc_partial_function (pc, NULL, &startaddr, NULL);
- if (b == NULL)
- sym = NULL;
- else
- {
- if (startaddr > BLOCK_START (b))
- /* This is the "pathological" case referred to in a comment in
- print_frame_info. It might be better to move this check into
- symbol reading. */
- sym = NULL;
- else
- sym = lookup_symbol (MIPS_EFI_SYMBOL_NAME, b, LABEL_DOMAIN,
- 0, NULL);
- }
-
- /* If we never found a PDR for this function in symbol reading, then
- examine prologues to find the information. */
- if (sym && ((mips_extra_func_info_t) SYMBOL_VALUE (sym))->pdr.framereg == -1)
- sym = NULL;
-
- if (sym)
+ switch (TYPE_LENGTH (valtype))
{
- /* IF this is the topmost frame AND
- * (this proc does not have debugging information OR
- * the PC is in the procedure prologue)
- * THEN create a "heuristic" proc_desc (by analyzing
- * the actual code) to replace the "official" proc_desc.
- */
- proc_desc = (alpha_extra_func_info_t) SYMBOL_VALUE (sym);
- if (next_frame == NULL)
- {
- if (PROC_DESC_IS_DUMMY (proc_desc) || alpha_in_prologue (pc, proc_desc))
- {
- alpha_extra_func_info_t found_heuristic =
- heuristic_proc_desc (PROC_LOW_ADDR (proc_desc),
- pc, next_frame);
- if (found_heuristic)
- {
- PROC_LOCALOFF (found_heuristic) =
- PROC_LOCALOFF (proc_desc);
- PROC_PC_REG (found_heuristic) = PROC_PC_REG (proc_desc);
- proc_desc = found_heuristic;
- }
- }
- }
- }
- else
- {
- long offset;
-
- /* Is linked_proc_desc_table really necessary? It only seems to be used
- by procedure call dummys. However, the procedures being called ought
- to have their own proc_descs, and even if they don't,
- heuristic_proc_desc knows how to create them! */
-
- register struct linked_proc_info *link;
- for (link = linked_proc_desc_table; link; link = link->next)
- if (PROC_LOW_ADDR (&link->info) <= pc
- && PROC_HIGH_ADDR (&link->info) > pc)
- return &link->info;
-
- /* If PC is inside a dynamically generated sigtramp handler,
- create and push a procedure descriptor for that code: */
- offset = alpha_dynamic_sigtramp_offset (pc);
- if (offset >= 0)
- return push_sigtramp_desc (pc - offset);
-
- /* If heuristic_fence_post is non-zero, determine the procedure
- start address by examining the instructions.
- This allows us to find the start address of static functions which
- have no symbolic information, as startaddr would have been set to
- the preceding global function start address by the
- find_pc_partial_function call above. */
- if (startaddr == 0 || heuristic_fence_post != 0)
- startaddr = heuristic_proc_start (pc);
-
- proc_desc =
- heuristic_proc_desc (startaddr, pc, next_frame);
+ case 4:
+ alpha_sts (out, in);
+ break;
+ case 8:
+ memcpy (out, in, 8);
+ break;
+ default:
+ error ("Cannot retrieve value from floating point register");
}
- return proc_desc;
-}
-
-alpha_extra_func_info_t cached_proc_desc;
-
-static CORE_ADDR
-alpha_frame_chain (struct frame_info *frame)
-{
- alpha_extra_func_info_t proc_desc;
- CORE_ADDR saved_pc = DEPRECATED_FRAME_SAVED_PC (frame);
-
- if (saved_pc == 0 || inside_entry_file (saved_pc))
- return 0;
-
- proc_desc = find_proc_desc (saved_pc, frame);
- if (!proc_desc)
- return 0;
-
- cached_proc_desc = proc_desc;
-
- /* Fetch the frame pointer for a dummy frame from the procedure
- descriptor. */
- if (PROC_DESC_IS_DUMMY (proc_desc))
- return (CORE_ADDR) PROC_DUMMY_FRAME (proc_desc);
-
- /* If no frame pointer and frame size is zero, we must be at end
- of stack (or otherwise hosed). If we don't check frame size,
- we loop forever if we see a zero size frame. */
- if (PROC_FRAME_REG (proc_desc) == SP_REGNUM
- && PROC_FRAME_OFFSET (proc_desc) == 0
- /* The previous frame from a sigtramp frame might be frameless
- and have frame size zero. */
- && !(get_frame_type (frame) == SIGTRAMP_FRAME))
- return alpha_frame_past_sigtramp_frame (frame, saved_pc);
- else
- return read_next_frame_reg (frame, PROC_FRAME_REG (proc_desc))
- + PROC_FRAME_OFFSET (proc_desc);
-}
-
-void
-alpha_print_extra_frame_info (struct frame_info *fi)
-{
- if (fi
- && get_frame_extra_info (fi)
- && get_frame_extra_info (fi)->proc_desc
- && get_frame_extra_info (fi)->proc_desc->pdr.framereg < NUM_REGS)
- printf_filtered (" frame pointer is at %s+%s\n",
- REGISTER_NAME (get_frame_extra_info (fi)->proc_desc->pdr.framereg),
- paddr_d (get_frame_extra_info (fi)->proc_desc->pdr.frameoffset));
}
static void
-alpha_init_extra_frame_info (int fromleaf, struct frame_info *frame)
+alpha_value_to_register (struct type *valtype, int regnum, char *in, char *out)
{
- /* Use proc_desc calculated in frame_chain */
- alpha_extra_func_info_t proc_desc =
- get_next_frame (frame)
- ? cached_proc_desc
- : find_proc_desc (get_frame_pc (frame), get_next_frame (frame));
-
- frame_extra_info_zalloc (frame, sizeof (struct frame_extra_info));
-
- /* NOTE: cagney/2003-01-03: No need to set saved_regs to NULL,
- always NULL by default. */
- /* frame->saved_regs = NULL; */
- get_frame_extra_info (frame)->localoff = 0;
- get_frame_extra_info (frame)->pc_reg = ALPHA_RA_REGNUM;
- get_frame_extra_info (frame)->proc_desc = proc_desc == &temp_proc_desc ? 0 : proc_desc;
- if (proc_desc)
+ switch (TYPE_LENGTH (valtype))
{
- /* Get the locals offset and the saved pc register from the
- procedure descriptor, they are valid even if we are in the
- middle of the prologue. */
- get_frame_extra_info (frame)->localoff = PROC_LOCALOFF (proc_desc);
- get_frame_extra_info (frame)->pc_reg = PROC_PC_REG (proc_desc);
-
- /* Fixup frame-pointer - only needed for top frame */
-
- /* Fetch the frame pointer for a dummy frame from the procedure
- descriptor. */
- if (PROC_DESC_IS_DUMMY (proc_desc))
- deprecated_update_frame_base_hack (frame, (CORE_ADDR) PROC_DUMMY_FRAME (proc_desc));
-
- /* This may not be quite right, if proc has a real frame register.
- Get the value of the frame relative sp, procedure might have been
- interrupted by a signal at it's very start. */
- else if (get_frame_pc (frame) == PROC_LOW_ADDR (proc_desc)
- && !alpha_proc_desc_is_dyn_sigtramp (proc_desc))
- deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), SP_REGNUM));
- else
- deprecated_update_frame_base_hack (frame, read_next_frame_reg (get_next_frame (frame), PROC_FRAME_REG (proc_desc))
- + PROC_FRAME_OFFSET (proc_desc));
-
- if (proc_desc == &temp_proc_desc)
- {
- char *name;
-
- /* Do not set the saved registers for a sigtramp frame,
- alpha_find_saved_registers will do that for us. We can't
- use (get_frame_type (frame) == SIGTRAMP_FRAME), it is not
- yet set. */
- /* FIXME: cagney/2002-11-18: This problem will go away once
- frame.c:get_prev_frame() is modified to set the frame's
- type before calling functions like this. */
- find_pc_partial_function (get_frame_pc (frame), &name,
- (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (!PC_IN_SIGTRAMP (get_frame_pc (frame), name))
- {
- frame_saved_regs_zalloc (frame);
- memcpy (get_frame_saved_regs (frame), temp_saved_regs,
- SIZEOF_FRAME_SAVED_REGS);
- get_frame_saved_regs (frame)[PC_REGNUM]
- = get_frame_saved_regs (frame)[ALPHA_RA_REGNUM];
- }
- }
+ case 4:
+ alpha_lds (out, in);
+ break;
+ case 8:
+ memcpy (out, in, 8);
+ break;
+ default:
+ error ("Cannot store value in floating point register");
}
}
-static CORE_ADDR
-alpha_frame_locals_address (struct frame_info *fi)
-{
- return (get_frame_base (fi) - get_frame_extra_info (fi)->localoff);
-}
-
-static CORE_ADDR
-alpha_frame_args_address (struct frame_info *fi)
-{
- return (get_frame_base (fi) - (ALPHA_NUM_ARG_REGS * 8));
-}
-
-/* ALPHA stack frames are almost impenetrable. When execution stops,
- we basically have to look at symbol information for the function
- that we stopped in, which tells us *which* register (if any) is
- the base of the frame pointer, and what offset from that register
- the frame itself is at.
-
- This presents a problem when trying to examine a stack in memory
- (that isn't executing at the moment), using the "frame" command. We
- don't have a PC, nor do we have any registers except SP.
-
- This routine takes two arguments, SP and PC, and tries to make the
- cached frames look as if these two arguments defined a frame on the
- cache. This allows the rest of info frame to extract the important
- arguments without difficulty. */
-
-struct frame_info *
-alpha_setup_arbitrary_frame (int argc, CORE_ADDR *argv)
-{
- if (argc != 2)
- error ("ALPHA frame specifications require two arguments: sp and pc");
+
+/* The alpha passes the first six arguments in the registers, the rest on
+ the stack. The register arguments are stored in ARG_REG_BUFFER, and
+ then moved into the register file; this simplifies the passing of a
+ large struct which extends from the registers to the stack, plus avoids
+ three ptrace invocations per word.
- return create_new_frame (argv[0], argv[1]);
-}
+ We don't bother tracking which register values should go in integer
+ regs or fp regs; we load the same values into both.
-/* The alpha passes the first six arguments in the registers, the rest on
- the stack. The register arguments are eventually transferred to the
- argument transfer area immediately below the stack by the called function
- anyway. So we `push' at least six arguments on the stack, `reload' the
- argument registers and then adjust the stack pointer to point past the
- sixth argument. This algorithm simplifies the passing of a large struct
- which extends from the registers to the stack.
If the called function is returning a structure, the address of the
structure to be returned is passed as a hidden first argument. */
static CORE_ADDR
-alpha_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+alpha_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr,
+ int nargs, struct value **args, CORE_ADDR sp,
+ int struct_return, CORE_ADDR struct_addr)
{
int i;
int accumulate_size = struct_return ? 8 : 0;
- int arg_regs_size = ALPHA_NUM_ARG_REGS * 8;
struct alpha_arg
{
char *contents;
int len;
int offset;
};
- struct alpha_arg *alpha_args =
- (struct alpha_arg *) alloca (nargs * sizeof (struct alpha_arg));
+ struct alpha_arg *alpha_args
+ = (struct alpha_arg *) alloca (nargs * sizeof (struct alpha_arg));
register struct alpha_arg *m_arg;
- char raw_buffer[sizeof (CORE_ADDR)];
+ char arg_reg_buffer[ALPHA_REGISTER_SIZE * ALPHA_NUM_ARG_REGS];
int required_arg_regs;
+ /* The ABI places the address of the called function in T12. */
+ regcache_cooked_write_signed (regcache, ALPHA_T12_REGNUM, func_addr);
+
+ /* Set the return address register to point to the entry point
+ of the program, where a breakpoint lies in wait. */
+ regcache_cooked_write_signed (regcache, ALPHA_RA_REGNUM, bp_addr);
+
+ /* Lay out the arguments in memory. */
for (i = 0, m_arg = alpha_args; i < nargs; i++, m_arg++)
{
struct value *arg = args[i];
struct type *arg_type = check_typedef (VALUE_TYPE (arg));
+
/* Cast argument to long if necessary as the compiler does it too. */
switch (TYPE_CODE (arg_type))
{
@@ -1112,12 +297,66 @@ alpha_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
case TYPE_CODE_CHAR:
case TYPE_CODE_RANGE:
case TYPE_CODE_ENUM:
- if (TYPE_LENGTH (arg_type) < TYPE_LENGTH (builtin_type_long))
+ if (TYPE_LENGTH (arg_type) == 4)
+ {
+ /* 32-bit values must be sign-extended to 64 bits
+ even if the base data type is unsigned. */
+ arg_type = builtin_type_int32;
+ arg = value_cast (arg_type, arg);
+ }
+ if (TYPE_LENGTH (arg_type) < ALPHA_REGISTER_SIZE)
+ {
+ arg_type = builtin_type_int64;
+ arg = value_cast (arg_type, arg);
+ }
+ break;
+
+ case TYPE_CODE_FLT:
+ /* "float" arguments loaded in registers must be passed in
+ register format, aka "double". */
+ if (accumulate_size < sizeof (arg_reg_buffer)
+ && TYPE_LENGTH (arg_type) == 4)
{
- arg_type = builtin_type_long;
+ arg_type = builtin_type_ieee_double_little;
arg = value_cast (arg_type, arg);
}
+ /* Tru64 5.1 has a 128-bit long double, and passes this by
+ invisible reference. No one else uses this data type. */
+ else if (TYPE_LENGTH (arg_type) == 16)
+ {
+ /* Allocate aligned storage. */
+ sp = (sp & -16) - 16;
+
+ /* Write the real data into the stack. */
+ write_memory (sp, VALUE_CONTENTS (arg), 16);
+
+ /* Construct the indirection. */
+ arg_type = lookup_pointer_type (arg_type);
+ arg = value_from_pointer (arg_type, sp);
+ }
+ break;
+
+ case TYPE_CODE_COMPLEX:
+ /* ??? The ABI says that complex values are passed as two
+ separate scalar values. This distinction only matters
+ for complex float. However, GCC does not implement this. */
+
+ /* Tru64 5.1 has a 128-bit long double, and passes this by
+ invisible reference. */
+ if (TYPE_LENGTH (arg_type) == 32)
+ {
+ /* Allocate aligned storage. */
+ sp = (sp & -16) - 16;
+
+ /* Write the real data into the stack. */
+ write_memory (sp, VALUE_CONTENTS (arg), 32);
+
+ /* Construct the indirection. */
+ arg_type = lookup_pointer_type (arg_type);
+ arg = value_from_pointer (arg_type, sp);
+ }
break;
+
default:
break;
}
@@ -1134,225 +373,275 @@ alpha_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
required_arg_regs = ALPHA_NUM_ARG_REGS;
/* Make room for the arguments on the stack. */
- if (accumulate_size < arg_regs_size)
- accumulate_size = arg_regs_size;
+ if (accumulate_size < sizeof(arg_reg_buffer))
+ accumulate_size = 0;
+ else
+ accumulate_size -= sizeof(arg_reg_buffer);
sp -= accumulate_size;
- /* Keep sp aligned to a multiple of 16 as the compiler does it too. */
+ /* Keep sp aligned to a multiple of 16 as the ABI requires. */
sp &= ~15;
/* `Push' arguments on the stack. */
for (i = nargs; m_arg--, --i >= 0;)
- write_memory (sp + m_arg->offset, m_arg->contents, m_arg->len);
- if (struct_return)
{
- /* NOTE: cagney/2003-05-09: Using sizeof CORE_ADDR here is just
- wrong. */
- store_unsigned_integer (raw_buffer, sizeof (CORE_ADDR), struct_addr);
- write_memory (sp, raw_buffer, sizeof (CORE_ADDR));
+ char *contents = m_arg->contents;
+ int offset = m_arg->offset;
+ int len = m_arg->len;
+
+ /* Copy the bytes destined for registers into arg_reg_buffer. */
+ if (offset < sizeof(arg_reg_buffer))
+ {
+ if (offset + len <= sizeof(arg_reg_buffer))
+ {
+ memcpy (arg_reg_buffer + offset, contents, len);
+ continue;
+ }
+ else
+ {
+ int tlen = sizeof(arg_reg_buffer) - offset;
+ memcpy (arg_reg_buffer + offset, contents, tlen);
+ offset += tlen;
+ contents += tlen;
+ len -= tlen;
+ }
+ }
+
+ /* Everything else goes to the stack. */
+ write_memory (sp + offset - sizeof(arg_reg_buffer), contents, len);
}
+ if (struct_return)
+ store_unsigned_integer (arg_reg_buffer, ALPHA_REGISTER_SIZE, struct_addr);
/* Load the argument registers. */
for (i = 0; i < required_arg_regs; i++)
{
- LONGEST val;
-
- val = read_memory_integer (sp + i * 8, 8);
- write_register (ALPHA_A0_REGNUM + i, val);
- write_register (ALPHA_FPA0_REGNUM + i, val);
+ regcache_cooked_write (regcache, ALPHA_A0_REGNUM + i,
+ arg_reg_buffer + i*ALPHA_REGISTER_SIZE);
+ regcache_cooked_write (regcache, ALPHA_FPA0_REGNUM + i,
+ arg_reg_buffer + i*ALPHA_REGISTER_SIZE);
}
- return sp + arg_regs_size;
-}
+ /* Finally, update the stack pointer. */
+ regcache_cooked_write_signed (regcache, ALPHA_SP_REGNUM, sp);
-static void
-alpha_push_dummy_frame (void)
-{
- int ireg;
- struct linked_proc_info *link;
- alpha_extra_func_info_t proc_desc;
- CORE_ADDR sp = read_register (SP_REGNUM);
- CORE_ADDR save_address;
- char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
- unsigned long mask;
-
- link = (struct linked_proc_info *) xmalloc (sizeof (struct linked_proc_info));
- link->next = linked_proc_desc_table;
- linked_proc_desc_table = link;
-
- proc_desc = &link->info;
-
- /*
- * The registers we must save are all those not preserved across
- * procedure calls.
- * In addition, we must save the PC and RA.
- *
- * Dummy frame layout:
- * (high memory)
- * Saved PC
- * Saved F30
- * ...
- * Saved F0
- * Saved R29
- * ...
- * Saved R0
- * Saved R26 (RA)
- * Parameter build area
- * (low memory)
- */
-
-/* MASK(i,j) == (1<<i) + (1<<(i+1)) + ... + (1<<j)). Assume i<=j<31. */
-#define MASK(i,j) ((((LONGEST)1 << ((j)+1)) - 1) ^ (((LONGEST)1 << (i)) - 1))
-#define GEN_REG_SAVE_MASK (MASK(0,8) | MASK(16,29))
-#define GEN_REG_SAVE_COUNT 24
-#define FLOAT_REG_SAVE_MASK (MASK(0,1) | MASK(10,30))
-#define FLOAT_REG_SAVE_COUNT 23
- /* The special register is the PC as we have no bit for it in the save masks.
- alpha_frame_saved_pc knows where the pc is saved in a dummy frame. */
-#define SPECIAL_REG_SAVE_COUNT 1
-
- PROC_REG_MASK (proc_desc) = GEN_REG_SAVE_MASK;
- PROC_FREG_MASK (proc_desc) = FLOAT_REG_SAVE_MASK;
- /* PROC_REG_OFFSET is the offset from the dummy frame to the saved RA,
- but keep SP aligned to a multiple of 16. */
- PROC_REG_OFFSET (proc_desc) =
- -((8 * (SPECIAL_REG_SAVE_COUNT
- + GEN_REG_SAVE_COUNT
- + FLOAT_REG_SAVE_COUNT)
- + 15) & ~15);
- PROC_FREG_OFFSET (proc_desc) =
- PROC_REG_OFFSET (proc_desc) + 8 * GEN_REG_SAVE_COUNT;
-
- /* Save general registers.
- The return address register is the first saved register, all other
- registers follow in ascending order.
- The PC is saved immediately below the SP. */
- save_address = sp + PROC_REG_OFFSET (proc_desc);
- store_unsigned_integer (raw_buffer, 8, read_register (ALPHA_RA_REGNUM));
- write_memory (save_address, raw_buffer, 8);
- save_address += 8;
- mask = PROC_REG_MASK (proc_desc) & 0xffffffffL;
- for (ireg = 0; mask; ireg++, mask >>= 1)
- if (mask & 1)
- {
- if (ireg == ALPHA_RA_REGNUM)
- continue;
- store_unsigned_integer (raw_buffer, 8, read_register (ireg));
- write_memory (save_address, raw_buffer, 8);
- save_address += 8;
- }
-
- store_unsigned_integer (raw_buffer, 8, read_register (PC_REGNUM));
- write_memory (sp - 8, raw_buffer, 8);
-
- /* Save floating point registers. */
- save_address = sp + PROC_FREG_OFFSET (proc_desc);
- mask = PROC_FREG_MASK (proc_desc) & 0xffffffffL;
- for (ireg = 0; mask; ireg++, mask >>= 1)
- if (mask & 1)
- {
- store_unsigned_integer (raw_buffer, 8, read_register (ireg + FP0_REGNUM));
- write_memory (save_address, raw_buffer, 8);
- save_address += 8;
- }
-
- /* Set and save the frame address for the dummy.
- This is tricky. The only registers that are suitable for a frame save
- are those that are preserved across procedure calls (s0-s6). But if
- a read system call is interrupted and then a dummy call is made
- (see testsuite/gdb.t17/interrupt.exp) the dummy call hangs till the read
- is satisfied. Then it returns with the s0-s6 registers set to the values
- on entry to the read system call and our dummy frame pointer would be
- destroyed. So we save the dummy frame in the proc_desc and handle the
- retrieval of the frame pointer of a dummy specifically. The frame register
- is set to the virtual frame (pseudo) register, it's value will always
- be read as zero and will help us to catch any errors in the dummy frame
- retrieval code. */
- PROC_DUMMY_FRAME (proc_desc) = sp;
- PROC_FRAME_REG (proc_desc) = DEPRECATED_FP_REGNUM;
- PROC_FRAME_OFFSET (proc_desc) = 0;
- sp += PROC_REG_OFFSET (proc_desc);
- write_register (SP_REGNUM, sp);
-
- PROC_LOW_ADDR (proc_desc) = CALL_DUMMY_ADDRESS ();
- PROC_HIGH_ADDR (proc_desc) = PROC_LOW_ADDR (proc_desc) + 4;
-
- SET_PROC_DESC_IS_DUMMY (proc_desc);
- PROC_PC_REG (proc_desc) = ALPHA_RA_REGNUM;
+ return sp;
}
+/* Extract from REGCACHE the value about to be returned from a function
+ and copy it into VALBUF. */
+
static void
-alpha_pop_frame (void)
+alpha_extract_return_value (struct type *valtype, struct regcache *regcache,
+ void *valbuf)
{
- register int regnum;
- struct frame_info *frame = get_current_frame ();
- CORE_ADDR new_sp = get_frame_base (frame);
+ int length = TYPE_LENGTH (valtype);
+ char raw_buffer[ALPHA_REGISTER_SIZE];
+ ULONGEST l;
+
+ switch (TYPE_CODE (valtype))
+ {
+ case TYPE_CODE_FLT:
+ switch (length)
+ {
+ case 4:
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, raw_buffer);
+ alpha_sts (valbuf, raw_buffer);
+ break;
+
+ case 8:
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
+ break;
- alpha_extra_func_info_t proc_desc = get_frame_extra_info (frame)->proc_desc;
+ case 16:
+ regcache_cooked_read_unsigned (regcache, ALPHA_V0_REGNUM, &l);
+ read_memory (l, valbuf, 16);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "unknown floating point width");
+ }
+ break;
- /* we need proc_desc to know how to restore the registers;
- if it is NULL, construct (a temporary) one */
- if (proc_desc == NULL)
- proc_desc = find_proc_desc (get_frame_pc (frame), get_next_frame (frame));
+ case TYPE_CODE_COMPLEX:
+ switch (length)
+ {
+ case 8:
+ /* ??? This isn't correct wrt the ABI, but it's what GCC does. */
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
+ break;
- /* Question: should we copy this proc_desc and save it in
- frame->proc_desc? If we do, who will free it?
- For now, we don't save a copy... */
+ case 16:
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM, valbuf);
+ regcache_cooked_read (regcache, ALPHA_FP0_REGNUM+1,
+ (char *)valbuf + 8);
+ break;
- write_register (PC_REGNUM, DEPRECATED_FRAME_SAVED_PC (frame));
- if (get_frame_saved_regs (frame) == NULL)
- alpha_find_saved_regs (frame);
- if (proc_desc)
- {
- for (regnum = 32; --regnum >= 0;)
- if (PROC_REG_MASK (proc_desc) & (1 << regnum))
- write_register (regnum,
- read_memory_integer (get_frame_saved_regs (frame)[regnum],
- 8));
- for (regnum = 32; --regnum >= 0;)
- if (PROC_FREG_MASK (proc_desc) & (1 << regnum))
- write_register (regnum + FP0_REGNUM,
- read_memory_integer (get_frame_saved_regs (frame)[regnum + FP0_REGNUM], 8));
+ case 32:
+ regcache_cooked_read_signed (regcache, ALPHA_V0_REGNUM, &l);
+ read_memory (l, valbuf, 32);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "unknown floating point width");
+ }
+ break;
+
+ default:
+ /* Assume everything else degenerates to an integer. */
+ regcache_cooked_read_unsigned (regcache, ALPHA_V0_REGNUM, &l);
+ store_unsigned_integer (valbuf, length, l);
+ break;
}
- write_register (SP_REGNUM, new_sp);
- flush_cached_frames ();
+}
- if (proc_desc && (PROC_DESC_IS_DUMMY (proc_desc)
- || alpha_proc_desc_is_dyn_sigtramp (proc_desc)))
- {
- struct linked_proc_info *pi_ptr, *prev_ptr;
+/* Extract from REGCACHE the address of a structure about to be returned
+ from a function. */
+
+static CORE_ADDR
+alpha_extract_struct_value_address (struct regcache *regcache)
+{
+ ULONGEST addr;
+ regcache_cooked_read_unsigned (regcache, ALPHA_V0_REGNUM, &addr);
+ return addr;
+}
+
+/* Insert the given value into REGCACHE as if it was being
+ returned by a function. */
+
+static void
+alpha_store_return_value (struct type *valtype, struct regcache *regcache,
+ const void *valbuf)
+{
+ int length = TYPE_LENGTH (valtype);
+ char raw_buffer[ALPHA_REGISTER_SIZE];
+ ULONGEST l;
- for (pi_ptr = linked_proc_desc_table, prev_ptr = NULL;
- pi_ptr != NULL;
- prev_ptr = pi_ptr, pi_ptr = pi_ptr->next)
+ switch (TYPE_CODE (valtype))
+ {
+ case TYPE_CODE_FLT:
+ switch (length)
{
- if (&pi_ptr->info == proc_desc)
- break;
+ case 4:
+ alpha_lds (raw_buffer, valbuf);
+ regcache_cooked_write (regcache, ALPHA_FP0_REGNUM, raw_buffer);
+ break;
+
+ case 8:
+ regcache_cooked_write (regcache, ALPHA_FP0_REGNUM, valbuf);
+ break;
+
+ case 16:
+ /* FIXME: 128-bit long doubles are returned like structures:
+ by writing into indirect storage provided by the caller
+ as the first argument. */
+ error ("Cannot set a 128-bit long double return value.");
+
+ default:
+ internal_error (__FILE__, __LINE__, "unknown floating point width");
}
+ break;
- if (pi_ptr == NULL)
- error ("Can't locate dummy extra frame info\n");
+ case TYPE_CODE_COMPLEX:
+ switch (length)
+ {
+ case 8:
+ /* ??? This isn't correct wrt the ABI, but it's what GCC does. */
+ regcache_cooked_write (regcache, ALPHA_FP0_REGNUM, valbuf);
+ break;
- if (prev_ptr != NULL)
- prev_ptr->next = pi_ptr->next;
- else
- linked_proc_desc_table = pi_ptr->next;
+ case 16:
+ regcache_cooked_write (regcache, ALPHA_FP0_REGNUM, valbuf);
+ regcache_cooked_write (regcache, ALPHA_FP0_REGNUM+1,
+ (const char *)valbuf + 8);
+ break;
+
+ case 32:
+ /* FIXME: 128-bit long doubles are returned like structures:
+ by writing into indirect storage provided by the caller
+ as the first argument. */
+ error ("Cannot set a 128-bit long double return value.");
- xfree (pi_ptr);
+ default:
+ internal_error (__FILE__, __LINE__, "unknown floating point width");
+ }
+ break;
+
+ default:
+ /* Assume everything else degenerates to an integer. */
+ /* 32-bit values must be sign-extended to 64 bits
+ even if the base data type is unsigned. */
+ if (length == 4)
+ valtype = builtin_type_int32;
+ l = unpack_long (valtype, valbuf);
+ regcache_cooked_write_unsigned (regcache, ALPHA_V0_REGNUM, l);
+ break;
}
}
+
+static int
+alpha_use_struct_convention (int gcc_p, struct type *type)
+{
+ /* Structures are returned by ref in extra arg0. */
+ return 1;
+}
+
+static const unsigned char *
+alpha_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+{
+ static const unsigned char alpha_breakpoint[] =
+ { 0x80, 0, 0, 0 }; /* call_pal bpt */
+
+ *lenptr = sizeof(alpha_breakpoint);
+ return (alpha_breakpoint);
+}
+
+
+/* This returns the PC of the first insn after the prologue.
+ If we can't find the prologue, then return 0. */
+
+CORE_ADDR
+alpha_after_prologue (CORE_ADDR pc)
+{
+ struct symtab_and_line sal;
+ CORE_ADDR func_addr, func_end;
+
+ if (!find_pc_partial_function (pc, NULL, &func_addr, &func_end))
+ return 0;
+
+ sal = find_pc_line (func_addr, 0);
+ if (sal.end < func_end)
+ return sal.end;
+
+ /* The line after the prologue is after the end of the function. In this
+ case, tell the caller to find the prologue the hard way. */
+ return 0;
+}
+
+/* Read an instruction from memory at PC, looking through breakpoints. */
+
+unsigned int
+alpha_read_insn (CORE_ADDR pc)
+{
+ char buf[4];
+ int status;
+
+ status = read_memory_nobpt (pc, buf, 4);
+ if (status)
+ memory_error (status, pc);
+ return extract_unsigned_integer (buf, 4);
+}
+
/* To skip prologues, I use this predicate. Returns either PC itself
if the code at PC does not look like a function prologue; otherwise
returns an address that (if we're lucky) follows the prologue. If
LENIENT, then we must skip everything which is involved in setting
up the frame (it's OK to skip more, just so long as we don't skip
- anything which might clobber the registers which are being saved.
- Currently we must not skip more on the alpha, but we might need the
- lenient stuff some day. */
+ anything which might clobber the registers which are being saved. */
static CORE_ADDR
-alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
+alpha_skip_prologue (CORE_ADDR pc)
{
unsigned long inst;
int offset;
@@ -1373,8 +662,7 @@ alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
If so, then return either PC, or the PC after the prologue, whichever
is greater. */
- post_prologue_pc = after_prologue (pc, NULL);
-
+ post_prologue_pc = alpha_after_prologue (pc);
if (post_prologue_pc != 0)
return max (pc, post_prologue_pc);
@@ -1386,17 +674,7 @@ alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
or in the gcc frame. */
for (offset = 0; offset < 100; offset += 4)
{
- int status;
-
- status = read_memory_nobpt (pc + offset, buf, 4);
- if (status)
- memory_error (status, pc + offset);
- inst = extract_unsigned_integer (buf, 4);
-
- /* The alpha has no delay slots. But let's keep the lenient stuff,
- we might need it for something else in the future. */
- if (lenient && 0)
- continue;
+ inst = alpha_read_insn (pc + offset);
if ((inst & 0xffff0000) == 0x27bb0000) /* ldah $gp,n($t12) */
continue;
@@ -1407,15 +685,14 @@ alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
if ((inst & 0xffe01fff) == 0x43c0153e) /* subq $sp,n,$sp */
continue;
- if ((inst & 0xfc1f0000) == 0xb41e0000
- && (inst & 0xffff0000) != 0xb7fe0000)
- continue; /* stq reg,n($sp) */
- /* reg != $zero */
- if ((inst & 0xfc1f0000) == 0x9c1e0000
- && (inst & 0xffff0000) != 0x9ffe0000)
- continue; /* stt reg,n($sp) */
- /* reg != $zero */
- if (inst == 0x47de040f) /* bis sp,sp,fp */
+ if (((inst & 0xfc1f0000) == 0xb41e0000 /* stq reg,n($sp) */
+ || (inst & 0xfc1f0000) == 0x9c1e0000) /* stt reg,n($sp) */
+ && (inst & 0x03e00000) != 0x03e00000) /* reg != $zero */
+ continue;
+
+ if (inst == 0x47de040f) /* bis sp,sp,fp */
+ continue;
+ if (inst == 0x47fe040f) /* bis zero,sp,fp */
continue;
break;
@@ -1423,135 +700,534 @@ alpha_skip_prologue_internal (CORE_ADDR pc, int lenient)
return pc + offset;
}
-static CORE_ADDR
-alpha_skip_prologue (CORE_ADDR addr)
+
+/* Figure out where the longjmp will land.
+ We expect the first arg to be a pointer to the jmp_buf structure from
+ which we extract the PC (JB_PC) that we will land at. The PC is copied
+ into the "pc". This routine returns true on success. */
+
+static int
+alpha_get_longjmp_target (CORE_ADDR *pc)
{
- return (alpha_skip_prologue_internal (addr, 0));
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ CORE_ADDR jb_addr;
+ char raw_buffer[ALPHA_REGISTER_SIZE];
+
+ jb_addr = read_register (ALPHA_A0_REGNUM);
+
+ if (target_read_memory (jb_addr + (tdep->jb_pc * tdep->jb_elt_size),
+ raw_buffer, tdep->jb_elt_size))
+ return 0;
+
+ *pc = extract_unsigned_integer (raw_buffer, tdep->jb_elt_size);
+ return 1;
}
-#if 0
-/* Is address PC in the prologue (loosely defined) for function at
- STARTADDR? */
+
+/* Frame unwinder for signal trampolines. We use alpha tdep bits that
+ describe the location and shape of the sigcontext structure. After
+ that, all registers are in memory, so it's easy. */
+/* ??? Shouldn't we be able to do this generically, rather than with
+ OSABI data specific to Alpha? */
-static int
-alpha_in_lenient_prologue (CORE_ADDR startaddr, CORE_ADDR pc)
+struct alpha_sigtramp_unwind_cache
{
- CORE_ADDR end_prologue = alpha_skip_prologue_internal (startaddr, 1);
- return pc >= startaddr && pc < end_prologue;
+ CORE_ADDR sigcontext_addr;
+};
+
+static struct alpha_sigtramp_unwind_cache *
+alpha_sigtramp_frame_unwind_cache (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_sigtramp_unwind_cache *info;
+ struct gdbarch_tdep *tdep;
+
+ if (*this_prologue_cache)
+ return *this_prologue_cache;
+
+ info = FRAME_OBSTACK_ZALLOC (struct alpha_sigtramp_unwind_cache);
+ *this_prologue_cache = info;
+
+ tdep = gdbarch_tdep (current_gdbarch);
+ info->sigcontext_addr = tdep->sigcontext_addr (next_frame);
+
+ return info;
}
+
+/* Return the address of REGNO in a sigtramp frame. Since this is all
+ arithmetic, it doesn't seem worthwhile to cache it. */
+
+#ifndef SIGFRAME_PC_OFF
+#define SIGFRAME_PC_OFF (2 * 8)
+#define SIGFRAME_REGSAVE_OFF (4 * 8)
+#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_REGSAVE_OFF + 32 * 8 + 8)
#endif
-/* The alpha needs a conversion between register and memory format if
- the register is a floating point register and
- memory format is float, as the register format must be double
- or
- memory format is an integer with 4 bytes or less, as the representation
- of integers in floating point registers is different. */
+static CORE_ADDR
+alpha_sigtramp_register_address (CORE_ADDR sigcontext_addr, unsigned int regno)
+{
+ if (regno < 32)
+ return sigcontext_addr + SIGFRAME_REGSAVE_OFF + regno * 8;
+ if (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 32)
+ return sigcontext_addr + SIGFRAME_FPREGSAVE_OFF + regno * 8;
+ if (regno == ALPHA_PC_REGNUM)
+ return sigcontext_addr + SIGFRAME_PC_OFF;
+
+ return 0;
+}
+
+/* Given a GDB frame, determine the address of the calling function's
+ frame. This will be used to create a new GDB frame struct. */
+
static void
-alpha_register_convert_to_virtual (int regnum, struct type *valtype,
- char *raw_buffer, char *virtual_buffer)
+alpha_sigtramp_frame_this_id (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ struct frame_id *this_id)
{
- if (TYPE_LENGTH (valtype) >= REGISTER_RAW_SIZE (regnum))
- {
- memcpy (virtual_buffer, raw_buffer, REGISTER_VIRTUAL_SIZE (regnum));
- return;
- }
+ struct alpha_sigtramp_unwind_cache *info
+ = alpha_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
+ struct gdbarch_tdep *tdep;
+ CORE_ADDR stack_addr, code_addr;
- if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
- {
- double d = deprecated_extract_floating (raw_buffer, REGISTER_RAW_SIZE (regnum));
- deprecated_store_floating (virtual_buffer, TYPE_LENGTH (valtype), d);
- }
- else if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 4)
+ /* If the OSABI couldn't locate the sigcontext, give up. */
+ if (info->sigcontext_addr == 0)
+ return;
+
+ /* If we have dynamic signal trampolines, find their start.
+ If we do not, then we must assume there is a symbol record
+ that can provide the start address. */
+ tdep = gdbarch_tdep (current_gdbarch);
+ if (tdep->dynamic_sigtramp_offset)
{
- ULONGEST l;
- l = extract_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum));
- l = ((l >> 32) & 0xc0000000) | ((l >> 29) & 0x3fffffff);
- store_unsigned_integer (virtual_buffer, TYPE_LENGTH (valtype), l);
+ int offset;
+ code_addr = frame_pc_unwind (next_frame);
+ offset = tdep->dynamic_sigtramp_offset (code_addr);
+ if (offset >= 0)
+ code_addr -= offset;
+ else
+ code_addr = 0;
}
else
- error ("Cannot retrieve value from floating point register");
+ code_addr = frame_func_unwind (next_frame);
+
+ /* The stack address is trivially read from the sigcontext. */
+ stack_addr = alpha_sigtramp_register_address (info->sigcontext_addr,
+ ALPHA_SP_REGNUM);
+ stack_addr = get_frame_memory_unsigned (next_frame, stack_addr,
+ ALPHA_REGISTER_SIZE);
+
+ *this_id = frame_id_build (stack_addr, code_addr);
}
+/* Retrieve the value of REGNUM in FRAME. Don't give up! */
+
static void
-alpha_register_convert_to_raw (struct type *valtype, int regnum,
- char *virtual_buffer, char *raw_buffer)
+alpha_sigtramp_frame_prev_register (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
{
- if (TYPE_LENGTH (valtype) >= REGISTER_RAW_SIZE (regnum))
+ struct alpha_sigtramp_unwind_cache *info
+ = alpha_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
+ CORE_ADDR addr;
+
+ if (info->sigcontext_addr != 0)
{
- memcpy (raw_buffer, virtual_buffer, REGISTER_RAW_SIZE (regnum));
- return;
+ /* All integer and fp registers are stored in memory. */
+ addr = alpha_sigtramp_register_address (info->sigcontext_addr, regnum);
+ if (addr != 0)
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = addr;
+ *realnump = -1;
+ if (bufferp != NULL)
+ get_frame_memory (next_frame, addr, bufferp, ALPHA_REGISTER_SIZE);
+ return;
+ }
}
- if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
+ /* This extra register may actually be in the sigcontext, but our
+ current description of it in alpha_sigtramp_frame_unwind_cache
+ doesn't include it. Too bad. Fall back on whatever's in the
+ outer frame. */
+ frame_register (next_frame, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
+}
+
+static const struct frame_unwind alpha_sigtramp_frame_unwind = {
+ SIGTRAMP_FRAME,
+ alpha_sigtramp_frame_this_id,
+ alpha_sigtramp_frame_prev_register
+};
+
+static const struct frame_unwind *
+alpha_sigtramp_frame_p (CORE_ADDR pc)
+{
+ char *name;
+
+ /* We shouldn't even bother to try if the OSABI didn't register
+ a sigcontext_addr handler. */
+ if (!gdbarch_tdep (current_gdbarch)->sigcontext_addr)
+ return NULL;
+
+ /* Otherwise we should be in a signal frame. */
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (PC_IN_SIGTRAMP (pc, name))
+ return &alpha_sigtramp_frame_unwind;
+
+ return NULL;
+}
+
+/* Fallback alpha frame unwinder. Uses instruction scanning and knows
+ something about the traditional layout of alpha stack frames. */
+
+struct alpha_heuristic_unwind_cache
+{
+ CORE_ADDR *saved_regs;
+ CORE_ADDR vfp;
+ CORE_ADDR start_pc;
+ int return_reg;
+};
+
+/* Heuristic_proc_start may hunt through the text section for a long
+ time across a 2400 baud serial line. Allows the user to limit this
+ search. */
+static unsigned int heuristic_fence_post = 0;
+
+/* Attempt to locate the start of the function containing PC. We assume that
+ the previous function ends with an about_to_return insn. Not foolproof by
+ any means, since gcc is happy to put the epilogue in the middle of a
+ function. But we're guessing anyway... */
+
+static CORE_ADDR
+alpha_heuristic_proc_start (CORE_ADDR pc)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ CORE_ADDR last_non_nop = pc;
+ CORE_ADDR fence = pc - heuristic_fence_post;
+ CORE_ADDR orig_pc = pc;
+ CORE_ADDR func;
+
+ if (pc == 0)
+ return 0;
+
+ /* First see if we can find the start of the function from minimal
+ symbol information. This can succeed with a binary that doesn't
+ have debug info, but hasn't been stripped. */
+ func = get_pc_function_start (pc);
+ if (func)
+ return func;
+
+ if (heuristic_fence_post == UINT_MAX
+ || fence < tdep->vm_min_address)
+ fence = tdep->vm_min_address;
+
+ /* Search back for previous return; also stop at a 0, which might be
+ seen for instance before the start of a code section. Don't include
+ nops, since this usually indicates padding between functions. */
+ for (pc -= 4; pc >= fence; pc -= 4)
{
- double d = deprecated_extract_floating (virtual_buffer, TYPE_LENGTH (valtype));
- deprecated_store_floating (raw_buffer, REGISTER_RAW_SIZE (regnum), d);
+ unsigned int insn = alpha_read_insn (pc);
+ switch (insn)
+ {
+ case 0: /* invalid insn */
+ case 0x6bfa8001: /* ret $31,($26),1 */
+ return last_non_nop;
+
+ case 0x2ffe0000: /* unop: ldq_u $31,0($30) */
+ case 0x47ff041f: /* nop: bis $31,$31,$31 */
+ break;
+
+ default:
+ last_non_nop = pc;
+ break;
+ }
}
- else if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 4)
+
+ /* It's not clear to me why we reach this point when stopping quietly,
+ but with this test, at least we don't print out warnings for every
+ child forked (eg, on decstation). 22apr93 rich@cygnus.com. */
+ if (stop_soon == NO_STOP_QUIETLY)
{
- ULONGEST l;
- if (TYPE_UNSIGNED (valtype))
- l = extract_unsigned_integer (virtual_buffer, TYPE_LENGTH (valtype));
+ static int blurb_printed = 0;
+
+ if (fence == tdep->vm_min_address)
+ warning ("Hit beginning of text section without finding");
else
- l = extract_signed_integer (virtual_buffer, TYPE_LENGTH (valtype));
- l = ((l & 0xc0000000) << 32) | ((l & 0x3fffffff) << 29);
- store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum), l);
+ warning ("Hit heuristic-fence-post without finding");
+ warning ("enclosing function for address 0x%s", paddr_nz (orig_pc));
+
+ if (!blurb_printed)
+ {
+ printf_filtered ("\
+This warning occurs if you are debugging a function without any symbols\n\
+(for example, in a stripped executable). In that case, you may wish to\n\
+increase the size of the search with the `set heuristic-fence-post' command.\n\
+\n\
+Otherwise, you told GDB there was a function where there isn't one, or\n\
+(more likely) you have encountered a bug in GDB.\n");
+ blurb_printed = 1;
+ }
}
- else
- error ("Cannot store value in floating point register");
+
+ return 0;
}
-static const unsigned char *
-alpha_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+static struct alpha_heuristic_unwind_cache *
+alpha_heuristic_frame_unwind_cache (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ CORE_ADDR start_pc)
{
- static const unsigned char alpha_breakpoint[] =
- { 0x80, 0, 0, 0 }; /* call_pal bpt */
+ struct alpha_heuristic_unwind_cache *info;
+ ULONGEST val;
+ CORE_ADDR limit_pc, cur_pc;
+ int frame_reg, frame_size, return_reg, reg;
- *lenptr = sizeof(alpha_breakpoint);
- return (alpha_breakpoint);
+ if (*this_prologue_cache)
+ return *this_prologue_cache;
+
+ info = FRAME_OBSTACK_ZALLOC (struct alpha_heuristic_unwind_cache);
+ *this_prologue_cache = info;
+ info->saved_regs = frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
+
+ limit_pc = frame_pc_unwind (next_frame);
+ if (start_pc == 0)
+ start_pc = alpha_heuristic_proc_start (limit_pc);
+ info->start_pc = start_pc;
+
+ frame_reg = ALPHA_SP_REGNUM;
+ frame_size = 0;
+ return_reg = -1;
+
+ /* If we've identified a likely place to start, do code scanning. */
+ if (start_pc != 0)
+ {
+ /* Limit the forward search to 50 instructions. */
+ if (start_pc + 200 < limit_pc)
+ limit_pc = start_pc + 200;
+
+ for (cur_pc = start_pc; cur_pc < limit_pc; cur_pc += 4)
+ {
+ unsigned int word = alpha_read_insn (cur_pc);
+
+ if ((word & 0xffff0000) == 0x23de0000) /* lda $sp,n($sp) */
+ {
+ if (word & 0x8000)
+ {
+ /* Consider only the first stack allocation instruction
+ to contain the static size of the frame. */
+ if (frame_size == 0)
+ frame_size = (-word) & 0xffff;
+ }
+ else
+ {
+ /* Exit loop if a positive stack adjustment is found, which
+ usually means that the stack cleanup code in the function
+ epilogue is reached. */
+ break;
+ }
+ }
+ else if ((word & 0xfc1f0000) == 0xb41e0000) /* stq reg,n($sp) */
+ {
+ reg = (word & 0x03e00000) >> 21;
+
+ if (reg == 31)
+ continue;
+
+ /* Do not compute the address where the register was saved yet,
+ because we don't know yet if the offset will need to be
+ relative to $sp or $fp (we can not compute the address
+ relative to $sp if $sp is updated during the execution of
+ the current subroutine, for instance when doing some alloca).
+ So just store the offset for the moment, and compute the
+ address later when we know whether this frame has a frame
+ pointer or not. */
+ /* Hack: temporarily add one, so that the offset is non-zero
+ and we can tell which registers have save offsets below. */
+ info->saved_regs[reg] = (word & 0xffff) + 1;
+
+ /* Starting with OSF/1-3.2C, the system libraries are shipped
+ without local symbols, but they still contain procedure
+ descriptors without a symbol reference. GDB is currently
+ unable to find these procedure descriptors and uses
+ heuristic_proc_desc instead.
+ As some low level compiler support routines (__div*, __add*)
+ use a non-standard return address register, we have to
+ add some heuristics to determine the return address register,
+ or stepping over these routines will fail.
+ Usually the return address register is the first register
+ saved on the stack, but assembler optimization might
+ rearrange the register saves.
+ So we recognize only a few registers (t7, t9, ra) within
+ the procedure prologue as valid return address registers.
+ If we encounter a return instruction, we extract the
+ the return address register from it.
+
+ FIXME: Rewriting GDB to access the procedure descriptors,
+ e.g. via the minimal symbol table, might obviate this hack. */
+ if (return_reg == -1
+ && cur_pc < (start_pc + 80)
+ && (reg == ALPHA_T7_REGNUM
+ || reg == ALPHA_T9_REGNUM
+ || reg == ALPHA_RA_REGNUM))
+ return_reg = reg;
+ }
+ else if ((word & 0xffe0ffff) == 0x6be08001) /* ret zero,reg,1 */
+ return_reg = (word >> 16) & 0x1f;
+ else if (word == 0x47de040f) /* bis sp,sp,fp */
+ frame_reg = ALPHA_GCC_FP_REGNUM;
+ else if (word == 0x47fe040f) /* bis zero,sp,fp */
+ frame_reg = ALPHA_GCC_FP_REGNUM;
+ }
+
+ /* If we haven't found a valid return address register yet, keep
+ searching in the procedure prologue. */
+ if (return_reg == -1)
+ {
+ while (cur_pc < (limit_pc + 80) && cur_pc < (start_pc + 80))
+ {
+ unsigned int word = alpha_read_insn (cur_pc);
+
+ if ((word & 0xfc1f0000) == 0xb41e0000) /* stq reg,n($sp) */
+ {
+ reg = (word & 0x03e00000) >> 21;
+ if (reg == ALPHA_T7_REGNUM
+ || reg == ALPHA_T9_REGNUM
+ || reg == ALPHA_RA_REGNUM)
+ {
+ return_reg = reg;
+ break;
+ }
+ }
+ else if ((word & 0xffe0ffff) == 0x6be08001) /* ret zero,reg,1 */
+ {
+ return_reg = (word >> 16) & 0x1f;
+ break;
+ }
+
+ cur_pc += 4;
+ }
+ }
+ }
+
+ /* Failing that, do default to the customary RA. */
+ if (return_reg == -1)
+ return_reg = ALPHA_RA_REGNUM;
+ info->return_reg = return_reg;
+
+ frame_unwind_unsigned_register (next_frame, frame_reg, &val);
+ info->vfp = val + frame_size;
+
+ /* Convert offsets to absolute addresses. See above about adding
+ one to the offsets to make all detected offsets non-zero. */
+ for (reg = 0; reg < ALPHA_NUM_REGS; ++reg)
+ if (info->saved_regs[reg])
+ info->saved_regs[reg] += val - 1;
+
+ return info;
}
-/* Given a return value in `regbuf' with a type `valtype',
- extract and copy its value into `valbuf'. */
+/* Given a GDB frame, determine the address of the calling function's
+ frame. This will be used to create a new GDB frame struct. */
static void
-alpha_extract_return_value (struct type *valtype,
- char regbuf[ALPHA_REGISTER_BYTES], char *valbuf)
+alpha_heuristic_frame_this_id (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ struct frame_id *this_id)
{
- if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
- alpha_register_convert_to_virtual (FP0_REGNUM, valtype,
- regbuf + REGISTER_BYTE (FP0_REGNUM),
- valbuf);
- else
- memcpy (valbuf, regbuf + REGISTER_BYTE (ALPHA_V0_REGNUM),
- TYPE_LENGTH (valtype));
+ struct alpha_heuristic_unwind_cache *info
+ = alpha_heuristic_frame_unwind_cache (next_frame, this_prologue_cache, 0);
+
+ /* This is meant to halt the backtrace at "_start". Make sure we
+ don't halt it at a generic dummy frame. */
+ if (inside_entry_file (info->start_pc))
+ return;
+
+ *this_id = frame_id_build (info->vfp, info->start_pc);
}
-/* Given a return value in `regbuf' with a type `valtype',
- write its value into the appropriate register. */
+/* Retrieve the value of REGNUM in FRAME. Don't give up! */
static void
-alpha_store_return_value (struct type *valtype, char *valbuf)
+alpha_heuristic_frame_prev_register (struct frame_info *next_frame,
+ void **this_prologue_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *bufferp)
{
- char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
- int regnum = ALPHA_V0_REGNUM;
- int length = TYPE_LENGTH (valtype);
+ struct alpha_heuristic_unwind_cache *info
+ = alpha_heuristic_frame_unwind_cache (next_frame, this_prologue_cache, 0);
+
+ /* The PC of the previous frame is stored in the link register of
+ the current frame. Frob regnum so that we pull the value from
+ the correct place. */
+ if (regnum == ALPHA_PC_REGNUM)
+ regnum = info->return_reg;
+
+ /* For all registers known to be saved in the current frame,
+ do the obvious and pull the value out. */
+ if (info->saved_regs[regnum])
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = info->saved_regs[regnum];
+ *realnump = -1;
+ if (bufferp != NULL)
+ get_frame_memory (next_frame, *addrp, bufferp, ALPHA_REGISTER_SIZE);
+ return;
+ }
- if (TYPE_CODE (valtype) == TYPE_CODE_FLT)
+ /* The stack pointer of the previous frame is computed by popping
+ the current stack frame. */
+ if (regnum == ALPHA_SP_REGNUM)
{
- regnum = FP0_REGNUM;
- length = REGISTER_RAW_SIZE (regnum);
- alpha_register_convert_to_raw (valtype, regnum, valbuf, raw_buffer);
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (bufferp != NULL)
+ store_unsigned_integer (bufferp, ALPHA_REGISTER_SIZE, info->vfp);
+ return;
}
- else
- memcpy (raw_buffer, valbuf, length);
- deprecated_write_register_bytes (REGISTER_BYTE (regnum), raw_buffer, length);
+ /* Otherwise assume the next frame has the same register value. */
+ frame_register (next_frame, regnum, optimizedp, lvalp, addrp,
+ realnump, bufferp);
+}
+
+static const struct frame_unwind alpha_heuristic_frame_unwind = {
+ NORMAL_FRAME,
+ alpha_heuristic_frame_this_id,
+ alpha_heuristic_frame_prev_register
+};
+
+static const struct frame_unwind *
+alpha_heuristic_frame_p (CORE_ADDR pc)
+{
+ return &alpha_heuristic_frame_unwind;
+}
+
+static CORE_ADDR
+alpha_heuristic_frame_base_address (struct frame_info *next_frame,
+ void **this_prologue_cache)
+{
+ struct alpha_heuristic_unwind_cache *info
+ = alpha_heuristic_frame_unwind_cache (next_frame, this_prologue_cache, 0);
+
+ return info->vfp;
}
+static const struct frame_base alpha_heuristic_frame_base = {
+ &alpha_heuristic_frame_unwind,
+ alpha_heuristic_frame_base_address,
+ alpha_heuristic_frame_base_address,
+ alpha_heuristic_frame_base_address
+};
+
/* Just like reinit_frame_cache, but with the right arguments to be
- callable as an sfunc. */
+ callable as an sfunc. Used by the "set heuristic-fence-post" command. */
static void
reinit_frame_cache_sfunc (char *args, int from_tty, struct cmd_list_element *c)
@@ -1559,90 +1235,120 @@ reinit_frame_cache_sfunc (char *args, int from_tty, struct cmd_list_element *c)
reinit_frame_cache ();
}
-/* This is the definition of CALL_DUMMY_ADDRESS. It's a heuristic that is used
- to find a convenient place in the text segment to stick a breakpoint to
- detect the completion of a target function call (ala call_function_by_hand).
- */
-
-CORE_ADDR
-alpha_call_dummy_address (void)
-{
- CORE_ADDR entry;
- struct minimal_symbol *sym;
+
+/* ALPHA stack frames are almost impenetrable. When execution stops,
+ we basically have to look at symbol information for the function
+ that we stopped in, which tells us *which* register (if any) is
+ the base of the frame pointer, and what offset from that register
+ the frame itself is at.
- entry = entry_point_address ();
+ This presents a problem when trying to examine a stack in memory
+ (that isn't executing at the moment), using the "frame" command. We
+ don't have a PC, nor do we have any registers except SP.
- if (entry != 0)
- return entry;
+ This routine takes two arguments, SP and PC, and tries to make the
+ cached frames look as if these two arguments defined a frame on the
+ cache. This allows the rest of info frame to extract the important
+ arguments without difficulty. */
- sym = lookup_minimal_symbol ("_Prelude", NULL, symfile_objfile);
+struct frame_info *
+alpha_setup_arbitrary_frame (int argc, CORE_ADDR *argv)
+{
+ if (argc != 2)
+ error ("ALPHA frame specifications require two arguments: sp and pc");
- if (!sym || MSYMBOL_TYPE (sym) != mst_text)
- return 0;
- else
- return SYMBOL_VALUE_ADDRESS (sym) + 4;
+ return create_new_frame (argv[0], argv[1]);
}
-static void
-alpha_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- struct value **args, struct type *type, int gcc_p)
+/* Assuming NEXT_FRAME->prev is a dummy, return the frame ID of that
+ dummy frame. The frame ID's base needs to match the TOS value
+ saved by save_dummy_frame_tos(), and the PC match the dummy frame's
+ breakpoint. */
+
+static struct frame_id
+alpha_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- CORE_ADDR bp_address = CALL_DUMMY_ADDRESS ();
+ ULONGEST base;
+ frame_unwind_unsigned_register (next_frame, ALPHA_SP_REGNUM, &base);
+ return frame_id_build (base, frame_pc_unwind (next_frame));
+}
- if (bp_address == 0)
- error ("no place to put call");
- write_register (ALPHA_RA_REGNUM, bp_address);
- write_register (ALPHA_T12_REGNUM, fun);
+static CORE_ADDR
+alpha_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ ULONGEST pc;
+ frame_unwind_unsigned_register (next_frame, ALPHA_PC_REGNUM, &pc);
+ return pc;
}
-/* On the Alpha, the call dummy code is nevery copied to user space
- (see alpha_fix_call_dummy() above). The contents of this do not
- matter. */
-LONGEST alpha_call_dummy_words[] = { 0 };
+
+/* Helper routines for alpha*-nat.c files to move register sets to and
+ from core files. The UNIQUE pointer is allowed to be NULL, as most
+ targets don't supply this value in their core files. */
-static int
-alpha_use_struct_convention (int gcc_p, struct type *type)
+void
+alpha_supply_int_regs (int regno, const void *r0_r30,
+ const void *pc, const void *unique)
{
- /* Structures are returned by ref in extra arg0. */
- return 1;
+ int i;
+
+ for (i = 0; i < 31; ++i)
+ if (regno == i || regno == -1)
+ supply_register (i, (const char *)r0_r30 + i*8);
+
+ if (regno == ALPHA_ZERO_REGNUM || regno == -1)
+ supply_register (ALPHA_ZERO_REGNUM, NULL);
+
+ if (regno == ALPHA_PC_REGNUM || regno == -1)
+ supply_register (ALPHA_PC_REGNUM, pc);
+
+ if (regno == ALPHA_UNIQUE_REGNUM || regno == -1)
+ supply_register (ALPHA_UNIQUE_REGNUM, unique);
}
-static void
-alpha_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+void
+alpha_fill_int_regs (int regno, void *r0_r30, void *pc, void *unique)
{
- /* Store the address of the place in which to copy the structure the
- subroutine will return. Handled by alpha_push_arguments. */
+ int i;
+
+ for (i = 0; i < 31; ++i)
+ if (regno == i || regno == -1)
+ regcache_collect (i, (char *)r0_r30 + i*8);
+
+ if (regno == ALPHA_PC_REGNUM || regno == -1)
+ regcache_collect (ALPHA_PC_REGNUM, pc);
+
+ if (unique && (regno == ALPHA_UNIQUE_REGNUM || regno == -1))
+ regcache_collect (ALPHA_UNIQUE_REGNUM, unique);
}
-static CORE_ADDR
-alpha_extract_struct_value_address (char *regbuf)
+void
+alpha_supply_fp_regs (int regno, const void *f0_f30, const void *fpcr)
{
- return (extract_address (regbuf + REGISTER_BYTE (ALPHA_V0_REGNUM),
- REGISTER_RAW_SIZE (ALPHA_V0_REGNUM)));
-}
+ int i;
-/* Figure out where the longjmp will land.
- We expect the first arg to be a pointer to the jmp_buf structure from
- which we extract the PC (JB_PC) that we will land at. The PC is copied
- into the "pc". This routine returns true on success. */
+ for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
+ if (regno == i || regno == -1)
+ supply_register (i, (const char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8);
-static int
-alpha_get_longjmp_target (CORE_ADDR *pc)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- CORE_ADDR jb_addr;
- char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE];
+ if (regno == ALPHA_FPCR_REGNUM || regno == -1)
+ supply_register (ALPHA_FPCR_REGNUM, fpcr);
+}
- jb_addr = read_register (ALPHA_A0_REGNUM);
+void
+alpha_fill_fp_regs (int regno, void *f0_f30, void *fpcr)
+{
+ int i;
- if (target_read_memory (jb_addr + (tdep->jb_pc * tdep->jb_elt_size),
- raw_buffer, tdep->jb_elt_size))
- return 0;
+ for (i = ALPHA_FP0_REGNUM; i < ALPHA_FP0_REGNUM + 31; ++i)
+ if (regno == i || regno == -1)
+ regcache_collect (i, (char *)f0_f30 + (i - ALPHA_FP0_REGNUM) * 8);
- *pc = extract_address (raw_buffer, tdep->jb_elt_size);
- return 1;
+ if (regno == ALPHA_FPCR_REGNUM || regno == -1)
+ regcache_collect (ALPHA_FPCR_REGNUM, fpcr);
}
+
/* alpha_software_single_step() is called just before we want to resume
the inferior, if we want to single-step it but there is no hardware
or kernel single-step support (NetBSD on Alpha, for example). We find
@@ -1659,7 +1365,7 @@ alpha_next_pc (CORE_ADDR pc)
int offset;
LONGEST rav;
- insn = read_memory_unsigned_integer (pc, sizeof (insn));
+ insn = alpha_read_insn (pc);
/* Opcode is top 6 bits. */
op = (insn >> 26) & 0x3f;
@@ -1722,6 +1428,8 @@ alpha_next_pc (CORE_ADDR pc)
if (rav >= 0)
goto branch_taken;
break;
+
+ /* ??? Missing floating-point branches. */
}
}
@@ -1753,7 +1461,6 @@ alpha_software_single_step (enum target_signal sig, int insert_breakpoints_p)
}
-
/* Initialize the current architecture based on INFO. If possible, re-use an
architecture from ARCHES, which is a list of architectures already created
during this debugging session.
@@ -1783,12 +1490,11 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep = xmalloc (sizeof (struct gdbarch_tdep));
gdbarch = gdbarch_alloc (&info, tdep);
- /* Lowest text address. This is used by heuristic_proc_start() to
- decide when to stop looking. */
+ /* Lowest text address. This is used by heuristic_proc_start()
+ to decide when to stop looking. */
tdep->vm_min_address = (CORE_ADDR) 0x120000000;
tdep->dynamic_sigtramp_offset = NULL;
- tdep->skip_sigtramp_frame = NULL;
tdep->sigcontext_addr = NULL;
tdep->jb_pc = -1; /* longjmp support not enabled by default */
@@ -1806,76 +1512,50 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Register info */
set_gdbarch_num_regs (gdbarch, ALPHA_NUM_REGS);
set_gdbarch_sp_regnum (gdbarch, ALPHA_SP_REGNUM);
- set_gdbarch_deprecated_fp_regnum (gdbarch, ALPHA_FP_REGNUM);
set_gdbarch_pc_regnum (gdbarch, ALPHA_PC_REGNUM);
set_gdbarch_fp0_regnum (gdbarch, ALPHA_FP0_REGNUM);
set_gdbarch_register_name (gdbarch, alpha_register_name);
- set_gdbarch_deprecated_register_size (gdbarch, ALPHA_REGISTER_SIZE);
- set_gdbarch_deprecated_register_bytes (gdbarch, ALPHA_REGISTER_BYTES);
set_gdbarch_register_byte (gdbarch, alpha_register_byte);
set_gdbarch_register_raw_size (gdbarch, alpha_register_raw_size);
- set_gdbarch_deprecated_max_register_raw_size (gdbarch, ALPHA_MAX_REGISTER_RAW_SIZE);
set_gdbarch_register_virtual_size (gdbarch, alpha_register_virtual_size);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch,
- ALPHA_MAX_REGISTER_VIRTUAL_SIZE);
- set_gdbarch_register_virtual_type (gdbarch, alpha_register_virtual_type);
+ set_gdbarch_register_type (gdbarch, alpha_register_type);
set_gdbarch_cannot_fetch_register (gdbarch, alpha_cannot_fetch_register);
set_gdbarch_cannot_store_register (gdbarch, alpha_cannot_store_register);
- set_gdbarch_register_convertible (gdbarch, alpha_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch,
- alpha_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch, alpha_register_convert_to_raw);
+ set_gdbarch_convert_register_p (gdbarch, alpha_convert_register_p);
+ set_gdbarch_register_to_value (gdbarch, alpha_register_to_value);
+ set_gdbarch_value_to_register (gdbarch, alpha_value_to_register);
+
+ set_gdbarch_register_reggroup_p (gdbarch, alpha_register_reggroup_p);
+ /* Prologue heuristics. */
set_gdbarch_skip_prologue (gdbarch, alpha_skip_prologue);
+ /* Disassembler. */
+ set_gdbarch_print_insn (gdbarch, print_insn_alpha);
+
+ /* Call info. */
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_frameless_function_invocation (gdbarch,
generic_frameless_function_invocation_not);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, alpha_saved_pc_after_call);
-
- set_gdbarch_deprecated_frame_chain (gdbarch, alpha_frame_chain);
- set_gdbarch_deprecated_frame_saved_pc (gdbarch, alpha_frame_saved_pc);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, alpha_frame_init_saved_regs);
-
set_gdbarch_use_struct_convention (gdbarch, alpha_use_struct_convention);
- set_gdbarch_deprecated_extract_return_value (gdbarch, alpha_extract_return_value);
-
- set_gdbarch_deprecated_store_struct_return (gdbarch, alpha_store_struct_return);
- set_gdbarch_deprecated_store_return_value (gdbarch, alpha_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch,
+ set_gdbarch_extract_return_value (gdbarch, alpha_extract_return_value);
+ set_gdbarch_store_return_value (gdbarch, alpha_store_return_value);
+ set_gdbarch_extract_struct_value_address (gdbarch,
alpha_extract_struct_value_address);
/* Settings for calling functions in the inferior. */
- set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
- set_gdbarch_deprecated_push_arguments (gdbarch, alpha_push_arguments);
- set_gdbarch_deprecated_pop_frame (gdbarch, alpha_pop_frame);
-
- /* On the Alpha, the call dummy code is never copied to user space,
- stopping the user call is achieved via a bp_call_dummy breakpoint.
- But we need a fake CALL_DUMMY definition to enable the proper
- call_function_by_hand and to avoid zero length array warnings. */
- set_gdbarch_deprecated_call_dummy_words (gdbarch, alpha_call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
- set_gdbarch_frame_args_address (gdbarch, alpha_frame_args_address);
- set_gdbarch_frame_locals_address (gdbarch, alpha_frame_locals_address);
- set_gdbarch_deprecated_init_extra_frame_info (gdbarch, alpha_init_extra_frame_info);
-
- /* Alpha OSF/1 inhibits execution of code on the stack. But there is
- no need for a dummy on the Alpha. PUSH_ARGUMENTS takes care of all
- argument handling and bp_call_dummy takes care of stopping the dummy. */
- set_gdbarch_call_dummy_address (gdbarch, alpha_call_dummy_address);
- set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_deprecated_push_dummy_frame (gdbarch, alpha_push_dummy_frame);
- /* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
- set_gdbarch_deprecated_fix_call_dummy (gdbarch, alpha_fix_call_dummy);
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
- set_gdbarch_deprecated_init_frame_pc_first (gdbarch, alpha_init_frame_pc_first);
+ set_gdbarch_push_dummy_call (gdbarch, alpha_push_dummy_call);
+
+ /* Methods for saving / extracting a dummy frame's ID. */
+ set_gdbarch_unwind_dummy_id (gdbarch, alpha_unwind_dummy_id);
+ set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
+
+ /* Return the unwound PC value. */
+ set_gdbarch_unwind_pc (gdbarch, alpha_unwind_pc);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
@@ -1895,27 +1575,20 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
if (tdep->jb_pc >= 0)
set_gdbarch_get_longjmp_target (gdbarch, alpha_get_longjmp_target);
+ frame_unwind_append_predicate (gdbarch, alpha_sigtramp_frame_p);
+ frame_unwind_append_predicate (gdbarch, alpha_heuristic_frame_p);
+
+ frame_base_set_default (gdbarch, &alpha_heuristic_frame_base);
+
return gdbarch;
}
-static void
-alpha_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
+void
+alpha_dwarf2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (tdep == NULL)
- return;
-
- fprintf_unfiltered (file,
- "alpha_dump_tdep: vm_min_address = 0x%lx\n",
- (long) tdep->vm_min_address);
-
- fprintf_unfiltered (file,
- "alpha_dump_tdep: jb_pc = %d\n",
- tdep->jb_pc);
- fprintf_unfiltered (file,
- "alpha_dump_tdep: jb_elt_size = %ld\n",
- (long) tdep->jb_elt_size);
+ frame_unwind_append_predicate (gdbarch, dwarf2_frame_p);
+ frame_base_append_predicate (gdbarch, dwarf2_frame_base_p);
+ set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
}
void
@@ -1923,9 +1596,7 @@ _initialize_alpha_tdep (void)
{
struct cmd_list_element *c;
- gdbarch_register (bfd_arch_alpha, alpha_gdbarch_init, alpha_dump_tdep);
-
- deprecated_tm_print_insn = print_insn_alpha;
+ gdbarch_register (bfd_arch_alpha, alpha_gdbarch_init, NULL);
/* Let the user set the fence post for heuristic_proc_start. */
diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h
index 0e8aefbfe16..c0e28e65772 100644
--- a/gdb/alpha-tdep.h
+++ b/gdb/alpha-tdep.h
@@ -34,33 +34,24 @@
register state. */
#define ALPHA_REGISTER_BYTES (ALPHA_NUM_REGS * 8)
-/* Largest value REGISTER_RAW_SIZE can have. */
-#define ALPHA_MAX_REGISTER_RAW_SIZE 8
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-#define ALPHA_MAX_REGISTER_VIRTUAL_SIZE 8
-
/* Register numbers of various important registers. Note that most of
these values are "real" register numbers, and correspond to the
- general registers of the machine, and DEPRECATED_FP_REGNUM is a
- "phony" register number which is too large to be an actual register
- number as far as the user is concerned but serves to get the
- desired value when passed to read_register. */
+ general registers of the machine. */
#define ALPHA_V0_REGNUM 0 /* Function integer return value */
#define ALPHA_T7_REGNUM 8 /* Return address register for OSF/1 __add* */
#define ALPHA_GCC_FP_REGNUM 15 /* Used by gcc as frame register */
#define ALPHA_A0_REGNUM 16 /* Loc of first arg during a subr call */
#define ALPHA_T9_REGNUM 23 /* Return address register for OSF/1 __div* */
+#define ALPHA_RA_REGNUM 26 /* Contains return address value */
#define ALPHA_T12_REGNUM 27 /* Contains start addr of current proc */
+#define ALPHA_GP_REGNUM 29 /* Contains the global pointer */
#define ALPHA_SP_REGNUM 30 /* Contains address of top of stack */
-#define ALPHA_RA_REGNUM 26 /* Contains return address value */
#define ALPHA_ZERO_REGNUM 31 /* Read-only register, always 0 */
#define ALPHA_FP0_REGNUM 32 /* Floating point register 0 */
#define ALPHA_FPA0_REGNUM 48 /* First float arg during a subr call */
#define ALPHA_FPCR_REGNUM 63 /* Floating point control register */
#define ALPHA_PC_REGNUM 64 /* Contains program counter */
-#define ALPHA_FP_REGNUM 65 /* Virtual frame pointer */
#define ALPHA_UNIQUE_REGNUM 66 /* PAL_rduniq value */
/* The alpha has two different virtual pointers for arguments and locals.
@@ -80,19 +71,15 @@
/* Target-dependent structure in gdbarch. */
struct gdbarch_tdep
{
- CORE_ADDR vm_min_address; /* used by heuristic_proc_start */
+ CORE_ADDR vm_min_address; /* Used by alpha_heuristic_proc_start. */
/* If PC is inside a dynamically-generated signal trampoline function
(i.e. one copied onto the user stack at run-time), return how many
bytes PC is beyond the start of that function. Otherwise, return -1. */
LONGEST (*dynamic_sigtramp_offset) (CORE_ADDR);
- /* If FRAME refers to a sigtramp frame, return the address of the next
- frame. */
- CORE_ADDR (*skip_sigtramp_frame) (struct frame_info *, CORE_ADDR);
-
- /* Translate a signal handler frame into the address of the sigcontext
- structure for that signal handler. */
+ /* Translate a signal handler stack base address into the address of
+ the sigcontext structure for that signal handler. */
CORE_ADDR (*sigcontext_addr) (struct frame_info *);
int jb_pc; /* Offset to PC value in jump buffer.
@@ -101,6 +88,17 @@ struct gdbarch_tdep
size_t jb_elt_size; /* And the size of each entry in the buf. */
};
-void alpha_software_single_step (enum target_signal, int);
+extern unsigned int alpha_read_insn (CORE_ADDR pc);
+extern void alpha_software_single_step (enum target_signal, int);
+extern CORE_ADDR alpha_after_prologue (CORE_ADDR pc);
+
+extern void alpha_mdebug_init_abi (struct gdbarch_info, struct gdbarch *);
+extern void alpha_dwarf2_init_abi (struct gdbarch_info, struct gdbarch *);
+
+extern void alpha_supply_int_regs (int, const void *, const void *,
+ const void *);
+extern void alpha_fill_int_regs (int, void *, void *, void *);
+extern void alpha_supply_fp_regs (int, const void *, const void *);
+extern void alpha_fill_fp_regs (int, void *, void *);
#endif /* ALPHA_TDEP_H */
diff --git a/gdb/alphabsd-nat.c b/gdb/alphabsd-nat.c
index a20b36f575e..0781698710f 100644
--- a/gdb/alphabsd-nat.c
+++ b/gdb/alphabsd-nat.c
@@ -75,7 +75,6 @@ fill_fpregset (fpregset_t *fpregsetp, int regno)
static int
getregs_supplies (int regno)
{
-
return ((regno >= ALPHA_V0_REGNUM && regno <= ALPHA_ZERO_REGNUM)
|| regno >= PC_REGNUM);
}
@@ -87,7 +86,6 @@ getregs_supplies (int regno)
void
fetch_inferior_registers (int regno)
{
-
if (regno == -1 || getregs_supplies (regno))
{
struct reg gregs;
@@ -111,9 +109,6 @@ fetch_inferior_registers (int regno)
alphabsd_supply_fpreg ((char *) &fpregs, regno);
}
-
- /* Reset virtual frame pointer. */
- supply_register (DEPRECATED_FP_REGNUM, NULL);
}
/* Store register REGNO back into the inferior. If REGNO is -1, do
@@ -122,7 +117,6 @@ fetch_inferior_registers (int regno)
void
store_inferior_registers (int regno)
{
-
if (regno == -1 || getregs_supplies (regno))
{
struct reg gregs;
diff --git a/gdb/alphabsd-tdep.c b/gdb/alphabsd-tdep.c
index 39a9b1ae77e..3e0f2272787 100644
--- a/gdb/alphabsd-tdep.c
+++ b/gdb/alphabsd-tdep.c
@@ -19,84 +19,37 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "regcache.h"
#include "alpha-tdep.h"
#include "alphabsd-tdep.h"
-/* Number of general-purpose registers. */
-#define NUM_GREGS 32
-
-/* Number of floating-point registers. */
-#define NUM_FPREGS 31
-
/* Conviently, GDB uses the same register numbering as the
ptrace register structure used by BSD on Alpha. */
void
alphabsd_supply_reg (char *regs, int regno)
{
- int i;
-
- for (i = 0; i < NUM_GREGS; i++)
- {
- if (i == regno || regno == -1)
- {
- if (CANNOT_FETCH_REGISTER (i))
- supply_register (i, NULL);
- else
- supply_register (i, regs + (i * 8));
- }
- }
-
- /* The PC travels in the ZERO slot. */
- if (regno == PC_REGNUM || regno == -1)
- supply_register (PC_REGNUM, regs + (31 * 8));
+ /* PC is at slot 32; UNIQUE not present. */
+ alpha_supply_int_regs (regno, regs, regs + 31*8, NULL);
}
void
alphabsd_fill_reg (char *regs, int regno)
{
- int i;
-
- for (i = 0; i < NUM_GREGS; i++)
- if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, regs + (i * 8));
-
- /* The PC travels in the ZERO slot. */
- if (regno == PC_REGNUM || regno == -1)
- regcache_collect (PC_REGNUM, regs + (31 * 8));
+ /* PC is at slot 32; UNIQUE not present. */
+ alpha_fill_int_regs (regno, regs, regs + 31*8, NULL);
}
void
alphabsd_supply_fpreg (char *fpregs, int regno)
{
- int i;
-
- for (i = FP0_REGNUM; i < FP0_REGNUM + NUM_FPREGS; i++)
- {
- if (i == regno || regno == -1)
- {
- if (CANNOT_FETCH_REGISTER (i))
- supply_register (i, NULL);
- else
- supply_register (i, fpregs + ((i - FP0_REGNUM) * 8));
- }
- }
-
- if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- supply_register (ALPHA_FPCR_REGNUM, fpregs + (32 * 8));
+ /* FPCR is at slot 33; slot 32 unused. */
+ alpha_supply_fp_regs (regno, fpregs, fpregs + 32*8);
}
void
alphabsd_fill_fpreg (char *fpregs, int regno)
{
- int i;
-
- for (i = FP0_REGNUM; i < FP0_REGNUM + NUM_FPREGS; i++)
- if ((regno == i || regno == -1) && ! CANNOT_STORE_REGISTER (i))
- regcache_collect (i, fpregs + ((i - FP0_REGNUM) * 8));
-
- if (regno == ALPHA_FPCR_REGNUM || regno == -1)
- regcache_collect (ALPHA_FPCR_REGNUM, fpregs + (32 * 8));
+ /* FPCR is at slot 33; slot 32 unused. */
+ alpha_fill_fp_regs (regno, fpregs, fpregs + 32*8);
}
diff --git a/gdb/alphafbsd-tdep.c b/gdb/alphafbsd-tdep.c
index 3d8eafb2927..680e303f587 100644
--- a/gdb/alphafbsd-tdep.c
+++ b/gdb/alphafbsd-tdep.c
@@ -68,6 +68,12 @@ alphafbsd_init_abi (struct gdbarch_info info,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ /* Hook into the DWARF CFI frame unwinder. */
+ alpha_dwarf2_init_abi (info, gdbarch);
+
+ /* Hook into the MDEBUG frame unwinder. */
+ alpha_mdebug_init_abi (info, gdbarch);
+
set_gdbarch_pc_in_sigtramp (gdbarch, alphafbsd_pc_in_sigtramp);
set_gdbarch_use_struct_convention (gdbarch, alphafbsd_use_struct_convention);
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index a4a77c1c00c..efb7ab9b47d 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -70,7 +70,6 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
for (regno = 0; regno < ALPHA_ZERO_REGNUM; regno++)
supply_register (regno, regs + (regmap[regno] * 8));
supply_register (ALPHA_ZERO_REGNUM, NULL);
- supply_register (DEPRECATED_FP_REGNUM, NULL);
supply_register (PC_REGNUM, regs + (28 * 8));
/* Floating point registers. */
@@ -190,21 +189,7 @@ alphanbsd_sigcontext_addr (struct frame_info *frame)
/* FIXME: This is not correct for all versions of NetBSD/alpha.
We will probably need to disassemble the trampoline to figure
out which trampoline frame type we have. */
- return frame->frame;
-}
-
-static CORE_ADDR
-alphanbsd_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
-{
- char *name;
-
- /* FIXME: This is not correct for all versions of NetBSD/alpha.
- We will probably need to disassemble the trampoline to figure
- out which trampoline frame type we have. */
- find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
- if (PC_IN_SIGTRAMP (pc, name))
- return frame->frame;
- return 0;
+ return get_frame_base (frame);
}
static void
@@ -213,6 +198,12 @@ alphanbsd_init_abi (struct gdbarch_info info,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ /* Hook into the DWARF CFI frame unwinder. */
+ alpha_dwarf2_init_abi (info, gdbarch);
+
+ /* Hook into the MDEBUG frame unwinder. */
+ alpha_mdebug_init_abi (info, gdbarch);
+
set_gdbarch_pc_in_sigtramp (gdbarch, alphanbsd_pc_in_sigtramp);
/* NetBSD/alpha does not provide single step support via ptrace(2); we
@@ -222,7 +213,6 @@ alphanbsd_init_abi (struct gdbarch_info info,
set_solib_svr4_fetch_link_map_offsets (gdbarch,
nbsd_lp64_solib_svr4_fetch_link_map_offsets);
- tdep->skip_sigtramp_frame = alphanbsd_skip_sigtramp_frame;
tdep->dynamic_sigtramp_offset = alphanbsd_sigtramp_offset;
tdep->sigcontext_addr = alphanbsd_sigcontext_addr;
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index a2ea4935303..8a4bdf69176 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -193,7 +193,7 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
&& NULL != target_type
&& TYPE_CODE_FUNC == TYPE_CODE (target_type))
{
- CORE_ADDR regval = extract_address (val, len);
+ CORE_ADDR regval = extract_unsigned_integer (val, len);
if (arm_pc_is_thumb (regval))
store_unsigned_integer (val, len, MAKE_THUMB_ADDR (regval));
}
@@ -208,7 +208,7 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (argreg <= ARM_LAST_ARG_REGNUM)
{
/* It's an argument being passed in a general register. */
- regval = extract_address (val, partial_len);
+ regval = extract_unsigned_integer (val, partial_len);
write_register (argreg++, regval);
}
else
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index c0e2408c886..4aaf15168c9 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -1405,19 +1405,20 @@ pop_stack_item (struct stack_item *si)
we should probably support some of them based on the selected ABI. */
static CORE_ADDR
-arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
- CORE_ADDR dummy_addr, int nargs, struct value **args,
- CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
+arm_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int argnum;
int argreg;
int nstack;
struct stack_item *si = NULL;
- /* Set the return address. For the ARM, the return breakpoint is always
- at DUMMY_ADDR. */
+ /* Set the return address. For the ARM, the return breakpoint is
+ always at BP_ADDR. */
/* XXX Fix for Thumb. */
- regcache_cooked_write_unsigned (regcache, ARM_LR_REGNUM, dummy_addr);
+ regcache_cooked_write_unsigned (regcache, ARM_LR_REGNUM, bp_addr);
/* Walk through the list of args and determine how large a temporary
stack is required. Need to take care here as structs may be
@@ -1464,7 +1465,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
&& target_type != NULL
&& TYPE_CODE_FUNC == TYPE_CODE (target_type))
{
- CORE_ADDR regval = extract_address (val, len);
+ CORE_ADDR regval = extract_unsigned_integer (val, len);
if (arm_pc_is_thumb (regval))
{
val = alloca (len);
@@ -1483,7 +1484,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
{
/* The argument is being passed in a general purpose
register. */
- CORE_ADDR regval = extract_address (val, partial_len);
+ CORE_ADDR regval = extract_unsigned_integer (val, partial_len);
if (arm_debug)
fprintf_unfiltered (gdb_stdlog, "arg %d in %s = 0x%s\n",
argnum, REGISTER_NAME (argreg),
@@ -2493,7 +2494,7 @@ arm_get_longjmp_target (CORE_ADDR *pc)
INT_REGISTER_RAW_SIZE))
return 0;
- *pc = extract_address (buf, INT_REGISTER_RAW_SIZE);
+ *pc = extract_unsigned_integer (buf, INT_REGISTER_RAW_SIZE);
return 1;
}
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 4ade2ab41ec..792f3fadc76 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -324,7 +324,7 @@ avr_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
static CORE_ADDR
avr_pointer_to_address (struct type *type, const void *buf)
{
- CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
+ CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
if (TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
{
@@ -1084,7 +1084,7 @@ avr_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
while (len > 0)
{ /* there's room in registers */
len -= wordsize;
- regval = extract_address (val + len, wordsize);
+ regval = extract_unsigned_integer (val + len, wordsize);
write_register (argreg--, regval);
}
}
diff --git a/gdb/block.c b/gdb/block.c
index 3396c8aa96c..98b6ccbb84b 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -44,7 +44,7 @@ static void block_initialize_namespace (struct block *block,
Return zero otherwise. */
int
-contained_in (struct block *a, struct block *b)
+contained_in (const struct block *a, const struct block *b)
{
if (!a || !b)
return 0;
@@ -57,7 +57,7 @@ contained_in (struct block *a, struct block *b)
lexical block, described by a struct block BL. */
struct symbol *
-block_function (struct block *bl)
+block_function (const struct block *bl)
{
while (BLOCK_FUNCTION (bl) == 0 && BLOCK_SUPERBLOCK (bl) != 0)
bl = BLOCK_SUPERBLOCK (bl);
@@ -71,17 +71,18 @@ block_function (struct block *bl)
is NULL, we don't pass this information back to the caller. */
struct blockvector *
-blockvector_for_pc_sect (register CORE_ADDR pc, struct sec *section,
+blockvector_for_pc_sect (CORE_ADDR pc, struct sec *section,
int *pindex, struct symtab *symtab)
{
- register struct block *b;
- register int bot, top, half;
+ struct block *b;
+ int bot, top, half;
struct blockvector *bl;
if (symtab == 0) /* if no symtab specified by caller */
{
/* First search all symtabs for one whose file contains our pc */
- if ((symtab = find_pc_sect_symtab (pc, section)) == 0)
+ symtab = find_pc_sect_symtab (pc, section);
+ if (symtab == 0)
return 0;
}
@@ -125,7 +126,7 @@ blockvector_for_pc_sect (register CORE_ADDR pc, struct sec *section,
Backward compatibility, no section. */
struct blockvector *
-blockvector_for_pc (register CORE_ADDR pc, int *pindex)
+blockvector_for_pc (CORE_ADDR pc, int *pindex)
{
return blockvector_for_pc_sect (pc, find_pc_mapped_section (pc),
pindex, NULL);
@@ -135,9 +136,9 @@ blockvector_for_pc (register CORE_ADDR pc, int *pindex)
in the specified section, or 0 if there is none. */
struct block *
-block_for_pc_sect (register CORE_ADDR pc, struct sec *section)
+block_for_pc_sect (CORE_ADDR pc, struct sec *section)
{
- register struct blockvector *bl;
+ struct blockvector *bl;
int index;
bl = blockvector_for_pc_sect (pc, section, &index, NULL);
@@ -150,7 +151,7 @@ block_for_pc_sect (register CORE_ADDR pc, struct sec *section)
or 0 if there is none. Backward compatibility, no section. */
struct block *
-block_for_pc (register CORE_ADDR pc)
+block_for_pc (CORE_ADDR pc)
{
return block_for_pc_sect (pc, find_pc_mapped_section (pc));
}
diff --git a/gdb/block.h b/gdb/block.h
index 442fa4a86e4..8334a3bca12 100644
--- a/gdb/block.h
+++ b/gdb/block.h
@@ -187,9 +187,9 @@ struct blockvector
#define STATIC_BLOCK 1
#define FIRST_LOCAL_BLOCK 2
-extern struct symbol *block_function (struct block *);
+extern struct symbol *block_function (const struct block *);
-extern int contained_in (struct block *, struct block *);
+extern int contained_in (const struct block *, const struct block *);
extern struct blockvector *blockvector_for_pc (CORE_ADDR, int *);
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 66b319e842b..a92ae8c6660 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -6082,7 +6082,7 @@ handle_gnu_v3_exceptions (int tempflag, char *cond_string,
sals = decode_line_1 (&nameptr, 1, NULL, 0, NULL);
if (sals.nelts == 0)
{
- free (trigger_func_name);
+ xfree (trigger_func_name);
return 0;
}
@@ -6098,7 +6098,7 @@ handle_gnu_v3_exceptions (int tempflag, char *cond_string,
b->disposition = tempflag ? disp_del : disp_donttouch;
b->ops = &gnu_v3_exception_catchpoint_ops;
- free (sals.sals);
+ xfree (sals.sals);
mention (b);
return 1;
}
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 848f7ac8ade..419b24770b6 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -213,13 +213,12 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset,
struct value *vt_val;
struct symbol *wsym = (struct symbol *) NULL;
struct type *wtype;
- struct symtab *s;
struct block *block = (struct block *) NULL;
int is_this_fld;
if (msymbol != NULL)
wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block,
- VAR_DOMAIN, &is_this_fld, &s);
+ VAR_DOMAIN, &is_this_fld, NULL);
if (wsym)
{
diff --git a/gdb/config.in b/gdb/config.in
index 450051976a4..9fddbef4b51 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -257,6 +257,9 @@
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
+/* Define if you have the syscall function. */
+#undef HAVE_SYSCALL
+
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
@@ -513,6 +516,9 @@
/* Define if <thread_db.h> has the TD_NOTALLOC error code. */
#undef THREAD_DB_HAS_TD_NOTALLOC
+/* Define if we can use the tkill syscall. */
+#undef HAVE_TKILL_SYSCALL
+
/* Define to the default OS ABI for this configuration. */
#undef GDB_OSABI_DEFAULT
diff --git a/gdb/config/alpha/alpha-linux.mt b/gdb/config/alpha/alpha-linux.mt
index 25538b34589..8fe98f264b7 100644
--- a/gdb/config/alpha/alpha-linux.mt
+++ b/gdb/config/alpha/alpha-linux.mt
@@ -1,3 +1,4 @@
# Target: Little-endian Alpha
-TDEPFILES= alpha-tdep.o alpha-linux-tdep.o solib.o solib-svr4.o solib-legacy.o
+TDEPFILES= alpha-tdep.o alpha-mdebug-tdep.o alpha-linux-tdep.o \
+ solib.o solib-svr4.o solib-legacy.o
TM_FILE= tm-alphalinux.h
diff --git a/gdb/config/alpha/alpha-osf1.mt b/gdb/config/alpha/alpha-osf1.mt
index 29212c9a957..2a47bd41429 100644
--- a/gdb/config/alpha/alpha-osf1.mt
+++ b/gdb/config/alpha/alpha-osf1.mt
@@ -1,3 +1,3 @@
# Target: Little-endian Alpha
-TDEPFILES= alpha-tdep.o alpha-osf1-tdep.o
+TDEPFILES= alpha-tdep.o alpha-osf1-tdep.o alpha-mdebug-tdep.o
TM_FILE= tm-alpha.h
diff --git a/gdb/config/alpha/fbsd.mt b/gdb/config/alpha/fbsd.mt
index 4b4ecbf6235..24d2fd80b84 100644
--- a/gdb/config/alpha/fbsd.mt
+++ b/gdb/config/alpha/fbsd.mt
@@ -1,3 +1,3 @@
# Target: FreeBSD/Alpha
-TDEPFILES= alpha-tdep.o alphabsd-tdep.o alphafbsd-tdep.o
+TDEPFILES= alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o alphafbsd-tdep.o
TM_FILE= tm-fbsd.h
diff --git a/gdb/config/alpha/nbsd.mt b/gdb/config/alpha/nbsd.mt
index 7fd9c503255..065a28c9a01 100644
--- a/gdb/config/alpha/nbsd.mt
+++ b/gdb/config/alpha/nbsd.mt
@@ -1,4 +1,4 @@
# Target: Alpha running NetBSD
-TDEPFILES= alpha-tdep.o alphabsd-tdep.o alphanbsd-tdep.o corelow.o \
- nbsd-tdep.o solib.o solib-svr4.o
+TDEPFILES= alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o alphanbsd-tdep.o \
+ corelow.o nbsd-tdep.o solib.o solib-svr4.o
TM_FILE= tm-nbsd.h
diff --git a/gdb/config/alpha/nm-linux.h b/gdb/config/alpha/nm-linux.h
index 9e99b33cd1f..a6f9a49f9d6 100644
--- a/gdb/config/alpha/nm-linux.h
+++ b/gdb/config/alpha/nm-linux.h
@@ -45,6 +45,9 @@
pointer to the first register. */
#define ALPHA_REGSET_BASE(regsetp) ((long *) (regsetp))
+/* Given a pointer to a gregset_t, locate the UNIQUE value. */
+#define ALPHA_REGSET_UNIQUE(regsetp) ((long *)(regsetp) + 32)
+
/* The address of UNIQUE for ptrace. */
#define ALPHA_UNIQUE_PTRACE_ADDR 65
diff --git a/gdb/config/alpha/tm-alpha.h b/gdb/config/alpha/tm-alpha.h
index feb752a1495..9ced4f238ed 100644
--- a/gdb/config/alpha/tm-alpha.h
+++ b/gdb/config/alpha/tm-alpha.h
@@ -64,11 +64,6 @@ typedef struct alpha_extra_func_info
#define mips_extra_func_info alpha_extra_func_info
#define mips_extra_func_info_t alpha_extra_func_info_t
-
-#define PRINT_EXTRA_FRAME_INFO(fi) alpha_print_extra_frame_info ((fi))
-extern void alpha_print_extra_frame_info (struct frame_info *);
-
-
/* It takes two values to specify a frame on the ALPHA. Sigh.
In fact, at the moment, the *PC* is the primary value that sets up
diff --git a/gdb/config/alpha/tm-alphalinux.h b/gdb/config/alpha/tm-alphalinux.h
index 4858b90eba2..30ae4f756f3 100644
--- a/gdb/config/alpha/tm-alphalinux.h
+++ b/gdb/config/alpha/tm-alphalinux.h
@@ -2,8 +2,8 @@
definitions here are used when the _target_ system is running
GNU/Linux.
- Copyright 1996, 1998, 1999, 2000, 2002 Free Software Foundation,
- Inc.
+ Copyright 1996, 1998, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -27,13 +27,6 @@
#include "alpha/tm-alpha.h"
-/* Get start and end address of sigtramp handler. */
-
-extern LONGEST alpha_linux_sigtramp_offset (CORE_ADDR);
-#define SIGTRAMP_START(pc) (pc - alpha_linux_sigtramp_offset (pc))
-#define SIGTRAMP_END(pc) (SIGTRAMP_START(pc) + 3*4)
-
-
/* Number of traps that happen between exec'ing the shell to run an
inferior, and when we finally get to the inferior code. This is 2
on GNU/Linux and most implementations. */
diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h
index 4e600575045..736e0f83432 100644
--- a/gdb/config/h8300/tm-h8300.h
+++ b/gdb/config/h8300/tm-h8300.h
@@ -28,6 +28,7 @@
GDB_TARGET_IS_H8300 in remote-e7000.c */
extern int h8300hmode;
extern int h8300smode;
+extern int h8300sxmode;
#define GDB_TARGET_IS_H8300
/* Needed for remote.c */
diff --git a/gdb/config/i386/i386sol2.mt b/gdb/config/i386/i386sol2.mt
index f8fabd494b7..93c2d783538 100644
--- a/gdb/config/i386/i386sol2.mt
+++ b/gdb/config/i386/i386sol2.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running Solaris 2 (SVR4)
-TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o i386bsd-tdep.o
+TDEPFILES= i386-tdep.o i387-tdep.o i386-sol2-tdep.o
TM_FILE= tm-i386sol2.h
diff --git a/gdb/config/i386/nm-x86-64linux.h b/gdb/config/i386/nm-x86-64linux.h
index 4430fcba5db..4df2f5ddb09 100644
--- a/gdb/config/i386/nm-x86-64linux.h
+++ b/gdb/config/i386/nm-x86-64linux.h
@@ -1,7 +1,8 @@
/* Native support for GNU/Linux x86-64.
- Copyright 2001, 2002 Free Software Foundation, Inc. Contributed by
- Jiri Smid, SuSE Labs.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
@@ -20,15 +21,16 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef NM_X86_64_H
-#define NM_X86_64_H
-
-#include "config/nm-linux.h"
+#ifndef NM_X86_64_LINUX_H
+#define NM_X86_64_LINUX_H
+/* GNU/Linux supports the i386 hardware debugging registers. */
#define I386_USE_GENERIC_WATCHPOINTS
+
#include "i386/nm-i386.h"
+#include "config/nm-linux.h"
-/* Support for 8-byte wide hw watchpoints. */
+/* Support for 8-byte wide hardware watchpoints. */
#define TARGET_HAS_DR_LEN_8 1
/* Provide access to the i386 hardware debugging registers. */
@@ -50,41 +52,17 @@ extern unsigned long x86_64_linux_dr_get_status (void);
x86_64_linux_dr_get_status ()
-#define REGISTER_U_ADDR(addr, blockend, regno) \
- (addr) = x86_64_register_u_addr ((blockend),(regno));
-CORE_ADDR x86_64_register_u_addr (CORE_ADDR, int);
-
-/* Return the size of the user struct. */
-#define KERNEL_U_SIZE kernel_u_size()
-extern int kernel_u_size (void);
-
-/* Offset of the registers within the user area. */
-#define U_REGS_OFFSET 0
-
-/* This is the amount to subtract from u.u_ar0
- to get the offset in the core file of the register values. */
-#define KERNEL_U_ADDR 0x0
-
-#define PTRACE_ARG3_TYPE void*
-#define PTRACE_XFER_TYPE unsigned long
-
-
-/* We define this if link.h is available, because with ELF we use SVR4 style
- shared libraries. */
+/* Type of the third argument to the `ptrace' system call. */
+#define PTRACE_ARG3_TYPE long
-#ifdef HAVE_LINK_H
-#define SVR4_SHARED_LIBS
-#include "solib.h" /* Support for shared libraries. */
-#endif
+/* Type of the fourth argument to the `ptrace' system call. */
+#define PTRACE_XFER_TYPE long
/* Override copies of {fetch,store}_inferior_registers in `infptrace.c'. */
#define FETCH_INFERIOR_REGISTERS
+
+/* FIXME: kettenis/20030416: Why? */
#undef PREPARE_TO_PROCEED
-#include <signal.h>
-
-extern void lin_thread_get_thread_signals (sigset_t * mask);
-#define GET_THREAD_SIGNALS(mask) lin_thread_get_thread_signals (mask)
-
-#endif /* NM_X86_64.h */
+#endif /* NM_X86_64_LINUX_H */
diff --git a/gdb/config/i386/tm-x86-64linux.h b/gdb/config/i386/tm-x86-64linux.h
index 11eea93793a..4c16766f3a8 100644
--- a/gdb/config/i386/tm-x86-64linux.h
+++ b/gdb/config/i386/tm-x86-64linux.h
@@ -1,6 +1,6 @@
/* Definitions to target GDB to GNU/Linux on x86-64.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Michal Ludvig, SuSE Labs.
@@ -25,10 +25,10 @@
#define TM_X86_64LINUX_H
/* We define SVR4_SHARED_LIBS unconditionally, on the assumption that
- * link.h is available on all linux platforms. For I386 and SH3/4,
- * we hard-code the information rather than use link.h anyway (for
- * the benefit of cross-debugging). We may move to doing that for
- * other architectures as well. */
+ link.h is available on all linux platforms. For I386 and SH3/4, we
+ hard-code the information rather than use link.h anyway (for the
+ benefit of cross-debugging). We may move to doing that for other
+ architectures as well. */
#define SVR4_SHARED_LIBS
#include "solib.h" /* Support for shared libraries. */
diff --git a/gdb/config/i386/x86-64linux.mh b/gdb/config/i386/x86-64linux.mh
index 7c221ebd807..895d1fb9f3a 100644
--- a/gdb/config/i386/x86-64linux.mh
+++ b/gdb/config/i386/x86-64linux.mh
@@ -4,8 +4,9 @@ XM_FILE= xm-i386.h
NAT_FILE= nm-x86-64linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o \
- core-aout.o i386-nat.o x86-64-linux-nat.o \
- proc-service.o thread-db.o lin-lwp.o \
- linux-proc.o gcore.o
+ core-regset.o i386-nat.o x86-64-linux-nat.o \
+ proc-service.o thread-db.o lin-lwp.o linux-proc.o gcore.o
+# The dynamically loaded libthread_db needs access to symbols in the
+# gdb executable.
LOADLIBES = -ldl -rdynamic
diff --git a/gdb/config/i386/x86-64linux.mt b/gdb/config/i386/x86-64linux.mt
index d0ffb34f97a..d4484523227 100644
--- a/gdb/config/i386/x86-64linux.mt
+++ b/gdb/config/i386/x86-64linux.mt
@@ -1,6 +1,6 @@
# Target: AMD x86-64 running GNU/Linux
-TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o dwarf2cfi.o \
- i386-tdep.o i387-tdep.o \
+TDEPFILES= x86-64-tdep.o x86-64-linux-tdep.o \
+ i386-tdep.o i387-tdep.o i386-linux-tdep.o \
solib.o solib-svr4.o solib-legacy.o
GDB_MULTI_ARCH=GDB_MULTI_ARCH_TM
diff --git a/gdb/config/mips/bigmips.mt b/gdb/config/mips/bigmips.mt
deleted file mode 100644
index 38f03f2f8e4..00000000000
--- a/gdb/config/mips/bigmips.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Big-endian MIPS machine such as Sony News
-TDEPFILES= mips-tdep.o
-TM_FILE= tm-bigmips.h
diff --git a/gdb/config/mips/bigmips64.mt b/gdb/config/mips/bigmips64.mt
deleted file mode 100644
index fcb7b21dae5..00000000000
--- a/gdb/config/mips/bigmips64.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Big-endian MIPS machine such as Sony News
-TDEPFILES= mips-tdep.o
-TM_FILE= tm-bigmips64.h
diff --git a/gdb/config/mips/decstation.mt b/gdb/config/mips/decstation.mt
deleted file mode 100644
index 19847224d2f..00000000000
--- a/gdb/config/mips/decstation.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Little-endian MIPS machine such as DECstation.
-TDEPFILES= mips-tdep.o
-TM_FILE= tm-mips.h
diff --git a/gdb/config/mips/embed64.mt b/gdb/config/mips/embed64.mt
index ed60fd25031..5df6224f102 100644
--- a/gdb/config/mips/embed64.mt
+++ b/gdb/config/mips/embed64.mt
@@ -1,5 +1,5 @@
# Target: Big-endian mips board, typically an IDT.
TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
-TM_FILE= tm-embed64.h
+TM_FILE= tm-mips64.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/embedl.mt b/gdb/config/mips/embedl.mt
index 0ed8b8d5021..4d5cea8de90 100644
--- a/gdb/config/mips/embedl.mt
+++ b/gdb/config/mips/embedl.mt
@@ -1,5 +1,5 @@
# Target: Big-endian mips board, typically an IDT.
TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
-TM_FILE= tm-embedl.h
+TM_FILE= tm-mips.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/embedl64.mt b/gdb/config/mips/embedl64.mt
index 28c41be48fb..5df6224f102 100644
--- a/gdb/config/mips/embedl64.mt
+++ b/gdb/config/mips/embedl64.mt
@@ -1,5 +1,5 @@
# Target: Big-endian mips board, typically an IDT.
TDEPFILES= mips-tdep.o remote-mips.o remote-array.o
-TM_FILE= tm-embedl64.h
+TM_FILE= tm-mips64.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/littlemips.mt b/gdb/config/mips/littlemips.mt
deleted file mode 100644
index 19847224d2f..00000000000
--- a/gdb/config/mips/littlemips.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Little-endian MIPS machine such as DECstation.
-TDEPFILES= mips-tdep.o
-TM_FILE= tm-mips.h
diff --git a/gdb/config/mips/vr5000.mt b/gdb/config/mips/mips.mt
index 7a4a915a12c..2d08bcb6eff 100644
--- a/gdb/config/mips/vr5000.mt
+++ b/gdb/config/mips/mips.mt
@@ -1,5 +1,5 @@
# Target: Big-endian SIM monitor board.
TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-vr5000.h
+TM_FILE= tm-mips.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/vr4100.mt b/gdb/config/mips/mips64.mt
index c5ae4f94a6d..e6a19d8d974 100644
--- a/gdb/config/mips/vr4100.mt
+++ b/gdb/config/mips/mips64.mt
@@ -1,5 +1,5 @@
# Target: Big-endian SIM monitor board.
TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-vr4100.h
+TM_FILE= tm-mips64.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/tm-bigmips.h b/gdb/config/mips/tm-bigmips.h
deleted file mode 100644
index 7a5a6b816c1..00000000000
--- a/gdb/config/mips/tm-bigmips.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1990, 1994, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-mips.h"
diff --git a/gdb/config/mips/tm-bigmips64.h b/gdb/config/mips/tm-bigmips64.h
deleted file mode 100644
index 9f171eef11c..00000000000
--- a/gdb/config/mips/tm-bigmips64.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Target machine parameters for MIPS r4000
- Copyright 1994, 2000 Free Software Foundation, Inc.
- Contributed by Ian Lance Taylor (ian@cygnus.com)
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-mips64.h"
diff --git a/gdb/config/mips/tm-embed.h b/gdb/config/mips/tm-embed.h
index 44072f4cb38..a7a794807f0 100644
--- a/gdb/config/mips/tm-embed.h
+++ b/gdb/config/mips/tm-embed.h
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips.h"
+#include "mips/tm-mips.h"
/* Watchpoint support */
diff --git a/gdb/config/mips/tm-embed64.h b/gdb/config/mips/tm-embed64.h
deleted file mode 100644
index 630b8e02516..00000000000
--- a/gdb/config/mips/tm-embed64.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1993, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-bigmips64.h"
diff --git a/gdb/config/mips/tm-embedl.h b/gdb/config/mips/tm-embedl.h
deleted file mode 100644
index d53f5c86228..00000000000
--- a/gdb/config/mips/tm-embedl.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1993, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-mips.h"
diff --git a/gdb/config/mips/tm-embedl64.h b/gdb/config/mips/tm-embedl64.h
deleted file mode 100644
index c76c612ac9d..00000000000
--- a/gdb/config/mips/tm-embedl64.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1993, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-mips64.h"
diff --git a/gdb/config/mips/tm-irix3.h b/gdb/config/mips/tm-irix3.h
index 03c66bd9fd0..05ab07d89a2 100644
--- a/gdb/config/mips/tm-irix3.h
+++ b/gdb/config/mips/tm-irix3.h
@@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips.h"
+#include "mips/tm-mips.h"
/* Redefine register numbers for SGI. */
diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h
index d3dfdc46903..3d598c9dae1 100644
--- a/gdb/config/mips/tm-irix5.h
+++ b/gdb/config/mips/tm-irix5.h
@@ -30,9 +30,6 @@
* Irix 6 (n32 ABI) has 32-bit GP regs and 64-bit FP regs
*/
-#undef DEPRECATED_REGISTER_BYTES
-#define DEPRECATED_REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE)
-
#undef REGISTER_BYTE
#define REGISTER_BYTE(N) \
(((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
diff --git a/gdb/config/mips/tm-irix6.h b/gdb/config/mips/tm-irix6.h
index 812aed5a25d..14de12e4c4f 100644
--- a/gdb/config/mips/tm-irix6.h
+++ b/gdb/config/mips/tm-irix6.h
@@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips64.h"
+#include "mips/tm-mips64.h"
#include "solib.h"
/* Redefine register numbers for SGI. */
@@ -62,9 +62,6 @@
#define FCRIR_REGNUM 70 /* FP implementation/revision */
-#undef DEPRECATED_REGISTER_BYTES
-#define DEPRECATED_REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE)
-
#undef REGISTER_BYTE
#define REGISTER_BYTE(N) \
(((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
@@ -96,9 +93,5 @@
#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4)
#define SIGFRAME_REG_SIZE 8
-/* Select the disassembler */
-#undef TM_PRINT_INSN_MACH
-#define TM_PRINT_INSN_MACH bfd_mach_mips8000
-
/* Undefine those methods which have been multiarched. */
#undef REGISTER_VIRTUAL_TYPE
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 540db163080..7ae05a4b203 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -1,7 +1,7 @@
/* Definitions to make GDB run on a mips box under 4.3bsd.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
- 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ 1997, 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Per Bothner (bothner@cs.wisc.edu) at U.Wisconsin
and by Alessandro Forin (af@cs.cmu.edu) at CMU..
@@ -45,15 +45,7 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define STEP_SKIPS_DELAY_P (1)
#define STEP_SKIPS_DELAY(pc) (mips_step_skips_delay (pc))
-/* Say how long (ordinary) registers are. This is a piece of bogosity
- used in push_word and a few other places; REGISTER_RAW_SIZE is the
- real way to know how big a register is. */
-
-#define DEPRECATED_REGISTER_SIZE 4
-
-/* The size of a register. This is predefined in tm-mips64.h. We
- can't use DEPRECATED_REGISTER_SIZE because that is used for various other
- things. */
+/* The size of a register. This is predefined in tm-mips64.h. */
#ifndef MIPS_REGSIZE
#define MIPS_REGSIZE 4
@@ -103,11 +95,6 @@ extern int mips_step_skips_delay (CORE_ADDR);
#define PRID_REGNUM 89 /* Processor ID */
#define LAST_EMBED_REGNUM 89 /* Last one */
-/* Total amount of space needed to store our copies of the machine's
- register state, the array `registers'. */
-
-#define DEPRECATED_REGISTER_BYTES (NUM_REGS*MIPS_REGSIZE)
-
/* Index within `registers' of the first byte of the space for
register N. */
@@ -182,10 +169,6 @@ extern void mips_print_extra_frame_info (struct frame_info *frame);
#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)
extern struct frame_info *setup_arbitrary_frame (int, CORE_ADDR *);
-/* Select the default mips disassembler */
-
-#define TM_PRINT_INSN_MACH 0
-
/* These are defined in mdebugread.c and are used in mips-tdep.c */
extern CORE_ADDR sigtramp_address, sigtramp_end;
extern void fixup_sigtramp (void);
@@ -197,22 +180,12 @@ extern char *mips_read_processor_type (void);
#define IGNORE_HELPER_CALL(pc) mips_ignore_helper (pc)
extern int mips_ignore_helper (CORE_ADDR pc);
-#ifndef TARGET_MIPS
-#define TARGET_MIPS
-#endif
-
/* Definitions and declarations used by mips-tdep.c and remote-mips.c */
#define MIPS_INSTLEN 4 /* Length of an instruction */
#define MIPS16_INSTLEN 2 /* Length of an instruction on MIPS16 */
#define MIPS_NUMREGS 32 /* Number of integer or float registers */
typedef unsigned long t_inst; /* Integer big enough to hold an instruction */
-/* MIPS16 function addresses are odd (bit 0 is set). Here are some
- macros to test, set, or clear bit 0 of addresses. */
-#define IS_MIPS16_ADDR(addr) ((addr) & 1)
-#define MAKE_MIPS16_ADDR(addr) ((addr) | 1)
-#define UNMAKE_MIPS16_ADDR(addr) ((addr) & ~1)
-
#endif /* TM_MIPS_H */
/* Command to set the processor type. */
diff --git a/gdb/config/mips/tm-mipsv4.h b/gdb/config/mips/tm-mipsv4.h
index ebf671bd54a..37f9e464790 100644
--- a/gdb/config/mips/tm-mipsv4.h
+++ b/gdb/config/mips/tm-mipsv4.h
@@ -18,7 +18,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips.h"
+#include "mips/tm-mips.h"
#include "config/tm-sysv4.h"
/* The signal handler trampoline is called _sigtramp. */
diff --git a/gdb/config/mips/tm-tx39.h b/gdb/config/mips/tm-tx39.h
index d095db0668f..81f3b6ddc41 100644
--- a/gdb/config/mips/tm-tx39.h
+++ b/gdb/config/mips/tm-tx39.h
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-bigmips.h"
+#include "mips/tm-mips.h"
#undef MIPS_REGISTER_NAMES
#define MIPS_REGISTER_NAMES \
diff --git a/gdb/config/mips/tm-vr4100.h b/gdb/config/mips/tm-vr4100.h
deleted file mode 100644
index 9c4472b0510..00000000000
--- a/gdb/config/mips/tm-vr4100.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1998, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-bigmips64.h"
diff --git a/gdb/config/mips/tm-vr4300.h b/gdb/config/mips/tm-vr4300.h
deleted file mode 100644
index 728c73135e5..00000000000
--- a/gdb/config/mips/tm-vr4300.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1993, 1995, 1996, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-bigmips64.h"
diff --git a/gdb/config/mips/tm-vr4300el.h b/gdb/config/mips/tm-vr4300el.h
deleted file mode 100644
index e7e56805dfb..00000000000
--- a/gdb/config/mips/tm-vr4300el.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1993, 1995, 1996, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-mips64.h"
diff --git a/gdb/config/mips/tm-vr4xxx.h b/gdb/config/mips/tm-vr4xxx.h
deleted file mode 100644
index 9c4472b0510..00000000000
--- a/gdb/config/mips/tm-vr4xxx.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1998, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-bigmips64.h"
diff --git a/gdb/config/mips/tm-vr4xxxel.h b/gdb/config/mips/tm-vr4xxxel.h
deleted file mode 100644
index 7f2e4cd2d04..00000000000
--- a/gdb/config/mips/tm-vr4xxxel.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1998, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-mips64.h"
diff --git a/gdb/config/mips/tm-vr5000.h b/gdb/config/mips/tm-vr5000.h
deleted file mode 100644
index 0d68345d093..00000000000
--- a/gdb/config/mips/tm-vr5000.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1996, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-bigmips64.h"
diff --git a/gdb/config/mips/tm-vr5000el.h b/gdb/config/mips/tm-vr5000el.h
deleted file mode 100644
index 7fae087d24b..00000000000
--- a/gdb/config/mips/tm-vr5000el.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 1996, 2000 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "mips/tm-mips64.h"
diff --git a/gdb/config/mips/tx39l.mt b/gdb/config/mips/tx39l.mt
index 35083293d45..8b4c1a92c24 100644
--- a/gdb/config/mips/tx39l.mt
+++ b/gdb/config/mips/tx39l.mt
@@ -1,5 +1,5 @@
# Target: Big-endian mips board, typically an IDT.
TDEPFILES= mips-tdep.o remote-mips.o dve3900-rom.o monitor.o dsrec.o
-TM_FILE= tm-tx39l.h
+TM_FILE= tm-tx39.h
SIM_OBS = remote-sim.o
SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/vr4300.mt b/gdb/config/mips/vr4300.mt
deleted file mode 100644
index 22cb25eb425..00000000000
--- a/gdb/config/mips/vr4300.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Target: Big-endian SIM monitor board.
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-vr4300.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/vr4300el.mt b/gdb/config/mips/vr4300el.mt
deleted file mode 100644
index cff7241597b..00000000000
--- a/gdb/config/mips/vr4300el.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Target: Little-endian SIM monitor board.
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-vr4300el.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/vr4xxx.mt b/gdb/config/mips/vr4xxx.mt
deleted file mode 100644
index 4c79ec7552d..00000000000
--- a/gdb/config/mips/vr4xxx.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Target: Big-endian SIM monitor board.
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-vr4xxx.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/vr4xxxel.mt b/gdb/config/mips/vr4xxxel.mt
deleted file mode 100644
index 5124dd75461..00000000000
--- a/gdb/config/mips/vr4xxxel.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Target: Big-endian SIM monitor board.
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-vr4xxxel.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/mips/vr5000el.mt b/gdb/config/mips/vr5000el.mt
deleted file mode 100644
index 99687edcefc..00000000000
--- a/gdb/config/mips/vr5000el.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Target: Little-endian SIM monitor board.
-TDEPFILES= mips-tdep.o remote-mips.o
-TM_FILE= tm-vr5000el.h
-SIM_OBS = remote-sim.o
-SIM = ../sim/mips/libsim.a
diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h
index f8a2a117fa2..74bfa206d85 100644
--- a/gdb/config/pa/nm-hppah.h
+++ b/gdb/config/pa/nm-hppah.h
@@ -55,8 +55,8 @@
/* While this is for use by threaded programs, it doesn't appear
* to hurt non-threaded ones. This is used in infrun.c: */
-#define PREPARE_TO_PROCEED(select_it) hppa_prepare_to_proceed()
-extern int hppa_prepare_to_proceed (void);
+#define PREPARE_TO_PROCEED(select_it) generic_prepare_to_proceed(select_it)
+extern int generic_prepare_to_proceed (int select_it);
/* In infptrace.c or infttrace.c: */
#define CHILD_PID_TO_EXEC_FILE
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index 988b790561f..afc87fa48a5 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -45,19 +45,6 @@ struct value;
struct type;
struct inferior_status;
-/* Get at various relevent fields of an instruction word. */
-
-#define MASK_5 0x1f
-#define MASK_11 0x7ff
-#define MASK_14 0x3fff
-#define MASK_21 0x1fffff
-
-/* This macro gets bit fields using HP's numbering (MSB = 0) */
-#ifndef GET_FIELD
-#define GET_FIELD(X, FROM, TO) \
- ((X) >> (31 - (TO)) & ((1 << ((TO) - (FROM) + 1)) - 1))
-#endif
-
/* Sequence of bytes for breakpoint instruction. */
const unsigned char *hppa_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr);
@@ -121,27 +108,6 @@ extern int hppa_pc_requires_run_before_use (CORE_ADDR pc);
#define ARG2_REGNUM 24 /* The third argument of a callee. */
#define ARG3_REGNUM 23 /* The fourth argument of a callee. */
-/*
- * Processor Status Word Masks
- */
-
-#define PSW_T 0x01000000 /* Taken Branch Trap Enable */
-#define PSW_H 0x00800000 /* Higher-Privilege Transfer Trap Enable */
-#define PSW_L 0x00400000 /* Lower-Privilege Transfer Trap Enable */
-#define PSW_N 0x00200000 /* PC Queue Front Instruction Nullified */
-#define PSW_X 0x00100000 /* Data Memory Break Disable */
-#define PSW_B 0x00080000 /* Taken Branch in Previous Cycle */
-#define PSW_C 0x00040000 /* Code Address Translation Enable */
-#define PSW_V 0x00020000 /* Divide Step Correction */
-#define PSW_M 0x00010000 /* High-Priority Machine Check Disable */
-#define PSW_CB 0x0000ff00 /* Carry/Borrow Bits */
-#define PSW_R 0x00000010 /* Recovery Counter Enable */
-#define PSW_Q 0x00000008 /* Interruption State Collection Enable */
-#define PSW_P 0x00000004 /* Protection ID Validation Enable */
-#define PSW_D 0x00000002 /* Data Address Translation Enable */
-#define PSW_I 0x00000001 /* External, Power Failure, Low-Priority */
- /* Machine Check Interruption Enable */
-
/* When fetching register values from an inferior or a core file,
clean them up using this macro. BUF is a char pointer to
the raw value of the register in the registers[] array. */
@@ -185,9 +151,6 @@ extern void hppa_frame_init_saved_regs (struct frame_info *);
#define INSTRUCTION_SIZE 4
-/* Non-level zero PA's have space registers (but they don't always have
- floating-point, do they???? */
-
/* This sequence of words is the instructions
; Call stack frame has already been built by gdb. Since we could be calling
@@ -250,14 +213,6 @@ extern void hppa_frame_init_saved_regs (struct frame_info *);
avoid the kernel bug. The second NOP is needed to keep the call
dummy 8 byte aligned. */
-/* Define offsets into the call dummy for the target function address */
-#define FUNC_LDIL_OFFSET (INSTRUCTION_SIZE * 9)
-#define FUNC_LDO_OFFSET (INSTRUCTION_SIZE * 10)
-
-/* Define offsets into the call dummy for the _sr4export address */
-#define SR4EXPORT_LDIL_OFFSET (INSTRUCTION_SIZE * 12)
-#define SR4EXPORT_LDO_OFFSET (INSTRUCTION_SIZE * 13)
-
#define CALL_DUMMY {0x4BDA3FB9, 0x4BD93FB1, 0x4BD83FA9, 0x4BD73FA1,\
0x37C13FB9, 0x24201004, 0x2C391005, 0x24311006,\
0x2C291007, 0x22C00000, 0x36D60000, 0x02C010A4,\
@@ -352,25 +307,6 @@ struct unwind_table_entry
"converts" them into normal unwind entries using some of the reserved
fields to store the stub type. */
-struct stub_unwind_entry
- {
- /* The offset within the executable for the associated stub. */
- unsigned stub_offset;
-
- /* The type of stub this unwind entry describes. */
- char type;
-
- /* Unknown. Not needed by GDB at this time. */
- char prs_info;
-
- /* Length (in instructions) of the associated stub. */
- short stub_length;
- };
-
-/* Sizes (in bytes) of the native unwind entries. */
-#define UNWIND_ENTRY_SIZE 16
-#define STUB_UNWIND_ENTRY_SIZE 8
-
/* The gaps represent linker stubs used in MPE and space for future
expansion. */
enum unwind_stub_types
diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h
index 6d39ed0c6a4..a3cc4bedcbd 100644
--- a/gdb/config/pa/tm-hppa64.h
+++ b/gdb/config/pa/tm-hppa64.h
@@ -35,9 +35,14 @@ struct frame_info;
the conversion for hppa64 hasn't been completed yet. */
#define GDB_MULTI_ARCH 0
-/* FIXME: brobecker 2003-04-21: All the definition from this point until
- the include of pa/tm-hppah.h are extracted from tm-hppa.h. They have
- been temporarily moved here, until hppa64 is multiarched too. */
+/* FIXME: brobecker 2003-05-22: All the definition from this point until
+ the include of pa/tm-hppah.h are extracted from tm-hppa.h and tm-hppah.h.
+ They have been temporarily moved here, until hppa64 is multiarched too. */
+
+#if !GDB_MULTI_ARCH
+extern int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
+#define PC_IN_SIGTRAMP(pc, name) hppa_hpux_pc_in_sigtramp (pc, name)
+#endif
#if !GDB_MULTI_ARCH
extern int hppa_reg_struct_has_addr (int gcc_p, struct type *type);
diff --git a/gdb/config/pa/tm-hppah.h b/gdb/config/pa/tm-hppah.h
index 290f752d0a3..345baafb4dc 100644
--- a/gdb/config/pa/tm-hppah.h
+++ b/gdb/config/pa/tm-hppah.h
@@ -35,11 +35,6 @@ struct frame_info;
#include "somsolib.h"
#endif
-#if !GDB_MULTI_ARCH
-extern int hppa_hpux_pc_in_sigtramp (CORE_ADDR pc, char *name);
-#define PC_IN_SIGTRAMP(pc, name) hppa_hpux_pc_in_sigtramp (pc, name)
-#endif
-
extern void hppa_hpux_frame_saved_pc_in_sigtramp (struct frame_info *fi,
CORE_ADDR *tmp);
#define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
diff --git a/gdb/config/powerpc/tm-linux.h b/gdb/config/powerpc/tm-linux.h
index d69dfc1f5bf..eba57c0f411 100644
--- a/gdb/config/powerpc/tm-linux.h
+++ b/gdb/config/powerpc/tm-linux.h
@@ -26,6 +26,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef SKIP_TRAMPOLINE_CODE
#include "config/tm-linux.h"
+/* We've multi-arched these. (Note that this completely undoes the
+ effect of config/tm-linux.h #including config/tm-sysv4.h.) */
+#undef IN_SOLIB_CALL_TRAMPOLINE
+#undef SKIP_TRAMPOLINE_CODE
+
/* We can single step on linux */
#undef SOFTWARE_SINGLE_STEP
#define SOFTWARE_SINGLE_STEP(p,q) internal_error (__FILE__, __LINE__, "Will never execute!")
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index e51eb63217d..16f94db182c 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -277,7 +277,7 @@ extern void sparc32_store_return_value (struct type *, struct regcache *,
#define EXTRACT_STRUCT_VALUE_ADDRESS(REGCACHE) \
sparc_extract_struct_value_address (REGCACHE)
-extern CORE_ADDR sparc_extract_struct_value_address (char *);
+extern CORE_ADDR sparc_extract_struct_value_address (struct regcache *);
/* Stack must be aligned on 64-bit boundaries when synthesizing
function calls (128-bit for sparc64). */
diff --git a/gdb/configure b/gdb/configure
index 207381adefb..11699a278a0 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -6602,10 +6602,65 @@ else
fi
done
+for ac_func in syscall
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6609: 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 6614 "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:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
if test "$cross_compiling" = no; then
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:6609: checking whether setpgrp takes no argument" >&5
+echo "configure:6664: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6613,7 +6668,7 @@ else
{ echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 6617 "configure"
+#line 6672 "configure"
#include "confdefs.h"
#ifdef HAVE_UNISTD_H
@@ -6633,7 +6688,7 @@ main()
}
EOF
-if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setpgrp_void=no
else
@@ -6658,12 +6713,12 @@ fi
else
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:6662: checking whether setpgrp takes no argument" >&5
+echo "configure:6717: checking whether setpgrp takes no argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6667 "configure"
+#line 6722 "configure"
#include "confdefs.h"
#include <unistd.h>
@@ -6677,7 +6732,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_setpgrp_void=no
else
@@ -6701,12 +6756,12 @@ fi
# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
# since sigsetjmp might only be defined as a macro.
echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:6705: checking for sigsetjmp" >&5
+echo "configure:6760: checking for sigsetjmp" >&5
if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6710 "configure"
+#line 6765 "configure"
#include "confdefs.h"
#include <setjmp.h>
@@ -6715,7 +6770,7 @@ int main() {
sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
; return 0; }
EOF
-if { (eval echo configure:6719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_func_sigsetjmp=yes
else
@@ -6741,12 +6796,12 @@ gdb_use_included_regex=yes
# However, if the system regex is GNU regex, then default to *not*
# using the included regex.
echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:6745: checking for GNU regex" >&5
+echo "configure:6800: checking for GNU regex" >&5
if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6750 "configure"
+#line 6805 "configure"
#include "confdefs.h"
#include <gnu-versions.h>
int main() {
@@ -6756,7 +6811,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:6760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_gnu_regex=yes
else
@@ -6791,19 +6846,19 @@ fi
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:6795: checking for r_fs in struct reg" >&5
+echo "configure:6850: checking for r_fs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6800 "configure"
+#line 6855 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_fs;
; return 0; }
EOF
-if { (eval echo configure:6807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_fs=yes
else
@@ -6823,19 +6878,19 @@ EOF
fi
echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:6827: checking for r_gs in struct reg" >&5
+echo "configure:6882: checking for r_gs in struct reg" >&5
if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6832 "configure"
+#line 6887 "configure"
#include "confdefs.h"
#include <machine/reg.h>
int main() {
struct reg r; r.r_gs;
; return 0; }
EOF
-if { (eval echo configure:6839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_struct_reg_r_gs=yes
else
@@ -6857,19 +6912,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:6861: checking for PTRACE_GETREGS" >&5
+echo "configure:6916: checking for PTRACE_GETREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6866 "configure"
+#line 6921 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETREGS;
; return 0; }
EOF
-if { (eval echo configure:6873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getregs=yes
else
@@ -6891,19 +6946,19 @@ fi
# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:6895: checking for PTRACE_GETFPXREGS" >&5
+echo "configure:6950: checking for PTRACE_GETFPXREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6900 "configure"
+#line 6955 "configure"
#include "confdefs.h"
#include <sys/ptrace.h>
int main() {
PTRACE_GETFPXREGS;
; return 0; }
EOF
-if { (eval echo configure:6907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_ptrace_getfpxregs=yes
else
@@ -6925,12 +6980,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:6929: checking for PT_GETDBREGS" >&5
+echo "configure:6984: checking for PT_GETDBREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6934 "configure"
+#line 6989 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -6938,7 +6993,7 @@ int main() {
PT_GETDBREGS;
; return 0; }
EOF
-if { (eval echo configure:6942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getdbregs=yes
else
@@ -6960,12 +7015,12 @@ fi
# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
-echo "configure:6964: checking for PT_GETXMMREGS" >&5
+echo "configure:7019: checking for PT_GETXMMREGS" >&5
if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6969 "configure"
+#line 7024 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -6973,7 +7028,7 @@ int main() {
PT_GETXMMREGS;
; return 0; }
EOF
-if { (eval echo configure:6977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_pt_getxmmregs=yes
else
@@ -6996,19 +7051,19 @@ fi
# See if stdint.h provides the uintptr_t type.
# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
-echo "configure:7000: checking for uintptr_t in stdint.h" >&5
+echo "configure:7055: checking for uintptr_t in stdint.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7005 "configure"
+#line 7060 "configure"
#include "confdefs.h"
#include <stdint.h>
int main() {
uintptr_t foo = 0;
; return 0; }
EOF
-if { (eval echo configure:7012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_uintptr_t=yes
else
@@ -7030,12 +7085,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:7034: checking whether malloc must be declared" >&5
+echo "configure:7089: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7039 "configure"
+#line 7094 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7056,7 +7111,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:7060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -7077,12 +7132,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:7081: checking whether realloc must be declared" >&5
+echo "configure:7136: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7086 "configure"
+#line 7141 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7103,7 +7158,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:7107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -7124,12 +7179,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:7128: checking whether free must be declared" >&5
+echo "configure:7183: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7133 "configure"
+#line 7188 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7150,7 +7205,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:7154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -7171,12 +7226,12 @@ EOF
fi
echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:7175: checking whether strerror must be declared" >&5
+echo "configure:7230: checking whether strerror must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7180 "configure"
+#line 7235 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7197,7 +7252,7 @@ int main() {
char *(*pfn) = (char *(*)) strerror
; return 0; }
EOF
-if { (eval echo configure:7201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strerror=no
else
@@ -7218,12 +7273,12 @@ EOF
fi
echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:7222: checking whether strdup must be declared" >&5
+echo "configure:7277: checking whether strdup must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7227 "configure"
+#line 7282 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7244,7 +7299,7 @@ int main() {
char *(*pfn) = (char *(*)) strdup
; return 0; }
EOF
-if { (eval echo configure:7248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strdup=no
else
@@ -7265,12 +7320,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:7269: checking whether strstr must be declared" >&5
+echo "configure:7324: checking whether strstr must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7274 "configure"
+#line 7329 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7291,7 +7346,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:7295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -7312,12 +7367,12 @@ EOF
fi
echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:7316: checking whether canonicalize_file_name must be declared" >&5
+echo "configure:7371: checking whether canonicalize_file_name must be declared" >&5
if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7321 "configure"
+#line 7376 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -7338,7 +7393,7 @@ int main() {
char *(*pfn) = (char *(*)) canonicalize_file_name
; return 0; }
EOF
-if { (eval echo configure:7342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_canonicalize_file_name=no
else
@@ -7364,9 +7419,9 @@ fi
# could be expunged. --jsm 1999-03-22
echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:7368: checking for HPUX save_state structure" >&5
+echo "configure:7423: checking for HPUX save_state structure" >&5
cat > conftest.$ac_ext <<EOF
-#line 7370 "configure"
+#line 7425 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -7381,7 +7436,7 @@ fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
-#line 7385 "configure"
+#line 7440 "configure"
#include "confdefs.h"
#include <machine/save_state.h>
EOF
@@ -7451,12 +7506,12 @@ fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7455: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:7510: checking for pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7460 "configure"
+#line 7515 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7465,7 +7520,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:7469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -7487,12 +7542,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7491: checking for prrun_t in sys/procfs.h" >&5
+echo "configure:7546: checking for prrun_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7496 "configure"
+#line 7551 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7501,7 +7556,7 @@ int main() {
prrun_t avar
; return 0; }
EOF
-if { (eval echo configure:7505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prrun_t=yes
else
@@ -7523,12 +7578,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7527: checking for gregset_t in sys/procfs.h" >&5
+echo "configure:7582: checking for gregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7532 "configure"
+#line 7587 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7537,7 +7592,7 @@ int main() {
gregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_gregset_t=yes
else
@@ -7559,12 +7614,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7563: checking for fpregset_t in sys/procfs.h" >&5
+echo "configure:7618: checking for fpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7568 "configure"
+#line 7623 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7573,7 +7628,7 @@ int main() {
fpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_fpregset_t=yes
else
@@ -7595,12 +7650,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7599: checking for prgregset_t in sys/procfs.h" >&5
+echo "configure:7654: checking for prgregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7604 "configure"
+#line 7659 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7609,7 +7664,7 @@ int main() {
prgregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset_t=yes
else
@@ -7631,12 +7686,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7635: checking for prfpregset_t in sys/procfs.h" >&5
+echo "configure:7690: checking for prfpregset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7640 "configure"
+#line 7695 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7645,7 +7700,7 @@ int main() {
prfpregset_t avar
; return 0; }
EOF
-if { (eval echo configure:7649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset_t=yes
else
@@ -7667,12 +7722,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7671: checking for prgregset32_t in sys/procfs.h" >&5
+echo "configure:7726: checking for prgregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7676 "configure"
+#line 7731 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7681,7 +7736,7 @@ int main() {
prgregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:7685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prgregset32_t=yes
else
@@ -7703,12 +7758,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7707: checking for prfpregset32_t in sys/procfs.h" >&5
+echo "configure:7762: checking for prfpregset32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7712 "configure"
+#line 7767 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7717,7 +7772,7 @@ int main() {
prfpregset32_t avar
; return 0; }
EOF
-if { (eval echo configure:7721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
else
@@ -7739,12 +7794,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7743: checking for lwpid_t in sys/procfs.h" >&5
+echo "configure:7798: checking for lwpid_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7748 "configure"
+#line 7803 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7753,7 +7808,7 @@ int main() {
lwpid_t avar
; return 0; }
EOF
-if { (eval echo configure:7757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpid_t=yes
else
@@ -7775,12 +7830,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7779: checking for psaddr_t in sys/procfs.h" >&5
+echo "configure:7834: checking for psaddr_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7784 "configure"
+#line 7839 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7789,7 +7844,7 @@ int main() {
psaddr_t avar
; return 0; }
EOF
-if { (eval echo configure:7793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psaddr_t=yes
else
@@ -7811,12 +7866,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7815: checking for prsysent_t in sys/procfs.h" >&5
+echo "configure:7870: checking for prsysent_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7820 "configure"
+#line 7875 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7825,7 +7880,7 @@ int main() {
prsysent_t avar
; return 0; }
EOF
-if { (eval echo configure:7829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prsysent_t=yes
else
@@ -7847,12 +7902,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7851: checking for pr_sigset_t in sys/procfs.h" >&5
+echo "configure:7906: checking for pr_sigset_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7856 "configure"
+#line 7911 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7861,7 +7916,7 @@ int main() {
pr_sigset_t avar
; return 0; }
EOF
-if { (eval echo configure:7865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
else
@@ -7883,12 +7938,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7887: checking for pr_sigaction64_t in sys/procfs.h" >&5
+echo "configure:7942: checking for pr_sigaction64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7892 "configure"
+#line 7947 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7897,7 +7952,7 @@ int main() {
pr_sigaction64_t avar
; return 0; }
EOF
-if { (eval echo configure:7901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
else
@@ -7919,12 +7974,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7923: checking for pr_siginfo64_t in sys/procfs.h" >&5
+echo "configure:7978: checking for pr_siginfo64_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7928 "configure"
+#line 7983 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -7933,7 +7988,7 @@ int main() {
pr_siginfo64_t avar
; return 0; }
EOF
-if { (eval echo configure:7937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
else
@@ -7960,7 +8015,7 @@ EOF
if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:7964: checking whether prfpregset_t type is broken" >&5
+echo "configure:8019: checking whether prfpregset_t type is broken" >&5
if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7968,7 +8023,7 @@ else
gdb_cv_prfpregset_t_broken=yes
else
cat > conftest.$ac_ext <<EOF
-#line 7972 "configure"
+#line 8027 "configure"
#include "confdefs.h"
#include <sys/procfs.h>
int main ()
@@ -7978,7 +8033,7 @@ else
return 0;
}
EOF
-if { (eval echo configure:7982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_prfpregset_t_broken=no
else
@@ -8003,12 +8058,12 @@ EOF
echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:8007: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+echo "configure:8062: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8012 "configure"
+#line 8067 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <sys/types.h>
@@ -8021,7 +8076,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_procfs_piocset=yes
else
@@ -8045,19 +8100,19 @@ fi
if test ${host} = ${target} ; then
echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:8049: checking for member l_addr in struct link_map" >&5
+echo "configure:8104: checking for member l_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8054 "configure"
+#line 8109 "configure"
#include "confdefs.h"
#include <link.h>
int main() {
struct link_map lm; (void) lm.l_addr;
; return 0; }
EOF
-if { (eval echo configure:8061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_l_members=yes
else
@@ -8079,12 +8134,12 @@ EOF
echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:8083: checking for member lm_addr in struct link_map" >&5
+echo "configure:8138: checking for member lm_addr in struct link_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8088 "configure"
+#line 8143 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <link.h>
@@ -8092,7 +8147,7 @@ int main() {
struct link_map lm; (void) lm.lm_addr;
; return 0; }
EOF
-if { (eval echo configure:8096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map_with_lm_members=yes
else
@@ -8114,12 +8169,12 @@ EOF
echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:8118: checking for member som_addr in struct so_map" >&5
+echo "configure:8173: checking for member som_addr in struct so_map" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8123 "configure"
+#line 8178 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_NLIST_H
@@ -8130,7 +8185,7 @@ int main() {
struct so_map lm; (void) lm.som_addr;
; return 0; }
EOF
-if { (eval echo configure:8134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_so_map_with_som_members=yes
else
@@ -8152,12 +8207,12 @@ EOF
echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:8156: checking for struct link_map32 in sys/link.h" >&5
+echo "configure:8211: checking for struct link_map32 in sys/link.h" >&5
if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8161 "configure"
+#line 8216 "configure"
#include "confdefs.h"
#define _SYSCALL32
#include <sys/link.h>
@@ -8165,7 +8220,7 @@ int main() {
struct link_map32 l;
; return 0; }
EOF
-if { (eval echo configure:8169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_struct_link_map32=yes
else
@@ -8192,12 +8247,12 @@ fi
echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:8196: checking for long long support in compiler" >&5
+echo "configure:8251: checking for long long support in compiler" >&5
if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8201 "configure"
+#line 8256 "configure"
#include "confdefs.h"
int main() {
@@ -8207,7 +8262,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_c_long_long=yes
else
@@ -8229,7 +8284,7 @@ fi
echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:8233: checking for long long support in printf" >&5
+echo "configure:8288: checking for long long support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8237,7 +8292,7 @@ else
gdb_cv_printf_has_long_long=no
else
cat > conftest.$ac_ext <<EOF
-#line 8241 "configure"
+#line 8296 "configure"
#include "confdefs.h"
int main () {
@@ -8251,7 +8306,7 @@ int main () {
return (strcmp ("0x0123456789abcdef", buf));
}
EOF
-if { (eval echo configure:8255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_long=yes
else
@@ -8275,19 +8330,19 @@ echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:8279: checking for long double support in compiler" >&5
+echo "configure:8334: checking for long double support in compiler" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8284 "configure"
+#line 8339 "configure"
#include "confdefs.h"
int main() {
long double foo;
; return 0; }
EOF
-if { (eval echo configure:8291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_double=yes
else
@@ -8309,7 +8364,7 @@ fi
echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:8313: checking for long double support in printf" >&5
+echo "configure:8368: checking for long double support in printf" >&5
if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8317,7 +8372,7 @@ else
gdb_cv_printf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 8321 "configure"
+#line 8376 "configure"
#include "confdefs.h"
int main () {
@@ -8327,7 +8382,7 @@ int main () {
return (strncmp ("3.14159", buf, 7));
}
EOF
-if { (eval echo configure:8331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_printf_has_long_double=yes
else
@@ -8351,7 +8406,7 @@ echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:8355: checking for long double support in scanf" >&5
+echo "configure:8410: checking for long double support in scanf" >&5
if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8359,7 +8414,7 @@ else
gdb_cv_scanf_has_long_double=no
else
cat > conftest.$ac_ext <<EOF
-#line 8363 "configure"
+#line 8418 "configure"
#include "confdefs.h"
int main () {
@@ -8369,7 +8424,7 @@ int main () {
return !(f > 3.14159 && f < 3.14160);
}
EOF
-if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:8428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gdb_cv_scanf_has_long_double=yes
else
@@ -8394,7 +8449,7 @@ echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
case ${host_os} in
aix*)
echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:8398: checking for -bbigtoc option" >&5
+echo "configure:8453: checking for -bbigtoc option" >&5
if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8408,14 +8463,14 @@ else
LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
cat > conftest.$ac_ext <<EOF
-#line 8412 "configure"
+#line 8467 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:8419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
:
else
echo "configure: failed program was:" >&5
@@ -8438,7 +8493,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
case ${host_os} in
hpux*)
echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:8442: checking for HPUX/OSF thread support" >&5
+echo "configure:8497: checking for HPUX/OSF thread support" >&5
if test -f /usr/include/dce/cma_config.h ; then
if test "$GCC" = "yes" ; then
echo "$ac_t""yes" 1>&6
@@ -8461,7 +8516,7 @@ EOF
# because version 0 (present on Solaris 2.4 or earlier) doesn't have
# the same API.
echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:8465: checking for Solaris thread debugging library" >&5
+echo "configure:8520: checking for Solaris thread debugging library" >&5
if test -f /usr/lib/libthread_db.so.1 ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -8471,7 +8526,7 @@ EOF
CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:8475: checking for dlopen in -ldl" >&5
+echo "configure:8530: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -8479,7 +8534,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 8483 "configure"
+#line 8538 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -8490,7 +8545,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:8494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -8522,17 +8577,17 @@ fi
# all symbols visible in the dynamic symbol table.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:8526: checking for the ld -export-dynamic flag" >&5
+echo "configure:8581: checking for the ld -export-dynamic flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
cat > conftest.$ac_ext <<EOF
-#line 8529 "configure"
+#line 8584 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:8536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -8551,13 +8606,13 @@ rm -f conftest*
# Sun randomly tweaked the prototypes in <proc_service.h>
# at one point.
echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:8555: checking if <proc_service.h> is old" >&5
+echo "configure:8610: checking if <proc_service.h> is old" >&5
if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8561 "configure"
+#line 8616 "configure"
#include "confdefs.h"
#include <proc_service.h>
@@ -8568,7 +8623,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:8572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_proc_service_is_old=no
else
@@ -8594,12 +8649,12 @@ EOF
;;
aix*)
echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
-echo "configure:8598: checking for AiX thread debugging library" >&5
+echo "configure:8653: checking for AiX thread debugging library" >&5
if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8603 "configure"
+#line 8658 "configure"
#include "confdefs.h"
#include <sys/pthdebug.h>
int main() {
@@ -8608,7 +8663,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:8612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_have_aix_thread_debug=yes
else
@@ -8633,19 +8688,19 @@ fi
if test "x$ac_cv_header_thread_db_h" = "xyes"; then
echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
-echo "configure:8637: checking whether <thread_db.h> has TD_NOTALLOC" >&5
+echo "configure:8692: checking whether <thread_db.h> has TD_NOTALLOC" >&5
if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8642 "configure"
+#line 8697 "configure"
#include "confdefs.h"
#include <thread_db.h>
int main() {
int i = TD_NOTALLOC;
; return 0; }
EOF
-if { (eval echo configure:8649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gdb_cv_thread_db_h_has_td_notalloc=yes
else
@@ -8668,6 +8723,43 @@ EOF
fi
+if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
+ echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
+echo "configure:8729: checking whether <sys/syscall.h> has __NR_tkill" >&5
+if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 8734 "configure"
+#include "confdefs.h"
+#include <sys/syscall.h>
+int main() {
+int i = __NR_tkill;
+; return 0; }
+EOF
+if { (eval echo configure:8741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdb_cv_sys_syscall_h_has_tkill=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gdb_cv_sys_syscall_h_has_tkill=no
+
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
+fi
+if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_TKILL_SYSCALL 1
+EOF
+
+fi
+
# Check whether --with-sysroot or --without-sysroot was given.
if test "${with_sysroot+set}" = set; then
@@ -8756,7 +8848,7 @@ WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
then
echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:8760: checking compiler warning flags" >&5
+echo "configure:8852: checking compiler warning flags" >&5
# Separate out the -Werror flag as some files just cannot be
# compiled with it enabled.
for w in ${build_warnings}; do
@@ -8766,14 +8858,14 @@ echo "configure:8760: checking compiler warning flags" >&5
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $w"
cat > conftest.$ac_ext <<EOF
-#line 8770 "configure"
+#line 8862 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:8777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
WARN_CFLAGS="${WARN_CFLAGS} $w"
else
@@ -8821,12 +8913,12 @@ fi
# In the Cygwin environment, we need some additional flags.
echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:8825: checking for cygwin" >&5
+echo "configure:8917: checking for cygwin" >&5
if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8830 "configure"
+#line 8922 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
@@ -8904,7 +8996,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:8908: checking for Tcl configuration" >&5
+echo "configure:9000: checking for Tcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9013,7 +9105,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:9017: checking for Tk configuration" >&5
+echo "configure:9109: checking for Tk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9122,7 +9214,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:9126: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:9218: checking for Tcl private headers. dir=${configdir}" >&5
# Check whether --with-tclinclude or --without-tclinclude was given.
if test "${with_tclinclude+set}" = set; then
withval="$with_tclinclude"
@@ -9188,17 +9280,17 @@ fi
if test x"${ac_cv_c_tclh}" = x ; then
ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:9192: checking for tclInt.h" >&5
+echo "configure:9284: checking for tclInt.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9197 "configure"
+#line 9289 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9294: \"$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*
@@ -9258,7 +9350,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:9262: checking for Tk private headers" >&5
+echo "configure:9354: checking for Tk private headers" >&5
# Check whether --with-tkinclude or --without-tkinclude was given.
if test "${with_tkinclude+set}" = set; then
withval="$with_tkinclude"
@@ -9324,17 +9416,17 @@ fi
if test x"${ac_cv_c_tkh}" = x ; then
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:9328: checking for tk.h" >&5
+echo "configure:9420: checking for tk.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 9333 "configure"
+#line 9425 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9430: \"$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*
@@ -9380,7 +9472,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9384: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:9476: checking for Itcl private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
if test -f $i/generic/itcl.h ; then
@@ -9403,7 +9495,7 @@ fi
echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9407: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:9499: checking for Itk private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itkh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
if test -f $i/generic/itk.h ; then
@@ -9458,7 +9550,7 @@ if test "${with_itclconfig+set}" = set; then
fi
echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:9462: checking for Itcl configuration" >&5
+echo "configure:9554: checking for Itcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9561,7 +9653,7 @@ if test "${with_itkconfig+set}" = set; then
fi
echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:9565: checking for Itk configuration" >&5
+echo "configure:9657: checking for Itk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -9704,7 +9796,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:9708: checking for X" >&5
+echo "configure:9800: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -9766,12 +9858,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 9770 "configure"
+#line 9862 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9867: \"$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*
@@ -9840,14 +9932,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 9844 "configure"
+#line 9936 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:9851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -10095,7 +10187,7 @@ fi
# We only build gdbserver automatically if host and target are the same.
if test "x$target" = "x$host"; then
echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:10099: checking whether gdbserver is supported on this host" >&5
+echo "configure:10191: checking whether gdbserver is supported on this host" >&5
if test "x$build_gdbserver" = xyes; then
configdirs="$configdirs gdbserver"
echo "$ac_t""yes" 1>&6
@@ -10159,12 +10251,12 @@ fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:10163: checking for Cygwin environment" >&5
+echo "configure:10255: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10168 "configure"
+#line 10260 "configure"
#include "confdefs.h"
int main() {
@@ -10175,7 +10267,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:10179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -10192,19 +10284,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:10196: checking for mingw32 environment" >&5
+echo "configure:10288: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10201 "configure"
+#line 10293 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:10208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -10223,7 +10315,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:10227: checking for executable suffix" >&5
+echo "configure:10319: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10233,7 +10325,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:10237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:10329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -10275,7 +10367,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:10279: checking for iconv" >&5
+echo "configure:10371: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -10283,7 +10375,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 10287 "configure"
+#line 10379 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -10293,7 +10385,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:10297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -10305,7 +10397,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
cat > conftest.$ac_ext <<EOF
-#line 10309 "configure"
+#line 10401 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -10315,7 +10407,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:10319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
@@ -10336,13 +10428,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:10340: checking for iconv declaration" >&5
+echo "configure:10432: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 10346 "configure"
+#line 10438 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -10361,7 +10453,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:10365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:10457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
diff --git a/gdb/configure.in b/gdb/configure.in
index 07aab351423..2cf9f6c5c13 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -384,6 +384,7 @@ AC_CHECK_FUNCS(sbrk)
AC_CHECK_FUNCS(setpgid setpgrp)
AC_CHECK_FUNCS(sigaction sigprocmask sigsetmask)
AC_CHECK_FUNCS(socketpair)
+AC_CHECK_FUNCS(syscall)
dnl AC_FUNC_SETPGRP does not work when cross compiling
dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
@@ -911,6 +912,24 @@ if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
[Define if <thread_db.h> has the TD_NOTALLOC error code.])
fi
+dnl See if we have a sys/syscall header file that has __NR_tkill.
+if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
+ AC_CACHE_CHECK([whether <sys/syscall.h> has __NR_tkill],
+ gdb_cv_sys_syscall_h_has_tkill,
+ AC_TRY_COMPILE(
+ [#include <sys/syscall.h>],
+ [int i = __NR_tkill;],
+ gdb_cv_sys_syscall_h_has_tkill=yes,
+ gdb_cv_sys_syscall_h_has_tkill=no
+ )
+ )
+fi
+dnl See if we can issue tkill syscall.
+if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
+ AC_DEFINE(HAVE_TKILL_SYSCALL, 1,
+ [Define if we can use the tkill syscall.])
+fi
+
dnl Handle optional features that can be enabled.
AC_ARG_WITH(sysroot,
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 955b3a47a69..45991d6c756 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -142,21 +142,13 @@ m68*-*-sysv4*) gdb_target=m68kv4 ;;
m68*-*-vxworks*) gdb_target=vxworks68 ;;
mcore*-*-*) gdb_target=mcore ;;
-mips64*-big-*) gdb_target=bigmips64 ;;
-mips*-big-*) gdb_target=bigmips ;;
-mips*-dec-*) gdb_target=decstation ;;
+mips64*-big-*) gdb_target=mips64 ;;
+mips*-big-*) gdb_target=mips ;;
+mips*-dec-*) gdb_target=mips ;;
mips*-*-pe) gdb_target=wince ;;
mips64*el-*-ecoff*) gdb_target=embedl64 ;;
mips64*-*-ecoff*) gdb_target=embed64 ;;
-mips64*vr4xxx*el-*-elf*)gdb_target=vr4xxxel ;;
-mips64*vr4xxx*-*-elf*) gdb_target=vr4xxx ;;
-mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
-mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
-mips64*vr4100*el-*-elf*) gdb_target=vr4300el ;;
-mips64*vr4100*-*-elf*) gdb_target=vr4100 ;;
-mips64*vr5000*el-*-elf*) gdb_target=vr5000el ;;
-mips64*vr5000*-*-elf*) gdb_target=vr5000 ;;
-mips*tx39*el*-elf*) gdb_target=tx39l ;;
+mips64*vr*-*-elf*) gdb_target=mips64 ;;
mips*tx39*-elf*) gdb_target=tx39 ;;
mips64*el-*-elf*) gdb_target=embedl64 ;;
mips64*-*-elf*) gdb_target=embed64 ;;
@@ -165,20 +157,20 @@ mips*el-*-ecoff*) gdb_target=embedl ;;
mips*-*-ecoff*) gdb_target=embed ;;
mips*el-*-elf*) gdb_target=embedl ;;
mips*-*-elf*) gdb_target=embed ;;
-mips*-little-*) gdb_target=littlemips ;;
+mips*-little-*) gdb_target=mips ;;
mips*-*-lnews*) gdb_target=embedl ;;
mips*-sgi-irix5*) gdb_target=irix5 ;;
mips*-sgi-irix6*) gdb_target=irix6 ;;
mips*-sgi-*) gdb_target=irix3 ;;
-mips*-sony-*) gdb_target=bigmips ;;
+mips*-sony-*) gdb_target=mips64 ;;
mips*-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
mips*-*-netbsd*) gdb_target=nbsd ;;
# OBSOLETE mips*-*-mach3*) gdb_target=mipsm3 ;;
mips*-*-sysv4*) gdb_target=mipsv4 ;;
-mips*-*-sysv*) gdb_target=bigmips ;;
-mips*-*-riscos*) gdb_target=bigmips ;;
+mips*-*-sysv*) gdb_target=mips ;;
+mips*-*-riscos*) gdb_target=mips ;;
mips*-*-vxworks*) gdb_target=vxmips ;;
mips*-*-*) gdb_target=embed ;;
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index 952d6a2b17b..0b567dd8b35 100644
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -30,6 +30,7 @@
/* Opaque declarations. */
+struct symbol;
struct obstack;
struct block;
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 2fbfde53b0e..76a0250a4a2 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -4267,9 +4267,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
- /* No register requires conversion from raw format to virtual format. */
- set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
-
set_gdbarch_deprecated_push_return_address (gdbarch, cris_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, cris_pop_frame);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index c184b4457e7..2696c60a64e 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -665,6 +665,7 @@ struct d10v_unwind_cache *
d10v_frame_unwind_cache (struct frame_info *next_frame,
void **this_prologue_cache)
{
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
CORE_ADDR pc;
ULONGEST prev_sp;
ULONGEST this_base;
@@ -689,7 +690,7 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
pc > 0 && pc < frame_pc_unwind (next_frame);
pc += 4)
{
- op = (unsigned long) read_memory_integer (pc, 4);
+ op = get_frame_memory_unsigned (next_frame, pc, 4);
if ((op & 0xC0000000) == 0xC0000000)
{
/* long instruction */
@@ -753,9 +754,10 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
{
/* The SP was saved (which is very unusual), the frame base is
just the PREV's frame's TOP-OF-STACK. */
- this_base = read_memory_unsigned_integer (info->saved_regs[D10V_SP_REGNUM],
- register_size (current_gdbarch,
- D10V_SP_REGNUM));
+ this_base
+ = get_frame_memory_unsigned (next_frame,
+ info->saved_regs[D10V_SP_REGNUM],
+ register_size (gdbarch, D10V_SP_REGNUM));
prev_sp = this_base;
}
else
@@ -779,9 +781,9 @@ d10v_frame_unwind_cache (struct frame_info *next_frame,
if (info->saved_regs[LR_REGNUM])
{
- CORE_ADDR return_pc
- = read_memory_unsigned_integer (info->saved_regs[LR_REGNUM],
- register_size (current_gdbarch, LR_REGNUM));
+ CORE_ADDR return_pc
+ = get_frame_memory_unsigned (next_frame, info->saved_regs[LR_REGNUM],
+ register_size (gdbarch, LR_REGNUM));
info->return_pc = d10v_make_iaddr (return_pc);
}
else
@@ -873,7 +875,7 @@ d10v_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
int i;
fprintf_filtered (file, " ");
frame_read_register (frame, a, num);
- for (i = 0; i < register_size (current_gdbarch, a); i++)
+ for (i = 0; i < register_size (gdbarch, a); i++)
{
fprintf_filtered (file, "%02x", (num[i] & 0xff));
}
@@ -977,9 +979,10 @@ d10v_push_dummy_code (struct gdbarch *gdbarch,
}
static CORE_ADDR
-d10v_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
- CORE_ADDR dummy_addr, int nargs, struct value **args,
- CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
+d10v_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr,
+ int nargs, struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int i;
int regnum = ARG1_REGNUM;
@@ -987,9 +990,9 @@ d10v_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache,
long val;
/* Set the return address. For the d10v, the return breakpoint is
- always at DUMMY_ADDR. */
+ always at BP_ADDR. */
regcache_cooked_write_unsigned (regcache, LR_REGNUM,
- d10v_convert_iaddr_to_raw (dummy_addr));
+ d10v_convert_iaddr_to_raw (bp_addr));
/* If STRUCT_RETURN is true, then the struct return address (in
STRUCT_ADDR) will consume the first argument-passing register.
@@ -1449,6 +1452,7 @@ saved_regs_unwinder (struct frame_info *next_frame,
enum lval_type *lvalp, CORE_ADDR *addrp,
int *realnump, void *bufferp)
{
+ struct gdbarch *gdbarch = get_frame_arch (next_frame);
if (this_saved_regs[regnum] != 0)
{
if (regnum == D10V_SP_REGNUM)
@@ -1460,7 +1464,7 @@ saved_regs_unwinder (struct frame_info *next_frame,
*realnump = -1;
if (bufferp != NULL)
store_unsigned_integer (bufferp,
- register_size (current_gdbarch, regnum),
+ register_size (gdbarch, regnum),
this_saved_regs[regnum]);
}
else
@@ -1474,8 +1478,8 @@ saved_regs_unwinder (struct frame_info *next_frame,
if (bufferp != NULL)
{
/* Read the value in from memory. */
- read_memory (this_saved_regs[regnum], bufferp,
- register_size (current_gdbarch, regnum));
+ get_frame_memory (next_frame, this_saved_regs[regnum], bufferp,
+ register_size (gdbarch, regnum));
}
}
return;
diff --git a/gdb/defs.h b/gdb/defs.h
index a90ef9ef7c0..492afe5f976 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1126,8 +1126,6 @@ extern ULONGEST extract_unsigned_integer (const void *, int);
extern int extract_long_unsigned_integer (const void *, int, LONGEST *);
-extern CORE_ADDR extract_address (const void *, int);
-
extern CORE_ADDR extract_typed_address (const void *buf, struct type *type);
extern void store_signed_integer (void *, int, LONGEST);
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 2cd0984205b..5530f7b396e 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-01 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Add "func_addr"
+ parameter to "push_dummy_call". Rename "dummy_addr" to "bp_addr".
+
2003-05-21 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Delete
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 90b25750ca7..dc5c6b809d8 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -3678,14 +3678,13 @@ definition is only used in generic code when parsing "$ps".)
If defined, used by @code{frame_pop} to remove a stack frame. This
method has been superseeded by generic code.
-@item push_dummy_call (@var{gdbarch}, @var{regcache}, @var{dummy_addr}, @var{nargs}, @var{args}, @var{sp}, @var{struct_return}, @var{struct_addr})
+@item push_dummy_call (@var{gdbarch}, @var{func_addr}, @var{regcache}, @var{pc_addr}, @var{nargs}, @var{args}, @var{sp}, @var{struct_return}, @var{struct_addr})
@findex push_dummy_call
@findex DEPRECATED_PUSH_ARGUMENTS.
-@anchor{push_dummy_call}
-Define this to push the dummy frame's call to the inferior function onto
-the stack. In addition to pushing @var{nargs}, the code should push
-@var{struct_addr} (when @var{struct_return}), and the return value (in
-the call dummy at @var{dummy_addr}).
+@anchor{push_dummy_call} Define this to push the dummy frame's call to
+the inferior function onto the stack. In addition to pushing
+@var{nargs}, the code should push @var{struct_addr} (when
+@var{struct_return}), and the return address (@var{bp_addr}).
Returns the updated top-of-stack pointer.
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
new file mode 100644
index 00000000000..f28fade3d7c
--- /dev/null
+++ b/gdb/dwarf2-frame.c
@@ -0,0 +1,1304 @@
+/* Frame unwinder for frames with DWARF Call Frame Information.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by Mark Kettenis.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "defs.h"
+#include "dwarf2expr.h"
+#include "elf/dwarf2.h"
+#include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
+#include "gdbcore.h"
+#include "gdbtypes.h"
+#include "symtab.h"
+#include "objfiles.h"
+#include "regcache.h"
+
+#include "gdb_assert.h"
+#include "gdb_string.h"
+
+#include "dwarf2-frame.h"
+
+/* Call Frame Information (CFI). */
+
+/* Common Information Entry (CIE). */
+
+struct dwarf2_cie
+{
+ /* Offset into the .debug_frame section where this CIE was found.
+ Used to identify this CIE. */
+ ULONGEST cie_pointer;
+
+ /* Constant that is factored out of all advance location
+ instructions. */
+ ULONGEST code_alignment_factor;
+
+ /* Constants that is factored out of all offset instructions. */
+ LONGEST data_alignment_factor;
+
+ /* Return address column. */
+ ULONGEST return_address_register;
+
+ /* Instruction sequence to initialize a register set. */
+ unsigned char *initial_instructions;
+ unsigned char *end;
+
+ /* Encoding of addresses. */
+ unsigned char encoding;
+
+ /* True if a 'z' augmentation existed. */
+ unsigned char saw_z_augmentation;
+
+ struct dwarf2_cie *next;
+};
+
+/* Frame Description Entry (FDE). */
+
+struct dwarf2_fde
+{
+ /* CIE for this FDE. */
+ struct dwarf2_cie *cie;
+
+ /* First location associated with this FDE. */
+ CORE_ADDR initial_location;
+
+ /* Number of bytes of program instructions described by this FDE. */
+ CORE_ADDR address_range;
+
+ /* Instruction sequence. */
+ unsigned char *instructions;
+ unsigned char *end;
+
+ struct dwarf2_fde *next;
+};
+
+static struct dwarf2_fde *dwarf2_frame_find_fde (CORE_ADDR *pc);
+
+
+/* Structure describing a frame state. */
+
+struct dwarf2_frame_state
+{
+ /* Each register save state can be described in terms of a CFA slot,
+ another register, or a location expression. */
+ struct dwarf2_frame_state_reg_info
+ {
+ struct dwarf2_frame_state_reg
+ {
+ union {
+ LONGEST offset;
+ ULONGEST reg;
+ unsigned char *exp;
+ } loc;
+ ULONGEST exp_len;
+ enum {
+ REG_UNSAVED,
+ REG_SAVED_OFFSET,
+ REG_SAVED_REG,
+ REG_SAVED_EXP,
+ REG_UNMODIFIED
+ } how;
+ } *reg;
+ int num_regs;
+
+ /* Used to implement DW_CFA_remember_state. */
+ struct dwarf2_frame_state_reg_info *prev;
+ } regs;
+
+ LONGEST cfa_offset;
+ ULONGEST cfa_reg;
+ unsigned char *cfa_exp;
+ enum {
+ CFA_UNSET,
+ CFA_REG_OFFSET,
+ CFA_EXP
+ } cfa_how;
+
+ /* The PC described by the current frame state. */
+ CORE_ADDR pc;
+
+ /* Initial register set from the CIE.
+ Used to implement DW_CFA_restore. */
+ struct dwarf2_frame_state_reg_info initial;
+
+ /* The information we care about from the CIE. */
+ LONGEST data_align;
+ ULONGEST code_align;
+ ULONGEST retaddr_column;
+};
+
+/* Store the length the expression for the CFA in the `cfa_reg' field,
+ which is unused in that case. */
+#define cfa_exp_len cfa_reg
+
+/* Assert that the register set RS is large enough to store NUM_REGS
+ columns. If necessary, enlarge the register set. */
+
+static void
+dwarf2_frame_state_alloc_regs (struct dwarf2_frame_state_reg_info *rs,
+ int num_regs)
+{
+ size_t size = sizeof (struct dwarf2_frame_state_reg);
+
+ if (num_regs <= rs->num_regs)
+ return;
+
+ rs->reg = (struct dwarf2_frame_state_reg *)
+ xrealloc (rs->reg, num_regs * size);
+
+ /* Initialize newly allocated registers. */
+ memset (rs->reg + rs->num_regs, 0, (num_regs - rs->num_regs) * size);
+ rs->num_regs = num_regs;
+}
+
+/* Copy the register columns in register set RS into newly allocated
+ memory and return a pointer to this newly created copy. */
+
+static struct dwarf2_frame_state_reg *
+dwarf2_frame_state_copy_regs (struct dwarf2_frame_state_reg_info *rs)
+{
+ size_t size = rs->num_regs * sizeof (struct dwarf2_frame_state_reg_info);
+ struct dwarf2_frame_state_reg *reg;
+
+ reg = (struct dwarf2_frame_state_reg *) xmalloc (size);
+ memcpy (reg, rs->reg, size);
+
+ return reg;
+}
+
+/* Release the memory allocated to register set RS. */
+
+static void
+dwarf2_frame_state_free_regs (struct dwarf2_frame_state_reg_info *rs)
+{
+ if (rs)
+ {
+ dwarf2_frame_state_free_regs (rs->prev);
+
+ xfree (rs->reg);
+ xfree (rs);
+ }
+}
+
+/* Release the memory allocated to the frame state FS. */
+
+static void
+dwarf2_frame_state_free (void *p)
+{
+ struct dwarf2_frame_state *fs = p;
+
+ dwarf2_frame_state_free_regs (fs->initial.prev);
+ dwarf2_frame_state_free_regs (fs->regs.prev);
+ xfree (fs->initial.reg);
+ xfree (fs->regs.reg);
+ xfree (fs);
+}
+
+
+/* Helper functions for execute_stack_op. */
+
+static CORE_ADDR
+read_reg (void *baton, int reg)
+{
+ struct frame_info *next_frame = (struct frame_info *) baton;
+ int regnum;
+ char *buf;
+
+ regnum = DWARF2_REG_TO_REGNUM (reg);
+
+ buf = (char *) alloca (register_size (current_gdbarch, regnum));
+ frame_unwind_register (next_frame, regnum, buf);
+ return extract_typed_address (buf, builtin_type_void_data_ptr);
+}
+
+static void
+read_mem (void *baton, char *buf, CORE_ADDR addr, size_t len)
+{
+ read_memory (addr, buf, len);
+}
+
+static void
+no_get_frame_base (void *baton, unsigned char **start, size_t *length)
+{
+ internal_error (__FILE__, __LINE__,
+ "Support for DW_OP_fbreg is unimplemented");
+}
+
+static CORE_ADDR
+no_get_tls_address (void *baton, CORE_ADDR offset)
+{
+ internal_error (__FILE__, __LINE__,
+ "Support for DW_OP_GNU_push_tls_address is unimplemented");
+}
+
+static CORE_ADDR
+execute_stack_op (unsigned char *exp, ULONGEST len,
+ struct frame_info *next_frame, CORE_ADDR initial)
+{
+ struct dwarf_expr_context *ctx;
+ CORE_ADDR result;
+
+ ctx = new_dwarf_expr_context ();
+ ctx->baton = next_frame;
+ ctx->read_reg = read_reg;
+ ctx->read_mem = read_mem;
+ ctx->get_frame_base = no_get_frame_base;
+ ctx->get_tls_address = no_get_tls_address;
+
+ dwarf_expr_push (ctx, initial);
+ dwarf_expr_eval (ctx, exp, len);
+ result = dwarf_expr_fetch (ctx, 0);
+
+ if (ctx->in_reg)
+ result = read_reg (next_frame, result);
+
+ free_dwarf_expr_context (ctx);
+
+ return result;
+}
+
+
+static void
+execute_cfa_program (unsigned char *insn_ptr, unsigned char *insn_end,
+ struct frame_info *next_frame,
+ struct dwarf2_frame_state *fs)
+{
+ CORE_ADDR pc = frame_pc_unwind (next_frame);
+ int bytes_read;
+
+ while (insn_ptr < insn_end && fs->pc <= pc)
+ {
+ unsigned char insn = *insn_ptr++;
+ ULONGEST utmp, reg;
+ LONGEST offset;
+
+ if ((insn & 0xc0) == DW_CFA_advance_loc)
+ fs->pc += (insn & 0x3f) * fs->code_align;
+ else if ((insn & 0xc0) == DW_CFA_offset)
+ {
+ reg = insn & 0x3f;
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ offset = utmp * fs->data_align;
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].how = REG_SAVED_OFFSET;
+ fs->regs.reg[reg].loc.offset = offset;
+ }
+ else if ((insn & 0xc0) == DW_CFA_restore)
+ {
+ gdb_assert (fs->initial.reg);
+ reg = insn & 0x3f;
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg] = fs->initial.reg[reg];
+ }
+ else
+ {
+ switch (insn)
+ {
+ case DW_CFA_set_loc:
+ fs->pc = dwarf2_read_address (insn_ptr, insn_end, &bytes_read);
+ insn_ptr += bytes_read;
+ break;
+
+ case DW_CFA_advance_loc1:
+ utmp = extract_unsigned_integer (insn_ptr, 1);
+ fs->pc += utmp * fs->code_align;
+ insn_ptr++;
+ break;
+ case DW_CFA_advance_loc2:
+ utmp = extract_unsigned_integer (insn_ptr, 2);
+ fs->pc += utmp * fs->code_align;
+ insn_ptr += 2;
+ break;
+ case DW_CFA_advance_loc4:
+ utmp = extract_unsigned_integer (insn_ptr, 4);
+ fs->pc += utmp * fs->code_align;
+ insn_ptr += 4;
+ break;
+
+ case DW_CFA_offset_extended:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ offset = utmp * fs->data_align;
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].how = REG_SAVED_OFFSET;
+ fs->regs.reg[reg].loc.offset = offset;
+ break;
+
+ case DW_CFA_restore_extended:
+ gdb_assert (fs->initial.reg);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg] = fs->initial.reg[reg];
+ break;
+
+ case DW_CFA_undefined:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].how = REG_UNSAVED;
+ break;
+
+ case DW_CFA_same_value:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].how = REG_UNMODIFIED;
+ break;
+
+ case DW_CFA_register:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].loc.reg = utmp;
+ break;
+
+ case DW_CFA_remember_state:
+ {
+ struct dwarf2_frame_state_reg_info *new_rs;
+
+ new_rs = XMALLOC (struct dwarf2_frame_state_reg_info);
+ *new_rs = fs->regs;
+ fs->regs.reg = dwarf2_frame_state_copy_regs (&fs->regs);
+ fs->regs.prev = new_rs;
+ }
+ break;
+
+ case DW_CFA_restore_state:
+ {
+ struct dwarf2_frame_state_reg_info *old_rs = fs->regs.prev;
+
+ gdb_assert (old_rs);
+
+ xfree (fs->regs.reg);
+ fs->regs = *old_rs;
+ xfree (old_rs);
+ }
+ break;
+
+ case DW_CFA_def_cfa:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_reg);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ fs->cfa_offset = utmp;
+ fs->cfa_how = CFA_REG_OFFSET;
+ break;
+
+ case DW_CFA_def_cfa_register:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_reg);
+ fs->cfa_how = CFA_REG_OFFSET;
+ break;
+
+ case DW_CFA_def_cfa_offset:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_offset);
+ /* cfa_how deliberately not set. */
+ break;
+
+ case DW_CFA_def_cfa_expression:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &fs->cfa_exp_len);
+ fs->cfa_exp = insn_ptr;
+ fs->cfa_how = CFA_EXP;
+ insn_ptr += fs->cfa_exp_len;
+ break;
+
+ case DW_CFA_expression:
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
+ dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ fs->regs.reg[reg].loc.exp = insn_ptr;
+ fs->regs.reg[reg].exp_len = utmp;
+ fs->regs.reg[reg].how = REG_SAVED_EXP;
+ insn_ptr += utmp;
+ break;
+
+ case DW_CFA_nop:
+ break;
+
+ case DW_CFA_GNU_args_size:
+ /* Ignored. */
+ insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "Unknown CFI encountered.");
+ }
+ }
+ }
+
+ /* Don't allow remember/restore between CIE and FDE programs. */
+ dwarf2_frame_state_free_regs (fs->regs.prev);
+ fs->regs.prev = NULL;
+}
+
+struct dwarf2_frame_cache
+{
+ /* DWARF Call Frame Address. */
+ CORE_ADDR cfa;
+
+ /* Saved registers, indexed by GDB register number, not by DWARF
+ register number. */
+ struct dwarf2_frame_state_reg *reg;
+};
+
+struct dwarf2_frame_cache *
+dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ struct cleanup *old_chain;
+ int num_regs = NUM_REGS + NUM_PSEUDO_REGS;
+ struct dwarf2_frame_cache *cache;
+ struct dwarf2_frame_state *fs;
+ struct dwarf2_fde *fde;
+ int reg;
+
+ if (*this_cache)
+ return *this_cache;
+
+ /* Allocate a new cache. */
+ cache = FRAME_OBSTACK_ZALLOC (struct dwarf2_frame_cache);
+ cache->reg = FRAME_OBSTACK_CALLOC (num_regs, struct dwarf2_frame_state_reg);
+
+ /* Allocate and initialize the frame state. */
+ fs = XMALLOC (struct dwarf2_frame_state);
+ memset (fs, 0, sizeof (struct dwarf2_frame_state));
+ old_chain = make_cleanup (dwarf2_frame_state_free, fs);
+
+ /* Unwind the PC.
+
+ Note that if NEXT_FRAME is never supposed to return (i.e. a call
+ to abort), the compiler might optimize away the instruction at
+ NEXT_FRAME's return address. As a result the return address will
+ point at some random instruction, and the CFI for that
+ instruction is probably wortless to us. GCC's unwinder solves
+ this problem by substracting 1 from the return address to get an
+ address in the middle of a presumed call instruction (or the
+ instruction in the associated delay slot). This should only be
+ done for "normal" frames and not for resume-type frames (signal
+ handlers, sentinel frames, dummy frames).
+
+ We don't do what GCC's does here (yet). It's not clear how
+ reliable the method is. There's also a problem with finding the
+ right FDE; see the comment in dwarf_frame_p. If dwarf_frame_p
+ selected this frame unwinder because it found the FDE for the
+ next function, using the adjusted return address might not yield
+ a FDE at all. The problem isn't specific to DWARF CFI; other
+ unwinders loose in similar ways. Therefore it's probably
+ acceptable to leave things slightly broken for now. */
+ fs->pc = frame_pc_unwind (next_frame);
+
+ /* Find the correct FDE. */
+ fde = dwarf2_frame_find_fde (&fs->pc);
+ gdb_assert (fde != NULL);
+
+ /* Extract any interesting information from the CIE. */
+ fs->data_align = fde->cie->data_alignment_factor;
+ fs->code_align = fde->cie->code_alignment_factor;
+ fs->retaddr_column = fde->cie->return_address_register;
+
+ /* First decode all the insns in the CIE. */
+ execute_cfa_program (fde->cie->initial_instructions,
+ fde->cie->end, next_frame, fs);
+
+ /* Save the initialized register set. */
+ fs->initial = fs->regs;
+ fs->initial.reg = dwarf2_frame_state_copy_regs (&fs->regs);
+
+ /* Then decode the insns in the FDE up to our target PC. */
+ execute_cfa_program (fde->instructions, fde->end, next_frame, fs);
+
+ /* Caclulate the CFA. */
+ switch (fs->cfa_how)
+ {
+ case CFA_REG_OFFSET:
+ cache->cfa = read_reg (next_frame, fs->cfa_reg);
+ cache->cfa += fs->cfa_offset;
+ break;
+
+ case CFA_EXP:
+ cache->cfa =
+ execute_stack_op (fs->cfa_exp, fs->cfa_exp_len, next_frame, 0);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "Unknown CFA rule.");
+ }
+
+ /* Save the register info in the cache. */
+ for (reg = 0; reg < fs->regs.num_regs; reg++)
+ {
+ int regnum;
+
+ /* Skip the return address column. */
+ if (reg == fs->retaddr_column)
+ continue;
+
+ /* Use the GDB register number as index. */
+ regnum = DWARF2_REG_TO_REGNUM (reg);
+
+ if (regnum >= 0 && regnum < num_regs)
+ cache->reg[regnum] = fs->regs.reg[reg];
+ }
+
+ /* Store the location of the return addess. If the return address
+ column (adjusted) is not the same as gdb's PC_REGNUM, then this
+ implies a copy from the ra column register. */
+ if (fs->retaddr_column < fs->regs.num_regs
+ && fs->regs.reg[fs->retaddr_column].how != REG_UNSAVED)
+ cache->reg[PC_REGNUM] = fs->regs.reg[fs->retaddr_column];
+ else
+ {
+ reg = DWARF2_REG_TO_REGNUM (fs->retaddr_column);
+ if (reg != PC_REGNUM)
+ {
+ cache->reg[PC_REGNUM].loc.reg = reg;
+ cache->reg[PC_REGNUM].how = REG_SAVED_REG;
+ }
+ }
+
+ do_cleanups (old_chain);
+
+ *this_cache = cache;
+ return cache;
+}
+
+static void
+dwarf2_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct dwarf2_frame_cache *cache =
+ dwarf2_frame_cache (next_frame, this_cache);
+
+ (*this_id) = frame_id_build (cache->cfa, frame_func_unwind (next_frame));
+}
+
+static void
+dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
+{
+ struct dwarf2_frame_cache *cache =
+ dwarf2_frame_cache (next_frame, this_cache);
+
+ switch (cache->reg[regnum].how)
+ {
+ case REG_UNSAVED:
+ *optimizedp = 1;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (regnum == SP_REGNUM)
+ {
+ /* GCC defines the CFA as the value of the stack pointer
+ just before the call instruction is executed. Do other
+ compilers use the same definition? */
+ *optimizedp = 0;
+ if (valuep)
+ {
+ /* Store the value. */
+ store_typed_address (valuep, builtin_type_void_data_ptr,
+ cache->cfa);
+ }
+ }
+ else if (valuep)
+ {
+ /* In some cases, for example %eflags on the i386, we have
+ to provide a sane value, even though this register wasn't
+ saved. Assume we can get it from NEXT_FRAME. */
+ frame_unwind_register (next_frame, regnum, valuep);
+ }
+ break;
+
+ case REG_SAVED_OFFSET:
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = cache->cfa + cache->reg[regnum].loc.offset;
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Read the value in from memory. */
+ read_memory (*addrp, valuep,
+ register_size (current_gdbarch, regnum));
+ }
+ break;
+
+ case REG_SAVED_REG:
+ regnum = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg);
+ frame_register_unwind (next_frame, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+ break;
+
+ case REG_SAVED_EXP:
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = execute_stack_op (cache->reg[regnum].loc.exp,
+ cache->reg[regnum].exp_len,
+ next_frame, cache->cfa);
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Read the value in from memory. */
+ read_memory (*addrp, valuep,
+ register_size (current_gdbarch, regnum));
+ }
+ break;
+
+ case REG_UNMODIFIED:
+ frame_register_unwind (next_frame, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+ break;
+
+ default:
+ internal_error (__FILE__, __LINE__, "Unknown register rule.");
+ }
+}
+
+static const struct frame_unwind dwarf2_frame_unwind =
+{
+ NORMAL_FRAME,
+ dwarf2_frame_this_id,
+ dwarf2_frame_prev_register
+};
+
+const struct frame_unwind *
+dwarf2_frame_p (CORE_ADDR pc)
+{
+ /* The way GDB works, this function can be called with PC just after
+ the last instruction of the function we're supposed to return the
+ unwind methods for. In that case we won't find the correct FDE;
+ instead we find the FDE for the next function, or we won't find
+ an FDE at all. There is a possible solution (see the comment in
+ dwarf2_frame_cache), GDB doesn't pass us enough information to
+ implement it. */
+ if (dwarf2_frame_find_fde (&pc))
+ return &dwarf2_frame_unwind;
+
+ return NULL;
+}
+
+
+/* There is no explicitly defined relationship between the CFA and the
+ location of frame's local variables and arguments/parameters.
+ Therefore, frame base methods on this page should probably only be
+ used as a last resort, just to avoid printing total garbage as a
+ response to the "info frame" command. */
+
+static CORE_ADDR
+dwarf2_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct dwarf2_frame_cache *cache =
+ dwarf2_frame_cache (next_frame, this_cache);
+
+ return cache->cfa;
+}
+
+static const struct frame_base dwarf2_frame_base =
+{
+ &dwarf2_frame_unwind,
+ dwarf2_frame_base_address,
+ dwarf2_frame_base_address,
+ dwarf2_frame_base_address
+};
+
+const struct frame_base *
+dwarf2_frame_base_p (CORE_ADDR pc)
+{
+ if (dwarf2_frame_find_fde (&pc))
+ return &dwarf2_frame_base;
+
+ return NULL;
+}
+
+/* A minimal decoding of DWARF2 compilation units. We only decode
+ what's needed to get to the call frame information. */
+
+struct comp_unit
+{
+ /* Keep the bfd convenient. */
+ bfd *abfd;
+
+ struct objfile *objfile;
+
+ /* Linked list of CIEs for this object. */
+ struct dwarf2_cie *cie;
+
+ /* Address size for this unit - from unit header. */
+ unsigned char addr_size;
+
+ /* Pointer to the .debug_frame section loaded into memory. */
+ char *dwarf_frame_buffer;
+
+ /* Length of the loaded .debug_frame section. */
+ unsigned long dwarf_frame_size;
+
+ /* Pointer to the .debug_frame section. */
+ asection *dwarf_frame_section;
+
+ /* Base for DW_EH_PE_datarel encodings. */
+ bfd_vma dbase;
+};
+
+static unsigned int
+read_1_byte (bfd *bfd, char *buf)
+{
+ return bfd_get_8 (abfd, (bfd_byte *) buf);
+}
+
+static unsigned int
+read_4_bytes (bfd *abfd, char *buf)
+{
+ return bfd_get_32 (abfd, (bfd_byte *) buf);
+}
+
+static ULONGEST
+read_8_bytes (bfd *abfd, char *buf)
+{
+ return bfd_get_64 (abfd, (bfd_byte *) buf);
+}
+
+static ULONGEST
+read_unsigned_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
+{
+ ULONGEST result;
+ unsigned int num_read;
+ int shift;
+ unsigned char byte;
+
+ result = 0;
+ shift = 0;
+ num_read = 0;
+
+ do
+ {
+ byte = bfd_get_8 (abfd, (bfd_byte *) buf);
+ buf++;
+ num_read++;
+ result |= ((byte & 0x7f) << shift);
+ shift += 7;
+ }
+ while (byte & 0x80);
+
+ *bytes_read_ptr = num_read;
+
+ return result;
+}
+
+static LONGEST
+read_signed_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
+{
+ LONGEST result;
+ int shift;
+ unsigned int num_read;
+ unsigned char byte;
+
+ result = 0;
+ shift = 0;
+ num_read = 0;
+
+ do
+ {
+ byte = bfd_get_8 (abfd, (bfd_byte *) buf);
+ buf++;
+ num_read++;
+ result |= ((byte & 0x7f) << shift);
+ shift += 7;
+ }
+ while (byte & 0x80);
+
+ if ((shift < 32) && (byte & 0x40))
+ result |= -(1 << shift);
+
+ *bytes_read_ptr = num_read;
+
+ return result;
+}
+
+static ULONGEST
+read_initial_length (bfd *abfd, char *buf, unsigned int *bytes_read_ptr)
+{
+ LONGEST result;
+
+ result = bfd_get_32 (abfd, (bfd_byte *) buf);
+ if (result == 0xffffffff)
+ {
+ result = bfd_get_64 (abfd, (bfd_byte *) buf + 4);
+ *bytes_read_ptr = 12;
+ }
+ else
+ *bytes_read_ptr = 4;
+
+ return result;
+}
+
+
+/* Pointer encoding helper functions. */
+
+/* GCC supports exception handling based on DWARF2 CFI. However, for
+ technical reasons, it encodes addresses in its FDE's in a different
+ way. Several "pointer encodings" are supported. The encoding
+ that's used for a particular FDE is determined by the 'R'
+ augmentation in the associated CIE. The argument of this
+ augmentation is a single byte.
+
+ The address can be encoded as 2 bytes, 4 bytes, 8 bytes, or as a
+ LEB128. This is encoded in bits 0, 1 and 2. Bit 3 encodes whether
+ the address is signed or unsigned. Bits 4, 5 and 6 encode how the
+ address should be interpreted (absolute, relative to the current
+ position in the FDE, ...). Bit 7, indicates that the address
+ should be dereferenced. */
+
+static unsigned char
+encoding_for_size (unsigned int size)
+{
+ switch (size)
+ {
+ case 2:
+ return DW_EH_PE_udata2;
+ case 4:
+ return DW_EH_PE_udata4;
+ case 8:
+ return DW_EH_PE_udata8;
+ default:
+ internal_error (__FILE__, __LINE__, "Unsupported address size");
+ }
+}
+
+static unsigned int
+size_of_encoded_value (unsigned char encoding)
+{
+ if (encoding == DW_EH_PE_omit)
+ return 0;
+
+ switch (encoding & 0x07)
+ {
+ case DW_EH_PE_absptr:
+ return TYPE_LENGTH (builtin_type_void_data_ptr);
+ case DW_EH_PE_udata2:
+ return 2;
+ case DW_EH_PE_udata4:
+ return 4;
+ case DW_EH_PE_udata8:
+ return 8;
+ default:
+ internal_error (__FILE__, __LINE__, "Invalid or unsupported encoding");
+ }
+}
+
+static CORE_ADDR
+read_encoded_value (struct comp_unit *unit, unsigned char encoding,
+ char *buf, unsigned int *bytes_read_ptr)
+{
+ CORE_ADDR base;
+
+ /* GCC currently doesn't generate DW_EH_PE_indirect encodings for
+ FDE's. */
+ if (encoding & DW_EH_PE_indirect)
+ internal_error (__FILE__, __LINE__,
+ "Unsupported encoding: DW_EH_PE_indirect");
+
+ switch (encoding & 0x70)
+ {
+ case DW_EH_PE_absptr:
+ base = 0;
+ break;
+ case DW_EH_PE_pcrel:
+ base = bfd_get_section_vma (unit->bfd, unit->dwarf_frame_section);
+ base += (buf - unit->dwarf_frame_buffer);
+ break;
+ case DW_EH_PE_datarel:
+ base = unit->dbase;
+ break;
+ default:
+ internal_error (__FILE__, __LINE__, "Invalid or unsupported encoding");
+ }
+
+ if ((encoding & 0x0f) == 0x00)
+ encoding |= encoding_for_size (TYPE_LENGTH(builtin_type_void_data_ptr));
+
+ switch (encoding & 0x0f)
+ {
+ case DW_EH_PE_udata2:
+ *bytes_read_ptr = 2;
+ return (base + bfd_get_16 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_udata4:
+ *bytes_read_ptr = 4;
+ return (base + bfd_get_32 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_udata8:
+ *bytes_read_ptr = 8;
+ return (base + bfd_get_64 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_sdata2:
+ *bytes_read_ptr = 2;
+ return (base + bfd_get_signed_16 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_sdata4:
+ *bytes_read_ptr = 4;
+ return (base + bfd_get_signed_32 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_sdata8:
+ *bytes_read_ptr = 8;
+ return (base + bfd_get_signed_64 (unit->abfd, (bfd_byte *) buf));
+ default:
+ internal_error (__FILE__, __LINE__, "Invalid or unsupported encoding");
+ }
+}
+
+
+/* GCC uses a single CIE for all FDEs in a .debug_frame section.
+ That's why we use a simple linked list here. */
+
+static struct dwarf2_cie *
+find_cie (struct comp_unit *unit, ULONGEST cie_pointer)
+{
+ struct dwarf2_cie *cie = unit->cie;
+
+ while (cie)
+ {
+ if (cie->cie_pointer == cie_pointer)
+ return cie;
+
+ cie = cie->next;
+ }
+
+ return NULL;
+}
+
+static void
+add_cie (struct comp_unit *unit, struct dwarf2_cie *cie)
+{
+ cie->next = unit->cie;
+ unit->cie = cie;
+}
+
+/* Find the FDE for *PC. Return a pointer to the FDE, and store the
+ inital location associated with it into *PC. */
+
+static struct dwarf2_fde *
+dwarf2_frame_find_fde (CORE_ADDR *pc)
+{
+ struct objfile *objfile;
+
+ ALL_OBJFILES (objfile)
+ {
+ struct dwarf2_fde *fde;
+ CORE_ADDR offset;
+
+ offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+
+ fde = objfile->sym_private;
+ while (fde)
+ {
+ if (*pc >= fde->initial_location + offset
+ && *pc < fde->initial_location + offset + fde->address_range)
+ {
+ *pc = fde->initial_location + offset;
+ return fde;
+ }
+
+ fde = fde->next;
+ }
+ }
+
+ return NULL;
+}
+
+static void
+add_fde (struct comp_unit *unit, struct dwarf2_fde *fde)
+{
+ fde->next = unit->objfile->sym_private;
+ unit->objfile->sym_private = fde;
+}
+
+#ifdef CC_HAS_LONG_LONG
+#define DW64_CIE_ID 0xffffffffffffffffULL
+#else
+#define DW64_CIE_ID ~0
+#endif
+
+/* Read a CIE or FDE in BUF and decode it. */
+
+static char *
+decode_frame_entry (struct comp_unit *unit, char *buf, int eh_frame_p)
+{
+ LONGEST length;
+ unsigned int bytes_read;
+ int dwarf64_p = 0;
+ ULONGEST cie_id = DW_CIE_ID;
+ ULONGEST cie_pointer;
+ char *start = buf;
+ char *end;
+
+ length = read_initial_length (unit->abfd, buf, &bytes_read);
+ buf += bytes_read;
+ end = buf + length;
+
+ if (length == 0)
+ return end;
+
+ if (bytes_read == 12)
+ dwarf64_p = 1;
+
+ /* In a .eh_frame section, zero is used to distinguish CIEs from
+ FDEs. */
+ if (eh_frame_p)
+ cie_id = 0;
+ else if (dwarf64_p)
+ cie_id = DW64_CIE_ID;
+
+ if (dwarf64_p)
+ {
+ cie_pointer = read_8_bytes (unit->abfd, buf);
+ buf += 8;
+ }
+ else
+ {
+ cie_pointer = read_4_bytes (unit->abfd, buf);
+ buf += 4;
+ }
+
+ if (cie_pointer == cie_id)
+ {
+ /* This is a CIE. */
+ struct dwarf2_cie *cie;
+ char *augmentation;
+
+ /* Record the offset into the .debug_frame section of this CIE. */
+ cie_pointer = start - unit->dwarf_frame_buffer;
+
+ /* Check whether we've already read it. */
+ if (find_cie (unit, cie_pointer))
+ return end;
+
+ cie = (struct dwarf2_cie *)
+ obstack_alloc (&unit->objfile->psymbol_obstack,
+ sizeof (struct dwarf2_cie));
+ cie->initial_instructions = NULL;
+ cie->cie_pointer = cie_pointer;
+
+ /* The encoding for FDE's in a normal .debug_frame section
+ depends on the target address size as specified in the
+ Compilation Unit Header. */
+ cie->encoding = encoding_for_size (unit->addr_size);
+
+ /* Check version number. */
+ gdb_assert (read_1_byte (unit->abfd, buf) == DW_CIE_VERSION);
+ buf += 1;
+
+ /* Interpret the interesting bits of the augmentation. */
+ augmentation = buf;
+ buf = augmentation + strlen (augmentation) + 1;
+
+ /* The GCC 2.x "eh" augmentation has a pointer immediately
+ following the augmentation string, so it must be handled
+ first. */
+ if (augmentation[0] == 'e' && augmentation[1] == 'h')
+ {
+ /* Skip. */
+ buf += TYPE_LENGTH (builtin_type_void_data_ptr);
+ augmentation += 2;
+ }
+
+ cie->code_alignment_factor =
+ read_unsigned_leb128 (unit->abfd, buf, &bytes_read);
+ buf += bytes_read;
+
+ cie->data_alignment_factor =
+ read_signed_leb128 (unit->abfd, buf, &bytes_read);
+ buf += bytes_read;
+
+ cie->return_address_register = read_1_byte (unit->abfd, buf);
+ buf += 1;
+
+ cie->saw_z_augmentation = (*augmentation == 'z');
+ if (cie->saw_z_augmentation)
+ {
+ ULONGEST length;
+
+ length = read_unsigned_leb128 (unit->abfd, buf, &bytes_read);
+ buf += bytes_read;
+ cie->initial_instructions = buf + length;
+ augmentation++;
+ }
+
+ while (*augmentation)
+ {
+ /* "L" indicates a byte showing how the LSDA pointer is encoded. */
+ if (*augmentation == 'L')
+ {
+ /* Skip. */
+ buf++;
+ augmentation++;
+ }
+
+ /* "R" indicates a byte indicating how FDE addresses are encoded. */
+ else if (*augmentation == 'R')
+ {
+ cie->encoding = *buf++;
+ augmentation++;
+ }
+
+ /* "P" indicates a personality routine in the CIE augmentation. */
+ else if (*augmentation == 'P')
+ {
+ /* Skip. */
+ buf += size_of_encoded_value (*buf++);
+ augmentation++;
+ }
+
+ /* Otherwise we have an unknown augmentation.
+ Bail out unless we saw a 'z' prefix. */
+ else
+ {
+ if (cie->initial_instructions == NULL)
+ return end;
+
+ /* Skip unknown augmentations. */
+ buf = cie->initial_instructions;
+ break;
+ }
+ }
+
+ cie->initial_instructions = buf;
+ cie->end = end;
+
+ add_cie (unit, cie);
+ }
+ else
+ {
+ /* This is a FDE. */
+ struct dwarf2_fde *fde;
+
+ if (eh_frame_p)
+ {
+ /* In an .eh_frame section, the CIE pointer is the delta
+ between the address within the FDE where the CIE pointer
+ is stored and the address of the CIE. Convert it to an
+ offset into the .eh_frame section. */
+ cie_pointer = buf - unit->dwarf_frame_buffer - cie_pointer;
+ cie_pointer -= (dwarf64_p ? 8 : 4);
+ }
+
+ fde = (struct dwarf2_fde *)
+ obstack_alloc (&unit->objfile->psymbol_obstack,
+ sizeof (struct dwarf2_fde));
+ fde->cie = find_cie (unit, cie_pointer);
+ if (fde->cie == NULL)
+ {
+ decode_frame_entry (unit, unit->dwarf_frame_buffer + cie_pointer,
+ eh_frame_p);
+ fde->cie = find_cie (unit, cie_pointer);
+ }
+
+ gdb_assert (fde->cie != NULL);
+
+ fde->initial_location =
+ read_encoded_value (unit, fde->cie->encoding, buf, &bytes_read);
+ buf += bytes_read;
+
+ fde->address_range =
+ read_encoded_value (unit, fde->cie->encoding & 0x0f, buf, &bytes_read);
+ buf += bytes_read;
+
+ /* A 'z' augmentation in the CIE implies the presence of an
+ augmentation field in the FDE as well. The only thing known
+ to be in here at present is the LSDA entry for EH. So we
+ can skip the whole thing. */
+ if (fde->cie->saw_z_augmentation)
+ {
+ ULONGEST length;
+
+ length = read_unsigned_leb128 (unit->abfd, buf, &bytes_read);
+ buf += bytes_read + length;
+ }
+
+ fde->instructions = buf;
+ fde->end = end;
+
+ add_fde (unit, fde);
+ }
+
+ return end;
+}
+
+
+/* FIXME: kettenis/20030504: This still needs to be integrated with
+ dwarf2read.c in a better way. */
+
+/* Imported from dwarf2read.c. */
+extern file_ptr dwarf_frame_offset;
+extern unsigned int dwarf_frame_size;
+extern asection *dwarf_frame_section;
+extern file_ptr dwarf_eh_frame_offset;
+extern unsigned int dwarf_eh_frame_size;
+extern asection *dwarf_eh_frame_section;
+
+/* Imported from dwarf2read.c. */
+extern char *dwarf2_read_section (struct objfile *objfile, file_ptr offset,
+ unsigned int size, asection *sectp);
+
+void
+dwarf2_build_frame_info (struct objfile *objfile)
+{
+ struct comp_unit unit;
+ char *frame_ptr;
+
+ /* Build a minimal decoding of the DWARF2 compilation unit. */
+ unit.abfd = objfile->obfd;
+ unit.objfile = objfile;
+ unit.addr_size = objfile->obfd->arch_info->bits_per_address / 8;
+ unit.dbase = 0;
+
+ /* First add the information from the .eh_frame section. That way,
+ the FDEs from that section are searched last. */
+ if (dwarf_eh_frame_offset)
+ {
+ asection *got;
+
+ unit.cie = NULL;
+ unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
+ dwarf_eh_frame_offset,
+ dwarf_eh_frame_size,
+ dwarf_eh_frame_section);
+
+ unit.dwarf_frame_size = dwarf_eh_frame_size;
+ unit.dwarf_frame_section = dwarf_eh_frame_section;
+
+ /* FIXME: kettenis/20030602: This is the DW_EH_PE_datarel base
+ that for the i386/amd64 target, which currently is the only
+ target in GCC that supports/uses the DW_EH_PE_datarel
+ encoding. */
+ got = bfd_get_section_by_name (unit.abfd, ".got");
+ if (got)
+ unit.dbase = got->vma;
+
+ frame_ptr = unit.dwarf_frame_buffer;
+ while (frame_ptr < unit.dwarf_frame_buffer + unit.dwarf_frame_size)
+ frame_ptr = decode_frame_entry (&unit, frame_ptr, 1);
+ }
+
+ if (dwarf_frame_offset)
+ {
+ unit.cie = NULL;
+ unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
+ dwarf_frame_offset,
+ dwarf_frame_size,
+ dwarf_frame_section);
+ unit.dwarf_frame_size = dwarf_frame_size;
+ unit.dwarf_frame_section = dwarf_frame_section;
+
+ frame_ptr = unit.dwarf_frame_buffer;
+ while (frame_ptr < unit.dwarf_frame_buffer + unit.dwarf_frame_size)
+ frame_ptr = decode_frame_entry (&unit, frame_ptr, 0);
+ }
+}
diff --git a/gdb/config/mips/tm-tx39l.h b/gdb/dwarf2-frame.h
index 81f3b6ddc41..4b4c1a5ab2f 100644
--- a/gdb/config/mips/tm-tx39l.h
+++ b/gdb/dwarf2-frame.h
@@ -1,4 +1,8 @@
-/* Copyright 1993, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Frame unwinder for frames with DWARF Call Frame Information.
+
+ Copyright 2003 Free Software Foundation, Inc.
+
+ Contributed by Mark Kettenis.
This file is part of GDB.
@@ -17,16 +21,23 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/tm-mips.h"
-
-#undef MIPS_REGISTER_NAMES
-#define MIPS_REGISTER_NAMES \
- { "sr", "lo", "hi", "bad", "cause","pc", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "", "", \
- "", "", "", "", "", "", "", "", \
- "", "", "config", "cache", "debug", "depc", "epc", "" \
- }
+#ifndef DWARF2_FRAME_H
+#define DWARF2_FRAME_H 1
+
+struct objfile;
+
+/* Return the frame unwind methods for the function that contains PC,
+ or NULL if it can't be handled by DWARF CFI frame unwinder. */
+
+const struct frame_unwind *dwarf2_frame_p (CORE_ADDR pc);
+
+/* Return the frame base methods for the function that contains PC, or
+ NULL if it can't be handled by the DWARF CFI frame unwinder. */
+
+const struct frame_base *dwarf2_frame_base_p (CORE_ADDR pc);
+
+/* Register the DWARF CFI for OBJFILE. */
+
+void dwarf2_frame_build_info (struct objfile *objfile);
+
+#endif /* dwarf2-frame.h */
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8f927f0f0ea..182ee4fd064 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1768,6 +1768,8 @@ process_die (struct die_info *die, struct objfile *objfile,
of a function and make GDB `next' properly over inlined functions. */
break;
case DW_TAG_lexical_block:
+ case DW_TAG_try_block:
+ case DW_TAG_catch_block:
read_lexical_block_scope (die, objfile, cu_header);
break;
case DW_TAG_class_type:
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index bbfecbc29f5..38b5d927de6 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -701,7 +701,7 @@ static void
read_lexical_block_scope (struct dieinfo *dip, char *thisdie, char *enddie,
struct objfile *objfile)
{
- register struct context_stack *new;
+ struct context_stack *new;
push_context (0, dip->at_low_pc);
process_dies (thisdie + dip->die_length, enddie, objfile);
@@ -862,7 +862,8 @@ decode_die_type (struct dieinfo *dip)
}
else if (dip->at_user_def_type)
{
- if ((type = lookup_utype (dip->at_user_def_type)) == NULL)
+ type = lookup_utype (dip->at_user_def_type);
+ if (type == NULL)
{
type = alloc_utype (dip->at_user_def_type, NULL);
}
@@ -916,7 +917,8 @@ struct_type (struct dieinfo *dip, char *thisdie, char *enddie,
char *nextdie;
int anonymous_size;
- if ((type = lookup_utype (dip->die_ref)) == NULL)
+ type = lookup_utype (dip->die_ref);
+ if (type == NULL)
{
/* No forward references created an empty type, so install one now */
type = alloc_utype (dip->die_ref, NULL);
@@ -1149,7 +1151,8 @@ decode_array_element_type (char *scan)
attribute = target_to_host (scan, SIZEOF_ATTRIBUTE, GET_UNSIGNED,
current_objfile);
scan += SIZEOF_ATTRIBUTE;
- if ((nbytes = attribute_size (attribute)) == -1)
+ nbytes = attribute_size (attribute);
+ if (nbytes == -1)
{
bad_array_element_type_complaint (DIE_ID, DIE_NAME, attribute);
typep = dwarf_fundamental_type (current_objfile, FT_INTEGER);
@@ -1169,7 +1172,8 @@ decode_array_element_type (char *scan)
case AT_user_def_type:
die_ref = target_to_host (scan, nbytes, GET_UNSIGNED,
current_objfile);
- if ((typep = lookup_utype (die_ref)) == NULL)
+ typep = lookup_utype (die_ref);
+ if (typep == NULL)
{
typep = alloc_utype (die_ref, NULL);
}
@@ -1334,14 +1338,16 @@ dwarf_read_array_type (struct dieinfo *dip)
"DIE @ 0x%x \"%s\", array not row major; not handled correctly",
DIE_ID, DIE_NAME);
}
- if ((sub = dip->at_subscr_data) != NULL)
+ sub = dip->at_subscr_data;
+ if (sub != NULL)
{
nbytes = attribute_size (AT_subscr_data);
blocksz = target_to_host (sub, nbytes, GET_UNSIGNED, current_objfile);
subend = sub + nbytes + blocksz;
sub += nbytes;
type = decode_subscript_data_item (sub, subend);
- if ((utype = lookup_utype (dip->die_ref)) == NULL)
+ utype = lookup_utype (dip->die_ref);
+ if (utype == NULL)
{
/* Install user defined type that has not been referenced yet. */
alloc_utype (dip->die_ref, type);
@@ -1390,7 +1396,8 @@ read_tag_pointer_type (struct dieinfo *dip)
struct type *utype;
type = decode_die_type (dip);
- if ((utype = lookup_utype (dip->die_ref)) == NULL)
+ utype = lookup_utype (dip->die_ref);
+ if (utype == NULL)
{
utype = lookup_pointer_type (type);
alloc_utype (dip->die_ref, utype);
@@ -1509,7 +1516,8 @@ read_subroutine_type (struct dieinfo *dip, char *thisdie, char *enddie)
/* Check to see if we already have a partially constructed user
defined type for this DIE, from a forward reference. */
- if ((ftype = lookup_utype (dip->die_ref)) == NULL)
+ ftype = lookup_utype (dip->die_ref);
+ if (ftype == NULL)
{
/* This is the first reference to one of these types. Make
a new one and place it in the user defined types. */
@@ -1623,7 +1631,8 @@ enum_type (struct dieinfo *dip, struct objfile *objfile)
int nbytes;
int unsigned_enum = 1;
- if ((type = lookup_utype (dip->die_ref)) == NULL)
+ type = lookup_utype (dip->die_ref);
+ if (type == NULL)
{
/* No forward references created an empty type, so install one now */
type = alloc_utype (dip->die_ref, NULL);
@@ -1643,7 +1652,8 @@ enum_type (struct dieinfo *dip, struct objfile *objfile)
{
TYPE_LENGTH (type) = dip->at_byte_size;
}
- if ((scan = dip->at_element_list) != NULL)
+ scan = dip->at_element_list;
+ if (scan != NULL)
{
if (dip->short_element_list)
{
@@ -1734,7 +1744,7 @@ static void
read_func_scope (struct dieinfo *dip, char *thisdie, char *enddie,
struct objfile *objfile)
{
- register struct context_stack *new;
+ struct context_stack *new;
/* AT_name is absent if the function is described with an
AT_abstract_origin tag.
@@ -2431,7 +2441,8 @@ add_enum_psymbol (struct dieinfo *dip, struct objfile *objfile)
unsigned short blocksz;
int nbytes;
- if ((scan = dip->at_element_list) != NULL)
+ scan = dip->at_element_list;
+ if (scan != NULL)
{
if (dip->short_element_list)
{
@@ -3144,7 +3155,8 @@ decode_modified_type (char *modifiers, unsigned int modcount, int mtype)
nbytes = attribute_size (AT_user_def_type);
die_ref = target_to_host (modifiers, nbytes, GET_UNSIGNED,
current_objfile);
- if ((typep = lookup_utype (die_ref)) == NULL)
+ typep = lookup_utype (die_ref);
+ if (typep == NULL)
{
typep = alloc_utype (die_ref, NULL);
}
@@ -3493,7 +3505,8 @@ completedieinfo (struct dieinfo *dip, struct objfile *objfile)
{
attr = target_to_host (diep, SIZEOF_ATTRIBUTE, GET_UNSIGNED, objfile);
diep += SIZEOF_ATTRIBUTE;
- if ((nbytes = attribute_size (attr)) == -1)
+ nbytes = attribute_size (attr);
+ if (nbytes == -1)
{
complaint (&symfile_complaints,
"DIE @ 0x%x \"%s\", unknown attribute length, skipped remaining attributes",
diff --git a/gdb/event-top.c b/gdb/event-top.c
index ceef7b9c9eb..5ab324df758 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -492,10 +492,8 @@ command_handler (char *command)
if (display_space)
{
#ifdef HAVE_SBRK
- extern char **environ;
char *lim = (char *) sbrk (0);
-
- space_at_cmd_start = (long) (lim - (char *) &environ);
+ space_at_cmd_start = lim - lim_at_start;
#endif
}
@@ -538,9 +536,8 @@ command_handler (char *command)
if (display_space)
{
#ifdef HAVE_SBRK
- extern char **environ;
char *lim = (char *) sbrk (0);
- long space_now = lim - (char *) &environ;
+ long space_now = lim - lim_at_start;
long space_diff = space_now - space_at_cmd_start;
printf_unfiltered ("Space used: %ld (%c%ld for this command)\n",
@@ -577,9 +574,8 @@ command_line_handler_continuation (struct continuation_arg *arg)
if (display_space)
{
#ifdef HAVE_SBRK
- extern char **environ;
char *lim = (char *) sbrk (0);
- long space_now = lim - (char *) &environ;
+ long space_now = lim - lim_at_start;
long space_diff = space_now - space_at_cmd_start;
printf_unfiltered ("Space used: %ld (%c%ld for this command)\n",
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 5d975e43c85..4aa4f46c235 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -161,28 +161,6 @@ extract_long_unsigned_integer (const void *addr, int orig_len, LONGEST *pval)
}
-/* Treat the LEN bytes at ADDR as a target-format address, and return
- that address. ADDR is a buffer in the GDB process, not in the
- inferior.
-
- This function should only be used by target-specific code. It
- assumes that a pointer has the same representation as that thing's
- address represented as an integer. Some machines use word
- addresses, or similarly munged things, for certain types of
- pointers, so that assumption doesn't hold everywhere.
-
- Common code should use extract_typed_address instead, or something
- else based on POINTER_TO_ADDRESS. */
-
-CORE_ADDR
-extract_address (const void *addr, int len)
-{
- /* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
- whether we want this to be true eventually. */
- return (CORE_ADDR) extract_unsigned_integer (addr, len);
-}
-
-
/* Treat the bytes at BUF as a pointer of type TYPE, and return the
address it represents. */
CORE_ADDR
@@ -791,7 +769,7 @@ value_from_register (struct type *type, int regnum, struct frame_info *frame)
for some good purpose. */
{
VALUE_LVAL (v) = lval_reg_frame_relative;
- VALUE_FRAME (v) = get_frame_base (frame);
+ VALUE_FRAME_ID (v) = get_frame_id (frame);
VALUE_FRAME_REGNUM (v) = regnum;
}
else if (mem_stor)
diff --git a/gdb/frame.c b/gdb/frame.c
index 07e0e5b15b6..dd69ddecd58 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -2219,6 +2219,37 @@ deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
return frame;
}
+/* Memory access methods. */
+
+void
+get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr, void *buf,
+ int len)
+{
+ read_memory (addr, buf, len);
+}
+
+LONGEST
+get_frame_memory_signed (struct frame_info *this_frame, CORE_ADDR addr,
+ int len)
+{
+ return read_memory_integer (addr, len);
+}
+
+ULONGEST
+get_frame_memory_unsigned (struct frame_info *this_frame, CORE_ADDR addr,
+ int len)
+{
+ return read_memory_unsigned_integer (addr, len);
+}
+
+/* Architecture method. */
+
+struct gdbarch *
+get_frame_arch (struct frame_info *this_frame)
+{
+ return current_gdbarch;
+}
+
int
legacy_frame_p (struct gdbarch *current_gdbarch)
{
diff --git a/gdb/frame.h b/gdb/frame.h
index 0abb08ed9ca..bfd94694375 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -343,6 +343,31 @@ extern CORE_ADDR frame_pc_unwind (struct frame_info *frame);
of the caller. */
extern void frame_pop (struct frame_info *frame);
+/* Return memory from the specified frame. A frame knows its thread /
+ LWP and hence can find its way down to a target. The assumption
+ here is that the current and previous frame share a common address
+ space.
+
+ If the memory read fails, these methods throw an error.
+
+ NOTE: cagney/2003-06-03: Should there be unwind versions of these
+ methods? That isn't clear. Can code, for instance, assume that
+ this and the previous frame's memory or architecture are identical?
+ If architecture / memory changes are always separated by special
+ adaptor frames this should be ok. */
+
+extern void get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr,
+ void *buf, int len);
+extern LONGEST get_frame_memory_signed (struct frame_info *this_frame,
+ CORE_ADDR memaddr, int len);
+extern ULONGEST get_frame_memory_unsigned (struct frame_info *this_frame,
+ CORE_ADDR memaddr, int len);
+
+/* Return this frame's architecture. */
+
+extern struct gdbarch *get_frame_arch (struct frame_info *this_frame);
+
+
/* Values for the source flag to be used in print_frame_info_base(). */
enum print_what
{
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index c26af4d28ee..666aa25431a 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -762,8 +762,8 @@ frv_extract_return_value (struct type *type, char *regbuf, char *valbuf)
static CORE_ADDR
frv_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf + frv_register_byte (struct_return_regnum),
- 4);
+ return extract_unsigned_integer (regbuf + frv_register_byte (struct_return_regnum),
+ 4);
}
static void
@@ -859,7 +859,7 @@ frv_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (argreg < 14)
{
- regval = extract_address (val, partial_len);
+ regval = extract_unsigned_integer (val, partial_len);
#if 0
printf(" Argnum %d data %x -> reg %d\n",
argnum, (int) regval, argreg);
@@ -1108,7 +1108,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_function_start_offset (gdbarch, 0);
- set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
set_gdbarch_remote_translate_xfer_address
(gdbarch, frv_remote_translate_xfer_address);
diff --git a/gdb/gdb_assert.h b/gdb/gdb_assert.h
index 4f0bcdc9497..9cad74c9cbc 100644
--- a/gdb/gdb_assert.h
+++ b/gdb/gdb_assert.h
@@ -40,16 +40,19 @@
#else
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
#define ASSERT_FUNCTION __func__
-#else
-#define ASSERT_FUNCTION ((const char *) 0)
#endif
#endif
/* This prints an "Assertion failed" message, aksing the user if they
want to continue, dump core, or just exit. */
+#if defined (ASSERT_FUNCTION)
+#define gdb_assert_fail(assertion, file, line, function) \
+ internal_error (file, line, "%s: Assertion `%s' failed.", \
+ function, assertion)
+#else
#define gdb_assert_fail(assertion, file, line, function) \
- internal_error (file, line, "%s%sAssertion `%s' failed.", \
- function ? function : "", function ? ": " : "", \
+ internal_error (file, line, "Assertion `%s' failed.", \
assertion)
+#endif
#endif /* gdb_assert.h */
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 976ce59ae13..7c0a8fde405 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -280,6 +280,7 @@ struct gdbarch
gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
gdbarch_register_reggroup_p_ftype *register_reggroup_p;
+ gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
};
@@ -446,6 +447,7 @@ struct gdbarch startup_gdbarch =
0,
0,
default_register_reggroup_p,
+ 0,
/* startup_gdbarch() */
};
@@ -762,6 +764,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of address_class_type_flags_to_name, has predicate */
/* Skip verify of address_class_name_to_type_flags, has predicate */
/* Skip verify of register_reggroup_p, invalid_p == 0 */
+ /* Skip verify of fetch_pointer_argument, has predicate */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -1693,6 +1696,26 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->extract_struct_value_address
/*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
#endif
+#ifdef FETCH_POINTER_ARGUMENT_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FETCH_POINTER_ARGUMENT_P()",
+ XSTRING (FETCH_POINTER_ARGUMENT_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n",
+ FETCH_POINTER_ARGUMENT_P ());
+#endif
+#ifdef FETCH_POINTER_ARGUMENT
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "FETCH_POINTER_ARGUMENT(frame, argi, type)",
+ XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type)));
+ if (GDB_MULTI_ARCH)
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n",
+ (long) current_gdbarch->fetch_pointer_argument
+ /*FETCH_POINTER_ARGUMENT ()*/);
+#endif
#ifdef FP0_REGNUM
fprintf_unfiltered (file,
"gdbarch_dump: FP0_REGNUM # %s\n",
@@ -4264,7 +4287,7 @@ gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
}
CORE_ADDR
-gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
+gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
{
gdb_assert (gdbarch != NULL);
if (gdbarch->push_dummy_call == 0)
@@ -4272,7 +4295,7 @@ gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, COR
"gdbarch: gdbarch_push_dummy_call invalid");
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
- return gdbarch->push_dummy_call (gdbarch, regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr);
+ return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr);
}
void
@@ -5691,6 +5714,32 @@ set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
gdbarch->register_reggroup_p = register_reggroup_p;
}
+int
+gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->fetch_pointer_argument != 0;
+}
+
+CORE_ADDR
+gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch->fetch_pointer_argument == 0)
+ internal_error (__FILE__, __LINE__,
+ "gdbarch: gdbarch_fetch_pointer_argument invalid");
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n");
+ return gdbarch->fetch_pointer_argument (frame, argi, type);
+}
+
+void
+set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
+ gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument)
+{
+ gdbarch->fetch_pointer_argument = fetch_pointer_argument;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index e80836f2a33..9678f4fb12f 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -69,33 +69,27 @@ extern const struct bfd_arch_info * gdbarch_bfd_arch_info (struct gdbarch *gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ARCHITECTURE)
#error "Non multi-arch definition of TARGET_ARCHITECTURE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ARCHITECTURE)
+#if !defined (TARGET_ARCHITECTURE)
#define TARGET_ARCHITECTURE (gdbarch_bfd_arch_info (current_gdbarch))
#endif
-#endif
extern int gdbarch_byte_order (struct gdbarch *gdbarch);
/* set_gdbarch_byte_order() - not applicable - pre-initialized. */
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BYTE_ORDER)
#error "Non multi-arch definition of TARGET_BYTE_ORDER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BYTE_ORDER)
+#if !defined (TARGET_BYTE_ORDER)
#define TARGET_BYTE_ORDER (gdbarch_byte_order (current_gdbarch))
#endif
-#endif
extern enum gdb_osabi gdbarch_osabi (struct gdbarch *gdbarch);
/* set_gdbarch_osabi() - not applicable - pre-initialized. */
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_OSABI)
#error "Non multi-arch definition of TARGET_OSABI"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_OSABI)
+#if !defined (TARGET_OSABI)
#define TARGET_OSABI (gdbarch_osabi (current_gdbarch))
#endif
-#endif
/* The following are initialized by the target dependent code. */
@@ -116,11 +110,9 @@ extern void set_gdbarch_short_bit (struct gdbarch *gdbarch, int short_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_SHORT_BIT)
#error "Non multi-arch definition of TARGET_SHORT_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_SHORT_BIT)
+#if !defined (TARGET_SHORT_BIT)
#define TARGET_SHORT_BIT (gdbarch_short_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in an int or unsigned int for the target machine. */
@@ -134,11 +126,9 @@ extern void set_gdbarch_int_bit (struct gdbarch *gdbarch, int int_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_INT_BIT)
#error "Non multi-arch definition of TARGET_INT_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_INT_BIT)
+#if !defined (TARGET_INT_BIT)
#define TARGET_INT_BIT (gdbarch_int_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a long or unsigned long for the target machine. */
@@ -152,11 +142,9 @@ extern void set_gdbarch_long_bit (struct gdbarch *gdbarch, int long_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_BIT)
#error "Non multi-arch definition of TARGET_LONG_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_BIT)
+#if !defined (TARGET_LONG_BIT)
#define TARGET_LONG_BIT (gdbarch_long_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a long long or unsigned long long for the target
machine. */
@@ -171,11 +159,9 @@ extern void set_gdbarch_long_long_bit (struct gdbarch *gdbarch, int long_long_bi
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_LONG_BIT)
#error "Non multi-arch definition of TARGET_LONG_LONG_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_LONG_BIT)
+#if !defined (TARGET_LONG_LONG_BIT)
#define TARGET_LONG_LONG_BIT (gdbarch_long_long_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a float for the target machine. */
@@ -189,11 +175,9 @@ extern void set_gdbarch_float_bit (struct gdbarch *gdbarch, int float_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_BIT)
#error "Non multi-arch definition of TARGET_FLOAT_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_BIT)
+#if !defined (TARGET_FLOAT_BIT)
#define TARGET_FLOAT_BIT (gdbarch_float_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a double for the target machine. */
@@ -207,11 +191,9 @@ extern void set_gdbarch_double_bit (struct gdbarch *gdbarch, int double_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_BIT)
#error "Non multi-arch definition of TARGET_DOUBLE_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_BIT)
+#if !defined (TARGET_DOUBLE_BIT)
#define TARGET_DOUBLE_BIT (gdbarch_double_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a long double for the target machine. */
@@ -225,11 +207,9 @@ extern void set_gdbarch_long_double_bit (struct gdbarch *gdbarch, int long_doubl
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_BIT)
#error "Non multi-arch definition of TARGET_LONG_DOUBLE_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_BIT)
+#if !defined (TARGET_LONG_DOUBLE_BIT)
#define TARGET_LONG_DOUBLE_BIT (gdbarch_long_double_bit (current_gdbarch))
#endif
-#endif
/* For most targets, a pointer on the target and its representation as an
address in GDB have the same size and "look the same". For such a
@@ -251,11 +231,9 @@ extern void set_gdbarch_ptr_bit (struct gdbarch *gdbarch, int ptr_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PTR_BIT)
#error "Non multi-arch definition of TARGET_PTR_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PTR_BIT)
+#if !defined (TARGET_PTR_BIT)
#define TARGET_PTR_BIT (gdbarch_ptr_bit (current_gdbarch))
#endif
-#endif
/* addr_bit is the size of a target address as represented in gdb */
@@ -269,11 +247,9 @@ extern void set_gdbarch_addr_bit (struct gdbarch *gdbarch, int addr_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_ADDR_BIT)
#error "Non multi-arch definition of TARGET_ADDR_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_ADDR_BIT)
+#if !defined (TARGET_ADDR_BIT)
#define TARGET_ADDR_BIT (gdbarch_addr_bit (current_gdbarch))
#endif
-#endif
/* Number of bits in a BFD_VMA for the target object file format. */
@@ -287,11 +263,9 @@ extern void set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, int bfd_vma_bit);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_BFD_VMA_BIT)
#error "Non multi-arch definition of TARGET_BFD_VMA_BIT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_BFD_VMA_BIT)
+#if !defined (TARGET_BFD_VMA_BIT)
#define TARGET_BFD_VMA_BIT (gdbarch_bfd_vma_bit (current_gdbarch))
#endif
-#endif
/* One if `char' acts like `signed char', zero if `unsigned char'. */
@@ -305,11 +279,9 @@ extern void set_gdbarch_char_signed (struct gdbarch *gdbarch, int char_signed);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_CHAR_SIGNED)
#error "Non multi-arch definition of TARGET_CHAR_SIGNED"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_CHAR_SIGNED)
+#if !defined (TARGET_CHAR_SIGNED)
#define TARGET_CHAR_SIGNED (gdbarch_char_signed (current_gdbarch))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_PC)
@@ -322,11 +294,9 @@ extern void set_gdbarch_read_pc (struct gdbarch *gdbarch, gdbarch_read_pc_ftype
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_PC)
#error "Non multi-arch definition of TARGET_READ_PC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_PC)
+#if !defined (TARGET_READ_PC)
#define TARGET_READ_PC(ptid) (gdbarch_read_pc (current_gdbarch, ptid))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_WRITE_PC)
@@ -339,11 +309,9 @@ extern void set_gdbarch_write_pc (struct gdbarch *gdbarch, gdbarch_write_pc_ftyp
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_WRITE_PC)
#error "Non multi-arch definition of TARGET_WRITE_PC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_WRITE_PC)
+#if !defined (TARGET_WRITE_PC)
#define TARGET_WRITE_PC(val, ptid) (gdbarch_write_pc (current_gdbarch, val, ptid))
#endif
-#endif
/* This is simply not needed. See value_of_builtin_frame_fp_reg and
call_function_by_hand. */
@@ -379,11 +347,9 @@ extern void set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_TARGET_READ_FP)
#error "Non multi-arch definition of DEPRECATED_TARGET_READ_FP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_TARGET_READ_FP)
+#if !defined (DEPRECATED_TARGET_READ_FP)
#define DEPRECATED_TARGET_READ_FP() (gdbarch_deprecated_target_read_fp (current_gdbarch))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_READ_SP)
@@ -396,11 +362,9 @@ extern void set_gdbarch_read_sp (struct gdbarch *gdbarch, gdbarch_read_sp_ftype
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_READ_SP)
#error "Non multi-arch definition of TARGET_READ_SP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_READ_SP)
+#if !defined (TARGET_READ_SP)
#define TARGET_READ_SP() (gdbarch_read_sp (current_gdbarch))
#endif
-#endif
/* The dummy call frame SP should be set by push_dummy_call. */
@@ -435,11 +399,9 @@ extern void set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DUMMY_WRITE_SP)
#error "Non multi-arch definition of DEPRECATED_DUMMY_WRITE_SP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DUMMY_WRITE_SP)
+#if !defined (DEPRECATED_DUMMY_WRITE_SP)
#define DEPRECATED_DUMMY_WRITE_SP(val) (gdbarch_deprecated_dummy_write_sp (current_gdbarch, val))
#endif
-#endif
/* Function for getting target's idea of a frame pointer. FIXME: GDB's
whole scheme for dealing with "frames" and "frame pointers" needs a
@@ -456,11 +418,9 @@ extern void set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_VIRTUAL_FRAME_POINTER)
#error "Non multi-arch definition of TARGET_VIRTUAL_FRAME_POINTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_VIRTUAL_FRAME_POINTER)
+#if !defined (TARGET_VIRTUAL_FRAME_POINTER)
#define TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset) (gdbarch_virtual_frame_pointer (current_gdbarch, pc, frame_regnum, frame_offset))
#endif
-#endif
extern int gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch);
@@ -479,11 +439,9 @@ extern void set_gdbarch_num_regs (struct gdbarch *gdbarch, int num_regs);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_REGS)
#error "Non multi-arch definition of NUM_REGS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_REGS)
+#if !defined (NUM_REGS)
#define NUM_REGS (gdbarch_num_regs (current_gdbarch))
#endif
-#endif
/* This macro gives the number of pseudo-registers that live in the
register namespace but do not get fetched or stored on the target.
@@ -500,11 +458,9 @@ extern void set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, int num_pseudo
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NUM_PSEUDO_REGS)
#error "Non multi-arch definition of NUM_PSEUDO_REGS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NUM_PSEUDO_REGS)
+#if !defined (NUM_PSEUDO_REGS)
#define NUM_PSEUDO_REGS (gdbarch_num_pseudo_regs (current_gdbarch))
#endif
-#endif
/* GDB's standard (or well known) register numbers. These can map onto
a real register or a pseudo (computed) register or not be defined at
@@ -520,11 +476,9 @@ extern void set_gdbarch_sp_regnum (struct gdbarch *gdbarch, int sp_regnum);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SP_REGNUM)
#error "Non multi-arch definition of SP_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SP_REGNUM)
+#if !defined (SP_REGNUM)
#define SP_REGNUM (gdbarch_sp_regnum (current_gdbarch))
#endif
-#endif
/* This is simply not needed. See value_of_builtin_frame_fp_reg and
call_function_by_hand. */
@@ -539,11 +493,9 @@ extern void set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, int depre
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FP_REGNUM)
#error "Non multi-arch definition of DEPRECATED_FP_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FP_REGNUM)
+#if !defined (DEPRECATED_FP_REGNUM)
#define DEPRECATED_FP_REGNUM (gdbarch_deprecated_fp_regnum (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (PC_REGNUM)
@@ -555,11 +507,9 @@ extern void set_gdbarch_pc_regnum (struct gdbarch *gdbarch, int pc_regnum);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_REGNUM)
#error "Non multi-arch definition of PC_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_REGNUM)
+#if !defined (PC_REGNUM)
#define PC_REGNUM (gdbarch_pc_regnum (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (PS_REGNUM)
@@ -571,11 +521,9 @@ extern void set_gdbarch_ps_regnum (struct gdbarch *gdbarch, int ps_regnum);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PS_REGNUM)
#error "Non multi-arch definition of PS_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PS_REGNUM)
+#if !defined (PS_REGNUM)
#define PS_REGNUM (gdbarch_ps_regnum (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FP0_REGNUM)
@@ -587,11 +535,9 @@ extern void set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, int fp0_regnum);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FP0_REGNUM)
#error "Non multi-arch definition of FP0_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FP0_REGNUM)
+#if !defined (FP0_REGNUM)
#define FP0_REGNUM (gdbarch_fp0_regnum (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (NPC_REGNUM)
@@ -603,11 +549,9 @@ extern void set_gdbarch_npc_regnum (struct gdbarch *gdbarch, int npc_regnum);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NPC_REGNUM)
#error "Non multi-arch definition of NPC_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NPC_REGNUM)
+#if !defined (NPC_REGNUM)
#define NPC_REGNUM (gdbarch_npc_regnum (current_gdbarch))
#endif
-#endif
/* Convert stab register number (from `r' declaration) to a gdb REGNUM. */
@@ -622,11 +566,9 @@ extern void set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sta
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STAB_REG_TO_REGNUM)
#error "Non multi-arch definition of STAB_REG_TO_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STAB_REG_TO_REGNUM)
+#if !defined (STAB_REG_TO_REGNUM)
#define STAB_REG_TO_REGNUM(stab_regnr) (gdbarch_stab_reg_to_regnum (current_gdbarch, stab_regnr))
#endif
-#endif
/* Provide a default mapping from a ecoff register number to a gdb REGNUM. */
@@ -641,11 +583,9 @@ extern void set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_ec
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ECOFF_REG_TO_REGNUM)
#error "Non multi-arch definition of ECOFF_REG_TO_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ECOFF_REG_TO_REGNUM)
+#if !defined (ECOFF_REG_TO_REGNUM)
#define ECOFF_REG_TO_REGNUM(ecoff_regnr) (gdbarch_ecoff_reg_to_regnum (current_gdbarch, ecoff_regnr))
#endif
-#endif
/* Provide a default mapping from a DWARF register number to a gdb REGNUM. */
@@ -660,11 +600,9 @@ extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dw
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF_REG_TO_REGNUM)
#error "Non multi-arch definition of DWARF_REG_TO_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF_REG_TO_REGNUM)
+#if !defined (DWARF_REG_TO_REGNUM)
#define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
#endif
-#endif
/* Convert from an sdb register number to an internal gdb register number.
This should be defined in tm.h, if REGISTER_NAMES is not set up
@@ -681,11 +619,9 @@ extern void set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_sdb_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SDB_REG_TO_REGNUM)
#error "Non multi-arch definition of SDB_REG_TO_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SDB_REG_TO_REGNUM)
+#if !defined (SDB_REG_TO_REGNUM)
#define SDB_REG_TO_REGNUM(sdb_regnr) (gdbarch_sdb_reg_to_regnum (current_gdbarch, sdb_regnr))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (DWARF2_REG_TO_REGNUM)
@@ -698,11 +634,9 @@ extern void set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_d
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_REG_TO_REGNUM)
#error "Non multi-arch definition of DWARF2_REG_TO_REGNUM"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_REG_TO_REGNUM)
+#if !defined (DWARF2_REG_TO_REGNUM)
#define DWARF2_REG_TO_REGNUM(dwarf2_regnr) (gdbarch_dwarf2_reg_to_regnum (current_gdbarch, dwarf2_regnr))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_NAME)
@@ -715,11 +649,9 @@ extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_NAME)
#error "Non multi-arch definition of REGISTER_NAME"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_NAME)
+#if !defined (REGISTER_NAME)
#define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
#endif
-#endif
extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch);
extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size);
@@ -776,11 +708,9 @@ extern void set_gdbarch_register_byte (struct gdbarch *gdbarch, gdbarch_register
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTE)
#error "Non multi-arch definition of REGISTER_BYTE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTE)
+#if !defined (REGISTER_BYTE)
#define REGISTER_BYTE(reg_nr) (gdbarch_register_byte (current_gdbarch, reg_nr))
#endif
-#endif
/* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */
@@ -796,11 +726,9 @@ extern void set_gdbarch_register_raw_size (struct gdbarch *gdbarch, gdbarch_regi
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_RAW_SIZE)
#error "Non multi-arch definition of REGISTER_RAW_SIZE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_RAW_SIZE)
+#if !defined (REGISTER_RAW_SIZE)
#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_register_raw_size (current_gdbarch, reg_nr))
#endif
-#endif
/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
@@ -836,11 +764,9 @@ extern void set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
#error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_RAW_SIZE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
+#if !defined (DEPRECATED_MAX_REGISTER_RAW_SIZE)
#define DEPRECATED_MAX_REGISTER_RAW_SIZE (gdbarch_deprecated_max_register_raw_size (current_gdbarch))
#endif
-#endif
/* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */
@@ -856,11 +782,9 @@ extern void set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_SIZE)
#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_SIZE)
+#if !defined (REGISTER_VIRTUAL_SIZE)
#define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_register_virtual_size (current_gdbarch, reg_nr))
#endif
-#endif
/* The methods DEPRECATED_MAX_REGISTER_RAW_SIZE and
DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE are all being replaced by
@@ -896,11 +820,9 @@ extern void set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gd
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
#error "Non multi-arch definition of DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
+#if !defined (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)
#define DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE (gdbarch_deprecated_max_register_virtual_size (current_gdbarch))
#endif
-#endif
/* The methods REGISTER_VIRTUAL_TYPE, REGISTER_VIRTUAL_SIZE and
REGISTER_RAW_SIZE are all being replaced by REGISTER_TYPE. */
@@ -936,11 +858,9 @@ extern void set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_VIRTUAL_TYPE)
#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_VIRTUAL_TYPE)
+#if !defined (REGISTER_VIRTUAL_TYPE)
#define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_register_virtual_type (current_gdbarch, reg_nr))
#endif
-#endif
extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
@@ -979,11 +899,9 @@ extern void set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, g
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_DO_REGISTERS_INFO)
#error "Non multi-arch definition of DEPRECATED_DO_REGISTERS_INFO"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_DO_REGISTERS_INFO)
+#if !defined (DEPRECATED_DO_REGISTERS_INFO)
#define DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs) (gdbarch_deprecated_do_registers_info (current_gdbarch, reg_nr, fpregs))
#endif
-#endif
typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
extern void gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all);
@@ -1015,11 +933,9 @@ extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_reg
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIM_REGNO)
#error "Non multi-arch definition of REGISTER_SIM_REGNO"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_SIM_REGNO)
+#if !defined (REGISTER_SIM_REGNO)
#define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
#endif
-#endif
#if defined (REGISTER_BYTES_OK)
/* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
@@ -1052,11 +968,9 @@ extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_regi
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_BYTES_OK)
#error "Non multi-arch definition of REGISTER_BYTES_OK"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_BYTES_OK)
+#if !defined (REGISTER_BYTES_OK)
#define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CANNOT_FETCH_REGISTER)
@@ -1069,11 +983,9 @@ extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_FETCH_REGISTER)
#error "Non multi-arch definition of CANNOT_FETCH_REGISTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_FETCH_REGISTER)
+#if !defined (CANNOT_FETCH_REGISTER)
#define CANNOT_FETCH_REGISTER(regnum) (gdbarch_cannot_fetch_register (current_gdbarch, regnum))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STORE_REGISTER)
@@ -1086,11 +998,9 @@ extern void set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STORE_REGISTER)
#error "Non multi-arch definition of CANNOT_STORE_REGISTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STORE_REGISTER)
+#if !defined (CANNOT_STORE_REGISTER)
#define CANNOT_STORE_REGISTER(regnum) (gdbarch_cannot_store_register (current_gdbarch, regnum))
#endif
-#endif
/* setjmp/longjmp support. */
@@ -1125,11 +1035,9 @@ extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (GET_LONGJMP_TARGET)
#error "Non multi-arch definition of GET_LONGJMP_TARGET"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (GET_LONGJMP_TARGET)
+#if !defined (GET_LONGJMP_TARGET)
#define GET_LONGJMP_TARGET(pc) (gdbarch_get_longjmp_target (current_gdbarch, pc))
#endif
-#endif
/* Non multi-arch DUMMY_FRAMES are a mess (multi-arch ones are not that
much better but at least they are vaguely consistent). The headers
@@ -1182,11 +1090,9 @@ extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_cal
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_ADDRESS)
#error "Non multi-arch definition of CALL_DUMMY_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_ADDRESS)
+#if !defined (CALL_DUMMY_ADDRESS)
#define CALL_DUMMY_ADDRESS() (gdbarch_call_dummy_address (current_gdbarch))
#endif
-#endif
/* Replaced by push_dummy_code. */
@@ -1258,11 +1164,9 @@ extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gd
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PC_IN_CALL_DUMMY)
#error "Non multi-arch definition of DEPRECATED_PC_IN_CALL_DUMMY"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PC_IN_CALL_DUMMY)
+#if !defined (DEPRECATED_PC_IN_CALL_DUMMY)
#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) (gdbarch_deprecated_pc_in_call_dummy (current_gdbarch, pc, sp, frame_address))
#endif
-#endif
/* Replaced by push_dummy_code. */
@@ -1328,11 +1232,9 @@ extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_STACK_ADJUST"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
+#if !defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
#define DEPRECATED_CALL_DUMMY_STACK_ADJUST (gdbarch_deprecated_call_dummy_stack_adjust (current_gdbarch))
#endif
-#endif
/* Replaced by push_dummy_code. */
@@ -1367,11 +1269,9 @@ extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY)
#error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY)
+#if !defined (DEPRECATED_FIX_CALL_DUMMY)
#define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (gdbarch_deprecated_fix_call_dummy (current_gdbarch, dummy, pc, fun, nargs, args, type, gcc_p))
#endif
-#endif
/* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */
@@ -1412,11 +1312,9 @@ extern void set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC_FIRST)
#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC_FIRST"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
+#if !defined (DEPRECATED_INIT_FRAME_PC_FIRST)
#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) (gdbarch_deprecated_init_frame_pc_first (current_gdbarch, fromleaf, prev))
#endif
-#endif
#if defined (DEPRECATED_INIT_FRAME_PC)
/* Legacy for systems yet to multi-arch DEPRECATED_INIT_FRAME_PC */
@@ -1449,22 +1347,18 @@ extern void set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_FRAME_PC)
#error "Non multi-arch definition of DEPRECATED_INIT_FRAME_PC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_FRAME_PC)
+#if !defined (DEPRECATED_INIT_FRAME_PC)
#define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (gdbarch_deprecated_init_frame_pc (current_gdbarch, fromleaf, prev))
#endif
-#endif
extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BELIEVE_PCC_PROMOTION)
#error "Non multi-arch definition of BELIEVE_PCC_PROMOTION"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BELIEVE_PCC_PROMOTION)
+#if !defined (BELIEVE_PCC_PROMOTION)
#define BELIEVE_PCC_PROMOTION (gdbarch_believe_pcc_promotion (current_gdbarch))
#endif
-#endif
extern int gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch);
extern void set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, int believe_pcc_promotion_type);
@@ -1506,11 +1400,9 @@ extern void set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_GET_SAVED_REGISTER)
#error "Non multi-arch definition of DEPRECATED_GET_SAVED_REGISTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_GET_SAVED_REGISTER)
+#if !defined (DEPRECATED_GET_SAVED_REGISTER)
#define DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) (gdbarch_deprecated_get_saved_register (current_gdbarch, raw_buffer, optimized, addrp, frame, regnum, lval))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERTIBLE)
@@ -1523,11 +1415,9 @@ extern void set_gdbarch_register_convertible (struct gdbarch *gdbarch, gdbarch_r
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERTIBLE)
#error "Non multi-arch definition of REGISTER_CONVERTIBLE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERTIBLE)
+#if !defined (REGISTER_CONVERTIBLE)
#define REGISTER_CONVERTIBLE(nr) (gdbarch_register_convertible (current_gdbarch, nr))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_VIRTUAL)
@@ -1540,11 +1430,9 @@ extern void set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, gd
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_VIRTUAL)
#error "Non multi-arch definition of REGISTER_CONVERT_TO_VIRTUAL"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_VIRTUAL)
+#if !defined (REGISTER_CONVERT_TO_VIRTUAL)
#define REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to) (gdbarch_register_convert_to_virtual (current_gdbarch, regnum, type, from, to))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_CONVERT_TO_RAW)
@@ -1557,11 +1445,9 @@ extern void set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, gdbarc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_CONVERT_TO_RAW)
#error "Non multi-arch definition of REGISTER_CONVERT_TO_RAW"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_CONVERT_TO_RAW)
+#if !defined (REGISTER_CONVERT_TO_RAW)
#define REGISTER_CONVERT_TO_RAW(type, regnum, from, to) (gdbarch_register_convert_to_raw (current_gdbarch, type, regnum, from, to))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CONVERT_REGISTER_P)
@@ -1574,11 +1460,9 @@ extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_con
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_REGISTER_P)
#error "Non multi-arch definition of CONVERT_REGISTER_P"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_REGISTER_P)
+#if !defined (CONVERT_REGISTER_P)
#define CONVERT_REGISTER_P(regnum) (gdbarch_convert_register_p (current_gdbarch, regnum))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (REGISTER_TO_VALUE)
@@ -1591,11 +1475,9 @@ extern void set_gdbarch_register_to_value (struct gdbarch *gdbarch, gdbarch_regi
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_TO_VALUE)
#error "Non multi-arch definition of REGISTER_TO_VALUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (REGISTER_TO_VALUE)
+#if !defined (REGISTER_TO_VALUE)
#define REGISTER_TO_VALUE(regnum, type, from, to) (gdbarch_register_to_value (current_gdbarch, regnum, type, from, to))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (VALUE_TO_REGISTER)
@@ -1608,11 +1490,9 @@ extern void set_gdbarch_value_to_register (struct gdbarch *gdbarch, gdbarch_valu
#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (VALUE_TO_REGISTER)
#error "Non multi-arch definition of VALUE_TO_REGISTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (VALUE_TO_REGISTER)
+#if !defined (VALUE_TO_REGISTER)
#define VALUE_TO_REGISTER(type, regnum, from, to) (gdbarch_value_to_register (current_gdbarch, type, regnum, from, to))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (POINTER_TO_ADDRESS)
@@ -1625,11 +1505,9 @@ extern void set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, gdbarch_poi
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (POINTER_TO_ADDRESS)
#error "Non multi-arch definition of POINTER_TO_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (POINTER_TO_ADDRESS)
+#if !defined (POINTER_TO_ADDRESS)
#define POINTER_TO_ADDRESS(type, buf) (gdbarch_pointer_to_address (current_gdbarch, type, buf))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (ADDRESS_TO_POINTER)
@@ -1642,11 +1520,9 @@ extern void set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, gdbarch_add
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_TO_POINTER)
#error "Non multi-arch definition of ADDRESS_TO_POINTER"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_TO_POINTER)
+#if !defined (ADDRESS_TO_POINTER)
#define ADDRESS_TO_POINTER(type, buf, addr) (gdbarch_address_to_pointer (current_gdbarch, type, buf, addr))
#endif
-#endif
#if defined (INTEGER_TO_ADDRESS)
/* Legacy for systems yet to multi-arch INTEGER_TO_ADDRESS */
@@ -1679,11 +1555,9 @@ extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_int
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INTEGER_TO_ADDRESS)
#error "Non multi-arch definition of INTEGER_TO_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INTEGER_TO_ADDRESS)
+#if !defined (INTEGER_TO_ADDRESS)
#define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (RETURN_VALUE_ON_STACK)
@@ -1696,11 +1570,9 @@ extern void set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (RETURN_VALUE_ON_STACK)
#error "Non multi-arch definition of RETURN_VALUE_ON_STACK"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (RETURN_VALUE_ON_STACK)
+#if !defined (RETURN_VALUE_ON_STACK)
#define RETURN_VALUE_ON_STACK(type) (gdbarch_return_value_on_stack (current_gdbarch, type))
#endif
-#endif
/* Replaced by PUSH_DUMMY_CALL */
@@ -1735,16 +1607,14 @@ extern void set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_ARGUMENTS)
#error "Non multi-arch definition of DEPRECATED_PUSH_ARGUMENTS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_ARGUMENTS)
+#if !defined (DEPRECATED_PUSH_ARGUMENTS)
#define DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (gdbarch_deprecated_push_arguments (current_gdbarch, nargs, args, sp, struct_return, struct_addr))
#endif
-#endif
extern int gdbarch_push_dummy_call_p (struct gdbarch *gdbarch);
-typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
-extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
+typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
+extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr);
extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call);
#if defined (DEPRECATED_PUSH_DUMMY_FRAME)
@@ -1778,11 +1648,9 @@ extern void set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, gd
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_DUMMY_FRAME)
#error "Non multi-arch definition of DEPRECATED_PUSH_DUMMY_FRAME"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_DUMMY_FRAME)
+#if !defined (DEPRECATED_PUSH_DUMMY_FRAME)
#define DEPRECATED_PUSH_DUMMY_FRAME (gdbarch_deprecated_push_dummy_frame (current_gdbarch))
#endif
-#endif
/* NOTE: This can be handled directly in push_dummy_call. */
@@ -1817,11 +1685,9 @@ extern void set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_PUSH_RETURN_ADDRESS)
#error "Non multi-arch definition of DEPRECATED_PUSH_RETURN_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
+#if !defined (DEPRECATED_PUSH_RETURN_ADDRESS)
#define DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp) (gdbarch_deprecated_push_return_address (current_gdbarch, pc, sp))
#endif
-#endif
#if defined (DEPRECATED_POP_FRAME)
/* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */
@@ -1854,11 +1720,9 @@ extern void set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, gdbarch_d
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_POP_FRAME)
#error "Non multi-arch definition of DEPRECATED_POP_FRAME"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_POP_FRAME)
+#if !defined (DEPRECATED_POP_FRAME)
#define DEPRECATED_POP_FRAME (gdbarch_deprecated_pop_frame (current_gdbarch))
#endif
-#endif
/* NOTE: cagney/2003-03-24: Replaced by PUSH_ARGUMENTS. */
@@ -1893,11 +1757,9 @@ extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_STRUCT_RETURN)
#error "Non multi-arch definition of DEPRECATED_STORE_STRUCT_RETURN"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_STRUCT_RETURN)
+#if !defined (DEPRECATED_STORE_STRUCT_RETURN)
#define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (EXTRACT_RETURN_VALUE)
@@ -1910,11 +1772,9 @@ extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_e
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_RETURN_VALUE)
#error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_RETURN_VALUE)
+#if !defined (EXTRACT_RETURN_VALUE)
#define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (STORE_RETURN_VALUE)
@@ -1927,11 +1787,9 @@ extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_sto
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STORE_RETURN_VALUE)
#error "Non multi-arch definition of STORE_RETURN_VALUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STORE_RETURN_VALUE)
+#if !defined (STORE_RETURN_VALUE)
#define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
#endif
-#endif
typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, char *regbuf, char *valbuf);
extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf);
@@ -1939,11 +1797,9 @@ extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
+#if !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
#endif
-#endif
typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, char *valbuf);
extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf);
@@ -1951,11 +1807,9 @@ extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_STORE_RETURN_VALUE)
#error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_STORE_RETURN_VALUE)
+#if !defined (DEPRECATED_STORE_RETURN_VALUE)
#define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
#endif
-#endif
#if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
/* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
@@ -1988,11 +1842,9 @@ extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, g
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (EXTRACT_STRUCT_VALUE_ADDRESS)
#error "Non multi-arch definition of EXTRACT_STRUCT_VALUE_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
+#if !defined (EXTRACT_STRUCT_VALUE_ADDRESS)
#define EXTRACT_STRUCT_VALUE_ADDRESS(regcache) (gdbarch_extract_struct_value_address (current_gdbarch, regcache))
#endif
-#endif
#if defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
/* Legacy for systems yet to multi-arch DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS */
@@ -2025,11 +1877,9 @@ extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
#error "Non multi-arch definition of DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
+#if !defined (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS)
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION)
@@ -2042,11 +1892,9 @@ extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (USE_STRUCT_CONVENTION)
#error "Non multi-arch definition of USE_STRUCT_CONVENTION"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (USE_STRUCT_CONVENTION)
+#if !defined (USE_STRUCT_CONVENTION)
#define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
#endif
-#endif
#if defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_INIT_SAVED_REGS */
@@ -2079,11 +1927,9 @@ extern void set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
#error "Non multi-arch definition of DEPRECATED_FRAME_INIT_SAVED_REGS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
+#if !defined (DEPRECATED_FRAME_INIT_SAVED_REGS)
#define DEPRECATED_FRAME_INIT_SAVED_REGS(frame) (gdbarch_deprecated_frame_init_saved_regs (current_gdbarch, frame))
#endif
-#endif
#if defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
/* Legacy for systems yet to multi-arch DEPRECATED_INIT_EXTRA_FRAME_INFO */
@@ -2116,11 +1962,9 @@ extern void set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
#error "Non multi-arch definition of DEPRECATED_INIT_EXTRA_FRAME_INFO"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
+#if !defined (DEPRECATED_INIT_EXTRA_FRAME_INFO)
#define DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame) (gdbarch_deprecated_init_extra_frame_info (current_gdbarch, fromleaf, frame))
#endif
-#endif
typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (CORE_ADDR ip);
extern CORE_ADDR gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip);
@@ -2128,11 +1972,9 @@ extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_pro
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_PROLOGUE)
#error "Non multi-arch definition of SKIP_PROLOGUE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_PROLOGUE)
+#if !defined (SKIP_PROLOGUE)
#define SKIP_PROLOGUE(ip) (gdbarch_skip_prologue (current_gdbarch, ip))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (PROLOGUE_FRAMELESS_P)
@@ -2145,11 +1987,9 @@ extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_p
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PROLOGUE_FRAMELESS_P)
#error "Non multi-arch definition of PROLOGUE_FRAMELESS_P"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PROLOGUE_FRAMELESS_P)
+#if !defined (PROLOGUE_FRAMELESS_P)
#define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
#endif
-#endif
typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
@@ -2157,11 +1997,9 @@ extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INNER_THAN)
#error "Non multi-arch definition of INNER_THAN"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INNER_THAN)
+#if !defined (INNER_THAN)
#define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
#endif
-#endif
typedef const unsigned char * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
extern const unsigned char * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
@@ -2169,11 +2007,9 @@ extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_bre
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (BREAKPOINT_FROM_PC)
#error "Non multi-arch definition of BREAKPOINT_FROM_PC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (BREAKPOINT_FROM_PC)
+#if !defined (BREAKPOINT_FROM_PC)
#define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (MEMORY_INSERT_BREAKPOINT)
@@ -2186,11 +2022,9 @@ extern void set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_INSERT_BREAKPOINT)
#error "Non multi-arch definition of MEMORY_INSERT_BREAKPOINT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_INSERT_BREAKPOINT)
+#if !defined (MEMORY_INSERT_BREAKPOINT)
#define MEMORY_INSERT_BREAKPOINT(addr, contents_cache) (gdbarch_memory_insert_breakpoint (current_gdbarch, addr, contents_cache))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (MEMORY_REMOVE_BREAKPOINT)
@@ -2203,22 +2037,18 @@ extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (MEMORY_REMOVE_BREAKPOINT)
#error "Non multi-arch definition of MEMORY_REMOVE_BREAKPOINT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (MEMORY_REMOVE_BREAKPOINT)
+#if !defined (MEMORY_REMOVE_BREAKPOINT)
#define MEMORY_REMOVE_BREAKPOINT(addr, contents_cache) (gdbarch_memory_remove_breakpoint (current_gdbarch, addr, contents_cache))
#endif
-#endif
extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch);
extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_BREAK)
#error "Non multi-arch definition of DECR_PC_AFTER_BREAK"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DECR_PC_AFTER_BREAK)
+#if !defined (DECR_PC_AFTER_BREAK)
#define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED)
@@ -2231,22 +2061,18 @@ extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_pre
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED)
#error "Non multi-arch definition of PREPARE_TO_PROCEED"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PREPARE_TO_PROCEED)
+#if !defined (PREPARE_TO_PROCEED)
#define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it))
#endif
-#endif
extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch);
extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset);
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
#error "Non multi-arch definition of FUNCTION_START_OFFSET"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FUNCTION_START_OFFSET)
+#if !defined (FUNCTION_START_OFFSET)
#define FUNCTION_START_OFFSET (gdbarch_function_start_offset (current_gdbarch))
#endif
-#endif
typedef void (gdbarch_remote_translate_xfer_address_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
@@ -2257,11 +2083,9 @@ extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR fram
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_SKIP)
#error "Non multi-arch definition of FRAME_ARGS_SKIP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_SKIP)
+#if !defined (FRAME_ARGS_SKIP)
#define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FRAMELESS_FUNCTION_INVOCATION)
@@ -2274,11 +2098,9 @@ extern void set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAMELESS_FUNCTION_INVOCATION)
#error "Non multi-arch definition of FRAMELESS_FUNCTION_INVOCATION"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAMELESS_FUNCTION_INVOCATION)
+#if !defined (FRAMELESS_FUNCTION_INVOCATION)
#define FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_frameless_function_invocation (current_gdbarch, fi))
#endif
-#endif
#if defined (DEPRECATED_FRAME_CHAIN)
/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */
@@ -2311,11 +2133,9 @@ extern void set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, gdbarch
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN)
#error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN)
+#if !defined (DEPRECATED_FRAME_CHAIN)
#define DEPRECATED_FRAME_CHAIN(frame) (gdbarch_deprecated_frame_chain (current_gdbarch, frame))
#endif
-#endif
#if defined (DEPRECATED_FRAME_CHAIN_VALID)
/* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN_VALID */
@@ -2348,11 +2168,9 @@ extern void set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, g
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_CHAIN_VALID)
#error "Non multi-arch definition of DEPRECATED_FRAME_CHAIN_VALID"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_CHAIN_VALID)
+#if !defined (DEPRECATED_FRAME_CHAIN_VALID)
#define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe) (gdbarch_deprecated_frame_chain_valid (current_gdbarch, chain, thisframe))
#endif
-#endif
/* DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please
note, per UNWIND_PC's doco, that while the two have similar
@@ -2389,11 +2207,9 @@ extern void set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAME_SAVED_PC)
#error "Non multi-arch definition of DEPRECATED_FRAME_SAVED_PC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FRAME_SAVED_PC)
+#if !defined (DEPRECATED_FRAME_SAVED_PC)
#define DEPRECATED_FRAME_SAVED_PC(fi) (gdbarch_deprecated_frame_saved_pc (current_gdbarch, fi))
#endif
-#endif
extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch);
@@ -2412,11 +2228,9 @@ extern void set_gdbarch_frame_args_address (struct gdbarch *gdbarch, gdbarch_fra
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_ARGS_ADDRESS)
#error "Non multi-arch definition of FRAME_ARGS_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_ARGS_ADDRESS)
+#if !defined (FRAME_ARGS_ADDRESS)
#define FRAME_ARGS_ADDRESS(fi) (gdbarch_frame_args_address (current_gdbarch, fi))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (FRAME_LOCALS_ADDRESS)
@@ -2429,11 +2243,9 @@ extern void set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, gdbarch_f
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_LOCALS_ADDRESS)
#error "Non multi-arch definition of FRAME_LOCALS_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_LOCALS_ADDRESS)
+#if !defined (FRAME_LOCALS_ADDRESS)
#define FRAME_LOCALS_ADDRESS(fi) (gdbarch_frame_locals_address (current_gdbarch, fi))
#endif
-#endif
#if defined (DEPRECATED_SAVED_PC_AFTER_CALL)
/* Legacy for systems yet to multi-arch DEPRECATED_SAVED_PC_AFTER_CALL */
@@ -2466,11 +2278,9 @@ extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SAVED_PC_AFTER_CALL)
#error "Non multi-arch definition of DEPRECATED_SAVED_PC_AFTER_CALL"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
+#if !defined (DEPRECATED_SAVED_PC_AFTER_CALL)
#define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame))
#endif
-#endif
typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame);
extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame);
@@ -2478,11 +2288,9 @@ extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_n
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS)
#error "Non multi-arch definition of FRAME_NUM_ARGS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS)
+#if !defined (FRAME_NUM_ARGS)
#define FRAME_NUM_ARGS(frame) (gdbarch_frame_num_args (current_gdbarch, frame))
#endif
-#endif
#if defined (STACK_ALIGN)
/* Legacy for systems yet to multi-arch STACK_ALIGN */
@@ -2515,11 +2323,9 @@ extern void set_gdbarch_stack_align (struct gdbarch *gdbarch, gdbarch_stack_alig
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (STACK_ALIGN)
#error "Non multi-arch definition of STACK_ALIGN"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (STACK_ALIGN)
+#if !defined (STACK_ALIGN)
#define STACK_ALIGN(sp) (gdbarch_stack_align (current_gdbarch, sp))
#endif
-#endif
extern int gdbarch_frame_align_p (struct gdbarch *gdbarch);
@@ -2539,11 +2345,9 @@ extern void set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
#error "Non multi-arch definition of DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
+#if !defined (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED)
#define DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED (gdbarch_deprecated_extra_stack_alignment_needed (current_gdbarch))
#endif
-#endif
#if defined (REG_STRUCT_HAS_ADDR)
/* Legacy for systems yet to multi-arch REG_STRUCT_HAS_ADDR */
@@ -2576,11 +2380,9 @@ extern void set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_re
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REG_STRUCT_HAS_ADDR)
#error "Non multi-arch definition of REG_STRUCT_HAS_ADDR"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REG_STRUCT_HAS_ADDR)
+#if !defined (REG_STRUCT_HAS_ADDR)
#define REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_reg_struct_has_addr (current_gdbarch, gcc_p, type))
#endif
-#endif
/* FIXME: kettenis/2003-03-08: This should be replaced by a function
parametrized with (at least) the regcache. */
@@ -2616,11 +2418,9 @@ extern void set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, gdbarch_s
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SAVE_DUMMY_FRAME_TOS)
#error "Non multi-arch definition of SAVE_DUMMY_FRAME_TOS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SAVE_DUMMY_FRAME_TOS)
+#if !defined (SAVE_DUMMY_FRAME_TOS)
#define SAVE_DUMMY_FRAME_TOS(sp) (gdbarch_save_dummy_frame_tos (current_gdbarch, sp))
#endif
-#endif
extern int gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch);
@@ -2633,11 +2433,9 @@ extern void set_gdbarch_parm_boundary (struct gdbarch *gdbarch, int parm_boundar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PARM_BOUNDARY)
#error "Non multi-arch definition of PARM_BOUNDARY"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PARM_BOUNDARY)
+#if !defined (PARM_BOUNDARY)
#define PARM_BOUNDARY (gdbarch_parm_boundary (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_FLOAT_FORMAT)
@@ -2649,11 +2447,9 @@ extern void set_gdbarch_float_format (struct gdbarch *gdbarch, const struct floa
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_FLOAT_FORMAT)
#error "Non multi-arch definition of TARGET_FLOAT_FORMAT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_FLOAT_FORMAT)
+#if !defined (TARGET_FLOAT_FORMAT)
#define TARGET_FLOAT_FORMAT (gdbarch_float_format (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_DOUBLE_FORMAT)
@@ -2665,11 +2461,9 @@ extern void set_gdbarch_double_format (struct gdbarch *gdbarch, const struct flo
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_DOUBLE_FORMAT)
#error "Non multi-arch definition of TARGET_DOUBLE_FORMAT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_DOUBLE_FORMAT)
+#if !defined (TARGET_DOUBLE_FORMAT)
#define TARGET_DOUBLE_FORMAT (gdbarch_double_format (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_LONG_DOUBLE_FORMAT)
@@ -2681,11 +2475,9 @@ extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_LONG_DOUBLE_FORMAT)
#error "Non multi-arch definition of TARGET_LONG_DOUBLE_FORMAT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_LONG_DOUBLE_FORMAT)
+#if !defined (TARGET_LONG_DOUBLE_FORMAT)
#define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CONVERT_FROM_FUNC_PTR_ADDR)
@@ -2698,11 +2490,9 @@ extern void set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, gdb
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
#error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CONVERT_FROM_FUNC_PTR_ADDR)
+#if !defined (CONVERT_FROM_FUNC_PTR_ADDR)
#define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
#endif
-#endif
/* On some machines there are bits in addresses which are not really
part of the address, but are used by the kernel, the hardware, etc.
@@ -2725,11 +2515,9 @@ extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDR_BITS_REMOVE)
#error "Non multi-arch definition of ADDR_BITS_REMOVE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDR_BITS_REMOVE)
+#if !defined (ADDR_BITS_REMOVE)
#define ADDR_BITS_REMOVE(addr) (gdbarch_addr_bits_remove (current_gdbarch, addr))
#endif
-#endif
/* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
ADDR_BITS_REMOVE. */
@@ -2745,11 +2533,9 @@ extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_sma
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS)
#error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SMASH_TEXT_ADDRESS)
+#if !defined (SMASH_TEXT_ADDRESS)
#define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
#endif
-#endif
/* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
the target needs software single step. An ISA method to implement it.
@@ -2791,11 +2577,9 @@ extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_s
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SOFTWARE_SINGLE_STEP)
#error "Non multi-arch definition of SOFTWARE_SINGLE_STEP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SOFTWARE_SINGLE_STEP)
+#if !defined (SOFTWARE_SINGLE_STEP)
#define SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p) (gdbarch_software_single_step (current_gdbarch, sig, insert_breakpoints_p))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (TARGET_PRINT_INSN)
@@ -2808,11 +2592,9 @@ extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (TARGET_PRINT_INSN)
#error "Non multi-arch definition of TARGET_PRINT_INSN"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (TARGET_PRINT_INSN)
+#if !defined (TARGET_PRINT_INSN)
#define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (SKIP_TRAMPOLINE_CODE)
@@ -2825,11 +2607,9 @@ extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_s
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_TRAMPOLINE_CODE)
#error "Non multi-arch definition of SKIP_TRAMPOLINE_CODE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SKIP_TRAMPOLINE_CODE)
+#if !defined (SKIP_TRAMPOLINE_CODE)
#define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
#endif
-#endif
/* For SVR4 shared libraries, each call goes through a small piece of
trampoline code in the ".plt" section. IN_SOLIB_CALL_TRAMPOLINE evaluates
@@ -2846,11 +2626,9 @@ extern void set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_CALL_TRAMPOLINE)
#error "Non multi-arch definition of IN_SOLIB_CALL_TRAMPOLINE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_CALL_TRAMPOLINE)
+#if !defined (IN_SOLIB_CALL_TRAMPOLINE)
#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (gdbarch_in_solib_call_trampoline (current_gdbarch, pc, name))
#endif
-#endif
/* Some systems also have trampoline code for returning from shared libs. */
@@ -2865,11 +2643,9 @@ extern void set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, gdb
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (IN_SOLIB_RETURN_TRAMPOLINE)
#error "Non multi-arch definition of IN_SOLIB_RETURN_TRAMPOLINE"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (IN_SOLIB_RETURN_TRAMPOLINE)
+#if !defined (IN_SOLIB_RETURN_TRAMPOLINE)
#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) (gdbarch_in_solib_return_trampoline (current_gdbarch, pc, name))
#endif
-#endif
/* Sigtramp is a routine that the kernel calls (which then calls the
signal handler). On most machines it is a library routine that is
@@ -2903,11 +2679,9 @@ extern void set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, gdbarch_pc_in_s
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PC_IN_SIGTRAMP)
#error "Non multi-arch definition of PC_IN_SIGTRAMP"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (PC_IN_SIGTRAMP)
+#if !defined (PC_IN_SIGTRAMP)
#define PC_IN_SIGTRAMP(pc, name) (gdbarch_pc_in_sigtramp (current_gdbarch, pc, name))
#endif
-#endif
#if defined (SIGTRAMP_START)
/* Legacy for systems yet to multi-arch SIGTRAMP_START */
@@ -2940,11 +2714,9 @@ extern void set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, gdbarch_sigtram
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_START)
#error "Non multi-arch definition of SIGTRAMP_START"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_START)
+#if !defined (SIGTRAMP_START)
#define SIGTRAMP_START(pc) (gdbarch_sigtramp_start (current_gdbarch, pc))
#endif
-#endif
#if defined (SIGTRAMP_END)
/* Legacy for systems yet to multi-arch SIGTRAMP_END */
@@ -2977,11 +2749,9 @@ extern void set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, gdbarch_sigtramp_
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIGTRAMP_END)
#error "Non multi-arch definition of SIGTRAMP_END"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIGTRAMP_END)
+#if !defined (SIGTRAMP_END)
#define SIGTRAMP_END(pc) (gdbarch_sigtramp_end (current_gdbarch, pc))
#endif
-#endif
/* A target might have problems with watchpoints as soon as the stack
frame of the current function has been destroyed. This mostly happens
@@ -3041,11 +2811,9 @@ extern void set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, gdbarc
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DWARF2_BUILD_FRAME_INFO)
#error "Non multi-arch definition of DWARF2_BUILD_FRAME_INFO"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DWARF2_BUILD_FRAME_INFO)
+#if !defined (DWARF2_BUILD_FRAME_INFO)
#define DWARF2_BUILD_FRAME_INFO(objfile) (gdbarch_dwarf2_build_frame_info (current_gdbarch, objfile))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (ELF_MAKE_MSYMBOL_SPECIAL)
@@ -3058,11 +2826,9 @@ extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
#error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ELF_MAKE_MSYMBOL_SPECIAL)
+#if !defined (ELF_MAKE_MSYMBOL_SPECIAL)
#define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym))
#endif
-#endif
/* Default (function) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (COFF_MAKE_MSYMBOL_SPECIAL)
@@ -3075,11 +2841,9 @@ extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdba
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
#error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (COFF_MAKE_MSYMBOL_SPECIAL)
+#if !defined (COFF_MAKE_MSYMBOL_SPECIAL)
#define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (NAME_OF_MALLOC)
@@ -3091,11 +2855,9 @@ extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * na
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (NAME_OF_MALLOC)
#error "Non multi-arch definition of NAME_OF_MALLOC"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (NAME_OF_MALLOC)
+#if !defined (NAME_OF_MALLOC)
#define NAME_OF_MALLOC (gdbarch_name_of_malloc (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CANNOT_STEP_BREAKPOINT)
@@ -3107,11 +2869,9 @@ extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int can
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CANNOT_STEP_BREAKPOINT)
#error "Non multi-arch definition of CANNOT_STEP_BREAKPOINT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CANNOT_STEP_BREAKPOINT)
+#if !defined (CANNOT_STEP_BREAKPOINT)
#define CANNOT_STEP_BREAKPOINT (gdbarch_cannot_step_breakpoint (current_gdbarch))
#endif
-#endif
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
@@ -3123,11 +2883,9 @@ extern void set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, i
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (HAVE_NONSTEPPABLE_WATCHPOINT)
#error "Non multi-arch definition of HAVE_NONSTEPPABLE_WATCHPOINT"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
+#if !defined (HAVE_NONSTEPPABLE_WATCHPOINT)
#define HAVE_NONSTEPPABLE_WATCHPOINT (gdbarch_have_nonsteppable_watchpoint (current_gdbarch))
#endif
-#endif
#if defined (ADDRESS_CLASS_TYPE_FLAGS)
/* Legacy for systems yet to multi-arch ADDRESS_CLASS_TYPE_FLAGS */
@@ -3160,11 +2918,9 @@ extern void set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, gdbar
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (ADDRESS_CLASS_TYPE_FLAGS)
#error "Non multi-arch definition of ADDRESS_CLASS_TYPE_FLAGS"
#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (ADDRESS_CLASS_TYPE_FLAGS)
+#if !defined (ADDRESS_CLASS_TYPE_FLAGS)
#define ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class) (gdbarch_address_class_type_flags (current_gdbarch, byte_size, dwarf2_addr_class))
#endif
-#endif
extern int gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch);
@@ -3184,6 +2940,43 @@ typedef int (gdbarch_register_reggroup_p_ftype) (struct gdbarch *gdbarch, int re
extern int gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup);
extern void set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *register_reggroup_p);
+/* Fetch the pointer to the ith function argument. */
+
+#if defined (FETCH_POINTER_ARGUMENT)
+/* Legacy for systems yet to multi-arch FETCH_POINTER_ARGUMENT */
+#if !defined (FETCH_POINTER_ARGUMENT_P)
+#define FETCH_POINTER_ARGUMENT_P() (1)
+#endif
+#endif
+
+/* Default predicate for non- multi-arch targets. */
+#if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT_P)
+#define FETCH_POINTER_ARGUMENT_P() (0)
+#endif
+
+extern int gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT_P)
+#error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
+#endif
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FETCH_POINTER_ARGUMENT_P)
+#define FETCH_POINTER_ARGUMENT_P() (gdbarch_fetch_pointer_argument_p (current_gdbarch))
+#endif
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (FETCH_POINTER_ARGUMENT)
+#define FETCH_POINTER_ARGUMENT(frame, argi, type) (internal_error (__FILE__, __LINE__, "FETCH_POINTER_ARGUMENT"), 0)
+#endif
+
+typedef CORE_ADDR (gdbarch_fetch_pointer_argument_ftype) (struct frame_info *frame, int argi, struct type *type);
+extern CORE_ADDR gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type);
+extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FETCH_POINTER_ARGUMENT)
+#error "Non multi-arch definition of FETCH_POINTER_ARGUMENT"
+#endif
+#if !defined (FETCH_POINTER_ARGUMENT)
+#define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type))
+#endif
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index f6106e4f372..006ec96680f 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -568,7 +568,7 @@ F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf
f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
# Replaced by PUSH_DUMMY_CALL
F:2:DEPRECATED_PUSH_ARGUMENTS:CORE_ADDR:deprecated_push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr
-M::PUSH_DUMMY_CALL:CORE_ADDR:push_dummy_call:struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr
+M::PUSH_DUMMY_CALL:CORE_ADDR:push_dummy_call:CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr
F:2:DEPRECATED_PUSH_DUMMY_FRAME:void:deprecated_push_dummy_frame:void:-:::0
# NOTE: This can be handled directly in push_dummy_call.
F:2:DEPRECATED_PUSH_RETURN_ADDRESS:CORE_ADDR:deprecated_push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0
@@ -716,6 +716,8 @@ M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:const char *:address_class_type_flags_to_na
M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:const char *name, int *type_flags_ptr:name, type_flags_ptr
# Is a register in a group
m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p::0
+# Fetch the pointer to the ith function argument.
+F::FETCH_POINTER_ARGUMENT:CORE_ADDR:fetch_pointer_argument:struct frame_info *frame, int argi, struct type *type:frame, argi, type:::::::::
EOF
}
@@ -853,11 +855,9 @@ do
printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro})\n"
printf "#error \"Non multi-arch definition of ${macro}\"\n"
printf "#endif\n"
- printf "#if GDB_MULTI_ARCH\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) || !defined (${macro})\n"
+ printf "#if !defined (${macro})\n"
printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
printf "#endif\n"
- printf "#endif\n"
fi
done
@@ -924,18 +924,9 @@ do
printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro})\n"
printf "#error \"Non multi-arch definition of ${macro}\"\n"
printf "#endif\n"
- if test "${level}" = ""
- then
- printf "#if !defined (${macro})\n"
- printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
- printf "#endif\n"
- else
- printf "#if GDB_MULTI_ARCH\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) || !defined (${macro})\n"
- printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
- printf "#endif\n"
- printf "#endif\n"
- fi
+ printf "#if !defined (${macro})\n"
+ printf "#define ${macro} (gdbarch_${function} (current_gdbarch))\n"
+ printf "#endif\n"
fi
if class_is_function_p
then
@@ -982,8 +973,16 @@ do
printf "#if (GDB_MULTI_ARCH ${gt_level}) && defined (${macro})\n"
printf "#error \"Non multi-arch definition of ${macro}\"\n"
printf "#endif\n"
- printf "#if GDB_MULTI_ARCH\n"
- printf "#if (GDB_MULTI_ARCH ${gt_level}) || !defined (${macro})\n"
+ if [ "x${actual}" = "x" ]
+ then
+ d="#define ${macro}() (gdbarch_${function} (current_gdbarch))"
+ elif [ "x${actual}" = "x-" ]
+ then
+ d="#define ${macro} (gdbarch_${function} (current_gdbarch))"
+ else
+ d="#define ${macro}(${actual}) (gdbarch_${function} (current_gdbarch, ${actual}))"
+ fi
+ printf "#if !defined (${macro})\n"
if [ "x${actual}" = "x" ]
then
printf "#define ${macro}() (gdbarch_${function} (current_gdbarch))\n"
@@ -994,7 +993,6 @@ do
printf "#define ${macro}(${actual}) (gdbarch_${function} (current_gdbarch, ${actual}))\n"
fi
printf "#endif\n"
- printf "#endif\n"
fi
fi
done
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 9df8a2a4807..3a324d630f2 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,20 @@
+2003-06-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * linux-low.c (linux_wait_for_event): Correct comment typos.
+ (linux_resume_one_process): Call check_removed_breakpoint.
+ (linux_send_signal): New function.
+ (linux_target_ops): Add linux_send_signal.
+ * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
+ of kill.
+ * target.h (struct target_ops): Add send_signal.
+
+2003-05-29 Jim Blandy <jimb@redhat.com>
+
+ * linux-low.c (usr_store_inferior_registers): Transfer buf in
+ PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
+ if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
+ away part of the register's value.
+
2003-04-24 Andrew Cagney <cagney@redhat.com>
* low-nbsd.c (fetch_inferior_registers):
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 95bf9697739..4ad204ed3ac 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -399,7 +399,7 @@ linux_wait_for_event (struct thread_info *child)
/* Check for a process with a pending status. */
/* It is possible that the user changed the pending task's registers since
it stopped. We correctly handle the change of PC if we hit a breakpoint
- (in check_removed_breakpoints); signals should be reported anyway. */
+ (in check_removed_breakpoint); signals should be reported anyway. */
if (child == NULL)
{
event_child = (struct process_info *)
@@ -541,7 +541,7 @@ linux_wait_for_event (struct thread_info *child)
if (check_breakpoints (stop_pc) != 0)
{
/* We hit one of our own breakpoints. We mark it as a pending
- breakpoint, so that check_removed_breakpoints () will do the PC
+ breakpoint, so that check_removed_breakpoint () will do the PC
adjustment for us at the appropriate time. */
event_child->pending_is_breakpoint = 1;
event_child->pending_stop_pc = stop_pc;
@@ -587,7 +587,7 @@ linux_wait_for_event (struct thread_info *child)
will give us a new action for this thread, but clear it for
consistency anyway. It's safe to clear the stepping flag
because the only consumer of get_stop_pc () after this point
- is check_removed_breakpoints, and pending_is_breakpoint is not
+ is check_removed_breakpoint, and pending_is_breakpoint is not
set. It might be wiser to use a step_completed flag instead. */
if (event_child->stepping)
{
@@ -786,7 +786,7 @@ linux_resume_one_process (struct inferior_list_entry *entry,
process->pending_signals = p_sig;
}
- if (process->status_pending_p)
+ if (process->status_pending_p && !check_removed_breakpoint (process))
return;
saved_inferior = current_inferior;
@@ -976,7 +976,7 @@ usr_store_inferior_registers (int regno)
{
errno = 0;
ptrace (PTRACE_POKEUSER, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- *(int *) (buf + i));
+ *(PTRACE_XFER_TYPE *) (buf + i));
if (errno != 0)
{
if ((*the_low_target.cannot_store_register) (regno) == 0)
@@ -989,7 +989,7 @@ usr_store_inferior_registers (int regno)
return;
}
}
- regaddr += sizeof (int);
+ regaddr += sizeof (PTRACE_XFER_TYPE);
}
}
else
@@ -1228,6 +1228,22 @@ linux_look_up_symbols (void)
#endif
}
+static void
+linux_send_signal (int signum)
+{
+ extern int signal_pid;
+
+ if (cont_thread > 0)
+ {
+ struct process_info *process;
+
+ process = get_thread_process (current_inferior);
+ kill (process->lwpid, signum);
+ }
+ else
+ kill (signal_pid, signum);
+}
+
static struct target_ops linux_target_ops = {
linux_create_inferior,
@@ -1241,6 +1257,7 @@ static struct target_ops linux_target_ops = {
linux_read_memory,
linux_write_memory,
linux_look_up_symbols,
+ linux_send_signal,
};
static void
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index d5699379bd5..eb56c1039a8 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -46,8 +46,6 @@ static int remote_desc;
extern int using_threads;
extern int debug_threads;
-extern int signal_pid;
-
/* Open a connection to a remote debugger.
NAME is the filename used for communication. */
@@ -326,7 +324,7 @@ putpkt (char *buf)
/* Check for an input interrupt while we're here. */
if (buf3[0] == '\003')
- kill (signal_pid, SIGINT);
+ (*the_target->send_signal) (SIGINT);
}
while (buf3[0] != '+');
@@ -363,7 +361,7 @@ input_interrupt (int unused)
return;
}
- kill (signal_pid, SIGINT);
+ (*the_target->send_signal) (SIGINT);
}
}
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index e554c0ac7e1..c09ac8da73d 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -104,6 +104,9 @@ struct target_ops
symbols. */
void (*look_up_symbols) (void);
+
+ /* Send a signal to the inferior process, however is appropriate. */
+ void (*send_signal) (int);
};
extern struct target_ops *the_target;
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 0559805da03..e7eb1faf494 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -706,7 +706,7 @@ h8300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
for (offset = 0; offset < padded_len; offset += wordsize)
{
- ULONGEST word = extract_address (padded + offset, wordsize);
+ ULONGEST word = extract_unsigned_integer (padded + offset, wordsize);
write_register (reg++, word);
}
}
@@ -830,11 +830,11 @@ h8300_store_return_value (struct type *type, char *valbuf)
{
case 1: /* char */
case 2: /* short, int */
- regval = extract_address (valbuf, len);
+ regval = extract_unsigned_integer (valbuf, len);
write_register (0, regval);
break;
case 4: /* long, float */
- regval = extract_address (valbuf, len);
+ regval = extract_unsigned_integer (valbuf, len);
if (wordsize == 4)
{
write_register (0, regval);
@@ -1032,8 +1032,8 @@ h8300_use_struct_convention (int gcc_p, struct type *type)
static CORE_ADDR
h8300_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf + h8300_register_byte (E_ARG0_REGNUM),
- h8300_register_raw_size (E_ARG0_REGNUM));
+ return extract_unsigned_integer (regbuf + h8300_register_byte (E_ARG0_REGNUM),
+ h8300_register_raw_size (E_ARG0_REGNUM));
}
const static unsigned char *
@@ -1074,18 +1074,28 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
switch (info.bfd_arch_info->mach)
{
- case bfd_mach_h8300:
- h8300smode = 0;
- h8300hmode = 0;
- break;
- case bfd_mach_h8300h:
- h8300smode = 0;
- h8300hmode = 1;
- break;
- case bfd_mach_h8300s:
- h8300smode = 1;
- h8300hmode = 1;
- break;
+ case bfd_mach_h8300:
+ h8300sxmode = 0;
+ h8300smode = 0;
+ h8300hmode = 0;
+ break;
+ case bfd_mach_h8300h:
+ case bfd_mach_h8300hn:
+ h8300sxmode = 0;
+ h8300smode = 0;
+ h8300hmode = 1;
+ break;
+ case bfd_mach_h8300s:
+ case bfd_mach_h8300sn:
+ h8300sxmode = 0;
+ h8300smode = 1;
+ h8300hmode = 1;
+ break;
+ case bfd_mach_h8300sx:
+ h8300sxmode = 1;
+ h8300smode = 1;
+ h8300hmode = 1;
+ break;
}
gdbarch = gdbarch_alloc (&info, 0);
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index cc50e02783e..0fb7c8f879d 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -94,15 +94,22 @@ hppa_hpux_frame_find_saved_regs_in_sigtramp (struct frame_info *fi,
}
}
+static void
+hppa_hpux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ set_gdbarch_pc_in_sigtramp (gdbarch, hppa_hpux_pc_in_sigtramp);
+}
static void
hppa_hpux_som_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
+ hppa_hpux_init_abi (info, gdbarch);
}
static void
hppa_hpux_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
+ hppa_hpux_init_abi (info, gdbarch);
}
void
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 1f78d06d164..24305ff60ff 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -4673,92 +4673,6 @@ unwind_command (char *exp, int from_tty)
pin (Total_frame_size);
}
-#ifdef PREPARE_TO_PROCEED
-
-/* If the user has switched threads, and there is a breakpoint
- at the old thread's pc location, then switch to that thread
- and return TRUE, else return FALSE and don't do a thread
- switch (or rather, don't seem to have done a thread switch).
-
- Ptrace-based gdb will always return FALSE to the thread-switch
- query, and thus also to PREPARE_TO_PROCEED.
-
- The important thing is whether there is a BPT instruction,
- not how many user breakpoints there are. So we have to worry
- about things like these:
-
- o Non-bp stop -- NO
-
- o User hits bp, no switch -- NO
-
- o User hits bp, switches threads -- YES
-
- o User hits bp, deletes bp, switches threads -- NO
-
- o User hits bp, deletes one of two or more bps
- at that PC, user switches threads -- YES
-
- o Plus, since we're buffering events, the user may have hit a
- breakpoint, deleted the breakpoint and then gotten another
- hit on that same breakpoint on another thread which
- actually hit before the delete. (FIXME in breakpoint.c
- so that "dead" breakpoints are ignored?) -- NO
-
- For these reasons, we have to violate information hiding and
- call "breakpoint_here_p". If core gdb thinks there is a bpt
- here, that's what counts, as core gdb is the one which is
- putting the BPT instruction in and taking it out.
-
- Note that this implementation is potentially redundant now that
- default_prepare_to_proceed() has been added.
-
- FIXME This may not support switching threads after Ctrl-C
- correctly. The default implementation does support this. */
-int
-hppa_prepare_to_proceed (void)
-{
- pid_t old_thread;
- pid_t current_thread;
-
- old_thread = hppa_switched_threads (PIDGET (inferior_ptid));
- if (old_thread != 0)
- {
- /* Switched over from "old_thread". Try to do
- as little work as possible, 'cause mostly
- we're going to switch back. */
- CORE_ADDR new_pc;
- CORE_ADDR old_pc = read_pc ();
-
- /* Yuk, shouldn't use global to specify current
- thread. But that's how gdb does it. */
- current_thread = PIDGET (inferior_ptid);
- inferior_ptid = pid_to_ptid (old_thread);
-
- new_pc = read_pc ();
- if (new_pc != old_pc /* If at same pc, no need */
- && breakpoint_here_p (new_pc))
- {
- /* User hasn't deleted the BP.
- Return TRUE, finishing switch to "old_thread". */
- flush_cached_frames ();
- registers_changed ();
-#if 0
- printf ("---> PREPARE_TO_PROCEED (was %d, now %d)!\n",
- current_thread, PIDGET (inferior_ptid));
-#endif
-
- return 1;
- }
-
- /* Otherwise switch back to the user-chosen thread. */
- inferior_ptid = pid_to_ptid (current_thread);
- new_pc = read_pc (); /* Re-prime register cache */
- }
-
- return 0;
-}
-#endif /* PREPARE_TO_PROCEED */
-
void
hppa_skip_permanent_breakpoint (void)
{
@@ -4993,6 +4907,16 @@ hppa_smash_text_address (CORE_ADDR addr)
return (addr &= ~0x3);
}
+/* Get the ith function argument for the current function. */
+CORE_ADDR
+hppa_fetch_pointer_argument (struct frame_info *frame, int argi,
+ struct type *type)
+{
+ CORE_ADDR addr;
+ frame_read_register (frame, R0_REGNUM + 26 - argi, &addr);
+ return addr;
+}
+
static struct gdbarch *
hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
@@ -5071,6 +4995,9 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_write_pc (gdbarch, hppa_target_write_pc);
set_gdbarch_deprecated_target_read_fp (gdbarch, hppa_target_read_fp);
+ /* Helper for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, hppa_fetch_pointer_argument);
+
return gdbarch;
}
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index 02f5acd9a90..ed55c341596 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -360,8 +360,8 @@ hpux_thread_store_registers (int regno)
&deprecated_registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
tcb_ptr->static_ctx.sp = (cma__t_hppa_regs *)
- (extract_address (&deprecated_registers[REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno)) + 160);
+ (extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (regno)],
+ REGISTER_RAW_SIZE (regno)) + 160);
}
else if (regno == PC_REGNUM)
write_memory (sp - 20,
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c
index 5911ec9b91a..443f8f7c223 100644
--- a/gdb/i386-cygwin-tdep.c
+++ b/gdb/i386-cygwin-tdep.c
@@ -1,56 +1,30 @@
/* Target-dependent code for Cygwin running on i386's, for GDB.
+
Copyright 2003 Free Software Foundation, Inc.
-This file is part of GDB.
+ This file is part of GDB.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include "defs.h"
-
-#include "gdb_string.h"
-#include "gdbcore.h"
-#include "i386-tdep.h"
#include "osabi.h"
-#include "frame.h"
-#include "dummy-frame.h"
-
-static int
-i386_cygwin_frame_chain_valid (CORE_ADDR chain, struct frame_info *thisframe)
-{
- /* In the context where this is used, we get the saved PC before we've
- successfully unwound far enough to be sure what we've got (it may
- be a signal handler caller). If we're dealing with a signal
- handler caller, this will return valid, which is fine. If not,
- it'll make the correct test. */
- return ((get_frame_type (thisframe) == SIGTRAMP_FRAME) || chain != 0);
-}
-/* Return the chain-pointer for FRAME. In the case of the i386, the
- frame's nominal address is the address of a 4-byte word containing
- the calling frame's address. */
-static CORE_ADDR
-i386_cygwin_frame_chain (struct frame_info *frame)
-{
- if (pc_in_dummy_frame (get_frame_pc (frame)))
- return get_frame_base (frame);
- if (get_frame_type (frame) == SIGTRAMP_FRAME
- || i386_frameless_signal_p (frame))
- return get_frame_base (frame);
+#include "gdb_string.h"
- return read_memory_unsigned_integer (get_frame_base (frame), 4);
-}
+#include "i386-tdep.h"
static void
i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -58,8 +32,6 @@ i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
tdep->struct_return = reg_struct_return;
- set_gdbarch_deprecated_frame_chain (gdbarch, i386_cygwin_frame_chain);
- set_gdbarch_deprecated_frame_chain_valid (gdbarch, i386_cygwin_frame_chain_valid);
}
static enum gdb_osabi
@@ -75,6 +47,9 @@ i386_cygwin_osabi_sniffer (bfd * abfd)
return GDB_OSABI_UNKNOWN;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+void _initialize_i386_cygwin_tdep (void);
+
void
_initialize_i386_cygwin_tdep (void)
{
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index cf769d87edc..81be404a0f4 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -70,6 +70,9 @@
/* Defines I386_LINUX_ORIG_EAX_REGNUM. */
#include "i386-linux-tdep.h"
+/* Defines ps_err_e, struct ps_prochandle. */
+#include "gdb_proc_service.h"
+
/* Prototypes for local functions. */
static void dummy_sse_values (void);
@@ -683,6 +686,21 @@ i386_linux_dr_set (int regnum, unsigned long value)
perror_with_name ("Couldn't write debug register");
}
+extern ps_err_e
+ps_get_thread_area(const struct ps_prochandle *ph,
+ lwpid_t lwpid, int idx, void **base)
+{
+ unsigned long int desc[3];
+#define PTRACE_GET_THREAD_AREA 25
+
+ if (ptrace (PTRACE_GET_THREAD_AREA,
+ lwpid, (void *) idx, (unsigned long) &desc) < 0)
+ return PS_ERR;
+
+ *(int *)base = desc[1];
+ return PS_OK;
+}
+
void
i386_linux_dr_set_control (unsigned long control)
{
@@ -852,7 +870,7 @@ child_resume (ptid_t ptid, int step, enum target_signal signal)
/* Then check the system call number. */
if (syscall == SYS_sigreturn || syscall == SYS_rt_sigreturn)
{
- CORE_ADDR sp = read_register (SP_REGNUM);
+ CORE_ADDR sp = read_register (I386_ESP_REGNUM);
CORE_ADDR addr = sp;
unsigned long int eflags;
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index afff5485edc..6d284f1ea98 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -81,7 +81,7 @@ i386_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
The instruction sequence for normal signals is
pop %eax
- mov $0x77,%eax
+ mov $0x77, %eax
int $0x80
or 0x58 0xb8 0x77 0x00 0x00 0x00 0xcd 0x80.
@@ -103,17 +103,17 @@ i386_linux_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
to the ones used by the kernel. Therefore, these trampolines are
supported too. */
-#define LINUX_SIGTRAMP_INSN0 (0x58) /* pop %eax */
-#define LINUX_SIGTRAMP_OFFSET0 (0)
-#define LINUX_SIGTRAMP_INSN1 (0xb8) /* mov $NNNN,%eax */
-#define LINUX_SIGTRAMP_OFFSET1 (1)
-#define LINUX_SIGTRAMP_INSN2 (0xcd) /* int */
-#define LINUX_SIGTRAMP_OFFSET2 (6)
+#define LINUX_SIGTRAMP_INSN0 0x58 /* pop %eax */
+#define LINUX_SIGTRAMP_OFFSET0 0
+#define LINUX_SIGTRAMP_INSN1 0xb8 /* mov $NNNN, %eax */
+#define LINUX_SIGTRAMP_OFFSET1 1
+#define LINUX_SIGTRAMP_INSN2 0xcd /* int */
+#define LINUX_SIGTRAMP_OFFSET2 6
static const unsigned char linux_sigtramp_code[] =
{
LINUX_SIGTRAMP_INSN0, /* pop %eax */
- LINUX_SIGTRAMP_INSN1, 0x77, 0x00, 0x00, 0x00, /* mov $0x77,%eax */
+ LINUX_SIGTRAMP_INSN1, 0x77, 0x00, 0x00, 0x00, /* mov $0x77, %eax */
LINUX_SIGTRAMP_INSN2, 0x80 /* int $0x80 */
};
@@ -167,20 +167,20 @@ i386_linux_sigtramp_start (CORE_ADDR pc)
/* This function does the same for RT signals. Here the instruction
sequence is
- mov $0xad,%eax
+ mov $0xad, %eax
int $0x80
or 0xb8 0xad 0x00 0x00 0x00 0xcd 0x80.
The effect is to call the system call rt_sigreturn. */
-#define LINUX_RT_SIGTRAMP_INSN0 (0xb8) /* mov $NNNN,%eax */
-#define LINUX_RT_SIGTRAMP_OFFSET0 (0)
-#define LINUX_RT_SIGTRAMP_INSN1 (0xcd) /* int */
-#define LINUX_RT_SIGTRAMP_OFFSET1 (5)
+#define LINUX_RT_SIGTRAMP_INSN0 0xb8 /* mov $NNNN, %eax */
+#define LINUX_RT_SIGTRAMP_OFFSET0 0
+#define LINUX_RT_SIGTRAMP_INSN1 0xcd /* int */
+#define LINUX_RT_SIGTRAMP_OFFSET1 5
static const unsigned char linux_rt_sigtramp_code[] =
{
- LINUX_RT_SIGTRAMP_INSN0, 0xad, 0x00, 0x00, 0x00, /* mov $0xad,%eax */
+ LINUX_RT_SIGTRAMP_INSN0, 0xad, 0x00, 0x00, 0x00, /* mov $0xad, %eax */
LINUX_RT_SIGTRAMP_INSN1, 0x80 /* int $0x80 */
};
@@ -239,50 +239,47 @@ i386_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
|| strcmp ("__restore_rt", name) == 0);
}
-/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
- address of the associated sigcontext structure. */
+/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
+#define I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 20
+
+/* Assuming NEXT_FRAME is a frame following a GNU/Linux sigtramp
+ routine, return the address of the associated sigcontext structure. */
static CORE_ADDR
-i386_linux_sigcontext_addr (struct frame_info *frame)
+i386_linux_sigcontext_addr (struct frame_info *next_frame)
{
CORE_ADDR pc;
+ CORE_ADDR sp;
+ char buf[4];
+
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+ sp = extract_unsigned_integer (buf, 4);
- pc = i386_linux_sigtramp_start (get_frame_pc (frame));
+ pc = i386_linux_sigtramp_start (frame_pc_unwind (next_frame));
if (pc)
{
- CORE_ADDR sp;
-
- if (get_next_frame (frame))
- /* If this isn't the top frame, the next frame must be for the
- signal handler itself. The sigcontext structure lives on
- the stack, right after the signum argument. */
- return get_frame_base (get_next_frame (frame)) + 12;
-
- /* This is the top frame. We'll have to find the address of the
- sigcontext structure by looking at the stack pointer. Keep
- in mind that the first instruction of the sigtramp code is
- "pop %eax". If the PC is at this instruction, adjust the
- returned value accordingly. */
- sp = read_register (SP_REGNUM);
- if (pc == get_frame_pc (frame))
+ /* The sigcontext structure lives on the stack, right after
+ the signum argument. We determine the address of the
+ sigcontext structure by looking at the frame's stack
+ pointer. Keep in mind that the first instruction of the
+ sigtramp code is "pop %eax". If the PC is after this
+ instruction, adjust the returned value accordingly. */
+ if (pc == frame_pc_unwind (next_frame))
return sp + 4;
return sp;
}
- pc = i386_linux_rt_sigtramp_start (get_frame_pc (frame));
+ pc = i386_linux_rt_sigtramp_start (frame_pc_unwind (next_frame));
if (pc)
{
- if (get_next_frame (frame))
- /* If this isn't the top frame, the next frame must be for the
- signal handler itself. The sigcontext structure is part of
- the user context. A pointer to the user context is passed
- as the third argument to the signal handler. */
- return read_memory_integer (get_frame_base (get_next_frame (frame))
- + 16, 4) + 20;
-
- /* This is the top frame. Again, use the stack pointer to find
- the address of the sigcontext structure. */
- return read_memory_integer (read_register (SP_REGNUM) + 8, 4) + 20;
+ CORE_ADDR ucontext_addr;
+
+ /* The sigcontext structure is part of the user context. A
+ pointer to the user context is passed as the third argument
+ to the signal handler. */
+ read_memory (sp + 8, buf, 4);
+ ucontext_addr = extract_unsigned_integer (buf, 4) + 20;
+ return ucontext_addr + I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
error ("Couldn't recognize signal trampoline.");
@@ -294,7 +291,7 @@ i386_linux_sigcontext_addr (struct frame_info *frame)
static void
i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid)
{
- write_register_pid (PC_REGNUM, pc, ptid);
+ write_register_pid (I386_EIP_REGNUM, pc, ptid);
/* We must be careful with modifying the program counter. If we
just interrupted a system call, the kernel might try to restart
@@ -322,7 +319,7 @@ i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid)
be considered too special-purpose for general consumption. */
static struct minimal_symbol *
-find_minsym_and_objfile (char *name, struct objfile **objfile_p)
+find_minsym_and_objfile (char *name, struct objfile **objfilep)
{
struct objfile *objfile;
@@ -335,7 +332,7 @@ find_minsym_and_objfile (char *name, struct objfile **objfile_p)
if (SYMBOL_LINKAGE_NAME (msym)
&& strcmp (SYMBOL_LINKAGE_NAME (msym), name) == 0)
{
- *objfile_p = objfile;
+ *objfilep = objfile;
return msym;
}
}
@@ -345,9 +342,9 @@ find_minsym_and_objfile (char *name, struct objfile **objfile_p)
}
static CORE_ADDR
-skip_hurd_resolver (CORE_ADDR pc)
+skip_gnu_resolver (CORE_ADDR pc)
{
- /* The HURD dynamic linker is part of the GNU C library, so many
+ /* The GNU dynamic linker is part of the GNU C library, so many
GNU/Linux distributions use it. (All ELF versions, as far as I
know.) An unresolved PLT entry points to "_dl_runtime_resolve",
which calls "fixup" to patch the PLT, and then passes control to
@@ -374,7 +371,7 @@ skip_hurd_resolver (CORE_ADDR pc)
= lookup_minimal_symbol ("fixup", NULL, objfile);
if (fixup && SYMBOL_VALUE_ADDRESS (fixup) == pc)
- return (DEPRECATED_SAVED_PC_AFTER_CALL (get_current_frame ()));
+ return frame_pc_unwind (get_current_frame ());
}
return 0;
@@ -393,7 +390,7 @@ i386_linux_skip_solib_resolver (CORE_ADDR pc)
CORE_ADDR result;
/* Plug in functions for other kinds of resolvers here. */
- result = skip_hurd_resolver (pc);
+ result = skip_gnu_resolver (pc);
if (result)
return result;
@@ -442,6 +439,27 @@ i386_linux_svr4_fetch_link_map_offsets (void)
}
+/* From <asm/sigcontext.h>. */
+static int i386_linux_sc_reg_offset[I386_NUM_GREGS] =
+{
+ 11 * 4, /* %eax */
+ 10 * 4, /* %ecx */
+ 9 * 4, /* %edx */
+ 8 * 4, /* %ebx */
+ 7 * 4, /* %esp */
+ 6 * 4, /* %ebp */
+ 5 * 4, /* %esi */
+ 4 * 4, /* %edi */
+ 14 * 4, /* %eip */
+ 16 * 4, /* %eflags */
+ 15 * 4, /* %cs */
+ 18 * 4, /* %ss */
+ 3 * 4, /* %ds */
+ 2 * 4, /* %es */
+ 1 * 4, /* %fs */
+ 0 * 4 /* %gs */
+};
+
static void
i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -461,13 +479,12 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS + 1);
set_gdbarch_register_name (gdbarch, i386_linux_register_name);
set_gdbarch_register_reggroup_p (gdbarch, i386_linux_register_reggroup_p);
- set_gdbarch_deprecated_register_bytes (gdbarch, I386_SSE_SIZEOF_REGS + 4);
tdep->jb_pc_offset = 20; /* From <bits/setjmp.h>. */
tdep->sigcontext_addr = i386_linux_sigcontext_addr;
- tdep->sc_pc_offset = 14 * 4; /* From <asm/sigcontext.h>. */
- tdep->sc_sp_offset = 7 * 4;
+ tdep->sc_reg_offset = i386_linux_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
/* When the i386 Linux kernel calls a signal handler, the return
address points to a bit of code on the stack. This function is
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index b35dd2a13b7..381119f7033 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -231,14 +231,20 @@ i386nto_pc_in_sigtramp (CORE_ADDR pc, char *name)
return name && strcmp ("__signalstub", name) == 0;
}
-#define SIGCONTEXT_OFFSET 136
+#define I386_NTO_SIGCONTEXT_OFFSET 136
+
+/* Assuming NEXT_FRAME is a frame following a QNX Neutrino sigtramp
+ routine, return the address of the associated sigcontext structure. */
+
static CORE_ADDR
-i386nto_sigcontext_addr (struct frame_info *frame)
+i386nto_sigcontext_addr (struct frame_info *next_frame)
{
- if (get_next_frame (frame))
- return get_frame_base (get_next_frame (frame)) + SIGCONTEXT_OFFSET;
+ char buf[4];
+
+ frame_unwind_register (next_frame, SP_REGNUM, buf);
+ sp = extract_unsigned_integer (buf, 4);
- return read_register (SP_REGNUM) + SIGCONTEXT_OFFSET;
+ return sp + I386_NTO_SIGCONTEXT_OFFSET;
}
static void
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c
index a52b18850fb..78487af4658 100644
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -42,12 +42,8 @@ i386_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Solaris is SVR4-based. */
i386_svr4_init_abi (info, gdbarch);
- /* Signal trampolines are different from SVR4, in fact they're
- rather similar to BSD. */
+ /* Signal trampolines are slightly different from SVR4. */
set_gdbarch_pc_in_sigtramp (gdbarch, i386_sol2_pc_in_sigtramp);
- tdep->sigcontext_addr = i386bsd_sigcontext_addr;
- tdep->sc_pc_offset = 36 + 14 * 4;
- tdep->sc_sp_offset = 36 + 17 * 4;
}
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 0428c13dabb..b8fd0e5d888 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -21,25 +21,29 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
-#include "gdb_string.h"
+#include "arch-utils.h"
+#include "command.h"
+#include "dummy-frame.h"
+#include "dwarf2-frame.h"
+#include "doublest.h"
+#include "floatformat.h"
#include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
#include "inferior.h"
+#include "gdbcmd.h"
#include "gdbcore.h"
#include "objfiles.h"
-#include "target.h"
-#include "floatformat.h"
+#include "osabi.h"
+#include "regcache.h"
+#include "reggroups.h"
#include "symfile.h"
#include "symtab.h"
-#include "gdbcmd.h"
-#include "command.h"
-#include "arch-utils.h"
-#include "regcache.h"
-#include "doublest.h"
+#include "target.h"
#include "value.h"
+
#include "gdb_assert.h"
-#include "reggroups.h"
-#include "dummy-frame.h"
-#include "osabi.h"
+#include "gdb_string.h"
#include "i386-tdep.h"
#include "i387-tdep.h"
@@ -122,12 +126,12 @@ i386_mxcsr_regnum_p (int regnum)
const char *
i386_register_name (int reg)
{
- if (reg >= 0 && reg < i386_num_register_names)
- return i386_register_names[reg];
-
if (i386_mmx_regnum_p (reg))
return i386_mmx_names[reg - MM0_REGNUM];
+ if (reg >= 0 && reg < i386_num_register_names)
+ return i386_register_names[reg];
+
return NULL;
}
@@ -140,7 +144,7 @@ i386_stab_reg_to_regnum (int reg)
/* This implements what GCC calls the "default" register map. */
if (reg >= 0 && reg <= 7)
{
- /* General registers. */
+ /* General-purpose registers. */
return reg;
}
else if (reg >= 12 && reg <= 19)
@@ -173,7 +177,7 @@ i386_dwarf_reg_to_regnum (int reg)
numbers the floating point registers differently. */
if (reg >= 0 && reg <= 9)
{
- /* General registers. */
+ /* General-purpose registers. */
return reg;
}
else if (reg >= 11 && reg <= 18)
@@ -203,412 +207,359 @@ static const char *valid_flavors[] =
NULL
};
static const char *disassembly_flavor = att_flavor;
+
-/* Stdio style buffering was used to minimize calls to ptrace, but
- this buffering did not take into account that the code section
- being accessed may not be an even number of buffers long (even if
- the buffer is only sizeof(int) long). In cases where the code
- section size happened to be a non-integral number of buffers long,
- attempting to read the last buffer would fail. Simply using
- target_read_memory and ignoring errors, rather than read_memory, is
- not the correct solution, since legitimate access errors would then
- be totally ignored. To properly handle this situation and continue
- to use buffering would require that this code be able to determine
- the minimum code section size granularity (not the alignment of the
- section itself, since the actual failing case that pointed out this
- problem had a section alignment of 4 but was not a multiple of 4
- bytes long), on a target by target basis, and then adjust it's
- buffer size accordingly. This is messy, but potentially feasible.
- It probably needs the bfd library's help and support. For now, the
- buffer size is set to 1. (FIXME -fnf) */
-
-#define CODESTREAM_BUFSIZ 1 /* Was sizeof(int), see note above. */
-static CORE_ADDR codestream_next_addr;
-static CORE_ADDR codestream_addr;
-static unsigned char codestream_buf[CODESTREAM_BUFSIZ];
-static int codestream_off;
-static int codestream_cnt;
-
-#define codestream_tell() (codestream_addr + codestream_off)
-#define codestream_peek() \
- (codestream_cnt == 0 ? \
- codestream_fill(1) : codestream_buf[codestream_off])
-#define codestream_get() \
- (codestream_cnt-- == 0 ? \
- codestream_fill(0) : codestream_buf[codestream_off++])
-
-static unsigned char
-codestream_fill (int peek_flag)
-{
- codestream_addr = codestream_next_addr;
- codestream_next_addr += CODESTREAM_BUFSIZ;
- codestream_off = 0;
- codestream_cnt = CODESTREAM_BUFSIZ;
- read_memory (codestream_addr, (char *) codestream_buf, CODESTREAM_BUFSIZ);
-
- if (peek_flag)
- return (codestream_peek ());
- else
- return (codestream_get ());
-}
+/* Use the program counter to determine the contents and size of a
+ breakpoint instruction. Return a pointer to a string of bytes that
+ encode a breakpoint instruction, store the length of the string in
+ *LEN and optionally adjust *PC to point to the correct memory
+ location for inserting the breakpoint.
-static void
-codestream_seek (CORE_ADDR place)
-{
- codestream_next_addr = place / CODESTREAM_BUFSIZ;
- codestream_next_addr *= CODESTREAM_BUFSIZ;
- codestream_cnt = 0;
- codestream_fill (1);
- while (codestream_tell () != place)
- codestream_get ();
-}
+ On the i386 we have a single breakpoint that fits in a single byte
+ and can be inserted anywhere.
-static void
-codestream_read (unsigned char *buf, int count)
+ This function is 64-bit safe. */
+
+static const unsigned char *
+i386_breakpoint_from_pc (CORE_ADDR *pc, int *len)
{
- unsigned char *p;
- int i;
- p = buf;
- for (i = 0; i < count; i++)
- *p++ = codestream_get ();
+ static unsigned char break_insn[] = { 0xcc }; /* int 3 */
+
+ *len = sizeof (break_insn);
+ return break_insn;
}
+#ifdef I386_REGNO_TO_SYMMETRY
+#error "The Sequent Symmetry is no longer supported."
+#endif
-/* If the next instruction is a jump, move to its target. */
+/* According to the System V ABI, the registers %ebp, %ebx, %edi, %esi
+ and %esp "belong" to the calling function. Therefore these
+ registers should be saved if they're going to be modified. */
-static void
-i386_follow_jump (void)
+/* The maximum number of saved registers. This should include all
+ registers mentioned above, and %eip. */
+#define I386_NUM_SAVED_REGS I386_NUM_GREGS
+
+struct i386_frame_cache
{
- unsigned char buf[4];
- long delta;
+ /* Base address. */
+ CORE_ADDR base;
+ CORE_ADDR sp_offset;
+ CORE_ADDR pc;
+
+ /* Saved registers. */
+ CORE_ADDR saved_regs[I386_NUM_SAVED_REGS];
+ CORE_ADDR saved_sp;
+ int pc_in_eax;
+
+ /* Stack space reserved for local variables. */
+ long locals;
+};
+
+/* Allocate and initialize a frame cache. */
+
+static struct i386_frame_cache *
+i386_alloc_frame_cache (void)
+{
+ struct i386_frame_cache *cache;
+ int i;
+
+ cache = FRAME_OBSTACK_ZALLOC (struct i386_frame_cache);
+
+ /* Base address. */
+ cache->base = 0;
+ cache->sp_offset = -4;
+ cache->pc = 0;
+
+ /* Saved registers. We initialize these to -1 since zero is a valid
+ offset (that's where %ebp is supposed to be stored). */
+ for (i = 0; i < I386_NUM_SAVED_REGS; i++)
+ cache->saved_regs[i] = -1;
+ cache->saved_sp = 0;
+ cache->pc_in_eax = 0;
+
+ /* Frameless until proven otherwise. */
+ cache->locals = -1;
+
+ return cache;
+}
- int data16;
- CORE_ADDR pos;
+/* If the instruction at PC is a jump, return the address of its
+ target. Otherwise, return PC. */
- pos = codestream_tell ();
+static CORE_ADDR
+i386_follow_jump (CORE_ADDR pc)
+{
+ unsigned char op;
+ long delta = 0;
+ int data16 = 0;
- data16 = 0;
- if (codestream_peek () == 0x66)
+ op = read_memory_unsigned_integer (pc, 1);
+ if (op == 0x66)
{
- codestream_get ();
data16 = 1;
+ op = read_memory_unsigned_integer (pc + 1, 1);
}
- switch (codestream_get ())
+ switch (op)
{
case 0xe9:
/* Relative jump: if data16 == 0, disp32, else disp16. */
if (data16)
{
- codestream_read (buf, 2);
- delta = extract_signed_integer (buf, 2);
+ delta = read_memory_integer (pc + 2, 2);
/* Include the size of the jmp instruction (including the
0x66 prefix). */
- pos += delta + 4;
+ delta += 4;
}
else
{
- codestream_read (buf, 4);
- delta = extract_signed_integer (buf, 4);
+ delta = read_memory_integer (pc + 1, 4);
- pos += delta + 5;
+ /* Include the size of the jmp instruction. */
+ delta += 5;
}
break;
case 0xeb:
/* Relative jump, disp8 (ignore data16). */
- codestream_read (buf, 1);
- /* Sign-extend it. */
- delta = extract_signed_integer (buf, 1);
+ delta = read_memory_integer (pc + data16 + 1, 1);
- pos += delta + 2;
+ delta += data16 + 2;
break;
}
- codestream_seek (pos);
-}
-/* Find & return the amount a local space allocated, and advance the
- codestream to the first register push (if any).
+ return pc + delta;
+}
- If the entry sequence doesn't make sense, return -1, and leave
- codestream pointer at a random spot. */
+/* Check whether PC points at a prologue for a function returning a
+ structure or union. If so, it updates CACHE and returns the
+ address of the first instruction after the code sequence that
+ removes the "hidden" argument from the stack or CURRENT_PC,
+ whichever is smaller. Otherwise, return PC. */
-static long
-i386_get_frame_setup (CORE_ADDR pc)
+static CORE_ADDR
+i386_analyze_struct_return (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct i386_frame_cache *cache)
{
+ /* Functions that return a structure or union start with:
+
+ popl %eax 0x58
+ xchgl %eax, (%esp) 0x87 0x04 0x24
+ or xchgl %eax, 0(%esp) 0x87 0x44 0x24 0x00
+
+ (the System V compiler puts out the second `xchg' instruction,
+ and the assembler doesn't try to optimize it, so the 'sib' form
+ gets generated). This sequence is used to get the address of the
+ return buffer for a function that returns a structure. */
+ static unsigned char proto1[3] = { 0x87, 0x04, 0x24 };
+ static unsigned char proto2[4] = { 0x87, 0x44, 0x24, 0x00 };
+ unsigned char buf[4];
unsigned char op;
- codestream_seek (pc);
+ if (current_pc <= pc)
+ return pc;
+
+ op = read_memory_unsigned_integer (pc, 1);
- i386_follow_jump ();
+ if (op != 0x58) /* popl %eax */
+ return pc;
- op = codestream_get ();
+ read_memory (pc + 1, buf, 4);
+ if (memcmp (buf, proto1, 3) != 0 && memcmp (buf, proto2, 4) != 0)
+ return pc;
- if (op == 0x58) /* popl %eax */
+ if (current_pc == pc)
{
- /* This function must start with
-
- popl %eax 0x58
- xchgl %eax, (%esp) 0x87 0x04 0x24
- or xchgl %eax, 0(%esp) 0x87 0x44 0x24 0x00
-
- (the System V compiler puts out the second `xchg'
- instruction, and the assembler doesn't try to optimize it, so
- the 'sib' form gets generated). This sequence is used to get
- the address of the return buffer for a function that returns
- a structure. */
- int pos;
- unsigned char buf[4];
- static unsigned char proto1[3] = { 0x87, 0x04, 0x24 };
- static unsigned char proto2[4] = { 0x87, 0x44, 0x24, 0x00 };
-
- pos = codestream_tell ();
- codestream_read (buf, 4);
- if (memcmp (buf, proto1, 3) == 0)
- pos += 3;
- else if (memcmp (buf, proto2, 4) == 0)
- pos += 4;
-
- codestream_seek (pos);
- op = codestream_get (); /* Update next opcode. */
+ cache->sp_offset += 4;
+ return current_pc;
}
- if (op == 0x68 || op == 0x6a)
+ if (current_pc == pc + 1)
{
- /* This function may start with
+ cache->pc_in_eax = 1;
+ return current_pc;
+ }
+
+ if (buf[1] == proto1[1])
+ return pc + 4;
+ else
+ return pc + 5;
+}
+
+static CORE_ADDR
+i386_skip_probe (CORE_ADDR pc)
+{
+ /* A function may start with
- pushl constant
- call _probe
- addl $4, %esp
+ pushl constant
+ call _probe
+ addl $4, %esp
- followed by
+ followed by
- pushl %ebp
+ pushl %ebp
- etc. */
- int pos;
- unsigned char buf[8];
+ etc. */
+ unsigned char buf[8];
+ unsigned char op;
+
+ op = read_memory_unsigned_integer (pc, 1);
+
+ if (op == 0x68 || op == 0x6a)
+ {
+ int delta;
- /* Skip past the `pushl' instruction; it has either a one-byte
- or a four-byte operand, depending on the opcode. */
- pos = codestream_tell ();
+ /* Skip past the `pushl' instruction; it has either a one-byte or a
+ four-byte operand, depending on the opcode. */
if (op == 0x68)
- pos += 4;
+ delta = 5;
else
- pos += 1;
- codestream_seek (pos);
+ delta = 2;
- /* Read the following 8 bytes, which should be "call _probe" (6
- bytes) followed by "addl $4,%esp" (2 bytes). */
- codestream_read (buf, sizeof (buf));
+ /* Read the following 8 bytes, which should be `call _probe' (6
+ bytes) followed by `addl $4,%esp' (2 bytes). */
+ read_memory (pc + delta, buf, sizeof (buf));
if (buf[0] == 0xe8 && buf[6] == 0xc4 && buf[7] == 0x4)
- pos += sizeof (buf);
- codestream_seek (pos);
- op = codestream_get (); /* Update next opcode. */
+ pc += delta + sizeof (buf);
}
+ return pc;
+}
+
+/* Check whether PC points at a code that sets up a new stack frame.
+ If so, it updates CACHE and returns the address of the first
+ instruction after the sequence that sets removes the "hidden"
+ argument from the stack or CURRENT_PC, whichever is smaller.
+ Otherwise, return PC. */
+
+static CORE_ADDR
+i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct i386_frame_cache *cache)
+{
+ unsigned char op;
+
+ if (current_pc <= pc)
+ return current_pc;
+
+ op = read_memory_unsigned_integer (pc, 1);
+
if (op == 0x55) /* pushl %ebp */
{
- /* Check for "movl %esp, %ebp" -- can be written in two ways. */
- switch (codestream_get ())
+ /* Take into account that we've executed the `pushl %ebp' that
+ starts this instruction sequence. */
+ cache->saved_regs[I386_EBP_REGNUM] = 0;
+ cache->sp_offset += 4;
+
+ /* If that's all, return now. */
+ if (current_pc <= pc + 1)
+ return current_pc;
+
+ /* Check for `movl %esp, %ebp' -- can be written in two ways. */
+ op = read_memory_unsigned_integer (pc + 1, 1);
+ switch (op)
{
case 0x8b:
- if (codestream_get () != 0xec)
- return -1;
+ if (read_memory_unsigned_integer (pc + 2, 1) != 0xec)
+ return pc + 1;
break;
case 0x89:
- if (codestream_get () != 0xe5)
- return -1;
+ if (read_memory_unsigned_integer (pc + 2, 1) != 0xe5)
+ return pc + 1;
break;
default:
- return -1;
+ return pc + 1;
}
+
+ /* OK, we actually have a frame. We just don't know how large it is
+ yet. Set its size to zero. We'll adjust it if necessary. */
+ cache->locals = 0;
+
+ /* If that's all, return now. */
+ if (current_pc <= pc + 3)
+ return current_pc;
+
/* Check for stack adjustment
- subl $XXX, %esp
+ subl $XXX, %esp
NOTE: You can't subtract a 16 bit immediate from a 32 bit
reg, so we don't have to worry about a data16 prefix. */
- op = codestream_peek ();
+ op = read_memory_unsigned_integer (pc + 3, 1);
if (op == 0x83)
{
/* `subl' with 8 bit immediate. */
- codestream_get ();
- if (codestream_get () != 0xec)
+ if (read_memory_unsigned_integer (pc + 4, 1) != 0xec)
/* Some instruction starting with 0x83 other than `subl'. */
- {
- codestream_seek (codestream_tell () - 2);
- return 0;
- }
- /* `subl' with signed byte immediate (though it wouldn't
- make sense to be negative). */
- return (codestream_get ());
+ return pc + 3;
+
+ /* `subl' with signed byte immediate (though it wouldn't make
+ sense to be negative). */
+ cache->locals = read_memory_integer (pc + 5, 1);
+ return pc + 6;
}
else if (op == 0x81)
{
- char buf[4];
/* Maybe it is `subl' with a 32 bit immedediate. */
- codestream_get ();
- if (codestream_get () != 0xec)
+ if (read_memory_unsigned_integer (pc + 4, 1) != 0xec)
/* Some instruction starting with 0x81 other than `subl'. */
- {
- codestream_seek (codestream_tell () - 2);
- return 0;
- }
+ return pc + 3;
+
/* It is `subl' with a 32 bit immediate. */
- codestream_read ((unsigned char *) buf, 4);
- return extract_signed_integer (buf, 4);
+ cache->locals = read_memory_integer (pc + 5, 4);
+ return pc + 9;
}
else
{
- return 0;
+ /* Some instruction other than `subl'. */
+ return pc + 3;
}
}
- else if (op == 0xc8)
+ else if (op == 0xc8) /* enter $XXX */
{
- char buf[2];
- /* `enter' with 16 bit unsigned immediate. */
- codestream_read ((unsigned char *) buf, 2);
- codestream_get (); /* Flush final byte of enter instruction. */
- return extract_unsigned_integer (buf, 2);
+ cache->locals = read_memory_unsigned_integer (pc + 1, 2);
+ return pc + 4;
}
- return (-1);
-}
-
-/* Signal trampolines don't have a meaningful frame. The frame
- pointer value we use is actually the frame pointer of the calling
- frame -- that is, the frame which was in progress when the signal
- trampoline was entered. GDB mostly treats this frame pointer value
- as a magic cookie. We detect the case of a signal trampoline by
- testing for get_frame_type() == SIGTRAMP_FRAME, which is set based
- on PC_IN_SIGTRAMP.
-
- When a signal trampoline is invoked from a frameless function, we
- essentially have two frameless functions in a row. In this case,
- we use the same magic cookie for three frames in a row. We detect
- this case by seeing whether the next frame is a SIGTRAMP_FRAME,
- and, if it does, checking whether the current frame is actually
- frameless. In this case, we need to get the PC by looking at the
- SP register value stored in the signal context.
-
- This should work in most cases except in horrible situations where
- a signal occurs just as we enter a function but before the frame
- has been set up. Incidentally, that's just what happens when we
- call a function from GDB with a signal pending (there's a test in
- the testsuite that makes this happen). Therefore we pretend that
- we have a frameless function if we're stopped at the start of a
- function. */
-
-/* Return non-zero if we're dealing with a frameless signal, that is,
- a signal trampoline invoked from a frameless function. */
-
-int
-i386_frameless_signal_p (struct frame_info *frame)
-{
- return (get_next_frame (frame)
- && get_frame_type (get_next_frame (frame)) == SIGTRAMP_FRAME
- && (frameless_look_for_prologue (frame)
- || get_frame_pc (frame) == get_frame_func (frame)));
-}
-
-/* Return the chain-pointer for FRAME. In the case of the i386, the
- frame's nominal address is the address of a 4-byte word containing
- the calling frame's address. */
-
-static CORE_ADDR
-i386_frame_chain (struct frame_info *frame)
-{
- if (pc_in_dummy_frame (get_frame_pc (frame)))
- return get_frame_base (frame);
-
- if (get_frame_type (frame) == SIGTRAMP_FRAME
- || i386_frameless_signal_p (frame))
- return get_frame_base (frame);
-
- if (! inside_entry_file (get_frame_pc (frame)))
- return read_memory_unsigned_integer (get_frame_base (frame), 4);
-
- return 0;
-}
-
-/* Determine whether the function invocation represented by FRAME does
- not have a from on the stack associated with it. If it does not,
- return non-zero, otherwise return zero. */
-
-static int
-i386_frameless_function_invocation (struct frame_info *frame)
-{
- if (get_frame_type (frame) == SIGTRAMP_FRAME)
- return 0;
-
- return frameless_look_for_prologue (frame);
-}
-
-/* Assuming FRAME is for a sigtramp routine, return the saved program
- counter. */
-
-static CORE_ADDR
-i386_sigtramp_saved_pc (struct frame_info *frame)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- CORE_ADDR addr;
-
- addr = tdep->sigcontext_addr (frame);
- return read_memory_unsigned_integer (addr + tdep->sc_pc_offset, 4);
-}
-/* Assuming FRAME is for a sigtramp routine, return the saved stack
- pointer. */
-
-static CORE_ADDR
-i386_sigtramp_saved_sp (struct frame_info *frame)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- CORE_ADDR addr;
-
- addr = tdep->sigcontext_addr (frame);
- return read_memory_unsigned_integer (addr + tdep->sc_sp_offset, 4);
+ return pc;
}
-/* Return the saved program counter for FRAME. */
+/* Check whether PC points at code that saves registers on the stack.
+ If so, it updates CACHE and returns the address of the first
+ instruction after the register saves or CURRENT_PC, whichever is
+ smaller. Otherwise, return PC. */
static CORE_ADDR
-i386_frame_saved_pc (struct frame_info *frame)
+i386_analyze_register_saves (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct i386_frame_cache *cache)
{
- if (pc_in_dummy_frame (get_frame_pc (frame)))
+ if (cache->locals >= 0)
{
- ULONGEST pc;
+ CORE_ADDR offset;
+ unsigned char op;
+ int i;
- frame_unwind_unsigned_register (frame, PC_REGNUM, &pc);
- return pc;
- }
-
- if (get_frame_type (frame) == SIGTRAMP_FRAME)
- return i386_sigtramp_saved_pc (frame);
+ offset = - 4 - cache->locals;
+ for (i = 0; i < 8 && pc < current_pc; i++)
+ {
+ op = read_memory_unsigned_integer (pc, 1);
+ if (op < 0x50 || op > 0x57)
+ break;
- if (i386_frameless_signal_p (frame))
- {
- CORE_ADDR sp = i386_sigtramp_saved_sp (get_next_frame (frame));
- return read_memory_unsigned_integer (sp, 4);
+ cache->saved_regs[op - 0x50] = offset;
+ offset -= 4;
+ pc++;
+ }
}
- return read_memory_unsigned_integer (get_frame_base (frame) + 4, 4);
+ return pc;
}
-/* Immediately after a function call, return the saved pc. */
-
-static CORE_ADDR
-i386_saved_pc_after_call (struct frame_info *frame)
-{
- if (get_frame_type (frame) == SIGTRAMP_FRAME)
- return i386_sigtramp_saved_pc (frame);
+/* Do a full analysis of the prologue at PC and update CACHE
+ accordingly. Bail out early if CURRENT_PC is reached. Return the
+ address where the analysis stopped.
- return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);
-}
-
-/* Parse the first few instructions the function to see what registers
- were stored.
-
We handle these cases:
The startup sequence can be at the start of the function, or the
@@ -632,79 +583,43 @@ i386_saved_pc_after_call (struct frame_info *frame)
If the setup sequence is at the end of the function, then the next
instruction will be a branch back to the start. */
-static void
-i386_frame_init_saved_regs (struct frame_info *fip)
+static CORE_ADDR
+i386_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct i386_frame_cache *cache)
{
- long locals = -1;
- unsigned char op;
- CORE_ADDR addr;
- CORE_ADDR pc;
- int i;
-
- if (get_frame_saved_regs (fip))
- return;
-
- frame_saved_regs_zalloc (fip);
-
- pc = get_frame_func (fip);
- if (pc != 0)
- locals = i386_get_frame_setup (pc);
-
- if (locals >= 0)
- {
- addr = get_frame_base (fip) - 4 - locals;
- for (i = 0; i < 8; i++)
- {
- op = codestream_get ();
- if (op < 0x50 || op > 0x57)
- break;
-#ifdef I386_REGNO_TO_SYMMETRY
- /* Dynix uses different internal numbering. Ick. */
- get_frame_saved_regs (fip)[I386_REGNO_TO_SYMMETRY (op - 0x50)] = addr;
-#else
- get_frame_saved_regs (fip)[op - 0x50] = addr;
-#endif
- addr -= 4;
- }
- }
-
- get_frame_saved_regs (fip)[PC_REGNUM] = get_frame_base (fip) + 4;
- get_frame_saved_regs (fip)[DEPRECATED_FP_REGNUM] = get_frame_base (fip);
+ pc = i386_follow_jump (pc);
+ pc = i386_analyze_struct_return (pc, current_pc, cache);
+ pc = i386_skip_probe (pc);
+ pc = i386_analyze_frame_setup (pc, current_pc, cache);
+ return i386_analyze_register_saves (pc, current_pc, cache);
}
/* Return PC of first real instruction. */
static CORE_ADDR
-i386_skip_prologue (CORE_ADDR pc)
+i386_skip_prologue (CORE_ADDR start_pc)
{
- unsigned char op;
- int i;
static unsigned char pic_pat[6] =
- { 0xe8, 0, 0, 0, 0, /* call 0x0 */
- 0x5b, /* popl %ebx */
+ {
+ 0xe8, 0, 0, 0, 0, /* call 0x0 */
+ 0x5b, /* popl %ebx */
};
- CORE_ADDR pos;
-
- if (i386_get_frame_setup (pc) < 0)
- return (pc);
+ struct i386_frame_cache cache;
+ CORE_ADDR pc;
+ unsigned char op;
+ int i;
- /* Found valid frame setup -- codestream now points to start of push
- instructions for saving registers. */
+ cache.locals = -1;
+ pc = i386_analyze_prologue (start_pc, 0xffffffff, &cache);
+ if (cache.locals < 0)
+ return start_pc;
- /* Skip over register saves. */
- for (i = 0; i < 8; i++)
- {
- op = codestream_peek ();
- /* Break if not `pushl' instrunction. */
- if (op < 0x50 || op > 0x57)
- break;
- codestream_get ();
- }
+ /* Found valid frame setup. */
/* The native cc on SVR4 in -K PIC mode inserts the following code
to get the address of the global offset table (GOT) into register
- %ebx
-
+ %ebx:
+
call 0x0
popl %ebx
movl %ebx,x(%ebp) (optional)
@@ -714,110 +629,353 @@ i386_skip_prologue (CORE_ADDR pc)
function), so we have to skip it to get to the first real
instruction at the start of the function. */
- pos = codestream_tell ();
for (i = 0; i < 6; i++)
{
- op = codestream_get ();
+ op = read_memory_unsigned_integer (pc + i, 1);
if (pic_pat[i] != op)
break;
}
if (i == 6)
{
- unsigned char buf[4];
- long delta = 6;
+ int delta = 6;
+
+ op = read_memory_unsigned_integer (pc + delta, 1);
- op = codestream_get ();
if (op == 0x89) /* movl %ebx, x(%ebp) */
{
- op = codestream_get ();
+ op = read_memory_unsigned_integer (pc + delta + 1, 1);
+
if (op == 0x5d) /* One byte offset from %ebp. */
- {
- delta += 3;
- codestream_read (buf, 1);
- }
+ delta += 3;
else if (op == 0x9d) /* Four byte offset from %ebp. */
- {
- delta += 6;
- codestream_read (buf, 4);
- }
+ delta += 6;
else /* Unexpected instruction. */
- delta = -1;
- op = codestream_get ();
+ delta = 0;
+
+ op = read_memory_unsigned_integer (pc + delta, 1);
}
+
/* addl y,%ebx */
- if (delta > 0 && op == 0x81 && codestream_get () == 0xc3)
+ if (delta > 0 && op == 0x81
+ && read_memory_unsigned_integer (pc + delta + 1, 1) == 0xc3);
{
- pos += delta + 6;
+ pc += delta + 6;
}
}
- codestream_seek (pos);
-
- i386_follow_jump ();
- return (codestream_tell ());
+ return i386_follow_jump (pc);
}
-/* Use the program counter to determine the contents and size of a
- breakpoint instruction. Return a pointer to a string of bytes that
- encode a breakpoint instruction, store the length of the string in
- *LEN and optionally adjust *PC to point to the correct memory
- location for inserting the breakpoint.
+/* This function is 64-bit safe. */
- On the i386 we have a single breakpoint that fits in a single byte
- and can be inserted anywhere. */
-
-static const unsigned char *
-i386_breakpoint_from_pc (CORE_ADDR *pc, int *len)
+static CORE_ADDR
+i386_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- static unsigned char break_insn[] = { 0xcc }; /* int 3 */
-
- *len = sizeof (break_insn);
- return break_insn;
+ char buf[8];
+
+ frame_unwind_register (next_frame, PC_REGNUM, buf);
+ return extract_typed_address (buf, builtin_type_void_func_ptr);
}
+
-/* Push the return address (pointing to the call dummy) onto the stack
- and return the new value for the stack pointer. */
+/* Normal frames. */
-static CORE_ADDR
-i386_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
+static struct i386_frame_cache *
+i386_frame_cache (struct frame_info *next_frame, void **this_cache)
{
+ struct i386_frame_cache *cache;
char buf[4];
+ int i;
+
+ if (*this_cache)
+ return *this_cache;
+
+ cache = i386_alloc_frame_cache ();
+ *this_cache = cache;
+
+ /* In principle, for normal frames, %ebp holds the frame pointer,
+ which holds the base address for the current stack frame.
+ However, for functions that don't need it, the frame pointer is
+ optional. For these "frameless" functions the frame pointer is
+ actually the frame pointer of the calling frame. Signal
+ trampolines are just a special case of a "frameless" function.
+ They (usually) share their frame pointer with the frame that was
+ in progress when the signal occurred. */
- store_unsigned_integer (buf, 4, CALL_DUMMY_ADDRESS ());
- write_memory (sp - 4, buf, 4);
- return sp - 4;
+ frame_unwind_register (next_frame, I386_EBP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 4);
+ if (cache->base == 0)
+ return cache;
+
+ /* For normal frames, %eip is stored at 4(%ebp). */
+ cache->saved_regs[I386_EIP_REGNUM] = 4;
+
+ cache->pc = frame_func_unwind (next_frame);
+ if (cache->pc != 0)
+ i386_analyze_prologue (cache->pc, frame_pc_unwind (next_frame), cache);
+
+ if (cache->locals < 0)
+ {
+ /* We didn't find a valid frame, which means that CACHE->base
+ currently holds the frame pointer for our calling frame. If
+ we're at the start of a function, or somewhere half-way its
+ prologue, the function's frame probably hasn't been fully
+ setup yet. Try to reconstruct the base address for the stack
+ frame by looking at the stack pointer. For truly "frameless"
+ functions this might work too. */
+
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 4) + cache->sp_offset;
+ }
+
+ /* Now that we have the base address for the stack frame we can
+ calculate the value of %esp in the calling frame. */
+ cache->saved_sp = cache->base + 8;
+
+ /* Adjust all the saved registers such that they contain addresses
+ instead of offsets. */
+ for (i = 0; i < I386_NUM_SAVED_REGS; i++)
+ if (cache->saved_regs[i] != -1)
+ cache->saved_regs[i] += cache->base;
+
+ return cache;
}
static void
-i386_do_pop_frame (struct frame_info *frame)
+i386_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
{
- CORE_ADDR fp;
- int regnum;
- char regbuf[I386_MAX_REGISTER_SIZE];
+ struct i386_frame_cache *cache = i386_frame_cache (next_frame, this_cache);
+
+ /* This marks the outermost frame. */
+ if (cache->base == 0)
+ return;
- fp = get_frame_base (frame);
- i386_frame_init_saved_regs (frame);
+ (*this_id) = frame_id_build (cache->base + 8, cache->pc);
+}
+
+static void
+i386_frame_prev_register (struct frame_info *next_frame, void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
+{
+ struct i386_frame_cache *cache = i386_frame_cache (next_frame, this_cache);
+
+ gdb_assert (regnum >= 0);
+
+ /* The System V ABI says that:
+
+ "The flags register contains the system flags, such as the
+ direction flag and the carry flag. The direction flag must be
+ set to the forward (that is, zero) direction before entry and
+ upon exit from a function. Other user flags have no specified
+ role in the standard calling sequence and are not preserved."
+
+ To guarantee the "upon exit" part of that statement we fake a
+ saved flags register that has its direction flag cleared.
+
+ Note that GCC doesn't seem to rely on the fact that the direction
+ flag is cleared after a function return; it always explicitly
+ clears the flag before operations where it matters.
+
+ FIXME: kettenis/20030316: I'm not quite sure whether this is the
+ right thing to do. The way we fake the flags register here makes
+ it impossible to change it. */
+
+ if (regnum == I386_EFLAGS_REGNUM)
+ {
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (valuep)
+ {
+ ULONGEST val;
+
+ /* Clear the direction flag. */
+ frame_unwind_unsigned_register (next_frame, PS_REGNUM, &val);
+ val &= ~(1 << 10);
+ store_unsigned_integer (valuep, 4, val);
+ }
+
+ return;
+ }
+
+ if (regnum == I386_EIP_REGNUM && cache->pc_in_eax)
+ {
+ frame_register_unwind (next_frame, I386_EAX_REGNUM,
+ optimizedp, lvalp, addrp, realnump, valuep);
+ return;
+ }
- for (regnum = 0; regnum < NUM_REGS; regnum++)
+ if (regnum == I386_ESP_REGNUM && cache->saved_sp)
{
- CORE_ADDR addr;
- addr = get_frame_saved_regs (frame)[regnum];
- if (addr)
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (valuep)
{
- read_memory (addr, regbuf, REGISTER_RAW_SIZE (regnum));
- deprecated_write_register_gen (regnum, regbuf);
+ /* Store the value. */
+ store_unsigned_integer (valuep, 4, cache->saved_sp);
}
+ return;
+ }
+
+ if (regnum < I386_NUM_SAVED_REGS && cache->saved_regs[regnum] != -1)
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = cache->saved_regs[regnum];
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Read the value in from memory. */
+ read_memory (*addrp, valuep,
+ register_size (current_gdbarch, regnum));
+ }
+ return;
+ }
+
+ frame_register_unwind (next_frame, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind i386_frame_unwind =
+{
+ NORMAL_FRAME,
+ i386_frame_this_id,
+ i386_frame_prev_register
+};
+
+static const struct frame_unwind *
+i386_frame_p (CORE_ADDR pc)
+{
+ return &i386_frame_unwind;
+}
+
+
+/* Signal trampolines. */
+
+static struct i386_frame_cache *
+i386_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ struct i386_frame_cache *cache;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ CORE_ADDR addr;
+ char buf[4];
+
+ if (*this_cache)
+ return *this_cache;
+
+ cache = i386_alloc_frame_cache ();
+
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 4) - 4;
+
+ addr = tdep->sigcontext_addr (next_frame);
+ if (tdep->sc_reg_offset)
+ {
+ int i;
+
+ gdb_assert (tdep->sc_num_regs <= I386_NUM_SAVED_REGS);
+
+ for (i = 0; i < tdep->sc_num_regs; i++)
+ if (tdep->sc_reg_offset[i] != -1)
+ cache->saved_regs[i] = addr + tdep->sc_reg_offset[i];
+ }
+ else
+ {
+ cache->saved_regs[I386_EIP_REGNUM] = addr + tdep->sc_pc_offset;
+ cache->saved_regs[I386_ESP_REGNUM] = addr + tdep->sc_sp_offset;
}
- write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp, 4));
- write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
- write_register (SP_REGNUM, fp + 8);
- flush_cached_frames ();
+
+ *this_cache = cache;
+ return cache;
+}
+
+static void
+i386_sigtramp_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct i386_frame_cache *cache =
+ i386_sigtramp_frame_cache (next_frame, this_cache);
+
+ (*this_id) = frame_id_build (cache->base + 8, frame_pc_unwind (next_frame));
+}
+
+static void
+i386_sigtramp_frame_prev_register (struct frame_info *next_frame,
+ void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
+{
+ /* Make sure we've initialized the cache. */
+ i386_sigtramp_frame_cache (next_frame, this_cache);
+
+ i386_frame_prev_register (next_frame, this_cache, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
+static const struct frame_unwind i386_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ i386_sigtramp_frame_this_id,
+ i386_sigtramp_frame_prev_register
+};
+
+static const struct frame_unwind *
+i386_sigtramp_frame_p (CORE_ADDR pc)
+{
+ char *name;
+
+ /* We shouldn't even bother to try if the OSABI didn't register
+ a sigcontext_addr handler. */
+ if (!gdbarch_tdep (current_gdbarch)->sigcontext_addr)
+ return NULL;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (PC_IN_SIGTRAMP (pc, name))
+ return &i386_sigtramp_frame_unwind;
+
+ return NULL;
+}
+
+
+static CORE_ADDR
+i386_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct i386_frame_cache *cache = i386_frame_cache (next_frame, this_cache);
+
+ return cache->base;
+}
+
+static const struct frame_base i386_frame_base =
+{
+ &i386_frame_unwind,
+ i386_frame_base_address,
+ i386_frame_base_address,
+ i386_frame_base_address
+};
+
static void
-i386_pop_frame (void)
+i386_save_dummy_frame_tos (CORE_ADDR sp)
+{
+ generic_save_dummy_frame_tos (sp + 8);
+}
+
+static struct frame_id
+i386_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- generic_pop_current_frame (i386_do_pop_frame);
+ char buf[4];
+ CORE_ADDR fp;
+
+ frame_unwind_register (next_frame, I386_EBP_REGNUM, buf);
+ fp = extract_unsigned_integer (buf, 4);
+
+ return frame_id_build (fp + 8, frame_pc_unwind (next_frame));
}
@@ -825,7 +983,9 @@ i386_pop_frame (void)
stack. We expect the first arg to be a pointer to the jmp_buf
structure from which we extract the address that we will land at.
This address is copied into PC. This routine returns non-zero on
- success. */
+ success.
+
+ This function is 64-bit safe. */
static int
i386_get_longjmp_target (CORE_ADDR *pc)
@@ -854,28 +1014,58 @@ i386_get_longjmp_target (CORE_ADDR *pc)
static CORE_ADDR
-i386_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+i386_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
- sp = legacy_push_arguments (nargs, args, sp, struct_return, struct_addr);
-
- if (struct_return)
+ char buf[4];
+ int i;
+
+ /* Push arguments in reverse order. */
+ for (i = nargs - 1; i >= 0; i--)
{
- char buf[4];
+ int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (args[i]));
+
+ /* The System V ABI says that:
+ "An argument's size is increased, if necessary, to make it a
+ multiple of [32-bit] words. This may require tail padding,
+ depending on the size of the argument."
+
+ This makes sure the stack says word-aligned. */
+ sp -= (len + 3) & ~3;
+ write_memory (sp, VALUE_CONTENTS_ALL (args[i]), len);
+ }
+
+ /* Push value address. */
+ if (struct_return)
+ {
sp -= 4;
store_unsigned_integer (buf, 4, struct_addr);
write_memory (sp, buf, 4);
}
+ /* Store return address. */
+ sp -= 4;
+ store_unsigned_integer (buf, 4, bp_addr);
+ write_memory (sp, buf, 4);
+
+ /* Finally, update the stack pointer... */
+ store_unsigned_integer (buf, 4, sp);
+ regcache_cooked_write (regcache, I386_ESP_REGNUM, buf);
+
+ /* ...and fake a frame pointer. */
+ regcache_cooked_write (regcache, I386_EBP_REGNUM, buf);
+
return sp;
}
/* These registers are used for returning integers (and on some
targets also for returning `struct' and `union' values when their
size and alignment match an integer type). */
-#define LOW_RETURN_REGNUM 0 /* %eax */
-#define HIGH_RETURN_REGNUM 2 /* %edx */
+#define LOW_RETURN_REGNUM I386_EAX_REGNUM /* %eax */
+#define HIGH_RETURN_REGNUM I386_EDX_REGNUM /* %edx */
/* Extract from an array REGBUF containing the (raw) register state, a
function return value of TYPE, and copy that, in virtual format,
@@ -909,7 +1099,7 @@ i386_extract_return_value (struct type *type, struct regcache *regcache,
its contents to the desired type. This is probably not
exactly how it would happen on the target itself, but it is
the best we can do. */
- regcache_raw_read (regcache, FP0_REGNUM, buf);
+ regcache_raw_read (regcache, I386_ST0_REGNUM, buf);
convert_typed_floating (buf, builtin_type_i387_ext, valbuf, type);
}
else
@@ -971,7 +1161,7 @@ i386_store_return_value (struct type *type, struct regcache *regcache,
not exactly how it would happen on the target itself, but
it is the best we can do. */
convert_typed_floating (valbuf, type, buf, builtin_type_i387_ext);
- regcache_raw_write (regcache, FP0_REGNUM, buf);
+ regcache_raw_write (regcache, I386_ST0_REGNUM, buf);
/* Set the top of the floating-point register stack to 7. The
actual value doesn't really matter, but 7 is what a normal
@@ -1012,10 +1202,10 @@ i386_store_return_value (struct type *type, struct regcache *regcache,
static CORE_ADDR
i386_extract_struct_value_address (struct regcache *regcache)
{
- ULONGEST addr;
+ char buf[4];
- regcache_raw_read_unsigned (regcache, LOW_RETURN_REGNUM, &addr);
- return addr;
+ regcache_cooked_read (regcache, I386_EAX_REGNUM, buf);
+ return extract_unsigned_integer (buf, 4);
}
@@ -1057,7 +1247,8 @@ i386_use_struct_convention (int gcc_p, struct type *type)
static struct type *
i386_register_type (struct gdbarch *gdbarch, int regnum)
{
- if (regnum == PC_REGNUM || regnum == DEPRECATED_FP_REGNUM || regnum == SP_REGNUM)
+ if (regnum == I386_EIP_REGNUM
+ || regnum == I386_EBP_REGNUM || regnum == I386_ESP_REGNUM)
return lookup_pointer_type (builtin_type_void);
if (i386_fp_regnum_p (regnum))
@@ -1073,7 +1264,7 @@ i386_register_type (struct gdbarch *gdbarch, int regnum)
}
/* Map a cooked register onto a raw register or memory. For the i386,
- the MMX registers need to be mapped onto floating-point registers. */
+ the MMX registers need to be mapped onto floating point registers. */
static int
i386_mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum)
@@ -1274,36 +1465,27 @@ i386_print_insn (bfd_vma pc, disassemble_info *info)
static int
i386_svr4_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
+ /* UnixWare uses _sigacthandler. The origin of the other symbols is
+ currently unknown. */
return (name && (strcmp ("_sigreturn", name) == 0
|| strcmp ("_sigacthandler", name) == 0
|| strcmp ("sigvechandler", name) == 0));
}
-/* Get address of the pushed ucontext (sigcontext) on the stack for
- all three variants of SVR4 sigtramps. */
+/* Assuming NEXT_FRAME is for a frame following a SVR4 sigtramp
+ routine, return the address of the associated sigcontext (ucontext)
+ structure. */
static CORE_ADDR
-i386_svr4_sigcontext_addr (struct frame_info *frame)
+i386_svr4_sigcontext_addr (struct frame_info *next_frame)
{
- int sigcontext_offset = -1;
- char *name = NULL;
-
- find_pc_partial_function (get_frame_pc (frame), &name, NULL, NULL);
- if (name)
- {
- if (strcmp (name, "_sigreturn") == 0)
- sigcontext_offset = 132;
- else if (strcmp (name, "_sigacthandler") == 0)
- sigcontext_offset = 80;
- else if (strcmp (name, "sigvechandler") == 0)
- sigcontext_offset = 120;
- }
+ char buf[4];
+ CORE_ADDR sp;
- gdb_assert (sigcontext_offset != -1);
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+ sp = extract_unsigned_integer (buf, 4);
- if (get_next_frame (frame))
- return get_frame_base (get_next_frame (frame)) + sigcontext_offset;
- return read_register (SP_REGNUM) + sigcontext_offset;
+ return read_memory_unsigned_integer (sp + 8, 4);
}
@@ -1342,8 +1524,8 @@ i386_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_pc_in_sigtramp (gdbarch, i386_svr4_pc_in_sigtramp);
tdep->sigcontext_addr = i386_svr4_sigcontext_addr;
- tdep->sc_pc_offset = 14 * 4;
- tdep->sc_sp_offset = 7 * 4;
+ tdep->sc_pc_offset = 36 + 14 * 4;
+ tdep->sc_sp_offset = 36 + 17 * 4;
tdep->jb_pc_offset = 20;
}
@@ -1407,6 +1589,7 @@ i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
int fp_regnum_p = (i386_fp_regnum_p (regnum)
|| i386_fpc_regnum_p (regnum));
int mmx_regnum_p = (i386_mmx_regnum_p (regnum));
+
if (group == i386_mmx_reggroup)
return mmx_regnum_p;
if (group == i386_sse_reggroup)
@@ -1417,8 +1600,20 @@ i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
return fp_regnum_p;
if (group == general_reggroup)
return (!fp_regnum_p && !mmx_regnum_p && !sse_regnum_p);
+
return default_register_reggroup_p (gdbarch, regnum, group);
}
+
+
+/* Get the ith function argument for the current function. */
+CORE_ADDR
+i386_fetch_pointer_argument (struct frame_info *frame, int argi,
+ struct type *type)
+{
+ CORE_ADDR stack;
+ frame_read_register (frame, SP_REGNUM, &stack);
+ return read_memory_unsigned_integer (stack + (4 * (argi + 1)), 4);
+}
static struct gdbarch *
@@ -1436,10 +1631,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep = XMALLOC (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
- /* NOTE: cagney/2002-12-06: This can be deleted when this arch is
- ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
-
/* The i386 default settings don't include the SSE registers.
FIXME: kettenis/20020614: They do include the FPU registers for
now, which probably is not quite right. */
@@ -1450,6 +1641,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->sigtramp_start = 0;
tdep->sigtramp_end = 0;
tdep->sigcontext_addr = NULL;
+ tdep->sc_reg_offset = NULL;
tdep->sc_pc_offset = -1;
tdep->sc_sp_offset = -1;
@@ -1464,15 +1656,17 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
alignment. */
set_gdbarch_long_double_bit (gdbarch, 96);
- /* NOTE: tm-i386aix.h, tm-i386bsd.h, tm-i386os9k.h, tm-ptx.h,
- tm-symmetry.h currently override this. Sigh. */
+ /* The default ABI includes general-purpose registers and
+ floating-point registers. */
set_gdbarch_num_regs (gdbarch, I386_NUM_GREGS + I386_NUM_FREGS);
+ set_gdbarch_register_name (gdbarch, i386_register_name);
+ set_gdbarch_register_type (gdbarch, i386_register_type);
- set_gdbarch_sp_regnum (gdbarch, 4); /* %esp */
- set_gdbarch_deprecated_fp_regnum (gdbarch, 5); /* %ebp */
- set_gdbarch_pc_regnum (gdbarch, 8); /* %eip */
- set_gdbarch_ps_regnum (gdbarch, 9); /* %eflags */
- set_gdbarch_fp0_regnum (gdbarch, 16); /* %st(0) */
+ /* Register numbers of various important registers. */
+ set_gdbarch_sp_regnum (gdbarch, I386_ESP_REGNUM); /* %esp */
+ set_gdbarch_pc_regnum (gdbarch, I386_EIP_REGNUM); /* %eip */
+ set_gdbarch_ps_regnum (gdbarch, I386_EFLAGS_REGNUM); /* %eflags */
+ set_gdbarch_fp0_regnum (gdbarch, I386_ST0_REGNUM); /* %st(0) */
/* Use the "default" register numbering scheme for stabs and COFF. */
set_gdbarch_stab_reg_to_regnum (gdbarch, i386_stab_reg_to_regnum);
@@ -1485,39 +1679,24 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* We don't define ECOFF_REG_TO_REGNUM, since ECOFF doesn't seem to
be in use on any of the supported i386 targets. */
- set_gdbarch_register_name (gdbarch, i386_register_name);
- set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_deprecated_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
- set_gdbarch_register_type (gdbarch, i386_register_type);
-
set_gdbarch_print_float_info (gdbarch, i387_print_float_info);
set_gdbarch_get_longjmp_target (gdbarch, i386_get_longjmp_target);
/* Call dummy code. */
- set_gdbarch_deprecated_call_dummy_words (gdbarch, NULL);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
+ set_gdbarch_push_dummy_call (gdbarch, i386_push_dummy_call);
set_gdbarch_register_convertible (gdbarch, i386_register_convertible);
set_gdbarch_register_convert_to_virtual (gdbarch,
i386_register_convert_to_virtual);
set_gdbarch_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
- /* "An argument's size is increased, if necessary, to make it a
- multiple of [32-bit] words. This may require tail padding,
- depending on the size of the argument" -- from the x86 ABI. */
- set_gdbarch_parm_boundary (gdbarch, 32);
-
set_gdbarch_extract_return_value (gdbarch, i386_extract_return_value);
- set_gdbarch_deprecated_push_arguments (gdbarch, i386_push_arguments);
- set_gdbarch_deprecated_push_return_address (gdbarch, i386_push_return_address);
- set_gdbarch_deprecated_pop_frame (gdbarch, i386_pop_frame);
set_gdbarch_store_return_value (gdbarch, i386_store_return_value);
set_gdbarch_extract_struct_value_address (gdbarch,
i386_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, i386_use_struct_convention);
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, i386_frame_init_saved_regs);
set_gdbarch_skip_prologue (gdbarch, i386_skip_prologue);
/* Stack grows downward. */
@@ -1527,17 +1706,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_decr_pc_after_break (gdbarch, 1);
set_gdbarch_function_start_offset (gdbarch, 0);
- /* The following redefines make backtracing through sigtramp work.
- They manufacture a fake sigtramp frame and obtain the saved pc in
- sigtramp from the sigcontext structure which is pushed by the
- kernel on the user stack, along with a pointer to it. */
-
set_gdbarch_frame_args_skip (gdbarch, 8);
- set_gdbarch_frameless_function_invocation (gdbarch,
- i386_frameless_function_invocation);
- set_gdbarch_deprecated_frame_chain (gdbarch, i386_frame_chain);
- set_gdbarch_deprecated_frame_saved_pc (gdbarch, i386_frame_saved_pc);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, i386_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
set_gdbarch_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp);
@@ -1548,16 +1717,30 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_print_insn (gdbarch, i386_print_insn);
+ set_gdbarch_unwind_dummy_id (gdbarch, i386_unwind_dummy_id);
+ set_gdbarch_save_dummy_frame_tos (gdbarch, i386_save_dummy_frame_tos);
+
+ set_gdbarch_unwind_pc (gdbarch, i386_unwind_pc);
+
/* Add the i386 register groups. */
i386_add_reggroups (gdbarch);
set_gdbarch_register_reggroup_p (gdbarch, i386_register_reggroup_p);
- /* Should be using push_dummy_call. */
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ /* Helper for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, i386_fetch_pointer_argument);
+
+ /* Hook in the DWARF CFI frame unwinder. */
+ frame_unwind_append_predicate (gdbarch, dwarf2_frame_p);
+ set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
+
+ frame_base_set_default (gdbarch, &i386_frame_base);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
+ frame_unwind_append_predicate (gdbarch, i386_sigtramp_frame_p);
+ frame_unwind_append_predicate (gdbarch, i386_frame_p);
+
return gdbarch;
}
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 1b569d924dd..38eac2004e8 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -71,7 +71,12 @@ struct gdbarch_tdep
/* Get address of sigcontext for sigtramp. */
CORE_ADDR (*sigcontext_addr) (struct frame_info *);
- /* Offset of saved PC and SP in `struct sigcontext'. */
+ /* Offset of registers in `struct sigcontext'. */
+ int *sc_reg_offset;
+ int sc_num_regs;
+
+ /* Offset of saved PC and SP in `struct sigcontext'. Usage of these
+ is deprecated, please use `sc_reg_offset' instead. */
int sc_pc_offset;
int sc_sp_offset;
};
@@ -136,8 +141,16 @@ extern int i386_mxcsr_regnum_p (int regnum);
#define FCOFF_REGNUM FIOFF_REGNUM
#define FDS_REGNUM FOSEG_REGNUM
#define FDOFF_REGNUM FOOFF_REGNUM
-#define IS_FP_REGNUM(n) i386_fp_regnum_p (n)
-#define IS_SSE_REGNUM(n) i386_sse_regnum_p (n)
+
+/* Register numbers of various important registers. */
+
+#define I386_EAX_REGNUM 0 /* %eax */
+#define I386_EDX_REGNUM 2 /* %edx */
+#define I386_ESP_REGNUM 4 /* %esp */
+#define I386_EBP_REGNUM 5 /* %ebp */
+#define I386_EIP_REGNUM 8 /* %eip */
+#define I386_EFLAGS_REGNUM 9 /* %eflags */
+#define I386_ST0_REGNUM 16 /* %st(0) */
#define I386_NUM_GREGS 16
#define I386_NUM_FREGS 16
@@ -146,16 +159,6 @@ extern int i386_mxcsr_regnum_p (int regnum);
#define I386_SSE_NUM_REGS (I386_NUM_GREGS + I386_NUM_FREGS \
+ I386_NUM_XREGS)
-/* Sizes of individual register sets. These cover the entire register
- file, so summing up the sizes of those portions actually present
- yields DEPRECATED_REGISTER_BYTES. */
-#define I386_SIZEOF_GREGS (I386_NUM_GREGS * 4)
-#define I386_SIZEOF_FREGS (8 * 10 + 8 * 4)
-#define I386_SIZEOF_XREGS (8 * 16 + 4)
-
-#define I386_SSE_SIZEOF_REGS (I386_SIZEOF_GREGS + I386_SIZEOF_FREGS \
- + I386_SIZEOF_XREGS)
-
/* Size of the largest register. */
#define I386_MAX_REGISTER_SIZE 16
@@ -178,7 +181,6 @@ extern void i386_svr4_init_abi (struct gdbarch_info, struct gdbarch *);
/* Functions exported from i386bsd-tdep.c. */
-extern CORE_ADDR i386bsd_sigcontext_addr (struct frame_info *frame);
extern void i386bsd_init_abi (struct gdbarch_info, struct gdbarch *);
#endif /* i386-tdep.h */
diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c
index ec38e135717..60524de148e 100644
--- a/gdb/i386bsd-nat.c
+++ b/gdb/i386bsd-nat.c
@@ -386,8 +386,7 @@ kernel_u_size (void)
void
_initialize_i386bsd_nat (void)
{
- int sc_pc_offset;
- int sc_sp_offset;
+ int offset;
/* To support the recognition of signal handlers, i386bsd-tdep.c
hardcodes some constants. Inclusion of this file means that we
@@ -396,51 +395,69 @@ _initialize_i386bsd_nat (void)
information. */
#if defined (__FreeBSD_version) && __FreeBSD_version >= 400011
- extern int i386fbsd4_sc_pc_offset;
- extern int i386fbsd4_sc_sp_offset;
-#define SC_PC_OFFSET i386fbsd4_sc_pc_offset
-#define SC_SP_OFFSET i386fbsd4_sc_sp_offset
+ extern int i386fbsd4_sc_reg_offset[];
+#define SC_REG_OFFSET i386fbsd4_sc_reg_offset
+#elif defined (__FreeBSD_version) && __FreeBSD_version >= 300005
+ extern int i386fbsd_sc_reg_offset[];
+#define SC_REG_OFFSET i386fbsd_sc_reg_offset
#elif defined (NetBSD) || defined (__NetBSD_Version__)
- extern int i386nbsd_sc_pc_offset;
- extern int i386nbsd_sc_sp_offset;
-#define SC_PC_OFFSET i386nbsd_sc_pc_offset
-#define SC_SP_OFFSET i386nbsd_sc_sp_offset
+ extern int i386nbsd_sc_reg_offset[];
+#define SC_REG_OFFSET i386nbsd_sc_reg_offset
#elif defined (OpenBSD)
- extern int i386obsd_sc_pc_offset;
- extern int i386obsd_sc_sp_offset;
-#define SC_PC_OFFSET i386obsd_sc_pc_offset
-#define SC_SP_OFFSET i386obsd_sc_sp_offset
+ extern int i386obsd_sc_reg_offset[];
+#define SC_REG_OFFSET i386obsd_sc_reg_offset
#else
- extern int i386bsd_sc_pc_offset;
- extern int i386bsd_sc_sp_offset;
-#define SC_PC_OFFSET i386bsd_sc_pc_offset
-#define SC_SP_OFFSET i386bsd_sc_sp_offset
+ extern int i386bsd_sc_reg_offset[];
+#define SC_PC_OFFSET i386bsd_sc_reg_offset
#endif
+ /* We only check the program counter, stack pointer and frame
+ pointer since these members of `struct sigcontext' are essential
+ for providing backtraces. More checks could be added, but would
+ involve adding configure checks for the appropriate structure
+ members, since older BSD's don't provide all of them. */
+
+#define SC_PC_OFFSET SC_REG_OFFSET[I386_EIP_REGNUM]
+#define SC_SP_OFFSET SC_REG_OFFSET[I386_ESP_REGNUM]
+#define SC_FP_OFFSET SC_REG_OFFSET[I386_EBP_REGNUM]
+
/* Override the default value for the offset of the program counter
in the sigcontext structure. */
- sc_pc_offset = offsetof (struct sigcontext, sc_pc);
+ offset = offsetof (struct sigcontext, sc_pc);
- if (SC_PC_OFFSET != sc_pc_offset)
+ if (SC_PC_OFFSET != offset)
{
warning ("\
offsetof (struct sigcontext, sc_pc) yields %d instead of %d.\n\
-Please report this to <bug-gdb@gnu.org>.",
- sc_pc_offset, SC_PC_OFFSET);
+Please report this to <bug-gdb@gnu.org>.",
+ offset, SC_PC_OFFSET);
}
- SC_PC_OFFSET = sc_pc_offset;
+ SC_PC_OFFSET = offset;
/* Likewise for the stack pointer. */
- sc_sp_offset = offsetof (struct sigcontext, sc_sp);
+ offset = offsetof (struct sigcontext, sc_sp);
- if (SC_SP_OFFSET != sc_sp_offset)
+ if (SC_SP_OFFSET != offset)
{
warning ("\
offsetof (struct sigcontext, sc_sp) yields %d instead of %d.\n\
Please report this to <bug-gdb@gnu.org>.",
- sc_sp_offset, SC_SP_OFFSET);
+ offset, SC_SP_OFFSET);
+ }
+
+ SC_SP_OFFSET = offset;
+
+ /* And the frame pointer. */
+ offset = offsetof (struct sigcontext, sc_fp);
+
+ if (SC_FP_OFFSET != offset)
+ {
+ warning ("\
+offsetof (struct sigcontext, sc_fp) yields %d instead of %d.\n\
+Please report this to <bug-gdb@gnu.org>.",
+ offset, SC_FP_OFFSET);
}
- SC_SP_OFFSET = sc_sp_offset;
+ SC_FP_OFFSET = offset;
}
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index c0c544de52d..94d68600fee 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -41,26 +41,19 @@ i386bsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
return (pc >= tdep->sigtramp_start && pc < tdep->sigtramp_end);
}
-/* Assuming FRAME is for a BSD sigtramp routine, return the address of
- the associated sigcontext structure.
+/* Assuming NEXT_FRAME is for a frame following a BSD sigtramp
+ routine, return the address of the associated sigcontext structure. */
- Note: This function is used for Solaris 2 too, so don't make it
- static. */
-
-CORE_ADDR
-i386bsd_sigcontext_addr (struct frame_info *frame)
+static CORE_ADDR
+i386bsd_sigcontext_addr (struct frame_info *next_frame)
{
- struct frame_info *next_frame = get_next_frame (frame);
+ char buf[4];
+ CORE_ADDR sp;
- if (next_frame)
- /* If this isn't the top frame, the next frame must be for the
- signal handler itself. A pointer to the sigcontext structure
- is passed as the third argument to the signal handler. */
- return read_memory_unsigned_integer (get_frame_base (next_frame) + 16, 4);
+ frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
+ sp = extract_unsigned_integer (buf, 4);
- /* This is the top frame. We'll have to find the address of the
- sigcontext structure by looking at the stack pointer. */
- return read_memory_unsigned_integer (read_register (SP_REGNUM) + 8, 4);
+ return read_memory_unsigned_integer (sp + 8, 4);
}
/* Return the start address of the sigtramp routine. */
@@ -93,8 +86,25 @@ i386bsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
/* Traditional BSD (4.3 BSD, still used for BSDI and 386BSD). */
/* From <machine/signal.h>. */
-int i386bsd_sc_pc_offset = 20;
-int i386bsd_sc_sp_offset = 8;
+int i386bsd_sc_reg_offset[I386_NUM_GREGS] =
+{
+ -1, /* %eax */
+ -1, /* %ecx */
+ -1, /* %edx */
+ -1, /* %ebx */
+ 8 + 0 * 4, /* %esp */
+ 8 + 1 * 4, /* %ebp */
+ -1, /* %esi */
+ -1, /* %edi */
+ 8 + 3 * 4, /* %eip */
+ 8 + 4 * 4, /* %eflags */
+ -1, /* %cs */
+ -1, /* %ss */
+ -1, /* %ds */
+ -1, /* %es */
+ -1, /* %fs */
+ -1 /* %gs */
+};
void
i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -116,8 +126,8 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sigtramp_start = 0xfdbfdfc0;
tdep->sigtramp_end = 0xfdbfe000;
tdep->sigcontext_addr = i386bsd_sigcontext_addr;
- tdep->sc_pc_offset = i386bsd_sc_pc_offset;
- tdep->sc_sp_offset = i386bsd_sc_sp_offset;
+ tdep->sc_reg_offset = i386bsd_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
}
/* FreeBSD 3.0-RELEASE or later. */
@@ -125,6 +135,27 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
CORE_ADDR i386fbsd_sigtramp_start = 0xbfbfdf20;
CORE_ADDR i386fbsd_sigtramp_end = 0xbfbfdff0;
+/* From <machine/signal.h>. */
+int i386fbsd_sc_reg_offset[I386_NUM_GREGS] =
+{
+ 8 + 14 * 4, /* %eax */
+ 8 + 13 * 4, /* %ecx */
+ 8 + 12 * 4, /* %edx */
+ 8 + 11 * 4, /* %ebx */
+ 8 + 0 * 4, /* %esp */
+ 8 + 1 * 4, /* %ebp */
+ 8 + 10 * 4, /* %esi */
+ 8 + 9 * 4, /* %edi */
+ 8 + 3 * 4, /* %eip */
+ 8 + 4 * 4, /* %eflags */
+ 8 + 7 * 4, /* %cs */
+ 8 + 8 * 4, /* %ss */
+ 8 + 6 * 4, /* %ds */
+ 8 + 5 * 4, /* %es */
+ 8 + 15 * 4, /* %fs */
+ 8 + 16 * 4 /* %gs */
+};
+
static void
i386fbsdaout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
@@ -139,6 +170,10 @@ i386fbsdaout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* FreeBSD uses a different memory layout. */
tdep->sigtramp_start = i386fbsd_sigtramp_start;
tdep->sigtramp_end = i386fbsd_sigtramp_end;
+
+ /* FreeBSD has a more complete `struct sigcontext'. */
+ tdep->sc_reg_offset = i386fbsd_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
}
static void
@@ -158,8 +193,25 @@ i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* FreeBSD 4.0-RELEASE or later. */
/* From <machine/signal.h>. */
-int i386fbsd4_sc_pc_offset = 76;
-int i386fbsd4_sc_sp_offset = 88;
+int i386fbsd4_sc_reg_offset[I386_NUM_GREGS] =
+{
+ 20 + 11 * 4, /* %eax */
+ 20 + 10 * 4, /* %ecx */
+ 20 + 9 * 4, /* %edx */
+ 20 + 8 * 4, /* %ebx */
+ 20 + 17 * 4, /* %esp */
+ 20 + 6 * 4, /* %ebp */
+ 20 + 5 * 4, /* %esi */
+ 20 + 4 * 4, /* %edi */
+ 20 + 14 * 4, /* %eip */
+ 20 + 16 * 4, /* %eflags */
+ 20 + 15 * 4, /* %cs */
+ 20 + 18 * 4, /* %ss */
+ 20 + 3 * 4, /* %ds */
+ 20 + 2 * 4, /* %es */
+ 20 + 1 * 4, /* %fs */
+ 20 + 0 * 4 /* %gs */
+};
static void
i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -171,8 +223,8 @@ i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
i386fbsd_init_abi (info, gdbarch);
/* FreeBSD 4.0 introduced a new `struct sigcontext'. */
- tdep->sc_pc_offset = i386fbsd4_sc_pc_offset;
- tdep->sc_sp_offset = i386fbsd4_sc_sp_offset;
+ tdep->sc_reg_offset = i386fbsd4_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
}
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index 64b3dc0984e..601530bce25 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -239,8 +239,25 @@ i386nbsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
}
/* From <machine/signal.h>. */
-int i386nbsd_sc_pc_offset = 44;
-int i386nbsd_sc_sp_offset = 56;
+int i386nbsd_sc_reg_offset[I386_NUM_GREGS] =
+{
+ 10 * 4, /* %eax */
+ 9 * 4, /* %ecx */
+ 8 * 4, /* %edx */
+ 7 * 4, /* %ebx */
+ 14 * 4, /* %esp */
+ 6 * 4, /* %ebp */
+ 5 * 4, /* %esi */
+ 4 * 4, /* %edi */
+ 11 * 4, /* %eip */
+ 13 * 4, /* %eflags */
+ 12 * 4, /* %cs */
+ 15 * 4, /* %ss */
+ 3 * 4, /* %ds */
+ 2 * 4, /* %es */
+ 1 * 4, /* %fs */
+ 0 * 4 /* %gs */
+};
static void
i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -263,8 +280,8 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* NetBSD has a `struct sigcontext' that's different from the
origional 4.3 BSD. */
- tdep->sc_pc_offset = i386nbsd_sc_pc_offset;
- tdep->sc_sp_offset = i386nbsd_sc_sp_offset;
+ tdep->sc_reg_offset = i386nbsd_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
}
/* NetBSD ELF. */
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index be0c674493b..7db076d3a3e 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -83,8 +83,25 @@ CORE_ADDR i386obsd_sigtramp_start = 0xbfbfdf20;
CORE_ADDR i386obsd_sigtramp_end = 0xbfbfdff0;
/* From <machine/signal.h>. */
-int i386obsd_sc_pc_offset = 44;
-int i386obsd_sc_sp_offset = 56;
+int i386obsd_sc_reg_offset[I386_NUM_GREGS] =
+{
+ 10 * 4, /* %eax */
+ 9 * 4, /* %ecx */
+ 8 * 4, /* %edx */
+ 7 * 4, /* %ebx */
+ 14 * 4, /* %esp */
+ 6 * 4, /* %ebp */
+ 5 * 4, /* %esi */
+ 4 * 4, /* %edi */
+ 11 * 4, /* %eip */
+ 13 * 4, /* %eflags */
+ 12 * 4, /* %cs */
+ 15 * 4, /* %ss */
+ 3 * 4, /* %ds */
+ 2 * 4, /* %es */
+ 1 * 4, /* %fs */
+ 0 * 4 /* %gs */
+};
static void
i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -103,8 +120,8 @@ i386obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* OpenBSD has a `struct sigcontext' that's different from the
origional 4.3 BSD. */
- tdep->sc_pc_offset = i386obsd_sc_pc_offset;
- tdep->sc_sp_offset = i386obsd_sc_sp_offset;
+ tdep->sc_reg_offset = i386obsd_sc_reg_offset;
+ tdep->sc_num_regs = I386_NUM_GREGS;
}
void
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index a898f5211ab..46975740473 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -1747,7 +1747,7 @@ generic_elf_find_global_pointer (CORE_ADDR faddr)
status = target_read_memory (addr + 8, buf, sizeof (buf));
if (status != 0)
break;
- global_pointer = extract_address (buf, sizeof (buf));
+ global_pointer = extract_unsigned_integer (buf, sizeof (buf));
/* The payoff... */
return global_pointer;
@@ -1929,7 +1929,7 @@ ia64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
char val_buf[8];
store_unsigned_integer (val_buf, 8,
- find_func_descr (extract_address (VALUE_CONTENTS (arg), 8),
+ find_func_descr (extract_unsigned_integer (VALUE_CONTENTS (arg), 8),
&funcdescaddr));
if (slotnum < rseslots)
write_memory (rse_address_add (bsp, slotnum), val_buf, 8);
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 5f80e896bbc..546e33c5d52 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -530,6 +530,17 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
}
break;
case AT_ENTRY_POINT:
+ if (DEPRECATED_FIX_CALL_DUMMY_P ())
+ {
+ /* Sigh. Some targets use DEPRECATED_FIX_CALL_DUMMY to
+ shove extra stuff onto the stack or into registers. That
+ code should be in PUSH_DUMMY_CALL, however, in the mean
+ time ... */
+ /* If the target is manipulating DUMMY1, it looses big time. */
+ void *dummy1 = NULL;
+ DEPRECATED_FIX_CALL_DUMMY (dummy1, sp, funaddr, nargs, args,
+ value_type, using_gcc);
+ }
real_pc = funaddr;
dummy_addr = CALL_DUMMY_ADDRESS ();
/* A call dummy always consists of just a single breakpoint, so
@@ -736,7 +747,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
/* When there is no push_dummy_call method, should this code
simply error out. That would the implementation of this method
for all ABIs (which is probably a good thing). */
- sp = gdbarch_push_dummy_call (current_gdbarch, current_regcache,
+ sp = gdbarch_push_dummy_call (current_gdbarch, funaddr, current_regcache,
bp_addr, nargs, args, sp, struct_return,
struct_addr);
else if (DEPRECATED_PUSH_ARGUMENTS_P ())
@@ -798,15 +809,16 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
if (struct_return && DEPRECATED_STORE_STRUCT_RETURN_P ())
DEPRECATED_STORE_STRUCT_RETURN (struct_addr, sp);
- /* Write the stack pointer. This is here because the statements above
- might fool with it. On SPARC, this write also stores the register
- window into the right place in the new stack frame, which otherwise
- wouldn't happen. (See store_inferior_registers in sparc-nat.c.) */
- /* NOTE: cagney/2003-03-23: Disable this code when there is a
- push_dummy_call() method. Since that method will have already
- stored the stack pointer (as part of creating the fake call
- frame), and none of the code following that code adjusts the
- stack-pointer value, the below call is entirely redundant. */
+ /* Write the stack pointer. This is here because the statements
+ above might fool with it. On SPARC, this write also stores the
+ register window into the right place in the new stack frame,
+ which otherwise wouldn't happen (see store_inferior_registers in
+ sparc-nat.c). */
+ /* NOTE: cagney/2003-03-23: Since the architecture method
+ push_dummy_call() should have already stored the stack pointer
+ (as part of creating the fake call frame), and none of the code
+ following that call adjusts the stack-pointer value, the below
+ call is entirely redundant. */
if (DEPRECATED_DUMMY_WRITE_SP_P ())
DEPRECATED_DUMMY_WRITE_SP (sp);
diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c
index 76354954443..90229bbe014 100644
--- a/gdb/irix4-nat.c
+++ b/gdb/irix4-nat.c
@@ -156,7 +156,7 @@ get_longjmp_target (CORE_ADDR *pc)
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 6128a04a450..bb90da51f88 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -174,7 +174,7 @@ get_longjmp_target (CORE_ADDR *pc)
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index c36394e87f3..48fd51673da 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -24,6 +24,10 @@
#include "gdb_string.h"
#include <errno.h>
#include <signal.h>
+#ifdef HAVE_TKILL_SYSCALL
+#include <unistd.h>
+#include <sys/syscall.h>
+#endif
#include <sys/ptrace.h>
#include "gdb_wait.h"
@@ -156,6 +160,7 @@ static sigset_t blocked_mask;
/* Prototypes for local functions. */
static int stop_wait_callback (struct lwp_info *lp, void *data);
+static int lin_lwp_thread_alive (ptid_t ptid);
/* Convert wait status STATUS to a string. Used for printing debug
messages only. */
@@ -627,6 +632,32 @@ lin_lwp_resume (ptid_t ptid, int step, enum target_signal signo)
}
+/* Issue kill to specified lwp. */
+
+static int tkill_failed;
+
+static int
+kill_lwp (int lwpid, int signo)
+{
+ errno = 0;
+
+/* Use tkill, if possible, in case we are using nptl threads. If tkill
+ fails, then we are not using nptl threads and we should be using kill. */
+
+#ifdef HAVE_TKILL_SYSCALL
+ if (!tkill_failed)
+ {
+ int ret = syscall (__NR_tkill, lwpid, signo);
+ if (errno != ENOSYS)
+ return ret;
+ errno = 0;
+ tkill_failed = 1;
+ }
+#endif
+
+ return kill (lwpid, signo);
+}
+
/* Send a SIGSTOP to LP. */
static int
@@ -642,8 +673,15 @@ stop_callback (struct lwp_info *lp, void *data)
"SC: kill %s **<SIGSTOP>**\n",
target_pid_to_str (lp->ptid));
}
- ret = kill (GET_LWP (lp->ptid), SIGSTOP);
- gdb_assert (ret == 0);
+ errno = 0;
+ ret = kill_lwp (GET_LWP (lp->ptid), SIGSTOP);
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "SC: lwp kill %d %s\n",
+ ret,
+ errno ? safe_strerror (errno) : "ERRNO-OK");
+ }
lp->signalled = 1;
gdb_assert (lp->status == 0);
@@ -667,11 +705,23 @@ stop_wait_callback (struct lwp_info *lp, void *data)
gdb_assert (lp->status == 0);
- pid = waitpid (GET_LWP (lp->ptid), &status, lp->cloned ? __WCLONE : 0);
+ pid = waitpid (GET_LWP (lp->ptid), &status, 0);
if (pid == -1 && errno == ECHILD)
- /* OK, the proccess has disappeared. We'll catch the actual
- exit event in lin_lwp_wait. */
- return 0;
+ {
+ pid = waitpid (GET_LWP (lp->ptid), &status, __WCLONE);
+ if (pid == -1 && errno == ECHILD)
+ {
+ /* The thread has previously exited. We need to delete it now
+ because in the case of nptl threads, there won't be an
+ exit event unless it is the main thread. */
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: %s exited.\n",
+ target_pid_to_str (lp->ptid));
+ delete_lwp (lp->ptid);
+ return 0;
+ }
+ }
gdb_assert (pid == GET_LWP (lp->ptid));
@@ -683,6 +733,7 @@ stop_wait_callback (struct lwp_info *lp, void *data)
status_to_str (status));
}
+ /* Check if the thread has exited. */
if (WIFEXITED (status) || WIFSIGNALED (status))
{
gdb_assert (num_lwps > 1);
@@ -697,7 +748,31 @@ stop_wait_callback (struct lwp_info *lp, void *data)
target_pid_to_str (lp->ptid));
}
if (debug_lin_lwp)
- fprintf_unfiltered (gdb_stdlog, "SWC: %s exited.\n",
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: %s exited.\n",
+ target_pid_to_str (lp->ptid));
+
+ delete_lwp (lp->ptid);
+ return 0;
+ }
+
+ /* Check if the current LWP has previously exited. For nptl threads,
+ there is no exit signal issued for LWPs that are not the
+ main thread so we should check whenever the thread is stopped. */
+ if (!lin_lwp_thread_alive (lp->ptid))
+ {
+ if (in_thread_list (lp->ptid))
+ {
+ /* Core GDB cannot deal with us deleting the current
+ thread. */
+ if (!ptid_equal (lp->ptid, inferior_ptid))
+ delete_thread (lp->ptid);
+ printf_unfiltered ("[%s exited]\n",
+ target_pid_to_str (lp->ptid));
+ }
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: %s already exited.\n",
target_pid_to_str (lp->ptid));
delete_lwp (lp->ptid);
@@ -756,7 +831,14 @@ stop_wait_callback (struct lwp_info *lp, void *data)
/* If there's another event, throw it back into the queue. */
if (lp->status)
{
- kill (GET_LWP (lp->ptid), WSTOPSIG (lp->status));
+ if (debug_lin_lwp)
+ {
+ fprintf_unfiltered (gdb_stdlog,
+ "SWC: kill %s, %s\n",
+ target_pid_to_str (lp->ptid),
+ status_to_str ((int) status));
+ }
+ kill_lwp (GET_LWP (lp->ptid), WSTOPSIG (lp->status));
}
/* Save the sigtrap event. */
lp->status = status;
@@ -800,7 +882,7 @@ stop_wait_callback (struct lwp_info *lp, void *data)
target_pid_to_str (lp->ptid),
status_to_str ((int) status));
}
- kill (GET_LWP (lp->ptid), WSTOPSIG (status));
+ kill_lwp (GET_LWP (lp->ptid), WSTOPSIG (status));
}
return 0;
}
@@ -1049,6 +1131,25 @@ child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
#endif
+/* Stop an active thread, verify it still exists, then resume it. */
+
+static int
+stop_and_resume_callback (struct lwp_info *lp, void *data)
+{
+ struct lwp_info *ptr;
+
+ if (!lp->stopped && !lp->signalled)
+ {
+ stop_callback (lp, NULL);
+ stop_wait_callback (lp, NULL);
+ /* Resume if the lwp still exists. */
+ for (ptr = lwp_list; ptr; ptr = ptr->next)
+ if (lp == ptr)
+ resume_callback (lp, NULL);
+ }
+ return 0;
+}
+
static ptid_t
lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
{
@@ -1206,9 +1307,7 @@ retry:
}
}
- /* Make sure we don't report a TARGET_WAITKIND_EXITED or
- TARGET_WAITKIND_SIGNALLED event if there are still LWP's
- left in the process. */
+ /* Check if the thread has exited. */
if ((WIFEXITED (status) || WIFSIGNALED (status)) && num_lwps > 1)
{
if (in_thread_list (lp->ptid))
@@ -1220,6 +1319,59 @@ retry:
printf_unfiltered ("[%s exited]\n",
target_pid_to_str (lp->ptid));
}
+
+ /* If this is the main thread, we must stop all threads and
+ verify if they are still alive. This is because in the nptl
+ thread model, there is no signal issued for exiting LWPs
+ other than the main thread. We only get the main thread
+ exit signal once all child threads have already exited.
+ If we stop all the threads and use the stop_wait_callback
+ to check if they have exited we can determine whether this
+ signal should be ignored or whether it means the end of the
+ debugged application, regardless of which threading model
+ is being used. */
+ if (GET_PID (lp->ptid) == GET_LWP (lp->ptid))
+ {
+ lp->stopped = 1;
+ iterate_over_lwps (stop_and_resume_callback, NULL);
+ }
+
+ if (debug_lin_lwp)
+ fprintf_unfiltered (gdb_stdlog,
+ "LLW: %s exited.\n",
+ target_pid_to_str (lp->ptid));
+
+ delete_lwp (lp->ptid);
+
+ /* If there is at least one more LWP, then the exit signal
+ was not the end of the debugged application and should be
+ ignored. */
+ if (num_lwps > 0)
+ {
+ /* Make sure there is at least one thread running. */
+ gdb_assert (iterate_over_lwps (running_callback, NULL));
+
+ /* Discard the event. */
+ status = 0;
+ continue;
+ }
+ }
+
+ /* Check if the current LWP has previously exited. In the nptl
+ thread model, LWPs other than the main thread do not issue
+ signals when they exit so we must check whenever the thread
+ has stopped. A similar check is made in stop_wait_callback(). */
+ if (num_lwps > 1 && !lin_lwp_thread_alive (lp->ptid))
+ {
+ if (in_thread_list (lp->ptid))
+ {
+ /* Core GDB cannot deal with us deleting the current
+ thread. */
+ if (!ptid_equal (lp->ptid, inferior_ptid))
+ delete_thread (lp->ptid);
+ printf_unfiltered ("[%s exited]\n",
+ target_pid_to_str (lp->ptid));
+ }
if (debug_lin_lwp)
fprintf_unfiltered (gdb_stdlog,
"LLW: %s exited.\n",
diff --git a/gdb/linespec.c b/gdb/linespec.c
index bda41c78940..682018f1fd0 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -82,6 +82,12 @@ static int total_number_of_methods (struct type *type);
static int find_methods (struct type *, char *, struct symbol **);
+static int add_matching_methods (int method_counter, struct type *t,
+ struct symbol **sym_arr);
+
+static int add_constructors (int method_counter, struct type *t,
+ struct symbol **sym_arr);
+
static void build_canonical_line_spec (struct symtab_and_line *,
char *, char ***);
@@ -210,7 +216,6 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr)
method_counter >= 0;
--method_counter)
{
- int field_counter;
char *method_name = TYPE_FN_FIELDLIST_NAME (t, method_counter);
char dem_opname[64];
@@ -226,88 +231,13 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr)
if (strcmp_iw (name, method_name) == 0)
/* Find all the overloaded methods with that name. */
- for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
- field_counter >= 0;
- --field_counter)
- {
- struct fn_field *f;
- char *phys_name;
-
- f = TYPE_FN_FIELDLIST1 (t, method_counter);
-
- if (TYPE_FN_FIELD_STUB (f, field_counter))
- {
- char *tmp_name;
-
- tmp_name = gdb_mangle_name (t,
- method_counter,
- field_counter);
- phys_name = alloca (strlen (tmp_name) + 1);
- strcpy (phys_name, tmp_name);
- xfree (tmp_name);
- }
- else
- phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
-
- /* Destructor is handled by caller, don't add it to
- the list. */
- if (is_destructor_name (phys_name) != 0)
- continue;
-
- sym_arr[i1] = lookup_symbol (phys_name,
- NULL, VAR_DOMAIN,
- (int *) NULL,
- (struct symtab **) NULL);
- if (sym_arr[i1])
- i1++;
- else
- {
- /* This error message gets printed, but the method
- still seems to be found
- fputs_filtered("(Cannot find method ", gdb_stdout);
- fprintf_symbol_filtered (gdb_stdout, phys_name,
- language_cplus,
- DMGL_PARAMS | DMGL_ANSI);
- fputs_filtered(" - possibly inlined.)\n", gdb_stdout);
- */
- }
- }
+ i1 += add_matching_methods (method_counter, t,
+ sym_arr + i1);
else if (strncmp (class_name, name, name_len) == 0
&& (class_name[name_len] == '\0'
|| class_name[name_len] == '<'))
- {
- /* For GCC 3.x and stabs, constructors and destructors
- have names like __base_ctor and __complete_dtor.
- Check the physname for now if we're looking for a
- constructor. */
- for (field_counter
- = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
- field_counter >= 0;
- --field_counter)
- {
- struct fn_field *f;
- char *phys_name;
-
- f = TYPE_FN_FIELDLIST1 (t, method_counter);
-
- /* GCC 3.x will never produce stabs stub methods, so
- we don't need to handle this case. */
- if (TYPE_FN_FIELD_STUB (f, field_counter))
- continue;
- phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
- if (! is_constructor_name (phys_name))
- continue;
-
- /* If this method is actually defined, include it in the
- list. */
- sym_arr[i1] = lookup_symbol (phys_name,
- NULL, VAR_DOMAIN,
- (int *) NULL,
- (struct symtab **) NULL);
- if (sym_arr[i1])
- i1++;
- }
- }
+ i1 += add_constructors (method_counter, t,
+ sym_arr + i1);
}
}
@@ -329,6 +259,113 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr)
return i1;
}
+/* Add the symbols associated to methods of the class whose type is T
+ and whose name matches the method indexed by METHOD_COUNTER in the
+ array SYM_ARR. Return the number of methods added. */
+
+static int
+add_matching_methods (int method_counter, struct type *t,
+ struct symbol **sym_arr)
+{
+ int field_counter;
+ int i1 = 0;
+
+ for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
+ field_counter >= 0;
+ --field_counter)
+ {
+ struct fn_field *f;
+ char *phys_name;
+
+ f = TYPE_FN_FIELDLIST1 (t, method_counter);
+
+ if (TYPE_FN_FIELD_STUB (f, field_counter))
+ {
+ char *tmp_name;
+
+ tmp_name = gdb_mangle_name (t,
+ method_counter,
+ field_counter);
+ phys_name = alloca (strlen (tmp_name) + 1);
+ strcpy (phys_name, tmp_name);
+ xfree (tmp_name);
+ }
+ else
+ phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
+
+ /* Destructor is handled by caller, don't add it to
+ the list. */
+ if (is_destructor_name (phys_name) != 0)
+ continue;
+
+ sym_arr[i1] = lookup_symbol (phys_name,
+ NULL, VAR_DOMAIN,
+ (int *) NULL,
+ (struct symtab **) NULL);
+ if (sym_arr[i1])
+ i1++;
+ else
+ {
+ /* This error message gets printed, but the method
+ still seems to be found
+ fputs_filtered("(Cannot find method ", gdb_stdout);
+ fprintf_symbol_filtered (gdb_stdout, phys_name,
+ language_cplus,
+ DMGL_PARAMS | DMGL_ANSI);
+ fputs_filtered(" - possibly inlined.)\n", gdb_stdout);
+ */
+ }
+ }
+
+ return i1;
+}
+
+/* Add the symbols associated to constructors of the class whose type
+ is CLASS_TYPE and which are indexed by by METHOD_COUNTER to the
+ array SYM_ARR. Return the number of methods added. */
+
+static int
+add_constructors (int method_counter, struct type *t,
+ struct symbol **sym_arr)
+{
+ int field_counter;
+ int i1 = 0;
+
+ /* For GCC 3.x and stabs, constructors and destructors
+ have names like __base_ctor and __complete_dtor.
+ Check the physname for now if we're looking for a
+ constructor. */
+ for (field_counter
+ = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
+ field_counter >= 0;
+ --field_counter)
+ {
+ struct fn_field *f;
+ char *phys_name;
+
+ f = TYPE_FN_FIELDLIST1 (t, method_counter);
+
+ /* GCC 3.x will never produce stabs stub methods, so
+ we don't need to handle this case. */
+ if (TYPE_FN_FIELD_STUB (f, field_counter))
+ continue;
+ phys_name = TYPE_FN_FIELD_PHYSNAME (f, field_counter);
+ if (! is_constructor_name (phys_name))
+ continue;
+
+ /* If this method is actually defined, include it in the
+ list. */
+ sym_arr[i1] = lookup_symbol (phys_name,
+ NULL, VAR_DOMAIN,
+ (int *) NULL,
+ (struct symtab **) NULL);
+ if (sym_arr[i1])
+ i1++;
+ }
+
+ return i1;
+}
+
/* Helper function for decode_line_1.
Build a canonical line spec in CANONICAL if it is non-NULL and if
the SAL has a symtab.
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 5d6e51e756b..b35c30cdaed 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -1171,8 +1171,8 @@ m68hc11_return_value_on_stack (struct type *type)
static CORE_ADDR
m68hc11_extract_struct_value_address (char *regbuf)
{
- return extract_address (&regbuf[HARD_D_REGNUM * 2],
- REGISTER_RAW_SIZE (HARD_D_REGNUM));
+ return extract_unsigned_integer (&regbuf[HARD_D_REGNUM * 2],
+ REGISTER_RAW_SIZE (HARD_D_REGNUM));
}
/* Function: push_return_address (pc)
@@ -1391,8 +1391,6 @@ m68hc11_gdbarch_init (struct gdbarch_info info,
set_gdbarch_deprecated_store_struct_return (gdbarch, m68hc11_store_struct_return);
set_gdbarch_deprecated_store_return_value (gdbarch, m68hc11_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, m68hc11_extract_struct_value_address);
- set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
-
set_gdbarch_deprecated_frame_chain (gdbarch, m68hc11_frame_chain);
set_gdbarch_deprecated_frame_saved_pc (gdbarch, m68hc11_frame_saved_pc);
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index fbbac634cae..44be19da5de 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -847,13 +847,13 @@ m68k_get_longjmp_target (CORE_ADDR *pc)
buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- jb_addr = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ jb_addr = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
if (target_read_memory (jb_addr + tdep->jb_pc * tdep->jb_elt_size, buf,
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
@@ -966,6 +966,9 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Should be using push_dummy_call. */
set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
+ /* Disassembler. */
+ set_gdbarch_print_insn (gdbarch, print_insn_m68k);
+
#if defined JB_PC && defined JB_ELEMENT_SIZE
tdep->jb_pc = JB_PC;
tdep->jb_elt_size = JB_ELEMENT_SIZE;
@@ -999,5 +1002,4 @@ void
_initialize_m68k_tdep (void)
{
gdbarch_register (bfd_arch_m68k, m68k_gdbarch_init, m68k_dump_tdep);
- deprecated_tm_print_insn = print_insn_m68k;
}
diff --git a/gdb/main.c b/gdb/main.c
index fd25750b94e..240aa00acfd 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -168,6 +168,10 @@ captured_main (void *data)
/* This needs to happen before the first use of malloc. */
init_malloc (NULL);
+#ifdef HAVE_SBRK
+ lim_at_start = (char *) sbrk (0);
+#endif
+
#if defined (ALIGN_STACK_ON_STARTUP)
i = (int) &count & 0x3;
if (i != 0)
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index ea97ec297e4..cd544f67e6a 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -992,7 +992,7 @@ mcore_use_struct_convention (int gcc_p, struct type *type)
CORE_ADDR
mcore_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf + REGISTER_BYTE (FIRST_ARGREG), DEPRECATED_REGISTER_SIZE);
+ return extract_unsigned_integer (regbuf + REGISTER_BYTE (FIRST_ARGREG), DEPRECATED_REGISTER_SIZE);
}
/* Given a function which returns a value of type TYPE, extract the
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index b8072f1aba7..78503d1c650 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -80,7 +80,7 @@ mips_linux_get_longjmp_target (CORE_ADDR *pc)
buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
@@ -367,7 +367,7 @@ mips64_linux_get_longjmp_target (CORE_ADDR *pc)
buf, TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index e370534f38c..fbd18c0b43f 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -150,7 +150,7 @@ get_longjmp_target (CORE_ADDR *pc)
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 23a5911f1c6..7bc4aebf5e3 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -48,6 +48,8 @@
#include "elf-bfd.h"
#include "symcat.h"
+static void set_reg_offset (CORE_ADDR *saved_regs, int regnum, CORE_ADDR off);
+
/* A useful bit in the CP0 status register (PS_REGNUM). */
/* This bit is set if we are emulating 32-bit FPRs on a 64-bit chip. */
#define ST0_FR (1 << 26)
@@ -150,6 +152,27 @@ static const char *mips_saved_regsize_string = size_auto;
#define MIPS_SAVED_REGSIZE (mips_saved_regsize())
+/* MIPS16 function addresses are odd (bit 0 is set). Here are some
+ functions to test, set, or clear bit 0 of addresses. */
+
+static CORE_ADDR
+is_mips16_addr (CORE_ADDR addr)
+{
+ return ((addr) & 1);
+}
+
+static CORE_ADDR
+make_mips16_addr (CORE_ADDR addr)
+{
+ return ((addr) | 1);
+}
+
+static CORE_ADDR
+unmake_mips16_addr (CORE_ADDR addr)
+{
+ return ((addr) & ~1);
+}
+
/* Return the contents of register REGNUM as a signed integer. */
static LONGEST
@@ -350,8 +373,6 @@ mips_stack_argsize (void)
int gdb_print_insn_mips (bfd_vma, disassemble_info *);
-static void mips_print_register (int, int);
-
static mips_extra_func_info_t heuristic_proc_desc (CORE_ADDR, CORE_ADDR,
struct frame_info *, int);
@@ -372,9 +393,6 @@ static mips_extra_func_info_t find_proc_desc (CORE_ADDR pc,
static CORE_ADDR after_prologue (CORE_ADDR pc,
mips_extra_func_info_t proc_desc);
-static void mips_read_fp_register_single (int regno, char *rare_buffer);
-static void mips_read_fp_register_double (int regno, char *rare_buffer);
-
static struct type *mips_float_register_type (void);
static struct type *mips_double_register_type (void);
@@ -792,7 +810,7 @@ pc_is_mips16 (bfd_vma memaddr)
struct minimal_symbol *sym;
/* If bit 0 of the address is set, assume this is a MIPS16 address. */
- if (IS_MIPS16_ADDR (memaddr))
+ if (is_mips16_addr (memaddr))
return 1;
/* A flag indicating that this is a MIPS16 function is stored by elfread.c in
@@ -925,7 +943,7 @@ mips_fetch_instruction (CORE_ADDR addr)
if (pc_is_mips16 (addr))
{
instlen = MIPS16_INSTLEN;
- addr = UNMAKE_MIPS16_ADDR (addr);
+ addr = unmake_mips16_addr (addr);
}
else
instlen = MIPS_INSTLEN;
@@ -1428,38 +1446,37 @@ mips_next_pc (CORE_ADDR pc)
return mips32_next_pc (pc);
}
-/* Guaranteed to set fci->saved_regs to some values (it never leaves it
- NULL).
-
- Note: kevinb/2002-08-09: The only caller of this function is (and
- should remain) mips_frame_init_saved_regs(). In fact,
- aside from calling mips_find_saved_regs(), mips_frame_init_saved_regs()
- does nothing more than set frame->saved_regs[SP_REGNUM]. These two
- functions should really be combined and now that there is only one
- caller, it should be straightforward. (Watch out for multiple returns
- though.) */
+/* Set up the 'saved_regs' array. This is a data structure containing
+ the addresses on the stack where each register has been saved, for
+ each stack frame. Registers that have not been saved will have
+ zero here. The stack pointer register is special: rather than the
+ address where the stack register has been saved,
+ saved_regs[SP_REGNUM] will have the actual value of the previous
+ frame's stack register. */
static void
mips_find_saved_regs (struct frame_info *fci)
{
int ireg;
- CORE_ADDR reg_position;
/* r0 bit means kernel trap */
int kernel_trap;
/* What registers have been saved? Bitmasks. */
unsigned long gen_mask, float_mask;
mips_extra_func_info_t proc_desc;
t_inst inst;
+ CORE_ADDR *saved_regs;
- frame_saved_regs_zalloc (fci);
+ if (get_frame_saved_regs (fci) != NULL)
+ return;
+ saved_regs = frame_saved_regs_zalloc (fci);
/* If it is the frame for sigtramp, the saved registers are located
- in a sigcontext structure somewhere on the stack.
- If the stack layout for sigtramp changes we might have to change these
- constants and the companion fixup_sigtramp in mdebugread.c */
+ in a sigcontext structure somewhere on the stack. If the stack
+ layout for sigtramp changes we might have to change these
+ constants and the companion fixup_sigtramp in mdebugread.c */
#ifndef SIGFRAME_BASE
-/* To satisfy alignment restrictions, sigcontext is located 4 bytes
- above the sigtramp frame. */
+ /* To satisfy alignment restrictions, sigcontext is located 4 bytes
+ above the sigtramp frame. */
#define SIGFRAME_BASE MIPS_REGSIZE
/* FIXME! Are these correct?? */
#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * MIPS_REGSIZE)
@@ -1468,61 +1485,65 @@ mips_find_saved_regs (struct frame_info *fci)
(SIGFRAME_REGSAVE_OFF + MIPS_NUMREGS * MIPS_REGSIZE + 3 * MIPS_REGSIZE)
#endif
#ifndef SIGFRAME_REG_SIZE
-/* FIXME! Is this correct?? */
+ /* FIXME! Is this correct?? */
#define SIGFRAME_REG_SIZE MIPS_REGSIZE
#endif
if ((get_frame_type (fci) == SIGTRAMP_FRAME))
{
for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
{
- reg_position = get_frame_base (fci) + SIGFRAME_REGSAVE_OFF
- + ireg * SIGFRAME_REG_SIZE;
- get_frame_saved_regs (fci)[ireg] = reg_position;
+ CORE_ADDR reg_position = (get_frame_base (fci) + SIGFRAME_REGSAVE_OFF
+ + ireg * SIGFRAME_REG_SIZE);
+ set_reg_offset (saved_regs, ireg, reg_position);
}
for (ireg = 0; ireg < MIPS_NUMREGS; ireg++)
{
- reg_position = get_frame_base (fci) + SIGFRAME_FPREGSAVE_OFF
- + ireg * SIGFRAME_REG_SIZE;
- get_frame_saved_regs (fci)[FP0_REGNUM + ireg] = reg_position;
+ CORE_ADDR reg_position = (get_frame_base (fci)
+ + SIGFRAME_FPREGSAVE_OFF
+ + ireg * SIGFRAME_REG_SIZE);
+ set_reg_offset (saved_regs, FP0_REGNUM + ireg, reg_position);
}
- get_frame_saved_regs (fci)[PC_REGNUM] = get_frame_base (fci) + SIGFRAME_PC_OFF;
+
+ set_reg_offset (saved_regs, PC_REGNUM, get_frame_base (fci) + SIGFRAME_PC_OFF);
+ /* SP_REGNUM, contains the value and not the address. */
+ set_reg_offset (saved_regs, SP_REGNUM, get_frame_base (fci));
return;
}
proc_desc = get_frame_extra_info (fci)->proc_desc;
if (proc_desc == NULL)
- /* I'm not sure how/whether this can happen. Normally when we can't
- find a proc_desc, we "synthesize" one using heuristic_proc_desc
- and set the saved_regs right away. */
+ /* I'm not sure how/whether this can happen. Normally when we
+ can't find a proc_desc, we "synthesize" one using
+ heuristic_proc_desc and set the saved_regs right away. */
return;
kernel_trap = PROC_REG_MASK (proc_desc) & 1;
gen_mask = kernel_trap ? 0xFFFFFFFF : PROC_REG_MASK (proc_desc);
float_mask = kernel_trap ? 0xFFFFFFFF : PROC_FREG_MASK (proc_desc);
- if ( /* In any frame other than the innermost or a frame interrupted by
- a signal, we assume that all registers have been saved.
- This assumes that all register saves in a function happen before
- the first function call. */
+ if (/* In any frame other than the innermost or a frame interrupted
+ by a signal, we assume that all registers have been saved.
+ This assumes that all register saves in a function happen
+ before the first function call. */
(get_next_frame (fci) == NULL
|| (get_frame_type (get_next_frame (fci)) == SIGTRAMP_FRAME))
- /* In a dummy frame we know exactly where things are saved. */
+ /* In a dummy frame we know exactly where things are saved. */
&& !PROC_DESC_IS_DUMMY (proc_desc)
- /* Don't bother unless we are inside a function prologue. Outside the
- prologue, we know where everything is. */
+ /* Don't bother unless we are inside a function prologue.
+ Outside the prologue, we know where everything is. */
&& in_prologue (get_frame_pc (fci), PROC_LOW_ADDR (proc_desc))
- /* Not sure exactly what kernel_trap means, but if it means
- the kernel saves the registers without a prologue doing it,
- we better not examine the prologue to see whether registers
- have been saved yet. */
+ /* Not sure exactly what kernel_trap means, but if it means the
+ kernel saves the registers without a prologue doing it, we
+ better not examine the prologue to see whether registers
+ have been saved yet. */
&& !kernel_trap)
{
- /* We need to figure out whether the registers that the proc_desc
- claims are saved have been saved yet. */
+ /* We need to figure out whether the registers that the
+ proc_desc claims are saved have been saved yet. */
CORE_ADDR addr;
@@ -1535,8 +1556,8 @@ mips_find_saved_regs (struct frame_info *fci)
addr = PROC_LOW_ADDR (proc_desc);
instlen = pc_is_mips16 (addr) ? MIPS16_INSTLEN : MIPS_INSTLEN;
- /* Scan through this function's instructions preceding the current
- PC, and look for those that save registers. */
+ /* Scan through this function's instructions preceding the
+ current PC, and look for those that save registers. */
while (addr < get_frame_pc (fci))
{
inst = mips_fetch_instruction (addr);
@@ -1550,89 +1571,84 @@ mips_find_saved_regs (struct frame_info *fci)
float_mask = float_save_found;
}
- /* Fill in the offsets for the registers which gen_mask says
- were saved. */
- reg_position = get_frame_base (fci) + PROC_REG_OFFSET (proc_desc);
- for (ireg = MIPS_NUMREGS - 1; gen_mask; --ireg, gen_mask <<= 1)
- if (gen_mask & 0x80000000)
- {
- get_frame_saved_regs (fci)[ireg] = reg_position;
- reg_position -= MIPS_SAVED_REGSIZE;
- }
+ /* Fill in the offsets for the registers which gen_mask says were
+ saved. */
+ {
+ CORE_ADDR reg_position = (get_frame_base (fci)
+ + PROC_REG_OFFSET (proc_desc));
+ for (ireg = MIPS_NUMREGS - 1; gen_mask; --ireg, gen_mask <<= 1)
+ if (gen_mask & 0x80000000)
+ {
+ set_reg_offset (saved_regs, ireg, reg_position);
+ reg_position -= MIPS_SAVED_REGSIZE;
+ }
+ }
- /* The MIPS16 entry instruction saves $s0 and $s1 in the reverse order
- of that normally used by gcc. Therefore, we have to fetch the first
- instruction of the function, and if it's an entry instruction that
- saves $s0 or $s1, correct their saved addresses. */
+ /* The MIPS16 entry instruction saves $s0 and $s1 in the reverse
+ order of that normally used by gcc. Therefore, we have to fetch
+ the first instruction of the function, and if it's an entry
+ instruction that saves $s0 or $s1, correct their saved addresses. */
if (pc_is_mips16 (PROC_LOW_ADDR (proc_desc)))
{
inst = mips_fetch_instruction (PROC_LOW_ADDR (proc_desc));
- if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700) /* entry */
+ if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700)
+ /* entry */
{
int reg;
int sreg_count = (inst >> 6) & 3;
/* Check if the ra register was pushed on the stack. */
- reg_position = get_frame_base (fci) + PROC_REG_OFFSET (proc_desc);
+ CORE_ADDR reg_position = (get_frame_base (fci)
+ + PROC_REG_OFFSET (proc_desc));
if (inst & 0x20)
reg_position -= MIPS_SAVED_REGSIZE;
- /* Check if the s0 and s1 registers were pushed on the stack. */
+ /* Check if the s0 and s1 registers were pushed on the
+ stack. */
for (reg = 16; reg < sreg_count + 16; reg++)
{
- get_frame_saved_regs (fci)[reg] = reg_position;
+ set_reg_offset (saved_regs, reg, reg_position);
reg_position -= MIPS_SAVED_REGSIZE;
}
}
}
- /* Fill in the offsets for the registers which float_mask says
- were saved. */
- reg_position = get_frame_base (fci) + PROC_FREG_OFFSET (proc_desc);
-
- /* Apparently, the freg_offset gives the offset to the first 64 bit
- saved.
+ /* Fill in the offsets for the registers which float_mask says were
+ saved. */
+ {
+ CORE_ADDR reg_position = (get_frame_base (fci)
+ + PROC_FREG_OFFSET (proc_desc));
- When the ABI specifies 64 bit saved registers, the FREG_OFFSET
- designates the first saved 64 bit register.
+ /* Apparently, the freg_offset gives the offset to the first 64
+ bit saved.
- When the ABI specifies 32 bit saved registers, the ``64 bit saved
- DOUBLE'' consists of two adjacent 32 bit registers, Hence
- FREG_OFFSET, designates the address of the lower register of the
- register pair. Adjust the offset so that it designates the upper
- register of the pair -- i.e., the address of the first saved 32
- bit register. */
+ When the ABI specifies 64 bit saved registers, the FREG_OFFSET
+ designates the first saved 64 bit register.
- if (MIPS_SAVED_REGSIZE == 4)
- reg_position += MIPS_SAVED_REGSIZE;
+ When the ABI specifies 32 bit saved registers, the ``64 bit
+ saved DOUBLE'' consists of two adjacent 32 bit registers, Hence
+ FREG_OFFSET, designates the address of the lower register of
+ the register pair. Adjust the offset so that it designates the
+ upper register of the pair -- i.e., the address of the first
+ saved 32 bit register. */
- /* Fill in the offsets for the float registers which float_mask says
- were saved. */
- for (ireg = MIPS_NUMREGS - 1; float_mask; --ireg, float_mask <<= 1)
- if (float_mask & 0x80000000)
- {
- get_frame_saved_regs (fci)[FP0_REGNUM + ireg] = reg_position;
- reg_position -= MIPS_SAVED_REGSIZE;
- }
+ if (MIPS_SAVED_REGSIZE == 4)
+ reg_position += MIPS_SAVED_REGSIZE;
- get_frame_saved_regs (fci)[PC_REGNUM] = get_frame_saved_regs (fci)[RA_REGNUM];
-}
+ /* Fill in the offsets for the float registers which float_mask
+ says were saved. */
+ for (ireg = MIPS_NUMREGS - 1; float_mask; --ireg, float_mask <<= 1)
+ if (float_mask & 0x80000000)
+ {
+ set_reg_offset (saved_regs, FP0_REGNUM + ireg, reg_position);
+ reg_position -= MIPS_SAVED_REGSIZE;
+ }
-/* Set up the 'saved_regs' array. This is a data structure containing
- the addresses on the stack where each register has been saved, for
- each stack frame. Registers that have not been saved will have
- zero here. The stack pointer register is special: rather than the
- address where the stack register has been saved, saved_regs[SP_REGNUM]
- will have the actual value of the previous frame's stack register. */
+ set_reg_offset (saved_regs, PC_REGNUM, saved_regs[RA_REGNUM]);
+ }
-static void
-mips_frame_init_saved_regs (struct frame_info *frame)
-{
- if (get_frame_saved_regs (frame) == NULL)
- {
- mips_find_saved_regs (frame);
- }
- get_frame_saved_regs (frame)[SP_REGNUM] = get_frame_base (frame);
+ /* SP_REGNUM, contains the value and not the address. */
+ set_reg_offset (saved_regs, SP_REGNUM, get_frame_base (fci));
}
static CORE_ADDR
@@ -1787,16 +1803,16 @@ static struct mips_extra_func_info temp_proc_desc;
frames. */
static CORE_ADDR *temp_saved_regs;
-/* Set a register's saved stack address in temp_saved_regs. If an address
- has already been set for this register, do nothing; this way we will
- only recognize the first save of a given register in a function prologue.
- This is a helper function for mips{16,32}_heuristic_proc_desc. */
+/* Set a register's saved stack address in temp_saved_regs. If an
+ address has already been set for this register, do nothing; this
+ way we will only recognize the first save of a given register in a
+ function prologue. */
static void
-set_reg_offset (int regno, CORE_ADDR offset)
+set_reg_offset (CORE_ADDR *saved_regs, int regno, CORE_ADDR offset)
{
- if (temp_saved_regs[regno] == 0)
- temp_saved_regs[regno] = offset;
+ if (saved_regs[regno] == 0)
+ saved_regs[regno] = offset;
}
@@ -1992,26 +2008,26 @@ mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
offset = mips16_get_imm (prev_inst, inst, 8, 4, 0);
reg = mips16_to_32_reg[(inst & 0x700) >> 8];
PROC_REG_MASK (&temp_proc_desc) |= (1 << reg);
- set_reg_offset (reg, sp + offset);
+ set_reg_offset (temp_saved_regs, reg, sp + offset);
}
else if ((inst & 0xff00) == 0xf900) /* sd reg,n($sp) */
{
offset = mips16_get_imm (prev_inst, inst, 5, 8, 0);
reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
PROC_REG_MASK (&temp_proc_desc) |= (1 << reg);
- set_reg_offset (reg, sp + offset);
+ set_reg_offset (temp_saved_regs, reg, sp + offset);
}
else if ((inst & 0xff00) == 0x6200) /* sw $ra,n($sp) */
{
offset = mips16_get_imm (prev_inst, inst, 8, 4, 0);
PROC_REG_MASK (&temp_proc_desc) |= (1 << RA_REGNUM);
- set_reg_offset (RA_REGNUM, sp + offset);
+ set_reg_offset (temp_saved_regs, RA_REGNUM, sp + offset);
}
else if ((inst & 0xff00) == 0xfa00) /* sd $ra,n($sp) */
{
offset = mips16_get_imm (prev_inst, inst, 8, 8, 0);
PROC_REG_MASK (&temp_proc_desc) |= (1 << RA_REGNUM);
- set_reg_offset (RA_REGNUM, sp + offset);
+ set_reg_offset (temp_saved_regs, RA_REGNUM, sp + offset);
}
else if (inst == 0x673d) /* move $s1, $sp */
{
@@ -2030,14 +2046,14 @@ mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
offset = mips16_get_imm (prev_inst, inst, 5, 4, 0);
reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, frame_addr + offset);
+ set_reg_offset (temp_saved_regs, reg, frame_addr + offset);
}
else if ((inst & 0xFF00) == 0x7900) /* sd reg,offset($s1) */
{
offset = mips16_get_imm (prev_inst, inst, 5, 8, 0);
reg = mips16_to_32_reg[(inst & 0xe0) >> 5];
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, frame_addr + offset);
+ set_reg_offset (temp_saved_regs, reg, frame_addr + offset);
}
else if ((inst & 0xf81f) == 0xe809 && (inst & 0x700) != 0x700) /* entry */
entry_inst = inst; /* save for later processing */
@@ -2067,7 +2083,7 @@ mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
for (reg = 4, offset = 0; reg < areg_count + 4; reg++)
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, sp + offset);
+ set_reg_offset (temp_saved_regs, reg, sp + offset);
offset += MIPS_SAVED_REGSIZE;
}
@@ -2076,7 +2092,7 @@ mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
if (entry_inst & 0x20)
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << RA_REGNUM;
- set_reg_offset (RA_REGNUM, sp + offset);
+ set_reg_offset (temp_saved_regs, RA_REGNUM, sp + offset);
offset -= MIPS_SAVED_REGSIZE;
}
@@ -2084,7 +2100,7 @@ mips16_heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
for (reg = 16; reg < sreg_count + 16; reg++)
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, sp + offset);
+ set_reg_offset (temp_saved_regs, reg, sp + offset);
offset -= MIPS_SAVED_REGSIZE;
}
}
@@ -2129,7 +2145,7 @@ restart:
else if ((high_word & 0xFFE0) == 0xafa0) /* sw reg,offset($sp) */
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, sp + low_word);
+ set_reg_offset (temp_saved_regs, reg, sp + low_word);
}
else if ((high_word & 0xFFE0) == 0xffa0) /* sd reg,offset($sp) */
{
@@ -2137,7 +2153,7 @@ restart:
but the register size used is only 32 bits. Make the address
for the saved register point to the lower 32 bits. */
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, sp + low_word + 8 - MIPS_REGSIZE);
+ set_reg_offset (temp_saved_regs, reg, sp + low_word + 8 - MIPS_REGSIZE);
}
else if (high_word == 0x27be) /* addiu $30,$sp,size */
{
@@ -2187,7 +2203,7 @@ restart:
else if ((high_word & 0xFFE0) == 0xafc0) /* sw reg,offset($30) */
{
PROC_REG_MASK (&temp_proc_desc) |= 1 << reg;
- set_reg_offset (reg, frame_addr + low_word);
+ set_reg_offset (temp_saved_regs, reg, frame_addr + low_word);
}
}
}
@@ -2586,15 +2602,18 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
if (!PC_IN_SIGTRAMP (get_frame_pc (fci), name))
{
frame_saved_regs_zalloc (fci);
- memcpy (get_frame_saved_regs (fci), temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
- get_frame_saved_regs (fci)[PC_REGNUM]
- = get_frame_saved_regs (fci)[RA_REGNUM];
- /* Set value of previous frame's stack pointer. Remember that
- saved_regs[SP_REGNUM] is special in that it contains the
- value of the stack pointer register. The other saved_regs
- values are addresses (in the inferior) at which a given
- register's value may be found. */
- get_frame_saved_regs (fci)[SP_REGNUM] = get_frame_base (fci);
+ /* Set value of previous frame's stack pointer.
+ Remember that saved_regs[SP_REGNUM] is special in
+ that it contains the value of the stack pointer
+ register. The other saved_regs values are addresses
+ (in the inferior) at which a given register's value
+ may be found. */
+ set_reg_offset (temp_saved_regs, SP_REGNUM,
+ get_frame_base (fci));
+ set_reg_offset (temp_saved_regs, PC_REGNUM,
+ temp_saved_regs[RA_REGNUM]);
+ memcpy (get_frame_saved_regs (fci), temp_saved_regs,
+ SIZEOF_FRAME_SAVED_REGS);
}
}
@@ -2697,11 +2716,10 @@ mips_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
}
static CORE_ADDR
-mips_eabi_push_arguments (int nargs,
- struct value **args,
- CORE_ADDR sp,
- int struct_return,
- CORE_ADDR struct_addr)
+mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int argreg;
int float_argreg;
@@ -2709,6 +2727,14 @@ mips_eabi_push_arguments (int nargs,
int len = 0;
int stack_offset = 0;
+ /* For shared libraries, "t9" needs to point at the function
+ address. */
+ regcache_cooked_write_signed (regcache, T9_REGNUM, func_addr);
+
+ /* Set the return address register to point to the entry point of
+ the program, where a breakpoint lies in wait. */
+ regcache_cooked_write_signed (regcache, RA_REGNUM, bp_addr);
+
/* First ensure that the stack and structure return address (if any)
are properly aligned. The stack has to be at least 64-bit
aligned even on 32-bit machines, because doubles must be 64-bit
@@ -2728,7 +2754,7 @@ mips_eabi_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_eabi_push_arguments: sp=0x%s allocated %d\n",
+ "mips_eabi_push_dummy_call: sp=0x%s allocated %d\n",
paddr_nz (sp), ROUND_UP (len, 16));
/* Initialize the integer and float register pointers. */
@@ -2740,7 +2766,7 @@ mips_eabi_push_arguments (int nargs,
{
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_eabi_push_arguments: struct_return reg=%d 0x%s\n",
+ "mips_eabi_push_dummy_call: struct_return reg=%d 0x%s\n",
argreg, paddr_nz (struct_addr));
write_register (argreg++, struct_addr);
}
@@ -2759,7 +2785,7 @@ mips_eabi_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_eabi_push_arguments: %d len=%d type=%d",
+ "mips_eabi_push_dummy_call: %d len=%d type=%d",
argnum + 1, len, (int) typecode);
/* The EABI passes structures that do not fit in a register by
@@ -2943,18 +2969,19 @@ mips_eabi_push_arguments (int nargs,
fprintf_unfiltered (gdb_stdlog, "\n");
}
+ regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+
/* Return adjusted stack pointer. */
return sp;
}
-/* N32/N64 version of push_arguments. */
+/* N32/N64 version of push_dummy_call. */
static CORE_ADDR
-mips_n32n64_push_arguments (int nargs,
- struct value **args,
- CORE_ADDR sp,
- int struct_return,
- CORE_ADDR struct_addr)
+mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int argreg;
int float_argreg;
@@ -2962,6 +2989,14 @@ mips_n32n64_push_arguments (int nargs,
int len = 0;
int stack_offset = 0;
+ /* For shared libraries, "t9" needs to point at the function
+ address. */
+ regcache_cooked_write_signed (regcache, T9_REGNUM, func_addr);
+
+ /* Set the return address register to point to the entry point of
+ the program, where a breakpoint lies in wait. */
+ regcache_cooked_write_signed (regcache, RA_REGNUM, bp_addr);
+
/* First ensure that the stack and structure return address (if any)
are properly aligned. The stack has to be at least 64-bit
aligned even on 32-bit machines, because doubles must be 64-bit
@@ -2979,7 +3014,7 @@ mips_n32n64_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_n32n64_push_arguments: sp=0x%s allocated %d\n",
+ "mips_n32n64_push_dummy_call: sp=0x%s allocated %d\n",
paddr_nz (sp), ROUND_UP (len, 16));
/* Initialize the integer and float register pointers. */
@@ -2991,7 +3026,7 @@ mips_n32n64_push_arguments (int nargs,
{
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_n32n64_push_arguments: struct_return reg=%d 0x%s\n",
+ "mips_n32n64_push_dummy_call: struct_return reg=%d 0x%s\n",
argreg, paddr_nz (struct_addr));
write_register (argreg++, struct_addr);
}
@@ -3010,7 +3045,7 @@ mips_n32n64_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_n32n64_push_arguments: %d len=%d type=%d",
+ "mips_n32n64_push_dummy_call: %d len=%d type=%d",
argnum + 1, len, (int) typecode);
val = (char *) VALUE_CONTENTS (arg);
@@ -3165,18 +3200,19 @@ mips_n32n64_push_arguments (int nargs,
fprintf_unfiltered (gdb_stdlog, "\n");
}
+ regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+
/* Return adjusted stack pointer. */
return sp;
}
-/* O32 version of push_arguments. */
+/* O32 version of push_dummy_call. */
static CORE_ADDR
-mips_o32_push_arguments (int nargs,
- struct value **args,
- CORE_ADDR sp,
- int struct_return,
- CORE_ADDR struct_addr)
+mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int argreg;
int float_argreg;
@@ -3184,6 +3220,14 @@ mips_o32_push_arguments (int nargs,
int len = 0;
int stack_offset = 0;
+ /* For shared libraries, "t9" needs to point at the function
+ address. */
+ regcache_cooked_write_signed (regcache, T9_REGNUM, func_addr);
+
+ /* Set the return address register to point to the entry point of
+ the program, where a breakpoint lies in wait. */
+ regcache_cooked_write_signed (regcache, RA_REGNUM, bp_addr);
+
/* First ensure that the stack and structure return address (if any)
are properly aligned. The stack has to be at least 64-bit
aligned even on 32-bit machines, because doubles must be 64-bit
@@ -3201,7 +3245,7 @@ mips_o32_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o32_push_arguments: sp=0x%s allocated %d\n",
+ "mips_o32_push_dummy_call: sp=0x%s allocated %d\n",
paddr_nz (sp), ROUND_UP (len, 16));
/* Initialize the integer and float register pointers. */
@@ -3213,7 +3257,7 @@ mips_o32_push_arguments (int nargs,
{
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o32_push_arguments: struct_return reg=%d 0x%s\n",
+ "mips_o32_push_dummy_call: struct_return reg=%d 0x%s\n",
argreg, paddr_nz (struct_addr));
write_register (argreg++, struct_addr);
stack_offset += MIPS_STACK_ARGSIZE;
@@ -3233,7 +3277,7 @@ mips_o32_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o32_push_arguments: %d len=%d type=%d",
+ "mips_o32_push_dummy_call: %d len=%d type=%d",
argnum + 1, len, (int) typecode);
val = (char *) VALUE_CONTENTS (arg);
@@ -3464,18 +3508,19 @@ mips_o32_push_arguments (int nargs,
fprintf_unfiltered (gdb_stdlog, "\n");
}
+ regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+
/* Return adjusted stack pointer. */
return sp;
}
-/* O64 version of push_arguments. */
+/* O64 version of push_dummy_call. */
static CORE_ADDR
-mips_o64_push_arguments (int nargs,
- struct value **args,
- CORE_ADDR sp,
- int struct_return,
- CORE_ADDR struct_addr)
+mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
+ struct value **args, CORE_ADDR sp, int struct_return,
+ CORE_ADDR struct_addr)
{
int argreg;
int float_argreg;
@@ -3483,6 +3528,14 @@ mips_o64_push_arguments (int nargs,
int len = 0;
int stack_offset = 0;
+ /* For shared libraries, "t9" needs to point at the function
+ address. */
+ regcache_cooked_write_signed (regcache, T9_REGNUM, func_addr);
+
+ /* Set the return address register to point to the entry point of
+ the program, where a breakpoint lies in wait. */
+ regcache_cooked_write_signed (regcache, RA_REGNUM, bp_addr);
+
/* First ensure that the stack and structure return address (if any)
are properly aligned. The stack has to be at least 64-bit
aligned even on 32-bit machines, because doubles must be 64-bit
@@ -3500,7 +3553,7 @@ mips_o64_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o64_push_arguments: sp=0x%s allocated %d\n",
+ "mips_o64_push_dummy_call: sp=0x%s allocated %d\n",
paddr_nz (sp), ROUND_UP (len, 16));
/* Initialize the integer and float register pointers. */
@@ -3512,7 +3565,7 @@ mips_o64_push_arguments (int nargs,
{
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o64_push_arguments: struct_return reg=%d 0x%s\n",
+ "mips_o64_push_dummy_call: struct_return reg=%d 0x%s\n",
argreg, paddr_nz (struct_addr));
write_register (argreg++, struct_addr);
stack_offset += MIPS_STACK_ARGSIZE;
@@ -3532,7 +3585,7 @@ mips_o64_push_arguments (int nargs,
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o64_push_arguments: %d len=%d type=%d",
+ "mips_o64_push_dummy_call: %d len=%d type=%d",
argnum + 1, len, (int) typecode);
val = (char *) VALUE_CONTENTS (arg);
@@ -3763,16 +3816,9 @@ mips_o64_push_arguments (int nargs,
fprintf_unfiltered (gdb_stdlog, "\n");
}
- /* Return adjusted stack pointer. */
- return sp;
-}
+ regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
-static CORE_ADDR
-mips_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-{
- /* Set the return address register to point to the entry
- point of the program, where a breakpoint lies in wait. */
- write_register (RA_REGNUM, CALL_DUMMY_ADDRESS ());
+ /* Return adjusted stack pointer. */
return sp;
}
@@ -3793,8 +3839,7 @@ mips_pop_frame (void)
proc_desc = get_frame_extra_info (frame)->proc_desc;
write_register (PC_REGNUM, DEPRECATED_FRAME_SAVED_PC (frame));
- if (get_frame_saved_regs (frame) == NULL)
- DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
+ mips_find_saved_regs (frame);
for (regnum = 0; regnum < NUM_REGS; regnum++)
if (regnum != SP_REGNUM && regnum != PC_REGNUM
&& get_frame_saved_regs (frame)[regnum])
@@ -3850,13 +3895,6 @@ mips_pop_frame (void)
}
}
-static void
-mips_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
- struct value **args, struct type *type, int gcc_p)
-{
- write_register(T9_REGNUM, fun);
-}
-
/* Floating point register management.
Background: MIPS1 & 2 fp registers are 32 bits wide. To support
@@ -3909,12 +3947,13 @@ mips_double_register_type (void)
into rare_buffer. */
static void
-mips_read_fp_register_single (int regno, char *rare_buffer)
+mips_read_fp_register_single (struct frame_info *frame, int regno,
+ char *rare_buffer)
{
int raw_size = REGISTER_RAW_SIZE (regno);
char *raw_buffer = alloca (raw_size);
- if (!frame_register_read (deprecated_selected_frame, regno, raw_buffer))
+ if (!frame_register_read (frame, regno, raw_buffer))
error ("can't read register %d (%s)", regno, REGISTER_NAME (regno));
if (raw_size == 8)
{
@@ -3940,7 +3979,8 @@ mips_read_fp_register_single (int regno, char *rare_buffer)
register. */
static void
-mips_read_fp_register_double (int regno, char *rare_buffer)
+mips_read_fp_register_double (struct frame_info *frame, int regno,
+ char *rare_buffer)
{
int raw_size = REGISTER_RAW_SIZE (regno);
@@ -3948,7 +3988,7 @@ mips_read_fp_register_double (int regno, char *rare_buffer)
{
/* We have a 64-bit value for this register, and we should use
all 64 bits. */
- if (!frame_register_read (deprecated_selected_frame, regno, rare_buffer))
+ if (!frame_register_read (frame, regno, rare_buffer))
error ("can't read register %d (%s)", regno, REGISTER_NAME (regno));
}
else
@@ -3962,19 +4002,20 @@ mips_read_fp_register_double (int regno, char *rare_buffer)
each register. */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- mips_read_fp_register_single (regno, rare_buffer + 4);
- mips_read_fp_register_single (regno + 1, rare_buffer);
+ mips_read_fp_register_single (frame, regno, rare_buffer + 4);
+ mips_read_fp_register_single (frame, regno + 1, rare_buffer);
}
else
{
- mips_read_fp_register_single (regno, rare_buffer);
- mips_read_fp_register_single (regno + 1, rare_buffer + 4);
+ mips_read_fp_register_single (frame, regno, rare_buffer);
+ mips_read_fp_register_single (frame, regno + 1, rare_buffer + 4);
}
}
}
static void
-mips_print_fp_register (int regnum)
+mips_print_fp_register (struct ui_file *file, struct frame_info *frame,
+ int regnum)
{ /* do values for FP (float) regs */
char *raw_buffer;
double doub, flt1, flt2; /* doubles extracted from raw hex data */
@@ -3982,94 +4023,94 @@ mips_print_fp_register (int regnum)
raw_buffer = (char *) alloca (2 * REGISTER_RAW_SIZE (FP0_REGNUM));
- printf_filtered ("%s:", REGISTER_NAME (regnum));
- printf_filtered ("%*s", 4 - (int) strlen (REGISTER_NAME (regnum)), "");
+ fprintf_filtered (file, "%s:", REGISTER_NAME (regnum));
+ fprintf_filtered (file, "%*s", 4 - (int) strlen (REGISTER_NAME (regnum)),
+ "");
if (REGISTER_RAW_SIZE (regnum) == 4 || mips2_fp_compat ())
{
/* 4-byte registers: Print hex and floating. Also print even
numbered registers as doubles. */
- mips_read_fp_register_single (regnum, raw_buffer);
+ mips_read_fp_register_single (frame, regnum, raw_buffer);
flt1 = unpack_double (mips_float_register_type (), raw_buffer, &inv1);
- print_scalar_formatted (raw_buffer, builtin_type_uint32, 'x', 'w',
- gdb_stdout);
+ print_scalar_formatted (raw_buffer, builtin_type_uint32, 'x', 'w', file);
- printf_filtered (" flt: ");
+ fprintf_filtered (file, " flt: ");
if (inv1)
- printf_filtered (" <invalid float> ");
+ fprintf_filtered (file, " <invalid float> ");
else
- printf_filtered ("%-17.9g", flt1);
+ fprintf_filtered (file, "%-17.9g", flt1);
if (regnum % 2 == 0)
{
- mips_read_fp_register_double (regnum, raw_buffer);
+ mips_read_fp_register_double (frame, regnum, raw_buffer);
doub = unpack_double (mips_double_register_type (), raw_buffer,
&inv2);
- printf_filtered (" dbl: ");
+ fprintf_filtered (file, " dbl: ");
if (inv2)
- printf_filtered ("<invalid double>");
+ fprintf_filtered (file, "<invalid double>");
else
- printf_filtered ("%-24.17g", doub);
+ fprintf_filtered (file, "%-24.17g", doub);
}
}
else
{
/* Eight byte registers: print each one as hex, float and double. */
- mips_read_fp_register_single (regnum, raw_buffer);
+ mips_read_fp_register_single (frame, regnum, raw_buffer);
flt1 = unpack_double (mips_float_register_type (), raw_buffer, &inv1);
- mips_read_fp_register_double (regnum, raw_buffer);
+ mips_read_fp_register_double (frame, regnum, raw_buffer);
doub = unpack_double (mips_double_register_type (), raw_buffer, &inv2);
- print_scalar_formatted (raw_buffer, builtin_type_uint64, 'x', 'g',
- gdb_stdout);
+ print_scalar_formatted (raw_buffer, builtin_type_uint64, 'x', 'g', file);
- printf_filtered (" flt: ");
+ fprintf_filtered (file, " flt: ");
if (inv1)
- printf_filtered ("<invalid float>");
+ fprintf_filtered (file, "<invalid float>");
else
- printf_filtered ("%-17.9g", flt1);
+ fprintf_filtered (file, "%-17.9g", flt1);
- printf_filtered (" dbl: ");
+ fprintf_filtered (file, " dbl: ");
if (inv2)
- printf_filtered ("<invalid double>");
+ fprintf_filtered (file, "<invalid double>");
else
- printf_filtered ("%-24.17g", doub);
+ fprintf_filtered (file, "%-24.17g", doub);
}
}
static void
-mips_print_register (int regnum, int all)
+mips_print_register (struct ui_file *file, struct frame_info *frame,
+ int regnum, int all)
{
char raw_buffer[MAX_REGISTER_SIZE];
int offset;
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
{
- mips_print_fp_register (regnum);
+ mips_print_fp_register (file, frame, regnum);
return;
}
/* Get the data in raw format. */
- if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
+ if (!frame_register_read (frame, regnum, raw_buffer))
{
- printf_filtered ("%s: [Invalid]", REGISTER_NAME (regnum));
+ fprintf_filtered (file, "%s: [Invalid]", REGISTER_NAME (regnum));
return;
}
- fputs_filtered (REGISTER_NAME (regnum), gdb_stdout);
+ fputs_filtered (REGISTER_NAME (regnum), file);
/* The problem with printing numeric register names (r26, etc.) is that
the user can't use them on input. Probably the best solution is to
fix it so that either the numeric or the funky (a2, etc.) names
are accepted on input. */
if (regnum < MIPS_NUMREGS)
- printf_filtered ("(r%d): ", regnum);
+ fprintf_filtered (file, "(r%d): ", regnum);
else
- printf_filtered (": ");
+ fprintf_filtered (file, ": ");
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
@@ -4078,18 +4119,19 @@ mips_print_register (int regnum, int all)
print_scalar_formatted (raw_buffer + offset,
REGISTER_VIRTUAL_TYPE (regnum),
- 'x', 0, gdb_stdout);
+ 'x', 0, file);
}
/* Replacement for generic do_registers_info.
Print regs in pretty columns. */
static int
-do_fp_register_row (int regnum)
+print_fp_register_row (struct ui_file *file, struct frame_info *frame,
+ int regnum)
{
- printf_filtered (" ");
- mips_print_fp_register (regnum);
- printf_filtered ("\n");
+ fprintf_filtered (file, " ");
+ mips_print_fp_register (file, frame, regnum);
+ fprintf_filtered (file, "\n");
return regnum + 1;
}
@@ -4097,7 +4139,8 @@ do_fp_register_row (int regnum)
/* Print a row's worth of GP (int) registers, with name labels above */
static int
-do_gp_register_row (int regnum)
+print_gp_register_row (struct ui_file *file, struct frame_info *frame,
+ int regnum)
{
/* do values for GP (int) regs */
char raw_buffer[MAX_REGISTER_SIZE];
@@ -4108,19 +4151,20 @@ do_gp_register_row (int regnum)
/* For GP registers, we print a separate row of names above the vals */
- printf_filtered (" ");
+ fprintf_filtered (file, " ");
for (col = 0; col < ncols && regnum < numregs; regnum++)
{
if (*REGISTER_NAME (regnum) == '\0')
continue; /* unused register */
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
break; /* end the row: reached FP register */
- printf_filtered (MIPS_REGSIZE == 8 ? "%17s" : "%9s",
- REGISTER_NAME (regnum));
+ fprintf_filtered (file, MIPS_REGSIZE == 8 ? "%17s" : "%9s",
+ REGISTER_NAME (regnum));
col++;
}
- printf_filtered (start_regnum < MIPS_NUMREGS ? "\n R%-4d" : "\n ",
- start_regnum); /* print the R0 to R31 names */
+ fprintf_filtered (file,
+ start_regnum < MIPS_NUMREGS ? "\n R%-4d" : "\n ",
+ start_regnum); /* print the R0 to R31 names */
regnum = start_regnum; /* go back to start of row */
/* now print the values in hex, 4 or 8 to the row */
@@ -4131,7 +4175,7 @@ do_gp_register_row (int regnum)
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
break; /* end row: reached FP register */
/* OK: get the data in raw format. */
- if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
+ if (!frame_register_read (frame, regnum, raw_buffer))
error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum));
/* pad small registers */
for (byte = 0; byte < (MIPS_REGSIZE - REGISTER_VIRTUAL_SIZE (regnum)); byte++)
@@ -4141,17 +4185,17 @@ do_gp_register_row (int regnum)
for (byte = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
byte < REGISTER_RAW_SIZE (regnum);
byte++)
- printf_filtered ("%02x", (unsigned char) raw_buffer[byte]);
+ fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[byte]);
else
for (byte = REGISTER_VIRTUAL_SIZE (regnum) - 1;
byte >= 0;
byte--)
- printf_filtered ("%02x", (unsigned char) raw_buffer[byte]);
- printf_filtered (" ");
+ fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[byte]);
+ fprintf_filtered (file, " ");
col++;
}
if (col > 0) /* ie. if we actually printed anything... */
- printf_filtered ("\n");
+ fprintf_filtered (file, "\n");
return regnum;
}
@@ -4159,15 +4203,16 @@ do_gp_register_row (int regnum)
/* MIPS_DO_REGISTERS_INFO(): called by "info register" command */
static void
-mips_do_registers_info (int regnum, int fpregs)
+mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
+ struct frame_info *frame, int regnum, int all)
{
if (regnum != -1) /* do one specified register */
{
if (*(REGISTER_NAME (regnum)) == '\0')
error ("Not a valid register for the current processor type");
- mips_print_register (regnum, 0);
- printf_filtered ("\n");
+ mips_print_register (file, frame, regnum, 0);
+ fprintf_filtered (file, "\n");
}
else
/* do all (or most) registers */
@@ -4176,12 +4221,14 @@ mips_do_registers_info (int regnum, int fpregs)
while (regnum < NUM_REGS)
{
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (regnum)) == TYPE_CODE_FLT)
- if (fpregs) /* true for "INFO ALL-REGISTERS" command */
- regnum = do_fp_register_row (regnum); /* FP regs */
- else
- regnum += MIPS_NUMREGS; /* skip floating point regs */
+ {
+ if (all) /* true for "INFO ALL-REGISTERS" command */
+ regnum = print_fp_register_row (file, frame, regnum);
+ else
+ regnum += MIPS_NUMREGS; /* skip floating point regs */
+ }
else
- regnum = do_gp_register_row (regnum); /* GP (int) regs */
+ regnum = print_gp_register_row (file, frame, regnum);
}
}
}
@@ -4893,12 +4940,6 @@ mips_n32n64_store_return_value (struct type *type, char *valbuf)
mips_n32n64_xfer_return_value (type, current_regcache, NULL, valbuf);
}
-static void
-mips_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-{
- /* Nothing to do -- push_arguments does all the work. */
-}
-
static CORE_ADDR
mips_extract_struct_value_address (struct regcache *regcache)
{
@@ -5096,7 +5137,7 @@ gdb_print_insn_mips (bfd_vma memaddr, disassemble_info *info)
the search would fail because the symbol table says the function
starts at an odd address, i.e. 1 byte past the given address. */
memaddr = ADDR_BITS_REMOVE (memaddr);
- proc_desc = non_heuristic_proc_desc (MAKE_MIPS16_ADDR (memaddr), NULL);
+ proc_desc = non_heuristic_proc_desc (make_mips16_addr (memaddr), NULL);
/* Make an attempt to determine if this is a 16-bit function. If
the procedure descriptor exists and the address therein is odd,
@@ -5104,10 +5145,10 @@ gdb_print_insn_mips (bfd_vma memaddr, disassemble_info *info)
guess that if the address passed in is odd, it's 16-bits. */
if (proc_desc)
info->mach = pc_is_mips16 (PROC_LOW_ADDR (proc_desc)) ?
- bfd_mach_mips16 : TM_PRINT_INSN_MACH;
+ bfd_mach_mips16 : 0;
else
info->mach = pc_is_mips16 (memaddr) ?
- bfd_mach_mips16 : TM_PRINT_INSN_MACH;
+ bfd_mach_mips16 : 0;
/* Round down the instruction address to the appropriate boundary. */
memaddr &= (info->mach == bfd_mach_mips16 ? ~1 : ~3);
@@ -5134,7 +5175,7 @@ mips_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
if (pc_is_mips16 (*pcptr))
{
static unsigned char mips16_big_breakpoint[] = {0xe8, 0xa5};
- *pcptr = UNMAKE_MIPS16_ADDR (*pcptr);
+ *pcptr = unmake_mips16_addr (*pcptr);
*lenptr = sizeof (mips16_big_breakpoint);
return mips16_big_breakpoint;
}
@@ -5164,7 +5205,7 @@ mips_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
if (pc_is_mips16 (*pcptr))
{
static unsigned char mips16_little_breakpoint[] = {0xa5, 0xe8};
- *pcptr = UNMAKE_MIPS16_ADDR (*pcptr);
+ *pcptr = unmake_mips16_addr (*pcptr);
*lenptr = sizeof (mips16_little_breakpoint);
return mips16_little_breakpoint;
}
@@ -5550,8 +5591,6 @@ static struct gdbarch *
mips_gdbarch_init (struct gdbarch_info info,
struct gdbarch_list *arches)
{
- static LONGEST mips_call_dummy_words[] =
- {0};
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
int elf_flags;
@@ -5709,8 +5748,6 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_double_bit (gdbarch, 64);
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_register_raw_size (gdbarch, mips_register_raw_size);
- set_gdbarch_deprecated_max_register_raw_size (gdbarch, 8);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 8);
tdep->found_abi = found_abi;
tdep->mips_abi = mips_abi;
@@ -5725,7 +5762,7 @@ mips_gdbarch_init (struct gdbarch_info info,
switch (mips_abi)
{
case MIPS_ABI_O32:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_o32_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_o32_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_o32_store_return_value);
set_gdbarch_extract_return_value (gdbarch, mips_o32_extract_return_value);
tdep->mips_default_saved_regsize = 4;
@@ -5744,7 +5781,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_o32_use_struct_convention);
break;
case MIPS_ABI_O64:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_o64_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_o64_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_o64_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch, mips_o64_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5763,7 +5800,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_o32_use_struct_convention);
break;
case MIPS_ABI_EABI32:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_eabi_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_eabi_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_eabi_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch, mips_eabi_extract_return_value);
tdep->mips_default_saved_regsize = 4;
@@ -5782,7 +5819,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_eabi_use_struct_convention);
break;
case MIPS_ABI_EABI64:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_eabi_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_eabi_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_eabi_store_return_value);
set_gdbarch_deprecated_extract_return_value (gdbarch, mips_eabi_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5801,7 +5838,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_eabi_use_struct_convention);
break;
case MIPS_ABI_N32:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_n32n64_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_n32n64_store_return_value);
set_gdbarch_extract_return_value (gdbarch, mips_n32n64_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5820,7 +5857,7 @@ mips_gdbarch_init (struct gdbarch_info info,
mips_n32n64_reg_struct_has_addr);
break;
case MIPS_ABI_N64:
- set_gdbarch_deprecated_push_arguments (gdbarch, mips_n32n64_push_arguments);
+ set_gdbarch_push_dummy_call (gdbarch, mips_n32n64_push_dummy_call);
set_gdbarch_deprecated_store_return_value (gdbarch, mips_n32n64_store_return_value);
set_gdbarch_extract_return_value (gdbarch, mips_n32n64_extract_return_value);
tdep->mips_default_saved_regsize = 8;
@@ -5898,7 +5935,6 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
set_gdbarch_deprecated_target_read_fp (gdbarch, mips_read_sp); /* Draft FRAME base. */
set_gdbarch_read_sp (gdbarch, mips_read_sp);
- set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
/* Add/remove bits from an address. The MIPS needs be careful to
ensure that all 32 bit addresses are sign extended to 64 bits. */
@@ -5916,18 +5952,13 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, mips_dwarf_dwarf2_ecoff_reg_to_regnum);
/* Initialize a frame */
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, mips_frame_init_saved_regs);
+ set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, mips_find_saved_regs);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, mips_init_extra_frame_info);
/* MIPS version of CALL_DUMMY */
set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address);
- set_gdbarch_deprecated_push_return_address (gdbarch, mips_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame);
- set_gdbarch_deprecated_fix_call_dummy (gdbarch, mips_fix_call_dummy);
- set_gdbarch_deprecated_call_dummy_words (gdbarch, mips_call_dummy_words);
- set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words));
- set_gdbarch_deprecated_push_return_address (gdbarch, mips_push_return_address);
set_gdbarch_frame_align (gdbarch, mips_frame_align);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_register_convertible (gdbarch, mips_register_convertible);
@@ -5961,15 +5992,13 @@ mips_gdbarch_init (struct gdbarch_info info,
/* There are MIPS targets which do not yet use this since they still
define REGISTER_VIRTUAL_TYPE. */
set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
- set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
- set_gdbarch_deprecated_do_registers_info (gdbarch, mips_do_registers_info);
+ set_gdbarch_print_registers_info (gdbarch, mips_print_registers_info);
set_gdbarch_pc_in_sigtramp (gdbarch, mips_pc_in_sigtramp);
/* Hook in OS ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
- set_gdbarch_deprecated_store_struct_return (gdbarch, mips_store_struct_return);
set_gdbarch_extract_struct_value_address (gdbarch,
mips_extract_struct_value_address);
@@ -6163,8 +6192,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: IN_SOLIB_RETURN_TRAMPOLINE # %s\n",
XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (PC, NAME)));
fprintf_unfiltered (file,
- "mips_dump_tdep: IS_MIPS16_ADDR = FIXME!\n");
- fprintf_unfiltered (file,
"mips_dump_tdep: LAST_EMBED_REGNUM = %d\n",
LAST_EMBED_REGNUM);
fprintf_unfiltered (file,
@@ -6186,8 +6213,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
MACHINE_CPROC_SP_OFFSET);
#endif
fprintf_unfiltered (file,
- "mips_dump_tdep: MAKE_MIPS16_ADDR = FIXME!\n");
- fprintf_unfiltered (file,
"mips_dump_tdep: MIPS16_INSTLEN = %d\n",
MIPS16_INSTLEN);
fprintf_unfiltered (file,
@@ -6333,11 +6358,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"mips_dump_tdep: TARGET_HAS_HARDWARE_WATCHPOINTS # %s\n",
XSTRING (TARGET_HAS_HARDWARE_WATCHPOINTS));
- fprintf_unfiltered (file,
- "mips_dump_tdep: TARGET_MIPS = used?\n");
- fprintf_unfiltered (file,
- "mips_dump_tdep: TM_PRINT_INSN_MACH # %s\n",
- XSTRING (TM_PRINT_INSN_MACH));
#ifdef TRACE_CLEAR
fprintf_unfiltered (file,
"mips_dump_tdep: TRACE_CLEAR # %s\n",
@@ -6358,8 +6378,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: TRACE_SET # %s\n",
XSTRING (TRACE_SET (X,STATE)));
#endif
- fprintf_unfiltered (file,
- "mips_dump_tdep: UNMAKE_MIPS16_ADDR = function?\n");
#ifdef UNUSED_REGNUM
fprintf_unfiltered (file,
"mips_dump_tdep: UNUSED_REGNUM = %d\n",
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index 7776d465ad1..62ec8f3bb64 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -1,5 +1,5 @@
/* Target-dependent code for MIPS systems running NetBSD.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -105,7 +105,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
mipsnbsd_supply_reg (regs, -1);
/* Floating point registers. */
- mipsnbsd_supply_fpreg (regs, -1);
+ mipsnbsd_supply_fpreg (fpregs, -1);
}
static void
@@ -250,7 +250,7 @@ mipsnbsd_get_longjmp_target (CORE_ADDR *pc)
NBSD_MIPS_JB_ELEMENT_SIZE))
return 0;
- *pc = extract_address (buf, NBSD_MIPS_JB_ELEMENT_SIZE);
+ *pc = extract_unsigned_integer (buf, NBSD_MIPS_JB_ELEMENT_SIZE);
return 1;
}
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index 65ffa0dc629..d29bc995d9a 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -154,7 +154,7 @@ get_longjmp_target (CORE_ADDR *pc)
TARGET_PTR_BIT / TARGET_CHAR_BIT))
return 0;
- *pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
+ *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
}
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index c7bc58c35fa..76f02453713 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -131,8 +131,8 @@ mn10300_extract_return_value (struct type *type, char *regbuf, char *valbuf)
static CORE_ADDR
mn10300_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf + REGISTER_BYTE (4),
- REGISTER_RAW_SIZE (4));
+ return extract_unsigned_integer (regbuf + REGISTER_BYTE (4),
+ REGISTER_RAW_SIZE (4));
}
static void
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 46c175c4b02..dfdd315f03c 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -503,7 +503,7 @@ ns32k_store_return_value (struct type *valtype, char *valbuf)
static CORE_ADDR
ns32k_extract_struct_value_address (char *regbuf)
{
- return (extract_address (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
+ return (extract_unsigned_integer (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
}
void
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index c3577476eb5..25d40ab9289 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -1421,7 +1421,6 @@ char *find_imps (struct symtab *symtab, struct block *block,
if (tmp == NULL) {
- struct symtab *sym_symtab = NULL;
struct symbol *sym = NULL;
struct minimal_symbol *msym = NULL;
@@ -1431,7 +1430,7 @@ char *find_imps (struct symtab *symtab, struct block *block,
if (tmp == NULL)
return NULL;
- sym = lookup_symbol (selector, block, VAR_DOMAIN, 0, &sym_symtab);
+ sym = lookup_symbol (selector, block, VAR_DOMAIN, 0, NULL);
if (sym != NULL)
{
if (syms)
@@ -1730,11 +1729,6 @@ static unsigned long FETCH_ARGUMENT (int i)
internal_error (__FILE__, __LINE__, "FETCH_ARGUMENT not implemented");
return 0;
}
-static CORE_ADDR CONVERT_FUNCPTR (CORE_ADDR pc)
-{
- internal_error (__FILE__, __LINE__, "CONVERT_FUNCPTR not implemented");
- return pc;
-}
#else
#if defined (__powerpc__) || defined (__ppc__)
static unsigned long FETCH_ARGUMENT (int i)
@@ -1761,20 +1755,6 @@ static unsigned long FETCH_ARGUMENT (int i)
#error unknown architecture
#endif
-#if defined (__hppa__) || defined (__hppa)
-static CORE_ADDR CONVERT_FUNCPTR (CORE_ADDR pc)
-{
- if (pc & 0x2)
- pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, 4);
-
- return pc;
-}
-#else
-static CORE_ADDR CONVERT_FUNCPTR (CORE_ADDR pc)
-{
- return pc;
-}
-#endif
#endif
static void
@@ -1865,7 +1845,9 @@ find_implementation_from_class (CORE_ADDR class, CORE_ADDR sel)
#endif
if (meth_str.name == sel)
- return CONVERT_FUNCPTR (meth_str.imp);
+ /* FIXME: hppa arch was doing a pointer dereference
+ here. There needs to be a better way to do that. */
+ return meth_str.imp;
}
mlistnum++;
}
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index ddd508ac044..4e460ccec26 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -222,13 +222,12 @@ pascal_val_print (struct type *type, char *valaddr, int embedded_offset,
struct value *vt_val;
struct symbol *wsym = (struct symbol *) NULL;
struct type *wtype;
- struct symtab *s;
struct block *block = (struct block *) NULL;
int is_this_fld;
if (msymbol != NULL)
wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block,
- VAR_DOMAIN, &is_this_fld, &s);
+ VAR_DOMAIN, &is_this_fld, NULL);
if (wsym)
{
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 20c8adda44a..d320499fecf 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -426,7 +426,7 @@ store_altivec_registers (int tid)
int ret;
gdb_vrregset_t regs;
- ret = ptrace (PTRACE_GETVRREGS, tid, 0, (int) &regs);
+ ret = ptrace (PTRACE_GETVRREGS, tid, 0, &regs);
if (ret < 0)
{
if (errno == EIO)
@@ -439,7 +439,7 @@ store_altivec_registers (int tid)
fill_vrregset (&regs);
- if (ptrace (PTRACE_SETVRREGS, tid, 0, (int) &regs) < 0)
+ if (ptrace (PTRACE_SETVRREGS, tid, 0, &regs) < 0)
perror_with_name ("Couldn't write AltiVec registers");
}
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 9284751fd0c..ef1d9f0b344 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -295,7 +295,7 @@ ppc_linux_skip_trampoline_code (CORE_ADDR pc)
/* Get address of the relocation entry (Elf32_Rela) */
if (target_read_memory (plt_table + reloc_index, buf, 4) != 0)
return 0;
- reloc = extract_address (buf, 4);
+ reloc = extract_unsigned_integer (buf, 4);
sect = find_pc_section (reloc);
if (!sect)
@@ -746,6 +746,10 @@ ppc_linux_init_abi (struct gdbarch_info info,
set_solib_svr4_fetch_link_map_offsets
(gdbarch, ppc_linux_svr4_fetch_link_map_offsets);
}
+
+ /* Shared library handling. */
+ set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
+ set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
}
void
diff --git a/gdb/remote-vxsparc.c b/gdb/remote-vxsparc.c
index a97c18eed99..8b554282194 100644
--- a/gdb/remote-vxsparc.c
+++ b/gdb/remote-vxsparc.c
@@ -101,8 +101,8 @@ vx_read_register (int regno)
area in the frame. VxWorks does not do this for the active frame
automatically; it greatly simplifies debugging. */
- sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
- REGISTER_RAW_SIZE (SP_REGNUM));
+ sp = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
+ REGISTER_RAW_SIZE (SP_REGNUM));
write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
@@ -176,8 +176,8 @@ vx_write_register (int regno)
if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM))
{
- sp = extract_address (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
- REGISTER_RAW_SIZE (SP_REGNUM));
+ sp = extract_unsigned_integer (&deprecated_registers[REGISTER_BYTE (SP_REGNUM)],
+ REGISTER_RAW_SIZE (SP_REGNUM));
write_memory (sp, &deprecated_registers[REGISTER_BYTE (L0_REGNUM)],
16 * REGISTER_RAW_SIZE (L0_REGNUM));
}
diff --git a/gdb/remote.c b/gdb/remote.c
index 40be8e6badc..e55e141ab0b 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -261,9 +261,10 @@ init_remote_state (struct gdbarch *gdbarch)
int regnum;
struct remote_state *rs = xmalloc (sizeof (struct remote_state));
- /* Start out by having the remote protocol mimic the existing
- behavour - just copy in the description of the register cache. */
- rs->sizeof_g_packet = DEPRECATED_REGISTER_BYTES; /* OK */
+ if (DEPRECATED_REGISTER_BYTES != 0)
+ rs->sizeof_g_packet = DEPRECATED_REGISTER_BYTES;
+ else
+ rs->sizeof_g_packet = 0;
/* Assume a 1:1 regnum<->pnum table. */
rs->regs = xcalloc (NUM_REGS + NUM_PSEUDO_REGS, sizeof (struct packet_reg));
@@ -274,8 +275,11 @@ init_remote_state (struct gdbarch *gdbarch)
r->regnum = regnum;
r->offset = REGISTER_BYTE (regnum);
r->in_g_packet = (regnum < NUM_REGS);
- /* ...size = REGISTER_RAW_SIZE (regnum); */
/* ...name = REGISTER_NAME (regnum); */
+
+ /* Compute packet size by accumulating the size of all registers. */
+ if (DEPRECATED_REGISTER_BYTES == 0)
+ rs->sizeof_g_packet += register_size (current_gdbarch, regnum);
}
/* Default maximum number of characters in a packet body. Many
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 977669753d1..98e1a0ca088 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -230,6 +230,16 @@ rs6000_saved_pc_after_call (struct frame_info *fi)
return read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum);
}
+/* Get the ith function argument for the current function. */
+CORE_ADDR
+rs6000_fetch_pointer_argument (struct frame_info *frame, int argi,
+ struct type *type)
+{
+ CORE_ADDR addr;
+ frame_read_register (frame, 3 + argi, &addr);
+ return addr;
+}
+
/* Calculate the destination of a branch/jump. Return -1 if not a branch. */
static CORE_ADDR
@@ -526,13 +536,13 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
if ((op & 0xfc1fffff) == 0x7c0802a6)
{ /* mflr Rx */
- lr_reg = (op & 0x03e00000) | 0x90010000;
+ lr_reg = (op & 0x03e00000);
continue;
}
else if ((op & 0xfc1fffff) == 0x7c000026)
{ /* mfcr Rx */
- cr_reg = (op & 0x03e00000) | 0x90010000;
+ cr_reg = (op & 0x03e00000);
continue;
}
@@ -558,7 +568,7 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
{
fdata->saved_gpr = reg;
if ((op & 0xfc1f0003) == 0xf8010000)
- op = (op >> 1) << 1;
+ op &= ~3UL;
fdata->gpr_offset = SIGNED_SHORT (op) + offset;
}
continue;
@@ -590,20 +600,42 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
continue;
}
- else if (lr_reg != -1 && (op & 0xffff0000) == lr_reg)
- { /* st Rx,NUM(r1)
- where Rx == lr */
- fdata->lr_offset = SIGNED_SHORT (op) + offset;
+ else if (lr_reg != -1 &&
+ /* std Rx, NUM(r1) || stdu Rx, NUM(r1) */
+ (((op & 0xffff0000) == (lr_reg | 0xf8010000)) ||
+ /* stw Rx, NUM(r1) */
+ ((op & 0xffff0000) == (lr_reg | 0x90010000)) ||
+ /* stwu Rx, NUM(r1) */
+ ((op & 0xffff0000) == (lr_reg | 0x94010000))))
+ { /* where Rx == lr */
+ fdata->lr_offset = offset;
fdata->nosavedpc = 0;
lr_reg = 0;
+ if ((op & 0xfc000003) == 0xf8000000 || /* std */
+ (op & 0xfc000000) == 0x90000000) /* stw */
+ {
+ /* Does not update r1, so add displacement to lr_offset. */
+ fdata->lr_offset += SIGNED_SHORT (op);
+ }
continue;
}
- else if (cr_reg != -1 && (op & 0xffff0000) == cr_reg)
- { /* st Rx,NUM(r1)
- where Rx == cr */
- fdata->cr_offset = SIGNED_SHORT (op) + offset;
+ else if (cr_reg != -1 &&
+ /* std Rx, NUM(r1) || stdu Rx, NUM(r1) */
+ (((op & 0xffff0000) == (cr_reg | 0xf8010000)) ||
+ /* stw Rx, NUM(r1) */
+ ((op & 0xffff0000) == (cr_reg | 0x90010000)) ||
+ /* stwu Rx, NUM(r1) */
+ ((op & 0xffff0000) == (cr_reg | 0x94010000))))
+ { /* where Rx == cr */
+ fdata->cr_offset = offset;
cr_reg = 0;
+ if ((op & 0xfc000003) == 0xf8000000 ||
+ (op & 0xfc000000) == 0x90000000)
+ {
+ /* Does not update r1, so add displacement to cr_offset. */
+ fdata->cr_offset += SIGNED_SHORT (op);
+ }
continue;
}
@@ -647,30 +679,41 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
this branch */
continue;
- /* update stack pointer */
}
- else if ((op & 0xffff0000) == 0x94210000 || /* stu r1,NUM(r1) */
- (op & 0xffff0003) == 0xf8210001) /* stdu r1,NUM(r1) */
- {
+ /* update stack pointer */
+ else if ((op & 0xfc1f0000) == 0x94010000)
+ { /* stu rX,NUM(r1) || stwu rX,NUM(r1) */
fdata->frameless = 0;
- if ((op & 0xffff0003) == 0xf8210001)
- op = (op >> 1) << 1;
fdata->offset = SIGNED_SHORT (op);
offset = fdata->offset;
continue;
-
}
- else if (op == 0x7c21016e)
- { /* stwux 1,1,0 */
+ else if ((op & 0xfc1f016a) == 0x7c01016e)
+ { /* stwux rX,r1,rY */
+ /* no way to figure out what r1 is going to be */
fdata->frameless = 0;
offset = fdata->offset;
continue;
-
- /* Load up minimal toc pointer */
}
- else if ((op >> 22) == 0x20f
+ else if ((op & 0xfc1f0003) == 0xf8010001)
+ { /* stdu rX,NUM(r1) */
+ fdata->frameless = 0;
+ fdata->offset = SIGNED_SHORT (op & ~3UL);
+ offset = fdata->offset;
+ continue;
+ }
+ else if ((op & 0xfc1f016a) == 0x7c01016a)
+ { /* stdux rX,r1,rY */
+ /* no way to figure out what r1 is going to be */
+ fdata->frameless = 0;
+ offset = fdata->offset;
+ continue;
+ }
+ /* Load up minimal toc pointer */
+ else if (((op >> 22) == 0x20f || /* l r31,... or l r30,... */
+ (op >> 22) == 0x3af) /* ld r31,... or ld r30,... */
&& !minimal_toc_loaded)
- { /* l r31,... or l r30,... */
+ {
minimal_toc_loaded = 1;
continue;
@@ -2958,6 +3001,9 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_locals_address (gdbarch, rs6000_frame_args_address);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, rs6000_saved_pc_after_call);
+ /* Helpers for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, rs6000_fetch_pointer_argument);
+
/* We can't tell how many args there are
now that the C compiler delays popping them. */
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
diff --git a/gdb/s390-nat.c b/gdb/s390-nat.c
index 63e779bc19e..4dc8045f35c 100644
--- a/gdb/s390-nat.c
+++ b/gdb/s390-nat.c
@@ -251,9 +251,26 @@ supply_gregset (gregset_t * gregsetp)
for (regi = 0; regi < S390_NUM_GPRS; regi++)
supply_register (S390_GP0_REGNUM + regi,
(char *) &gregp[S390_GP0_REGNUM + regi]);
+
+#if defined (CONFIG_ARCH_S390X)
+ /* On the s390x, each element of gregset_t is 8 bytes long, but
+ each access register is still only 32 bits long. So they're
+ packed two per element. It's apparently traditional that
+ gregset_t must be an array, so when the registers it provides
+ have different sizes, something has to get strange
+ somewhere. */
+ {
+ unsigned int *acrs = (unsigned int *) &gregp[S390_FIRST_ACR];
+
+ for (regi = 0; regi < S390_NUM_ACRS; regi++)
+ supply_register (S390_FIRST_ACR + regi, (char *) &acrs[regi]);
+ }
+#else
for (regi = 0; regi < S390_NUM_ACRS; regi++)
supply_register (S390_FIRST_ACR + regi,
- (char *) &gregp[S390_FIRST_ACR + regi]);
+ (char *) &gregp[S390_FIRST_ACR + regi]);
+#endif
+
/* unfortunately this isn't in gregsetp */
for (regi = 0; regi < S390_NUM_CRS; regi++)
supply_register (S390_FIRST_CR + regi, NULL);
@@ -284,12 +301,35 @@ fill_gregset (gregset_t * gregsetp, int regno)
for (regi = 0; regi < S390_NUM_GPRS; regi++)
regcache_collect (S390_GP0_REGNUM + regi,
&gregp[S390_GP0_REGNUM + regi]);
+#if defined (CONFIG_ARCH_S390X)
+ /* See the comments about the access registers in
+ supply_gregset, above. */
+ {
+ unsigned int *acrs = (unsigned int *) &gregp[S390_FIRST_ACR];
+
+ for (regi = 0; regi < S390_NUM_ACRS; regi++)
+ regcache_collect (S390_FIRST_ACR + regi, &acrs[regi]);
+ }
+#else
for (regi = 0; regi < S390_NUM_ACRS; regi++)
regcache_collect (S390_FIRST_ACR + regi,
&gregp[S390_FIRST_ACR + regi]);
+#endif
}
- else if (regno >= S390_PSWM_REGNUM && regno <= S390_LAST_ACR)
+ else if (regno >= S390_PSWM_REGNUM && regno < S390_FIRST_ACR)
regcache_collect (regno, &gregp[regno]);
+ else if (regno >= S390_FIRST_ACR && regno <= S390_LAST_ACR)
+ {
+#if defined (CONFIG_ARCH_S390X)
+ /* See the comments about the access registers in
+ supply_gregset, above. */
+ unsigned int *acrs = (unsigned int *) &gregp[S390_FIRST_ACR];
+
+ regcache_collect (regno, &acrs[regno - S390_FIRST_ACR]);
+#else
+ regcache_collect (regno, &gregp[regno]);
+#endif
+ }
}
/* Given a pointer to a floating point register set in /proc format
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index cbaaa3689d4..57c3f481831 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1921,14 +1921,14 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
static CORE_ADDR
sh_extract_struct_value_address (char *regbuf)
{
- return (extract_address ((regbuf), REGISTER_RAW_SIZE (0)));
+ return (extract_unsigned_integer ((regbuf), REGISTER_RAW_SIZE (0)));
}
static CORE_ADDR
sh64_extract_struct_value_address (char *regbuf)
{
- return (extract_address ((regbuf + REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
- REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
+ return (extract_unsigned_integer ((regbuf + REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
+ REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
}
static CORE_ADDR
@@ -2123,7 +2123,7 @@ sh_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (argreg <= tdep->ARGLAST_REGNUM)
{
/* there's room in a register */
- regval = extract_address (val, REGISTER_RAW_SIZE (argreg));
+ regval = extract_unsigned_integer (val, REGISTER_RAW_SIZE (argreg));
write_register (argreg++, regval);
}
/* Store the value 4 bytes at a time. This means that things
@@ -2238,7 +2238,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (int_argreg <= tdep->ARGLAST_REGNUM)
{
/* there's room in a register */
- regval = extract_address (val, argreg_size);
+ regval = extract_unsigned_integer (val, argreg_size);
write_register (int_argreg, regval);
}
/* Store the value 8 bytes at a time. This means that
diff --git a/gdb/shnbsd-nat.c b/gdb/shnbsd-nat.c
index e1b56e66405..ec400698553 100644
--- a/gdb/shnbsd-nat.c
+++ b/gdb/shnbsd-nat.c
@@ -1,5 +1,5 @@
/* Native-dependent code for SuperH running NetBSD, for GDB.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
Contributed by Wasabi Systems, Inc.
This file is part of GDB.
@@ -26,6 +26,7 @@
#include "defs.h"
#include "inferior.h"
+#include "sh-tdep.h"
#include "shnbsd-tdep.h"
/* Determine if PT_GETREGS fetches this register. */
diff --git a/gdb/solib-irix.c b/gdb/solib-irix.c
index 26a776ff283..8400ad3a006 100644
--- a/gdb/solib-irix.c
+++ b/gdb/solib-irix.c
@@ -123,16 +123,12 @@ union irix_obj_info
/* MIPS sign extends its 32 bit addresses. We could conceivably use
extract_typed_address here, but to do so, we'd have to construct an
- appropriate type. Calling extract_signed_integer or
- extract_address seems simpler. */
+ appropriate type. Calling extract_signed_integer seems simpler. */
static CORE_ADDR
extract_mips_address (void *addr, int len)
{
- if (len <= 32)
- return extract_signed_integer (addr, len);
- else
- return extract_address (addr, len);
+ return extract_signed_integer (addr, len);
}
/* Fetch and return the link map data associated with ADDR. Note that
diff --git a/gdb/solib-sunos.c b/gdb/solib-sunos.c
index 4072fab5f4c..b7444c64cc2 100644
--- a/gdb/solib-sunos.c
+++ b/gdb/solib-sunos.c
@@ -68,14 +68,16 @@ static char *main_name_list[] =
NULL
};
-/* Macro to extract an address from a solib structure.
- When GDB is configured for some 32-bit targets (e.g. Solaris 2.7
- sparc), BFD is configured to handle 64-bit targets, so CORE_ADDR is
- 64 bits. We have to extract only the significant bits of addresses
- to get the right address when accessing the core file BFD. */
+/* Macro to extract an address from a solib structure. When GDB is
+ configured for some 32-bit targets (e.g. Solaris 2.7 sparc), BFD is
+ configured to handle 64-bit targets, so CORE_ADDR is 64 bits. We
+ have to extract only the significant bits of addresses to get the
+ right address when accessing the core file BFD.
+
+ Assume that the address is unsigned. */
#define SOLIB_EXTRACT_ADDRESS(MEMBER) \
- extract_address (&(MEMBER), sizeof (MEMBER))
+ extract_unsigned_integer (&(MEMBER), sizeof (MEMBER))
/* local data declarations */
@@ -108,7 +110,9 @@ LM_NEXT (struct so_list *so)
int lm_next_offset = offsetof (struct link_map, lm_next);
int lm_next_size = fieldsize (struct link_map, lm_next);
- return extract_address (so->lm_info->lm + lm_next_offset, lm_next_size);
+ /* Assume that the address is unsigned. */
+ return extract_unsigned_integer (so->lm_info->lm + lm_next_offset,
+ lm_next_size);
}
static CORE_ADDR
@@ -117,7 +121,9 @@ LM_NAME (struct so_list *so)
int lm_name_offset = offsetof (struct link_map, lm_name);
int lm_name_size = fieldsize (struct link_map, lm_name);
- return extract_address (so->lm_info->lm + lm_name_offset, lm_name_size);
+ /* Assume that the address is unsigned. */
+ return extract_unsigned_integer (so->lm_info->lm + lm_name_offset,
+ lm_name_size);
}
static CORE_ADDR debug_base; /* Base of dynamic linker structures */
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 6c4c10ae013..3658be68b84 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -105,14 +105,16 @@ static char *main_name_list[] =
NULL
};
-/* Macro to extract an address from a solib structure.
- When GDB is configured for some 32-bit targets (e.g. Solaris 2.7
- sparc), BFD is configured to handle 64-bit targets, so CORE_ADDR is
- 64 bits. We have to extract only the significant bits of addresses
- to get the right address when accessing the core file BFD. */
+/* Macro to extract an address from a solib structure. When GDB is
+ configured for some 32-bit targets (e.g. Solaris 2.7 sparc), BFD is
+ configured to handle 64-bit targets, so CORE_ADDR is 64 bits. We
+ have to extract only the significant bits of addresses to get the
+ right address when accessing the core file BFD.
+
+ Assume that the address is unsigned. */
#define SOLIB_EXTRACT_ADDRESS(MEMBER) \
- extract_address (&(MEMBER), sizeof (MEMBER))
+ extract_unsigned_integer (&(MEMBER), sizeof (MEMBER))
/* local data declarations */
@@ -132,7 +134,9 @@ LM_NEXT (struct so_list *so)
{
struct link_map_offsets *lmo = SVR4_FETCH_LINK_MAP_OFFSETS ();
- return extract_address (so->lm_info->lm + lmo->l_next_offset, lmo->l_next_size);
+ /* Assume that the address is unsigned. */
+ return extract_unsigned_integer (so->lm_info->lm + lmo->l_next_offset,
+ lmo->l_next_size);
}
static CORE_ADDR
@@ -140,7 +144,9 @@ LM_NAME (struct so_list *so)
{
struct link_map_offsets *lmo = SVR4_FETCH_LINK_MAP_OFFSETS ();
- return extract_address (so->lm_info->lm + lmo->l_name_offset, lmo->l_name_size);
+ /* Assume that the address is unsigned. */
+ return extract_unsigned_integer (so->lm_info->lm + lmo->l_name_offset,
+ lmo->l_name_size);
}
static int
@@ -148,8 +154,9 @@ IGNORE_FIRST_LINK_MAP_ENTRY (struct so_list *so)
{
struct link_map_offsets *lmo = SVR4_FETCH_LINK_MAP_OFFSETS ();
- return extract_address (so->lm_info->lm + lmo->l_prev_offset,
- lmo->l_prev_size) == 0;
+ /* Assume that the address is unsigned. */
+ return extract_unsigned_integer (so->lm_info->lm + lmo->l_prev_offset,
+ lmo->l_prev_size) == 0;
}
static CORE_ADDR debug_base; /* Base of dynamic linker structures */
@@ -587,7 +594,8 @@ first_link_map_member (void)
read_memory (debug_base + lmo->r_map_offset, r_map_buf, lmo->r_map_size);
- lm = extract_address (r_map_buf, lmo->r_map_size);
+ /* Assume that the address is unsigned. */
+ lm = extract_unsigned_integer (r_map_buf, lmo->r_map_size);
/* FIXME: Perhaps we should validate the info somehow, perhaps by
checking r_version for a known version number, or r_state for
@@ -645,8 +653,9 @@ open_symbol_file_object (void *from_ttyp)
/* Read address of name from target memory to GDB. */
read_memory (lm + lmo->l_name_offset, l_name_buf, lmo->l_name_size);
- /* Convert the address to host format. */
- l_name = extract_address (l_name_buf, lmo->l_name_size);
+ /* Convert the address to host format. Assume that the address is
+ unsigned. */
+ l_name = extract_unsigned_integer (l_name_buf, lmo->l_name_size);
/* Free l_name_buf. */
do_cleanups (cleanups);
@@ -820,9 +829,9 @@ svr4_fetch_objfile_link_map (struct objfile *objfile)
/* Read address of name from target memory to GDB. */
read_memory (lm + lmo->l_name_offset, l_name_buf, lmo->l_name_size);
- /* Extract this object's name. */
- name_address = extract_address (l_name_buf,
- lmo->l_name_size);
+ /* Extract this object's name. Assume that the address is
+ unsigned. */
+ name_address = extract_unsigned_integer (l_name_buf, lmo->l_name_size);
target_read_string (name_address, &buffer,
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
make_cleanup (xfree, buffer);
@@ -843,9 +852,10 @@ svr4_fetch_objfile_link_map (struct objfile *objfile)
return lm;
}
}
- /* Not the file we wanted, continue checking. */
- lm = extract_address (objfile_lm_info.lm + lmo->l_next_offset,
- lmo->l_next_size);
+ /* Not the file we wanted, continue checking. Assume that the
+ address is unsigned. */
+ lm = extract_unsigned_integer (objfile_lm_info.lm + lmo->l_next_offset,
+ lmo->l_next_size);
do_cleanups (old_chain);
}
return 0;
diff --git a/gdb/solib.c b/gdb/solib.c
index 289b84f34bf..7eb06d7322d 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -91,6 +91,7 @@ static char *solib_search_path = NULL;
* If path is absolute, look in SOLIB_ABSOLUTE_PREFIX.
* If path is absolute or relative, look for it literally (unmodified).
* Look in SOLIB_SEARCH_PATH.
+ * If available, use target defined search function.
* Look in inferior's $PATH.
* Look in inferior's $LD_LIBRARY_PATH.
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index ab5b9732d5f..ccd3a3b5f8b 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -508,7 +508,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
stack layout has changed or the stack is corrupt. */
target_read_memory (sigcontext_addr + saved_pc_offset,
scbuf, sizeof (scbuf));
- return extract_address (scbuf, sizeof (scbuf));
+ return extract_unsigned_integer (scbuf, sizeof (scbuf));
}
else if (get_frame_extra_info (frame)->in_prologue ||
(get_next_frame (frame) != NULL &&
@@ -534,7 +534,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
return PC_ADJUST (read_register (O7_REGNUM));
read_memory (addr, buf, SPARC_INTREG_SIZE);
- return PC_ADJUST (extract_address (buf, SPARC_INTREG_SIZE));
+ return PC_ADJUST (extract_unsigned_integer (buf, SPARC_INTREG_SIZE));
}
/* Since an individual frame in the frame cache is defined by two
@@ -1796,7 +1796,7 @@ get_longjmp_target (CORE_ADDR *pc)
LONGJMP_TARGET_SIZE))
return 0;
- *pc = extract_address (buf, LONGJMP_TARGET_SIZE);
+ *pc = extract_unsigned_integer (buf, LONGJMP_TARGET_SIZE);
return 1;
}
@@ -2104,20 +2104,7 @@ sparc_print_registers (struct gdbarch *gdbarch,
continue;
}
- /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
- The function frame_register_read() should have returned the
- pre-cooked register so no conversion is necessary. */
- /* Convert raw data to virtual format if necessary. */
- if (REGISTER_CONVERTIBLE (i))
- {
- REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
- raw_buffer, virtual_buffer);
- }
- else
- {
- memcpy (virtual_buffer, raw_buffer,
- REGISTER_VIRTUAL_SIZE (i));
- }
+ memcpy (virtual_buffer, raw_buffer, REGISTER_VIRTUAL_SIZE (i));
/* If virtual format is floating, print it that way, and in raw
hex. */
@@ -3165,19 +3152,6 @@ sparc_saved_pc_after_call (struct frame_info *fi)
return sparc_pc_adjust (read_register (RP_REGNUM));
}
-/* Convert registers between 'raw' and 'virtual' formats.
- They are the same on sparc, so there's nothing to do. */
-
-static void
-sparc_convert_to_virtual (int regnum, struct type *type, char *from, char *to)
-{ /* do nothing (should never be called) */
-}
-
-static void
-sparc_convert_to_raw (struct type *type, int regnum, char *from, char *to)
-{ /* do nothing (should never be called) */
-}
-
/* Init saved regs: nothing to do, just a place-holder function. */
static void
@@ -3243,6 +3217,15 @@ sparc_return_value_on_stack (struct type *type)
return 0;
}
+/* Get the ith function argument for the current function. */
+CORE_ADDR
+sparc_fetch_pointer_argument (struct frame_info *frame, int argi, struct type *type)
+{
+ CORE_ADDR addr;
+ frame_read_register (frame, O0_REGNUM + argi, &addr);
+ return addr;
+}
+
/*
* Gdbarch "constructor" function.
*/
@@ -3339,11 +3322,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_push_return_address (gdbarch, sparc_push_return_address);
set_gdbarch_deprecated_push_dummy_frame (gdbarch, sparc_push_dummy_frame);
set_gdbarch_read_pc (gdbarch, generic_target_read_pc);
- set_gdbarch_register_convert_to_raw (gdbarch, sparc_convert_to_raw);
- set_gdbarch_register_convert_to_virtual (gdbarch,
- sparc_convert_to_virtual);
- set_gdbarch_register_convertible (gdbarch,
- generic_register_convertible_not);
set_gdbarch_reg_struct_has_addr (gdbarch, sparc_reg_struct_has_addr);
set_gdbarch_return_value_on_stack (gdbarch, sparc_return_value_on_stack);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sparc_saved_pc_after_call);
@@ -3354,6 +3332,9 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
+ /* Helper for function argument information. */
+ set_gdbarch_fetch_pointer_argument (gdbarch, sparc_fetch_pointer_argument);
+
/*
* Settings that depend only on 32/64 bit word size
*/
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index 1299d06972b..4fe05aa9ce0 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -447,7 +447,7 @@ sparcnbsd_get_longjmp_target_32 (CORE_ADDR *pc)
if (target_read_memory (jb_addr + 12, buf, sizeof (buf)))
return 0;
- *pc = extract_address (buf, sizeof (buf));
+ *pc = extract_unsigned_integer (buf, sizeof (buf));
return 1;
}
@@ -463,7 +463,7 @@ sparcnbsd_get_longjmp_target_64 (CORE_ADDR *pc)
if (target_read_memory (jb_addr + 16, buf, sizeof (buf)))
return 0;
- *pc = extract_address (buf, sizeof (buf));
+ *pc = extract_unsigned_integer (buf, sizeof (buf));
return 1;
}
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 8bb3b371339..3d63502b41f 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -792,13 +792,6 @@ syms_from_objfile (struct objfile *objfile,
/* Discard cleanups as symbol reading was successful. */
discard_cleanups (old_chain);
-
- /* Call this after reading in a new symbol table to give target
- dependent code a crack at the new symbols. For instance, this
- could be used to update the values of target-specific symbols GDB
- needs to keep track of (such as _sigtramp, or whatever). */
-
- TARGET_SYMFILE_POSTREAD (objfile);
}
/* Perform required actions after either reading in the initial
@@ -2041,14 +2034,6 @@ reread_symbols (void)
again now. */
objfile->mtime = new_modtime;
reread_one = 1;
-
- /* Call this after reading in a new symbol table to give target
- dependent code a crack at the new symbols. For instance, this
- could be used to update the values of target-specific symbols GDB
- needs to keep track of (such as _sigtramp, or whatever). */
-
- TARGET_SYMFILE_POSTREAD (objfile);
-
reread_separate_symbols (objfile);
}
}
diff --git a/gdb/target.h b/gdb/target.h
index cd822799ed6..c2d87937dad 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -945,12 +945,6 @@ extern void (*target_new_objfile_hook) (struct objfile *);
#define target_get_thread_local_address_p() \
(target_get_thread_local_address != NULL)
-/* Hook to call target-dependent code after reading in a new symbol table. */
-
-#ifndef TARGET_SYMFILE_POSTREAD
-#define TARGET_SYMFILE_POSTREAD(OBJFILE)
-#endif
-
/* Hook to call target dependent code just after inferior target process has
started. */
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index f0e5d82102c..3942eb7557c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,53 @@
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * gdb.base/float.exp: Add expected regexp for alpha-*-*.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * gdb.base/selftest.exp: Next over lim_at_start initialization.
+
+2003-06-02 Richard Henderson <rth@redhat.com>
+
+ * gdb.base/dump.exp [alpha*-*-*]: Add -taso linker switch.
+
+2003-06-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.asm/asm-source.exp: Dissassemble from &globalvar instead
+ of globalvar.
+
+2003-06-01 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.asm/asm-source.exp: Check for memory read errors in
+ disassembler test on *BSD too.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
+ * gdb.asm/alpha.inc (gdbasm_enter): Use numeric register names
+ for .frame.
+ (gdbasm_call): Lose ldgp.
+ (gdbasm_startup): Add frame information.
+ * gdb.asm/asm-source.exp (alpha*-*): Add -no-mdebug to asm-flags.
+
+2003-05-31 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.base/float.exp: Expect similar output for x86_64-*-* as for
+ i?86-*-*.
+
+2003-05-30 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb.asm/asm-source.exp: Make sure the final link succeeds on
+ FreeBSD.
+
+2003-05-29 Richard Henderson <rth@redhat.com>
+
+ * gdb.asm/alpha.inc: New file.
+ * gdb.asm/asm-source.exp: Use it.
+
+2003-05-29 Jim Blandy <jimb@redhat.com>
+
+ * gdb.base/corefile.exp: Find corefiles on Linux, which names them
+ 'core.PID'.
+
2003-05-22 Jim Blandy <jimb@redhat.com>
* gdb.base/corefile.exp: Tolerate stuff after argument parens in
diff --git a/gdb/testsuite/gdb.asm/alpha.inc b/gdb/testsuite/gdb.asm/alpha.inc
new file mode 100644
index 00000000000..f9741c479e5
--- /dev/null
+++ b/gdb/testsuite/gdb.asm/alpha.inc
@@ -0,0 +1,62 @@
+ comment "subroutine declare"
+ .macro gdbasm_declare name
+ .ent \name
+\name:
+ .endm
+
+ comment "subroutine prologue"
+ .macro gdbasm_enter
+ .frame $30, 16, $26, 0
+ .mask 0x04000000, -16
+ ldgp $gp, 0($27)
+ subq $sp, 16, $sp
+ stq $26, 0($sp)
+ .prologue 1
+ .endm
+
+ comment "subroutine epilogue"
+ .macro gdbasm_leave
+ ldq $26, 0($sp)
+ addq $sp, 16, $sp
+ ret
+ .endm
+
+ comment "subroutine end"
+ .macro gdbasm_end name
+ .end \name
+ .endm
+
+ comment "subroutine call"
+ /* Can't use ldgp here because the finish-frame test expects the
+ pc to wind up on the next line. That's ok, we're all local. */
+ .macro gdbasm_call subr
+ jsr $26, \subr
+ .endm
+
+ .macro gdbasm_several_nops
+ nop
+ nop
+ nop
+ nop
+ .endm
+
+ comment "exit (0)"
+ .macro gdbasm_exit0
+ lda $16, 0($31)
+ lda $0, 1($31)
+ callsys
+ .endm
+
+ comment "crt0 startup"
+ .macro gdbasm_startup
+ .frame $31, 0, $31, 0
+ .prologue
+ ldgp $gp, 0($27)
+ .endm
+
+ comment "Declare a data variable"
+ .macro gdbasm_datavar name value
+ .data
+\name:
+ .long \value
+ .endm
diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
index e4aa7be4fd9..8c3f00325ad 100644
--- a/gdb/testsuite/gdb.asm/asm-source.exp
+++ b/gdb/testsuite/gdb.asm/asm-source.exp
@@ -36,6 +36,12 @@ set asm-flags ""
set link-flags ""
switch -glob -- [istarget] {
+ "alpha*-*-*" {
+ set asm-arch alpha
+ # ??? Won't work with ecoff systems like Tru64, but then we also
+ # don't have any other -g flag that creates mdebug output.
+ set asm-flags "-gdwarf2 -no-mdebug -I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ }
"*arm-*-*" {
set asm-arch arm
}
@@ -99,6 +105,15 @@ if { "${asm-arch}" == "" } {
gdb_suppress_entire_file "Assembly source test -- not implemented for this target."
}
+# On FreeBSD, crt1.o the final link will fail because of unresolved
+# symbols. It turns out that libc.so references symbols that are
+# normally provided by crt1.o, which isn't linked in since we specify
+# -nostartfiles. Using -nostdlib doesn't help since target_compile
+# automatically adds -lm. Linking statically avoids this mess.
+if [istarget "*-*-freebsd*"] then {
+ set link-flags "-static"
+}
+
# Watch out, we are invoking the assembler, but the testsuite sets multilib
# switches according to compiler syntax. If we pass these options straight
# to the assembler, they won't always make sense. If we don't pass them to
@@ -304,7 +319,7 @@ proc test_dis { command var } {
global gdb_prompt
send_gdb "${command}\n"
gdb_expect {
- -re "${var}.*:.*Cannot access" {
+ -re "${var}.*:.*(Cannot access|Bad address)" {
# The "disassembler" was only accessing the local
# executable and that would cause attempts to disassemble
# variables to fail (memory not valid).
@@ -321,7 +336,7 @@ proc test_dis { command var } {
# See if we can look at a global variable, three ways
gdb_test "print globalvar" ".* = 11" "look at global variable"
-test_dis "x/i globalvar" "globalvar"
+test_dis "x/i &globalvar" "globalvar"
test_dis "disassem &globalvar &globalvar+1" "globalvar"
# See if we can look at a static variable, three ways
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index 73217775e0d..d059ef56b25 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -54,16 +54,30 @@ if [get_compiler_info ${binfile}] {
# allows us to generate a core on systems where it does.
#
# Some systems append "core" to the name of the program; others append
-# the name of the program to "core".
+# 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
-catch "system \"(cd ${objdir}/${subdir}; ulimit -c unlimited; ${binfile}; true) >/dev/null 2>&1\""
+set coredir "${objdir}/${subdir}/coredir.[getpid]"
+file mkdir $coredir
+catch "system \"(cd ${coredir}; ulimit -c unlimited; ${binfile}; true) >/dev/null 2>&1\""
# remote_exec host "${binfile}"
-foreach i "${objdir}/${subdir}/core ${objdir}/${subdir}/core.coremaker.c ${binfile}.core" {
+foreach i "${coredir}/core ${coredir}/core.coremaker.c ${binfile}.core" {
if [remote_file build exists $i] {
remote_exec build "mv $i ${objdir}/${subdir}/corefile"
set found 1
}
}
+# Check for "core.PID".
+if { $found == 0 } {
+ set names [glob -nocomplain -directory $coredir core.*]
+ if {[llength $names] == 1} {
+ set corefile [file join $coredir [lindex $names 0]]
+ remote_exec build "mv $corefile ${objdir}/${subdir}/corefile"
+ set found 1
+ }
+}
if { $found == 0 } {
# The braindamaged HPUX shell quits after the ulimit -c above
# without executing ${binfile}. So we try again without the
@@ -77,11 +91,15 @@ if { $found == 0 } {
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
- }
+if { $found == 0 } {
+ warning "can't generate a core file - core tests suppressed - check ulimit -c"
+ return 0
}
#
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index 5885307cea7..1120d41321c 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -31,8 +31,15 @@ set testfile "dump"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
+set options {debug}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+if [istarget "alpha*-*-*"] then {
+ # SREC etc cannot handle 64-bit addresses. Force the test
+ # program into the low 31 bits of the address space.
+ lappend options "additional_flags=-Wl,-taso"
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${options}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index 66943eff7dd..fff9fe6f5fc 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -51,11 +51,13 @@ if ![runto_main] then {
# Test "info float".
-if { [istarget "arm*-*-*"] || \
+if { [istarget "alpha*-*-*"] } then {
+ gdb_test "info float" "f0.*" "info float"
+} elseif { [istarget "arm*-*-*"] || \
[istarget "xscale*-*-*"] || \
[istarget "strongarm*-*-*"] } then {
gdb_test "info float" "Software FPU type.*mask:.*flags:.*" "info float"
-} elseif [istarget "i?86-*-*"] then {
+} elseif { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } then {
gdb_test "info float" "R7:.*Status Word:.*Opcode:.*" "info float"
} else {
gdb_test "info float" "No floating.point info available for this processor." "info float"
diff --git a/gdb/testsuite/gdb.base/selftest.exp b/gdb/testsuite/gdb.base/selftest.exp
index 5d9419ed298..a899e360111 100644
--- a/gdb/testsuite/gdb.base/selftest.exp
+++ b/gdb/testsuite/gdb.base/selftest.exp
@@ -115,6 +115,10 @@ proc do_steps_and_nexts {} {
set description "next over init_malloc and everything it calls"
set command "next"
}
+ -re ".*lim_at_start.*$gdb_prompt $" {
+ set description "next over lim_at_start initialization"
+ set command "next"
+ }
-re ".*count . 0x3.*$gdb_prompt $" {
set description "next over conditional stack alignment code 1"
set command "next"
diff --git a/gdb/testsuite/gdb.c++/Makefile.in b/gdb/testsuite/gdb.c++/Makefile.in
deleted file mode 100644
index 8f4a90e2bb2..00000000000
--- a/gdb/testsuite/gdb.c++/Makefile.in
+++ /dev/null
@@ -1,16 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = ambiguous annota2 anon-union cplusfuncs cttiadd \
- derivation inherit local member-ptr method misc \
- overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc namespace ref-types
-
-all info install-info dvi install uninstall installcheck check:
- @echo "Nothing to be done for $@..."
-
-clean mostlyclean:
- -rm -f *~ *.o *.ci
- -rm -f core ${EXECUTABLES}
-
-distclean maintainer-clean realclean: clean
- -rm -f Makefile config.status config.log
diff --git a/gdb/testsuite/gdb.c++/ambiguous.cc b/gdb/testsuite/gdb.c++/ambiguous.cc
deleted file mode 100644
index 6ee7bc18ea9..00000000000
--- a/gdb/testsuite/gdb.c++/ambiguous.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-
-void marker1()
-{
- return;
-}
-
-class A1 {
-public:
- int x;
- int y;
-};
-
-class A2 {
-public:
- int x;
- int y;
-};
-
-class A3 {
-public:
- int x;
- int y;
-};
-
-class X : public A1, public A2 {
-public:
- int z;
-};
-
-class L : public A1 {
-public:
- int z;
-};
-
-class LV : public virtual A1 {
-public:
- int z;
-};
-
-class M : public A2 {
-public:
- int w;
-};
-
-class N : public L, public M {
-public:
- int r;
-};
-
-class K : public A1 {
-public:
- int i;
-};
-
-class KV : public virtual A1 {
-public:
- int i;
-};
-
-class J : public K, public L {
-public:
- int j;
-};
-
-class JV : public KV, public LV {
-public:
- int jv;
-};
-
-class JVA1 : public KV, public LV, public A1 {
-public:
- int jva1;
-};
-
-class JVA2 : public KV, public LV, public A2 {
-public:
- int jva2;
-};
-
-class JVA1V : public KV, public LV, public virtual A1 {
-public:
- int jva1v;
-};
-
-int main()
-{
- A1 a1;
- A2 a2;
- A3 a3;
- X x;
- L l;
- M m;
- N n;
- K k;
- J j;
- JV jv;
- JVA1 jva1;
- JVA2 jva2;
- JVA1V jva1v;
-
- int i;
-
- i += k.i + m.w + a1.x + a2.x + a3.x + x.z + l.z + n.r + j.j;
-
- marker1();
-
-}
-
-
-
diff --git a/gdb/testsuite/gdb.c++/ambiguous.exp b/gdb/testsuite/gdb.c++/ambiguous.exp
deleted file mode 100644
index 4224b2d79fd..00000000000
--- a/gdb/testsuite/gdb.c++/ambiguous.exp
+++ /dev/null
@@ -1,237 +0,0 @@
-# Copyright 1998, 1999 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file is part of the gdb testsuite
-
-# tests relating to ambiguous class members
-# Written by Satish Pai <pai@apollo.hp.com> 1997-07-28
-
-# This file is part of the gdb testsuite
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-#
-# test running programs
-#
-
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "ambiguous"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1;
-}
-
-if { $gcc_compiled } then { continue }
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-#
-# set it up at a breakpoint so we can play with the variable values
-#
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
- send_gdb "cont\n"
- gdb_expect {
- -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
- send_gdb "up\n"
- gdb_expect {
- -re ".*$gdb_prompt $" { pass "up from marker1" }
- timeout { fail "up from marker1" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to marker1" }
- timeout { fail "(timeout) continue to marker1" }
- }
-
-# print out various class objects' members. The values aren't
-# important, just check that the warning is emitted at the
-# right times.
-
-# X is derived from A1 and A2; both A1 and A2 have a member 'x'
-send_gdb "print x.x\n"
-gdb_expect {
- -re "warning: x ambiguous; using X::A2::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- pass "print x.x"
- }
- -re "warning: x ambiguous; using X::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- pass "print x.x"
- }
- -re ".*$gdb_prompt $" { fail "print x.x" }
- timeout { fail "(timeout) print x.x" }
-}
-
-
-# N is derived from A1 and A2, but not immediately -- two steps
-# up in the hierarchy. Both A1 and A2 have a member 'x'.
-send_gdb "print n.x\n"
-gdb_expect {
- -re "warning: x ambiguous; using N::M::A2::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- pass "print n.x"
- }
- -re "warning: x ambiguous; using N::L::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- pass "print n.x"
- }
- -re ".*$gdb_prompt $" { fail "print n.x" }
- timeout { fail "(timeout) print n.x" }
-}
-
-# J is derived from A1 twice. A1 has a member x.
-send_gdb "print j.x\n"
-gdb_expect {
- -re "warning: x ambiguous; using J::L::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- pass "print j.x"
- }
- -re "warning: x ambiguous; using J::K::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- pass "print j.x"
- }
- -re ".*$gdb_prompt $" { fail "print j.x" }
- timeout { fail "(timeout) print j.x" }
-}
-
-# JV is derived from A1 but A1 is a virtual base. Should not
-# report an ambiguity in this case.
-send_gdb "print jv.x\n"
-gdb_expect {
- -re "warning: x ambiguous.*Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- fail "print jv.x (ambiguity reported)"
- }
- -re "\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" { pass "print jv.x" }
- -re ".*$gdb_prompt $" { fail "print jv.x (??)" }
- timeout { fail "(timeout) print jv.x" }
-}
-
-# JVA1 is derived from A1; A1 occurs as a virtual base in two
-# ancestors, and as a non-virtual immediate base. Ambiguity must
-# be reported.
-send_gdb "print jva1.x\n"
-gdb_expect {
- -re "warning: x ambiguous; using JVA1::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- pass "print jva1.x"
- }
- -re "warning: x ambiguous; using JVA1::KV::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- pass "print jva1.x"
- }
- -re ".*$gdb_prompt $" { fail "print jva1.x" }
- timeout { fail "(timeout) print jva1.x" }
-}
-
-# JVA2 is derived from A1 & A2; A1 occurs as a virtual base in two
-# ancestors, and A2 is a non-virtual immediate base. Ambiguity must
-# be reported as A1 and A2 both have a member 'x'.
-send_gdb "print jva2.x\n"
-gdb_expect {
- -re "warning: x ambiguous; using JVA2::A2::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- pass "print jva2.x"
- }
- -re "warning: x ambiguous; using JVA2::KV::A1::x. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- pass "print jva2.x"
- }
- -re ".*$gdb_prompt $" { fail "print jva2.x" }
- timeout { fail "(timeout) print jva2.x" }
-}
-
-# JVA1V is derived from A1; A1 occurs as a virtual base in two
-# ancestors, and also as a virtual immediate base. Ambiguity must
-# not be reported.
-send_gdb "print jva1v.x\n"
-gdb_expect {
- -re "warning: x ambiguous.*Use a cast to disambiguate.\r\n\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" {
- fail "print jva1v.x (ambiguity reported)"
- }
- -re "\\$\[0-9\]* = \[-\]*\[0-9\]*\r\n$gdb_prompt $" { pass "print jva1v.x" }
- -re ".*$gdb_prompt $" { fail "print jva1v.x (??)" }
- timeout { fail "(timeout) print jva1v.x" }
-}
-
-# Now check for ambiguous bases.
-
-# J is derived from A1 twice; report ambiguity if a J is
-# cast to an A1.
-send_gdb "print (A1)j\n"
-gdb_expect {
- -re "warning: A1 ambiguous; using J::L::A1. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
- pass "print (A1)j"
- }
- -re "warning: A1 ambiguous; using J::K::A1. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
- pass "print (A1)j"
- }
- -re ".*$gdb_prompt $" { fail "print (A1)j" }
- timeout { fail "(timeout) print (A1)j" }
-}
-
-# JV is derived from A1 twice, but A1 is a virtual base; should
-# not report ambiguity when a JV is cast to an A1.
-send_gdb "print (A1)jv\n"
-gdb_expect {
- -re "warning: A1 ambiguous.*Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
- fail "print (A1)jv (ambiguity reported)"
- }
- -re "\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" { pass "print (A1)jv" }
- -re ".*$gdb_prompt $" { fail "print (A1)jv (??)" }
- timeout { fail "(timeout) print (A1)jv" }
-}
-
-# JVA1 is derived from A1; A1 is a virtual base and also a
-# non-virtual base. Must report ambiguity if a JVA1 is cast to an A1.
-send_gdb "print (A1)jva1\n"
-gdb_expect {
- -re "warning: A1 ambiguous; using JVA1::A1. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
- pass "print (A1)jva1"
- }
- -re "warning: A1 ambiguous; using JVA1::KV::A1. Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
- pass "print (A1)jva1"
- }
- -re ".*$gdb_prompt $" { fail "print (A1)jva1" }
- timeout { fail "(timeout) print (A1)jva1" }
-}
-
-# JVA1V is derived from A1; A1 is a virtual base indirectly
-# and also directly; must not report ambiguity when a JVA1V is cast to an A1.
-send_gdb "print (A1)jva1v\n"
-gdb_expect {
- -re "warning: A1 ambiguous.*Use a cast to disambiguate.\r\n\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" {
- fail "print (A1)jva1v (ambiguity reported)"
- }
- -re "\\$\[0-9\]* = \{x = \[-\]*\[0-9\]*, y = \[-\]*\[0-9\]*\}\r\n$gdb_prompt $" { pass "print (A1)jva1v"
- }
- -re ".*$gdb_prompt $" { fail "print (A1)jva1v (??)" }
- timeout { fail "(timeout) print (A1)jva1v" }
-}
-
diff --git a/gdb/testsuite/gdb.c++/annota2.cc b/gdb/testsuite/gdb.c++/annota2.cc
deleted file mode 100644
index 234752e49af..00000000000
--- a/gdb/testsuite/gdb.c++/annota2.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <stdio.h>
-
-class A {
-public:
- int x;
- int y;
- int foo (int arg);
-};
-
-
-int A::foo (int arg)
-{
- x += arg;
- return arg *2;
-}
-
-int main()
-{
- A a;
-
- a.x = 0;
- a.x = 1;
- a.y = 2;
-
- printf ("a.x is %d\n", a.x);
- return 0;
-}
-
diff --git a/gdb/testsuite/gdb.c++/annota2.exp b/gdb/testsuite/gdb.c++/annota2.exp
deleted file mode 100644
index 0446eb3b63f..00000000000
--- a/gdb/testsuite/gdb.c++/annota2.exp
+++ /dev/null
@@ -1,234 +0,0 @@
-# Copyright 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Elena Zannoni (ezannoni@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "annota2"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++ additional_flags=-w}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-# are we on a target board? If so, don't run these tests.
-# note: this is necessary because we cannot use runto_main (which would
-# work for remote targets too) because of the different prompt we get
-# when using annotation level 2.
-#
-if [is_remote target] then {
- return 0
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-if [target_info exists gdb_stub] {
- gdb_step_for_stub;
-}
-
-#
-# line number where we need to stop in main
-#
-set main_line 25
-
-# The commands we test here produce many lines of output; disable "press
-# <return> to continue" prompts.
-send_gdb "set height 0\n"
-gdb_expect -re "$gdb_prompt $"
-
-#
-# break at main
-#
-gdb_test "break 25" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "breakpoint main"
-
-
-#
-# NOTE: this prompt is OK only when the annotation level is > 1
-# NOTE: When this prompt is in use the gdb_test procedure cannot be used because
-# it assumes that the last char of the gdb_prompt is a white space. This is not
-# true with this annotated prompt. So we must use send_gdb and gdb_expect.
-#
-
-set old_gdb_prompt $gdb_prompt
-set gdb_prompt "\r\n\032\032pre-prompt\r\n$gdb_prompt \r\n\032\032prompt\r\n"
-
-send_gdb "set annotate 2\n"
-gdb_expect {
- -re "set annotate 2\r\n$gdb_prompt$" { pass "annotation set at level 2" }
- -re ".*$gdb_prompt$" { fail "annotation set at level 2" }
- timeout { fail "annotation set at level 2 (timeout)" }
- }
-
-send_gdb "run\n"
- gdb_expect {
- -re "$main_line.*$gdb_prompt$" { pass "run until main breakpoint" }
- -re ".*$gdb_prompt$" { fail "run until main breakpoint" }
- timeout { fail "run until main breakpoint (timeout)" }
- }
-
-#
-# print class 'a' with public fields.
-# this will test:
-# annotate-field-begin
-# annotate-field-name-end
-# annotate-field-value
-# annotate-field-end
-#
-send_gdb "print a\n"
-gdb_expect {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032value-history-begin 1 -\r\n.*= \r\n\032\032value-history-value\r\n\\{\r\n\032\032field-begin -\r\nx\r\n\032\032field-name-end\r\n = \r\n\032\032field-value\r\n1\r\n\032\032field-end\r\n, \r\n\032\032field-begin -\r\ny\r\n\032\032field-name-end\r\n = \r\n\032\032field-value\r\n2\r\n\032\032field-end\r\n\\}\r\n\r\n\032\032value-history-end\r\n$gdb_prompt$" \
- { pass "print class" }
- -re ".*$gdb_prompt$" { fail "print class" }
- timeout { fail "print class (timeout)" }
-}
-
-#
-# continue until exit
-# this will test:
-# annotate-exited
-#
-send_gdb "continue\n"
-gdb_expect {
- -re "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\na.x is 1\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032exited 0\r\n\r\nProgram exited normally.\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { pass "continue until exit" }
- -re ".*$gdb_prompt$" { fail "continue to exit" }
- timeout { fail "continue to exit (timeout)" }
-}
-
-#
-# delete all breakpoints
-#
-send_gdb "delete\n"
-gdb_expect {
- -re ".*Delete all breakpoints. \\(y or n\\) \r\n\032\032query.*$" {
- send_gdb "y\n"
- gdb_expect {
- -re "\r\n\032\032post-query\r\n$gdb_prompt$" { pass "delete bps" }
- -re ".*$gdb_prompt$" { fail "delete bps" }
- timeout { fail "delete bps (timeout)" }
- }
- }
- -re ".*$gdb_prompt$" { fail "delete bps" }
- timeout { fail "delete bps (timeout)" }
-}
-
-#
-# break at first line of main.
-#
-send_gdb "break 22\n"
-gdb_expect {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-invalid\r\nBreakpoint.*at $hex: file.*$srcfile, line.*\r\n$gdb_prompt$" \
- { pass "breakpoint at main" }
- -re ".*$gdb_prompt$" { fail "break at main" }
- timeout { fail "break at main (timeout)" }
-}
-
-#
-# change value of main_line
-#
-set main_line 22
-
-#
-# run program up to breakpoint.
-#
-
-
-send_gdb "run\n"
- gdb_expect {
- -re "$main_line.*$gdb_prompt$" { pass "run until main breakpoint" }
- -re ".*$gdb_prompt$" { fail "run until main breakpoint" }
- timeout { fail "run until main breakpoint (timeout)" }
- }
-
-#
-# set up a watch point on a.x
-#
-send_gdb "watch a.x\n"
-gdb_expect {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-invalid\r\n.*atchpoint 3: a.x\r\n$gdb_prompt$" \
- { pass "set watch on a.x" }
- -re ".*$gdb_prompt$" { fail "set watch on a.x" }
- timeout { fail "set watch on a.x (timeout)" }
-}
-
-#
-# do a next, so that the watchpoint triggers. This will test:
-# annotate-watchpoint
-#
-send_gdb "next\n"
-gdb_expect {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\nWatchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { pass "watch triggered on a.x" }
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\n\.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*$srcfile\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" \
- { pass "watch triggered on a.x" }
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
- { kfail "gdb/38" "watch triggered on a.x" }
- -re ".*$gdb_prompt$" { fail "watch triggered on a.x" }
- timeout { fail "watch triggered on a.x (timeout)" }
-}
-
-
-#
-# send ^C to gdb, so that the quit() function gets called
-# and annotate-quit is tested
-# test:
-# annotate-quit
-#
-# This test sometimes fails, but not reproducibly. See gdb/544.
-#
-send_gdb "\003"
-gdb_expect {
- -re "\r\n\032\032error-begin\r\nQuit\r\n\r\n\032\032quit\r\n$gdb_prompt$" \
- { pass "annotate-quit" }
- -re "$gdb_prompt$" { kfail "gdb/544" "annotate-quit" }
- -re ".*$gdb_prompt$" { fail "annotate-quit" }
- timeout { fail "annotate-quit (timeout)" }
-}
-
-#
-# FIXME: the testsuite does not currently have tests for
-# annotate_catchpoints and annotate_function_call
-# and a few variants of the annotations that are
-# tested (marked by FIXME on the annot?.exp files)
-#
-
-# reinstall the old prompt for the rest of the testsuite.
-
-set gdb_prompt $old_gdb_prompt
-
diff --git a/gdb/testsuite/gdb.c++/anon-union.cc b/gdb/testsuite/gdb.c++/anon-union.cc
deleted file mode 100644
index 0b3fd130aeb..00000000000
--- a/gdb/testsuite/gdb.c++/anon-union.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-
-struct Foo {
- union {
- int zero;
- unsigned int one;
- } num1;
- struct X {
- int rock;
- unsigned int rock2;
- };
- union {
- int pebble;
- X x;
- union {
- int qux;
- unsigned int mux;
- };
- unsigned int boulder;
- };
- union {
- int paper;
- unsigned int cloth;
- };
- union {
- int two;
- unsigned int three;
- } num2;
-};
-
-union Bar {
- int x;
- unsigned int y;
-};
-
-
-int main()
-{
- Foo foo = {0, 0};
-
- foo.paper = 33;
- foo.pebble = 44;
- foo.mux = 55;
-
- Bar bar = {0};
-
- union {
- int z;
- unsigned int w;
- }; w = 0;
-
- bar.x = 33;
-
- w = 45;
-
-}
diff --git a/gdb/testsuite/gdb.c++/anon-union.exp b/gdb/testsuite/gdb.c++/anon-union.exp
deleted file mode 100644
index 0d5c7777319..00000000000
--- a/gdb/testsuite/gdb.c++/anon-union.exp
+++ /dev/null
@@ -1,348 +0,0 @@
-# Tests for anonymous union support.
-# Copyright 1998, 1999, 2003 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
-
-# Written by Satish Pai <pai@apollo.hp.com> 1997-08-19
-
-# This file is part of the gdb testsuite
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-#
-# test running programs
-#
-
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "anon-union"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- perror "Testcase compile failed" 0
- continue
-}
-
-# Start with a fresh gdb
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-send_gdb "set width 0\n"
-gdb_expect -re "$gdb_prompt $"
-
-#send_gdb "ptype foo\n"
-#gdb_expect {
-# -re "\r\n$gdb_prompt $" {
-# pass "ptype foo"
-# }
-# -re ".*$gdb_prompt $" { fail "ptype foo" }
-# timeout { fail "(timeout) ptype foo" }
-#}
-
-#send_gdb "ptype bar\n"
-#gdb_expect {
-# -re "\r\n$gdb_prompt $" {
-# pass "ptype foo"
-# }
-# -re ".*$gdb_prompt $" { fail "ptype foo" }
-# timeout { fail "(timeout) ptype foo" }
-#}
-
-# NOTE: Add -- ptype foo.x, etc. when things are working
-
-#Initialize foo
-send_gdb "next\n"
-gdb_expect {
- -re "40\[ \t\]*foo.paper = 33;\r\n$gdb_prompt $" {
- pass "next 1"
- }
- -re ".*$gdb_prompt $" { fail "next 1" }
- timeout { fail "(timeout) next 1" }
-}
-
-# Print out the big anon union.
-send_gdb "print foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{num1 = \{zero = 0, one = 0\}, \{pebble = 0, x = \{rock = 0, rock2 = 0\}, \{qux = 0, mux = 0\}, boulder = 0\}, \{paper = 0, cloth = 0\}, num2 = \{two = 0, three = 0\}\}\r\n$gdb_prompt $" {
- pass "print foo 1"
- }
- -re ".*$gdb_prompt $" { fail "print foo 1" }
- timeout { fail "(timeout) print foo 1" }
-}
-
-# Step over assignment to member
-
-send_gdb "next\n"
-gdb_expect {
- -re "41\[ \t\]*foo.pebble = 44;\r\n$gdb_prompt $" {
- pass "next 1"
- }
- -re ".*$gdb_prompt $" { fail "next 1" }
- timeout { fail "(timeout) next 1" }
-}
-
-# Now print out anon union again
-send_gdb "print foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{num1 = \{zero = 0, one = 0\}, \{pebble = 0, x = \{rock = 0, rock2 = 0\}, \{qux = 0, mux = 0\}, boulder = 0\}, \{paper = 33, cloth = 33\}, num2 = \{two = 0, three = 0\}\}\r\n$gdb_prompt $" {
- pass "print foo 2"
- }
- -re ".*$gdb_prompt $" { fail "print foo 2" }
- timeout { fail "(timeout) print foo 2" }
-}
-
-# Modify the member just set
-send_gdb "set var foo.cloth = 35\n"
-gdb_expect {
- -re "\r\n$gdb_prompt $" {
- pass "set var foo.cloth"
- }
- timeout { fail "(timeout) set var foo.cloth" }
-}
-
-# Now print out anon union again to see if the right member was set
-send_gdb "print foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{num1 = \{zero = 0, one = 0\}, \{pebble = 0, x = \{rock = 0, rock2 = 0\}, \{qux = 0, mux = 0\}, boulder = 0\}, \{paper = 35, cloth = 35\}, num2 = \{two = 0, three = 0\}\}\r\n$gdb_prompt $" {
- pass "print foo 3"
- }
- -re ".*$gdb_prompt $" { fail "print foo 3" }
- timeout { fail "(timeout) print foo 3" }
-}
-
-
-# Step over next assignment to member
-
-send_gdb "next\n"
-gdb_expect {
- -re "42\[ \t\]*foo.mux = 55;\r\n$gdb_prompt $" {
- pass "next 2"
- }
- -re ".*$gdb_prompt $" { fail "next 2" }
- timeout { fail "(timeout) next 2" }
-}
-
-# Now print out anon union again
-send_gdb "print foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{num1 = \{zero = 0, one = 0\}, \{pebble = 44, x = \{rock = 44, rock2 = 0\}, \{qux = 44, mux = 44\}, boulder = 44\}, \{paper = 35, cloth = 35\}, num2 = \{two = 0, three = 0\}\}\r\n$gdb_prompt $" {
- pass "print foo 4"
- }
- -re ".*$gdb_prompt $" { fail "print foo 4" }
- timeout { fail "(timeout) print foo 4" }
-}
-
-# Modify the member just set
-send_gdb "set var foo.pebble = 45\n"
-gdb_expect {
- -re "\r\n$gdb_prompt $" {
- pass "set var foo.pebble"
- }
- timeout { fail "(timeout) set var foo.pebble" }
-}
-
-# Now print out anon union again to see if the right member was set
-send_gdb "print foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{num1 = \{zero = 0, one = 0\}, \{pebble = 45, x = \{rock = 45, rock2 = 0\}, \{qux = 45, mux = 45\}, boulder = 45\}, \{paper = 35, cloth = 35\}, num2 = \{two = 0, three = 0\}\}\r\n$gdb_prompt $" {
- pass "print foo 5"
- }
- -re ".*$gdb_prompt $" { fail "print foo 5" }
- timeout { fail "(timeout) print foo 5" }
-}
-
-# Modify another member at a different level
-send_gdb "set var foo.qux = 46\n"
-gdb_expect {
- -re "\r\n$gdb_prompt $" {
- pass "set var foo.qux"
- }
- timeout { fail "(timeout) set var foo.qux" }
-}
-
-# Now print out anon union again to see if the right member was set
-send_gdb "print foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{num1 = \{zero = 0, one = 0\}, \{pebble = 46, x = \{rock = 46, rock2 = 0\}, \{qux = 46, mux = 46\}, boulder = 46\}, \{paper = 35, cloth = 35\}, num2 = \{two = 0, three = 0\}\}\r\n$gdb_prompt $" {
- pass "print foo 6"
- }
- -re ".*$gdb_prompt $" { fail "print foo 6" }
- timeout { fail "(timeout) print foo 6" }
-}
-
-# Modify the member at another level, but not the first one in the union
-send_gdb "set var foo.mux = 47\n"
-gdb_expect {
- -re "\r\n$gdb_prompt $" {
- pass "set var foo.mux"
- }
- timeout { fail "(timeout) set var foo.mux" }
-}
-
-# Now print out anon union again to see if things worked
-send_gdb "print foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{num1 = \{zero = 0, one = 0\}, \{pebble = 47, x = \{rock = 47, rock2 = 0\}, \{qux = 47, mux = 47\}, boulder = 47\}, \{paper = 35, cloth = 35\}, num2 = \{two = 0, three = 0\}\}\r\n$gdb_prompt $" {
- pass "print foo 7"
- }
- -re ".*$gdb_prompt $" { fail "print foo 7" }
- timeout { fail "(timeout) print foo 7" }
-}
-
-# Modify a member of a struct in an anon union
-send_gdb "set var foo.x.rock = 48\n"
-gdb_expect {
- -re "\r\n$gdb_prompt $" {
- pass "set var foo.x.rock"
- }
- timeout { fail "(timeout) set var foo.x.rock" }
-}
-
-# Now print out anon union again to see if things worked
-send_gdb "print foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{num1 = \{zero = 0, one = 0\}, \{pebble = 48, x = \{rock = 48, rock2 = 0\}, \{qux = 48, mux = 48\}, boulder = 48\}, \{paper = 35, cloth = 35\}, num2 = \{two = 0, three = 0\}\}\r\n$gdb_prompt $" {
- pass "print foo 8"
- }
- -re ".*$gdb_prompt $" { fail "print foo 8" }
- timeout { fail "(timeout) print foo 8" }
-}
-
-# Modify a member of a struct in an anon union, but something
-# that doesn't alias to some other union member
-send_gdb "set var foo.x.rock2 = 49\n"
-gdb_expect {
- -re "\r\n$gdb_prompt $" {
- pass "set var foo.x.rock2"
- }
- timeout { fail "(timeout) set var foo.x.rock2" }
-}
-
-# Now print out anon union again to see if things worked
-send_gdb "print foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{num1 = \{zero = 0, one = 0\}, \{pebble = 48, x = \{rock = 48, rock2 = 49\}, \{qux = 48, mux = 48\}, boulder = 48\}, \{paper = 35, cloth = 35\}, num2 = \{two = 0, three = 0\}\}\r\n$gdb_prompt $" {
- pass "print foo 9"
- }
- -re ".*$gdb_prompt $" { fail "print foo 9" }
- timeout { fail "(timeout) print foo 9" }
-}
-
-
-# Step over next four assignments
-send_gdb "next 4\n"
-gdb_expect {
- -re "53\[ \t\]*w = 45;\r\n$gdb_prompt $" {
- pass "next 3"
- }
- -re ".*$gdb_prompt $" { fail "next 3" }
- timeout { fail "(timeout) next 3" }
-}
-
-# Tests for anon unions that are not members of a class or struct
-
-send_gdb "print w\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" {
- pass "print w 1"
- }
- -re ".*$gdb_prompt $" { fail "print w 1" }
- timeout { fail "(timeout) print w 1" }
-}
-
-send_gdb "print z\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 0\r\n$gdb_prompt $" {
- pass "print z 1"
- }
- -re ".*$gdb_prompt $" { fail "print z 1" }
- timeout { fail "(timeout) print z 1" }
-}
-
-# Step over next assignment to w
-send_gdb "next\n"
-gdb_expect {
- -re "55\[ \t\]*\}\r\n$gdb_prompt $" {
- pass "next 4"
- }
- -re ".*$gdb_prompt $" { fail "next 4" }
- timeout { fail "(timeout) next 4" }
-}
-
-# See if the change in value is noticed
-send_gdb "print w\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 45\r\n$gdb_prompt $" {
- pass "print w 2"
- }
- -re ".*$gdb_prompt $" { fail "print w 2" }
- timeout { fail "(timeout) print w 2" }
-}
-
-# See if z shows the same value
-send_gdb "print z\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 45\r\n$gdb_prompt $" {
- pass "print z 2"
- }
- -re ".*$gdb_prompt $" { fail "print z 2" }
- timeout { fail "(timeout) print z 2" }
-}
-
-# Set the anon union member
-send_gdb "set var z = 27\n"
-gdb_expect {
- -re "\r\n$gdb_prompt $" {
- pass "set var z"
- }
- timeout { fail "(timeout) set var z" }
-}
-
-# See if the change in value is noticed
-send_gdb "print w\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 27\r\n$gdb_prompt $" {
- pass "print w 3"
- }
- -re ".*$gdb_prompt $" { fail "print w 3" }
- timeout { fail "(timeout) print w 3" }
-}
-
-# See if z shows the same value
-send_gdb "print z\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 27\r\n$gdb_prompt $" {
- pass "print z 3"
- }
- -re ".*$gdb_prompt $" { fail "print z 3" }
- timeout { fail "(timeout) print z 3" }
-}
diff --git a/gdb/testsuite/gdb.c++/casts.cc b/gdb/testsuite/gdb.c++/casts.cc
deleted file mode 100644
index 831add94418..00000000000
--- a/gdb/testsuite/gdb.c++/casts.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-struct A
-{
- int a;
- A (int aa): a (aa) {}
-};
-
-struct B: public A
-{
- int b;
- B (int aa, int bb): A (aa), b(bb) {}
-};
-
-int
-main (int argc, char **argv)
-{
- A *a = new B(42, 1729);
- B *b = (B *) a;
-
- return 0; /* breakpoint spot: casts.exp: 1 */
-}
diff --git a/gdb/testsuite/gdb.c++/casts.exp b/gdb/testsuite/gdb.c++/casts.exp
deleted file mode 100644
index 5b6cabe34fa..00000000000
--- a/gdb/testsuite/gdb.c++/casts.exp
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 2002, 2003 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 part of the gdb testsuite
-
-# Test casting, especially between class types or pointer-to-class
-# types.
-
-# This file is part of the gdb testsuite
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-#
-# test running programs
-#
-
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "casts"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1;
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-gdb_test "break [gdb_get_line_number "casts.exp: 1"]" \
- "Breakpoint.*at.* file .*" \
- ""
-
-gdb_test "continue" "Breakpoint .* at .*casts.cc.*" ""
-
-# Casting a pointer to a base class to a pointer to a derived class
-# should yield the entire derived class. Until August 2002, GDB got
-# the enclosing type on `(B *) a' wrong: while the value's static type
-# was `B *', as it should be, the enclosing type (which is supposed to
-# be the dynamic type) was `A *'. It's senseless to have a static
-# type derived from the dynamic type; it should be the other way
-# 'round. Dereferencing this oddly typed pointer yielded a value in
-# which only the base class's members were initialized, since GDB uses
-# the enclosing type to decide how many bytes to read. Members from
-# the derived class were garbage, from GDB's address space.
-gdb_test "print * (B *) a" ".* = {<A> = {a = 42}, b = 1729}" \
- "cast base class pointer to derived class pointer"
-
-# Check also that we get the same results from letting the compiler do
-# the dereference.
-gdb_test "print * b" ".* = {<A> = {a = 42}, b = 1729}" \
- "let compiler cast base class pointer to derived class pointer"
diff --git a/gdb/testsuite/gdb.c++/classes.exp b/gdb/testsuite/gdb.c++/classes.exp
deleted file mode 100644
index 3f398acc5ec..00000000000
--- a/gdb/testsuite/gdb.c++/classes.exp
+++ /dev/null
@@ -1,918 +0,0 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-set ws "\[\r\n\t \]+"
-set nl "\[\r\n\]+"
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "misc"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-#
-# Test ptype of class objects.
-#
-
-proc test_ptype_class_objects {} {
- global gdb_prompt
- global ws
- global nl
-
- # Note that struct members are public by default, so we don't print
- # "public:" for the public members of structs.
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
-
- send_gdb "ptype struct default_public_struct\n"
- gdb_expect {
- -re "type = struct default_public_struct \{${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- pass "ptype struct default_public_struct"
- }
- -re "type = class default_public_struct \{$nl.*int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype struct default_public_struct"
- }
- -re ".*$gdb_prompt $" { fail "ptype struct default_public_struct" }
- timeout { fail "ptype struct default_public_struct (timeout)" ; return }
- }
-
- # Note that struct members are public by default, so we don't print
- # "public:" for the public members of structs.
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
-
- send_gdb "ptype struct explicit_public_struct\n"
- gdb_expect {
- -re "type = struct explicit_public_struct \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype struct explicit_public_struct"
- }
- -re "type = class explicit_public_struct \{$nl.*int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype struct explicit_public_struct"
- }
- -re ".*$gdb_prompt $" { fail "ptype struct explicit_public_struct" }
- timeout { fail "ptype struct explicit_public_struct (timeout)" ; return }
- }
-
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
-
- send_gdb "ptype struct protected_struct\n"
- gdb_expect {
- -re "type = struct protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- pass "ptype struct protected_struct"
- }
- -re "type = class protected_struct \{${ws}protected:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype struct protected_struct"
- }
- -re ".*$gdb_prompt $" { fail "ptype struct protected_struct" }
- timeout { fail "ptype struct protected_struct (timeout)" ; return }
- }
-
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
-
- send_gdb "ptype struct private_struct\n"
- gdb_expect {
- -re "type = struct private_struct \{${ws}private:${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- pass "ptype struct private_struct"
- }
- -re "type = class private_struct \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype struct private_struct"
- }
- -re ".*$gdb_prompt $" { fail "ptype struct private_struct" }
- timeout { fail "ptype struct private_struct (timeout)" ; return }
- }
-
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
-
- send_gdb "ptype struct mixed_protection_struct\n"
- gdb_expect {
- -re "type = struct mixed_protection_struct \{${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl\}$nl$gdb_prompt $" {
- pass "ptype struct mixed_protection_struct"
- }
- -re "type = struct mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype struct mixed_protection_struct (extra public)"
- }
- -re "type = class mixed_protection_struct \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype struct mixed_protection_struct"
- }
- -re ".*$gdb_prompt $" { fail "ptype struct mixed_protection_struct" }
- timeout { fail "ptype struct mixed_protection_struct (timeout)" ; return }
- }
-
- # Accept it if gdb just fails to distinguish between
- # class and struct, and everything else is OK.
-
- send_gdb "ptype class public_class\n"
- gdb_expect {
- -re "type = class public_class \{${ws}public:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class public_class"
- }
- -re "type = struct public_class \{${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- pass "ptype class public_class"
- }
- -re ".*$gdb_prompt $" { fail "ptype class public_class" }
- timeout { fail "ptype class public_class (timeout)" ; return }
- }
-
- send_gdb "ptype class protected_class\n"
- gdb_expect {
- -re "type = class protected_class \{${ws}protected:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class protected_class"
- }
- -re "type = struct protected_class \{${ws}int a;${ws}int b;$nl\}$nl$gdb_prompt $" {
- fail "ptype class protected_class"
- }
- -re ".*$gdb_prompt $" { fail "ptype class protected_class" }
- timeout { fail "ptype class protected_class (timeout)" ; return }
- }
-
- # Accept it if gdb just emits a superflous "private:"
- # attribute, since classes default to private and for consistency with
- # structs (where we don't print the "public:" attribute) we don't print
- # the "private:" attribute.
-
- send_gdb "ptype class default_private_class\n"
- gdb_expect {
- -re "type = class default_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class default_private_class"
- }
- -re "type = class default_private_class \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class default_private_class"
- }
- -re ".*$gdb_prompt $" { fail "ptype class default_private_class" }
- timeout { fail "ptype class default_private_class (timeout)" ; return }
- }
-
- send_gdb "ptype class explicit_private_class\n"
- gdb_expect {
- -re "type = class explicit_private_class \{${ws}private:${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class explicit_private_class"
- }
- -re "type = class explicit_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class explicit_private_class"
- }
- -re "type = struct explicit_private_class \{${ws}int a;${ws}int b;$nl.*\}$nl$gdb_prompt $" {
- fail "ptype class explicit_private_class"
- }
- -re ".*$gdb_prompt $" { fail "ptype class explicit_private_class" }
- timeout { fail "ptype class explicit_private_class (timeout)" ; return }
- }
-
- send_gdb "ptype class mixed_protection_class\n"
- gdb_expect {
- -re "type = class mixed_protection_class \{${ws}public:${ws}int a;${ws}int b;${ws}private:${ws}int c;${ws}int d;${ws}protected:${ws}int e;${ws}int f;${ws}public:${ws}int g;${ws}private:${ws}int h;${ws}protected:${ws}int i;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class mixed_protection_class"
- }
- -re "type = struct mixed_protection_class \{${ws}int a;${ws}int b;${ws}int c;${ws}int d;${ws}int e;${ws}int f;${ws}int g;${ws}int h;${ws}int i;$nl.*\}$nl$gdb_prompt $" {
- fail "ptype class mixed_protection_class"
- }
- -re ".*$gdb_prompt $" { fail "ptype class mixed_protection_class" }
- timeout { fail "ptype class mixed_protection_class (timeout)" ; return }
- }
-
- # This class does not use any C++-specific features, so it's fine for
- # it to print as "struct".
- send_gdb "ptype class A\n"
- gdb_expect {
- -re "type = (class|struct) A \{(${ws}public:|)${ws}int a;${ws}int x;((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\((A const|const A) ?&\\);)|(${ws}A\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class A"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class A"
- }
- timeout {
- fail "ptype class A (timeout)"
- return
- }
- }
-
- send_gdb "ptype class B\n"
- gdb_expect {
- -re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;${ws}B & operator=\\(B const ?&\\);${ws}B\\((B const|const B) ?&\\);${ws}B\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class B"
- }
- -re "type = class B : public A \{${ws}public:${ws}int b;${ws}int x;((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(B const ?&\\);)|(${ws}B\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class B (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class B"
- }
- timeout {
- fail "ptype class B (timeout)"
- return
- }
- }
-
- send_gdb "ptype class C\n"
- gdb_expect {
- -re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;${ws}C & operator=\\(C const ?&\\);${ws}C\\((C const|const C) ?&\\);${ws}C\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class C"
- }
- -re "type = class C : public A \{${ws}public:${ws}int c;${ws}int x;((${ws}C & operator=\\(C const ?&\\);)|(${ws}C\\(C const ?&\\);)|(${ws}C\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class C (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class C"
- }
- timeout {
- fail "ptype class C (timeout)"
- return
- }
- }
-
- send_gdb "ptype class D\n"
- gdb_expect {
- -re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class D"
- }
- -re "type = class D : public B, public C \{${ws}public:${ws}int d;${ws}int x;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(D const ?&\\);)|(${ws}D\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class D (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class D"
- }
- timeout {
- fail "ptype class D (timeout)"
- return
- }
- }
-
- send_gdb "ptype class E\n"
- gdb_expect {
- -re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;${ws}E & operator=\\(E const ?&\\);${ws}E\\((E const|const E) ?&\\);${ws}E\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class E"
- }
- -re "type = class E : public D \{${ws}public:${ws}int e;${ws}int x;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\((E const|const E) ?&\\);)|(${ws}E\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class E"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class E"
- }
- timeout {
- fail "ptype class E (timeout)"
- return
- }
- }
-
- # With g++ 2.x and stabs debug info, we misinterpret static methods
- # whose name matches their argument mangling.
- send_gdb "ptype class Static\n"
- gdb_expect {
- -re "type = (class|struct) Static \{(${ws}public:|)${ws}Static & operator=\\(Static const ?&\\);${ws}Static\\((Static const|const Static) ?&\\);${ws}Static\\((void|)\\);${ws}static void ii\\(int, int\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Static"
- }
- -re "type = (class|struct) Static \{(${ws}public:|)${ws}static void ii\\(int, int\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Static"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class Static"
- }
- timeout {
- fail "ptype class Static (timeout)"
- return
- }
- }
-
- send_gdb "ptype class vA\n"
- gdb_expect {
- -re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vA"
- }
- -re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;${ws}vA & operator=\\(vA const ?&\\);${ws}vA\\((vA const|const vA) ?&\\);${ws}vA\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vA"
- }
- -re "type = (class|struct) vA \{(${ws}public:|)${ws}int va;${ws}int vx;((${ws}vA & operator=\\(vA const ?&\\);)|(${ws}vA\\(vA const ?&\\);)|(${ws}vA\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vA (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class vA"
- }
- timeout {
- fail "ptype class vA (timeout)"
- return
- }
- }
-
- # Accept the form with embedded GNU style mangled virtual table constructs
- # for now, but with a FIXME. At some future point, gdb should use a
- # portable representation for the virtual table constructs.
-
- # The format of a g++ virtual base pointer.
- set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
-
- send_gdb "ptype class vB\n"
- gdb_expect {
- -re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;${ws}vB & operator=\\(vB const ?&\\);${ws}vB\\((vB const|const vB) ?&\\);${ws}vB\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vB"
- }
- -re "type = class vB : public virtual vA \{${ws}private:${ws}vA \\*${vbptr}vA;${ws}public:${ws}int vb;${ws}int vx;${ws}vB & operator=\\(vB const ?&\\);${ws}vB\\(int, vB const ?&\\);${ws}vB\\(int\\);${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vB (FIXME: non-portable virtual table constructs)"
- }
- -re "type = class vB : public virtual vA \{${ws}public:${ws}int vb;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vB"
- }
- -re "type = class vB : public virtual vA \{${ws}private:${ws}vA \\*_vb.vA;${ws}public:${ws}int vb;${ws}int vx;((${ws}vB & operator=\\(vB const ?&\\);)|(${ws}vB\\(int, vB const ?&\\);)|(${ws}vB\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vB (FIXME) (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class vB"
- }
- timeout {
- fail "ptype class vB (timeout)"
- return
- }
- }
-
- # Accept the form with embedded GNU style mangled virtual table constructs
- # for now, but with a FIXME. At some future point, gdb should use a
- # portable representation for the virtual table constructs.
-
- send_gdb "ptype class vC\n"
- gdb_expect {
- -re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;${ws}vC & operator=\\(vC const ?&\\);${ws}vC\\((vC const|const vC) ?&\\);${ws}vC\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vC"
- }
- -re "type = class vC : public virtual vA \{${ws}private:${ws}vA \\*${vbptr}vA;${ws}public:${ws}int vc;${ws}int vx;${ws}vC & operator=\\(vC const ?&\\);${ws}vC\\(int, vC const ?&\\);${ws}vC\\(int\\);${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vC (FIXME: non-portable virtual table constructs)"
- }
- -re "type = class vC : public virtual vA \{${ws}public:${ws}int vc;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vC"
- }
- -re "type = class vC : public virtual vA \{${ws}private:${ws}vA \\*_vb.vA;${ws}public:${ws}int vc;${ws}int vx;((${ws}vC & operator=\\(vC const ?&\\);)|(${ws}vC\\(int, vC const ?&\\);)|(${ws}vC\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vC (FIXME) (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class vC"
- }
- timeout {
- fail "ptype class vC (timeout)"
- return
- }
- }
-
- # Accept the form with embedded GNU style mangled virtual table constructs
- # for now, but with a FIXME. At some future point, gdb should use a
- # portable representation for the virtual table constructs.
-
- send_gdb "ptype class vD\n"
- gdb_expect {
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;${ws}vD & operator=\\(vD const ?&\\);${ws}vD\\((vD const|const vD) ?&\\);${ws}vD\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vD"
- }
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;${ws}vD & operator=\\(vD const ?&\\);${ws}vD\\(int, vD const ?&\\);${ws}vD\\(int\\);${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vD (FIXME: non-portable virtual table constructs)"
- }
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vD"
- }
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*_vb.vC;${ws}vB \\*_vb.vB;${ws}public:${ws}int vd;${ws}int vx;((${ws}vD & operator=\\(vD const ?&\\);)|(${ws}vD\\(int, vD const ?&\\);)|(${ws}vD\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vD (FIXME) (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class vD"
- }
- timeout {
- fail "ptype class vD (timeout)"
- return
- }
- }
-
- # Accept the form with embedded GNU style mangled virtual table constructs
- # for now, but with a FIXME. At some future point, gdb should use a
- # portable representation for the virtual table constructs.
-
- send_gdb "ptype class vE\n"
- gdb_expect {
- -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;${ws}vE & operator=\\(vE const ?&\\);${ws}vE\\((vE const|const vE) ?&\\);${ws}vE\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vE"
- }
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;${ws}vE & operator=\\(vE const ?&\\);${ws}vE\\(int, vE const ?&\\);${ws}vE\\(int\\);${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vE (FIXME: non-portable virtual table constructs)"
- }
- -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;${ws}\}$nl$gdb_prompt $" {
- pass "ptype class vE"
- }
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*_vb.vD;${ws}public:${ws}int ve;${ws}int vx;((${ws}vE & operator=\\(vE const ?&\\);)|(${ws}vE\\(int, vE const ?&\\);)|(${ws}vE\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype class vE (FIXME) (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class vE"
- }
- timeout {
- fail "ptype class vE (timeout)"
- return
- }
- }
-
- send_gdb "ptype class Base1\n"
- gdb_expect {
- -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1 & operator=\\(Base1 const ?&\\);${ws}Base1\\(((Base1 const)|(const Base1)) ?&\\);${ws}Base1\\(int\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Base1"
- }
- -re "type = class Base1 \{${ws}public:${ws}int x;${ws}Base1\\(int\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Base1"
- }
- -re "type = class Base1 \{${ws}public:${ws}int x;((${ws}Base1 & operator=\\(Base1 const ?&\\);)|(${ws}Base1\\(Base1 const ?&\\);)|(${ws}Base1\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Base1 (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class Base1"
- }
- timeout {
- fail "ptype class Base1 (timeout)"
- return
- }
- }
-
- send_gdb "ptype class Foo\n"
- gdb_expect {
- -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;\r\n${ws}Foo\\(int, int\\);${ws}int operator!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);$nl\}$nl$gdb_prompt $" {
- pass "ptype class Foo"
- }
- -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;${ws}Foo & operator=\\(Foo const ?&\\);${ws}Foo\\((Foo const|const Foo) ?&\\);${ws}Foo\\(int, int\\);${ws}int operator!\\((void|)\\);${ws}operator int\\((void|)\\);${ws}int times\\(int\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Foo"
- }
- -re "type = class Foo \{${ws}public:${ws}int x;${ws}int y;${ws}static int st;((${ws}Foo & operator=\\(Foo const ?&\\);)|(${ws}Foo\\(Foo const ?&\\);)|(${ws}Foo\\(int, int\\);)|(${ws}int operator!\\((void|)\\);)|(${ws}int operator int\\((void|)\\);)|(${ws}int times\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Foo (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class Foo"
- }
- timeout {
- fail "ptype class Foo (timeout)"
- return
- }
- }
-
- send_gdb "ptype class Bar\n"
- gdb_expect {
- -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;${ws}Bar & operator=\\(Bar const ?&\\);${ws}Bar\\((Bar const|const Bar) ?&\\);${ws}Bar\\(int, int, int\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Bar"
- }
- -re "type = class Bar : public Base1, public Foo \{${ws}public:${ws}int z;((${ws}Bar & operator=\\(Bar const ?&\\);)|(${ws}Bar\\(Bar const ?&\\);)|(${ws}Bar\\(int, int, int\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype class Bar (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype class Bar"
- }
- timeout {
- fail "ptype class Bar (timeout)"
- return
- }
- }
-}
-
-#
-# Test simple access to class members.
-#
-
-proc test_non_inherited_member_access {} {
- global gdb_prompt
-
- # Print non-inherited members of g_A.
-
- gdb_test "print g_A.a" ".* = 1" "g_A.a incorrect"
-
- gdb_test "print g_A.x" ".* = 2" "g_A.x incorrect"
-
- # Print non-inherited members of g_B.
-
- gdb_test "print g_B.b" ".* = 5" "g_B.b incorrect"
-
- gdb_test "print g_B.x" ".* = 6" "g_B.x incorrect"
-
- # Print non-inherited members of g_C.
-
- gdb_test "print g_C.c" ".* = 9" "g_C.c incorrect"
-
- gdb_test "print g_C.x" ".* = 10" "g_C.x incorrect"
-
- # Print non-inherited members of g_D.
-
- gdb_test "print g_D.d" ".* = 19" "g_D.d incorrect"
-
- gdb_test "print g_D.x" ".* = 20" "g_D.x incorrect"
-
- # Print non-inherited members of g_E.
-
- gdb_test "print g_E.e" ".* = 31" "g_E.e incorrect"
-
- gdb_test "print g_E.x" ".* = 32" "g_E.x incorrect"
-}
-
-#
-# Try access to non-members that are members of another class.
-# Should give errors.
-#
-
-proc test_wrong_class_members {} {
- global gdb_prompt
-
- gdb_test "print g_A.b" "There is no member( or method|) named b." "print g_A.b should be error"
-
- gdb_test "print g_B.c" "There is no member( or method|) named c." "print g_B.c should be error"
-
- gdb_test "print g_B.d" "There is no member( or method|) named d." "print g_B.d should be error"
-
- gdb_test "print g_C.b" "There is no member( or method|) named b." "print g_C.b should be error"
-
- gdb_test "print g_C.d" "There is no member( or method|) named d." "print g_C.d should be error"
-
- gdb_test "print g_D.e" "There is no member( or method|) named e." "print g_D.e should be error"
-}
-
-#
-# Try access to non-members that are not members of any class.
-# Should give errors.
-#
-
-proc test_nonexistent_members {} {
- global gdb_prompt
-
- gdb_test "print g_A.y" "There is no member( or method|) named y." "print g_A.y should be error"
-
- gdb_test "print g_B.z" "There is no member( or method|) named z." "print g_B.z should be error"
-
- gdb_test "print g_C.q" "There is no member( or method|) named q." "print g_C.q should be error"
-
- gdb_test "print g_D.p" "There is no member( or method|) named p." "print g_D.p should be error"
-}
-
-#
-# Call a method that expects a base class parameter with base, inherited,
-# and unrelated class arguments.
-#
-
-proc test_method_param_class {} {
- gdb_test "call class_param.Aptr_a (&g_A)" ".* = 1" "base class param->a"
- gdb_test "call class_param.Aptr_x (&g_A)" ".* = 2" "base class param->x"
- gdb_test "call class_param.Aptr_a (&g_B)" ".* = 3" "inherited class param->a"
- gdb_test "call class_param.Aptr_x (&g_B)" ".* = 4" "inherited class param->x"
- gdb_test "call class_param.Aref_a (g_A)" ".* = 1" "base class (&param)->a"
- gdb_test "call class_param.Aref_x (g_A)" ".* = 2" "base class (&param)->x"
- gdb_test "call class_param.Aref_a (g_B)" ".* = 3" "inherited class (&param)->a"
- gdb_test "call class_param.Aref_x (g_B)" ".* = 4" "inherited class (&param)->x"
- gdb_test "call class_param.Aval_a (g_A)" ".* = 1" "base class param.a"
- gdb_test "call class_param.Aval_x (g_A)" ".* = 2" "base class param.x"
- gdb_test "call class_param.Aval_a (g_B)" ".* = 3" "inherited class param.a"
- gdb_test "call class_param.Aval_x (g_B)" ".* = 4" "inherited class param.x"
-
- gdb_test "call class_param.Aptr_a (&foo)" "Cannot resolve .*" "unrelated class *param"
- gdb_test "call class_param.Aref_a (foo)" "Cannot resolve .*" "unrelated class &param"
- gdb_test "call class_param.Aval_a (foo)" "Cannot resolve .*" "unrelated class param"
-}
-
-#
-# Examine a class with an enum field.
-#
-
-proc test_enums {} {
- global gdb_prompt
- global hp_aCC_compiler
-
- # print the object
- send_gdb "print obj_with_enum\n"
- gdb_expect {
- -re "\\$\[0-9\]* = \\{priv_enum = red, x = 0\\}.*$gdb_prompt $" { pass "print obj_with_enum (1)" }
- -re "$gdb_prompt $" { fail "print obj_with_enum (1)" }
- timeout { fail "(timeout) print obj_with_enum (1)" }
- }
-
- send_gdb "next\n"
- gdb_expect {
- -re "$gdb_prompt $" { pass "next" }
- timeout { fail "(timeout) next" }
- }
-
- # print the object again
- send_gdb "print obj_with_enum\n"
- gdb_expect {
- -re "\\$\[0-9\]* = \\{priv_enum = green, x = 0\\}.*$gdb_prompt $" { pass "print obj_with_enum (2)" }
- -re "$gdb_prompt $" { fail "print obj_with_enum (2)" }
- timeout { fail "(timeout) print obj_with_enum (2)" }
- }
-
- # print out the enum member
- send_gdb "print obj_with_enum.priv_enum\n"
- gdb_expect {
- -re "\\$\[0-9\]* = green.*$gdb_prompt $" { pass "print obj_with_enum.priv_enum" }
- -re "$gdb_prompt $" { fail "print obj_with_enum.priv_enum" }
- timeout { fail "(timeout) print obj_with_enum.priv_enum" }
- }
-
- # ptype on the enum member
- # The third success case is a little dubious, but it's not clear what
- # ought to be required of a ptype on a private enum... -sts 19990324
- send_gdb "ptype obj_with_enum.priv_enum\n"
- gdb_expect {
- -re "type = enum ClassWithEnum::PrivEnum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
- -re "type = enum PrivEnum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
- -re "type = enum \\{red, green, blue, yellow = 42\\}.*$gdb_prompt $" { pass "ptype obj_with_enum.priv_enum" }
- -re "$gdb_prompt $" { fail "ptype obj_with_enum.priv_enum" }
- timeout { fail "(timeout) ptype obj_with_enum.priv_enum" }
- }
-
- # ptype on the object
- send_gdb "ptype obj_with_enum\n"
- gdb_expect {
- -re "type = class ClassWithEnum \\{\r\n\[ \t\]*public:\r\n\[ \t\]*(enum |)ClassWithEnum::PrivEnum priv_enum;\r\n\[ \t\]*int x;\r\n\\}\r\n$gdb_prompt $" { pass "ptype obj_with_enum" }
- -re "type = class ClassWithEnum \\{\r\n\[ \t\]*public:\r\n\[ \t\]*(enum |)PrivEnum priv_enum;\r\n\[ \t\]*int x;.*\\}\r\n$gdb_prompt $"
- {
- # NOTE: carlton/2003-02-28: One could certainly argue that
- # this output is acceptable: PrivEnum is a member of
- # ClassWithEnum, so there's no need to explicitly qualify
- # its name with "ClassWithEnum::". The truth, though, is
- # that GDB is simply forgetting that PrivEnum is a member
- # of ClassWithEnum, so we do that output for a bad reason
- # instead of a good reason. Under stabs, we probably
- # can't get this right; under DWARF-2, we can.
- kfail "gdb/57" "ptype obj_with_enum"
- }
- -re "$gdb_prompt $" { fail "ptype obj_with_enum" }
- timeout { fail "(timeout) ptype obj_with_enum" }
- }
-
- # We'll do this test twice, because of a parser bug: see
- # PR gdb/826.
-
- send_gdb "print (ClassWithEnum::PrivEnum) 42\n"
- gdb_expect {
- -re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print (ClassWithEnum::PrivEnum) 42" }
- -re "A parse error in expression, near `42'.\r\n$gdb_prompt $"
- { kfail "gdb/826" "print (ClassWithEnum::PrivEnum) 42" }
- -re "$gdb_prompt $" { fail "print (ClassWithEnum::PrivEnum) 42" }
- timeout { fail "(timeout) print (ClassWithEnum::PrivEnum) 42" }
- }
-
- send_gdb "print ('ClassWithEnum::PrivEnum') 42\n"
- gdb_expect {
- -re "\\$\[0-9\]* = yellow.*$gdb_prompt $" { pass "print ('ClassWithEnum::PrivEnum') 42" }
- -re "No symbol \"ClassWithEnum::PrivEnum\" in current context.\r\n$gdb_prompt $"
- { kfail "gdb/57" "print ('ClassWithEnum::PrivEnum') 42" }
- -re "$gdb_prompt $" { fail "print ('ClassWithEnum::PrivEnum') 42" }
- timeout { fail "(timeout) print ('ClassWithEnum::PrivEnum') 42" }
- }
-}
-
-#
-# Pointers to class members
-#
-
-proc test_pointers_to_class_members {} {
- global gdb_prompt
- global decimal
- global nl
-
- gdb_test "print Bar::z" ".* = .int\[ \]*\[( \]*Bar::&\[)\]+\[ \]*Bar::z" "print Bar::z"
-
- gdb_test "print &Foo::x" ".* = .int\[ \]*\[( \]*Foo::\[*)\]+\[ \]*&Foo::x" "print &Foo::x"
-
- gdb_test "print (int)&Foo::x" ".* = 0" "print (int)&Foo::x"
-
- send_gdb "print (int)&Bar::y == 2*sizeof(int)\n"
- gdb_expect {
- -re ".* = true$nl$gdb_prompt $" {
- pass "print (int)&Bar::y == 2*sizeof(int)"
- }
- -re "There is no field named y.*$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "print (int)&Bar::y == 2*sizeof(int)"
- }
- -re ".*$gdb_prompt $" { fail "print (int)&Bar::y == 2*sizeof(int)" }
- timeout { fail "print (int)&Bar::y == 2*sizeof(int) (timeout)" ; return }
- }
-
- send_gdb "next 2\n"
- setup_xfail "*-*-*"
- gdb_expect {
- -re "$decimal\[ \t\]+inheritance3 \[)(\]+;$nl$gdb_prompt $" {}
- -re ".*$gdb_prompt $" { fail "next to inheritance3" ; return }
- }
- clear_xfail "*-*-*"
-
- gdb_test "print (int)pmi == sizeof(int)" ".* = false" "print (int)pmi == sizeof(int)"
-}
-
-#
-# Test static members.
-#
-
-proc test_static_members {} {
- global gdb_prompt
- global hex
- global nl
-
- send_gdb "print Foo::st\n"
- gdb_expect {
- -re ".* = 100$nl$gdb_prompt $" {
- pass "print Foo::st"
- }
- -re "There is no field named st.*$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "print Foo::st"
- }
- -re ".*$gdb_prompt $" { fail "print Foo::st" }
- timeout { fail "print Foo::st (timeout)" ; return }
- }
-
- send_gdb "set foo.st = 200\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {}
- }
-
- send_gdb "print bar.st\n"
- gdb_expect {
- -re ".* = 200$nl$gdb_prompt $" {
- pass "print bar.st"
- }
- -re "There is no member( or method|) named st.*$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "print bar.st"
- }
- -re ".*$gdb_prompt $" { fail "print bar.st" }
- timeout { fail "print bar.st (timeout)" ; return }
- }
-
- send_gdb "print &foo.st\n"
- gdb_expect {
- -re ".* = .int \[*)\]+ $hex$nl$gdb_prompt $" {
- pass "print &foo.st"
- }
- -re "There is no member( or method|) named st.*$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "print &foo.st"
- }
- -re ".*$gdb_prompt $" { fail "print &foo.st" }
- timeout { fail "print &foo.st (timeout)" ; return }
- }
-
- set got_bar_st 0
- send_gdb "print &Bar::st\n"
- gdb_expect {
- -re ".* = .int \[*)\]+ $hex$nl$gdb_prompt $" {
- pass "print &Bar::st"
- set got_bar_st 1
- }
- -re "There is no field named st.*$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "print &Bar::st"
- }
- -re ".*$gdb_prompt $" { fail "print &Bar::st" }
- timeout { fail "print &Bar::st (timeout)" ; return }
- }
-
- if $got_bar_st then {
- gdb_test "print *\$" ".* = 200" "print *\$"
- }
-
- gdb_test "set print static-members off" ""
- gdb_test "print csi" \
- "{x = 10, y = 20}" \
- "print csi without static members"
- gdb_test "print cnsi" \
- "{x = 30, y = 40}" \
- "print cnsi without static members"
-
- gdb_test "set print static-members on" ""
- gdb_test "print csi" \
- "{x = 10, y = 20, static null = {x = 0, y = 0, static null = <same as static member of an already seen type>}}" \
- "print csi with static members"
- gdb_test "print cnsi" \
- "{x = 30, y = 40, static null = {x = 0, y = 0, static null = <same as static member of an already seen type>, static yy = {z = 5, static xx = {x = 1, y = 2, static null = <same as static member of an already seen type>, static yy = <same as static member of an already seen type>}}}, static yy = <same as static member of an already seen type>}" \
- "print cnsi with static members"
-}
-
-proc do_tests {} {
- global prms_id
- global bug_id
- global subdir
- global objdir
- global srcdir
- global binfile
- global gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- send_gdb "set language c++\n"
- gdb_expect -re "$gdb_prompt $"
- send_gdb "set width 0\n"
- gdb_expect -re "$gdb_prompt $"
-
- runto_main
- test_ptype_class_objects
-
- if [ runto 'inheritance2' ] then {
- test_non_inherited_member_access
- test_wrong_class_members
- test_nonexistent_members
- test_method_param_class
- }
-
- gdb_breakpoint enums2
- if [ gdb_continue "enums2(\\(\\)|)" ]==0 then {
- gdb_test "finish" "" ""
- test_enums
- }
-
- if [istarget "mips-idt-*"] then {
- # Restart because IDT/SIM runs out of file descriptors.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
- }
-
- if [ runto_main ] then {
- test_pointers_to_class_members
- test_static_members
- }
-
- if [istarget "mips-idt-*"] then {
- # Restart because IDT/SIM runs out of file descriptors.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
- }
-
- if [ runto marker_reg1 ] then {
-
- gdb_test "finish" "Run till exit from.*" "finish from marker_reg1"
-
- send_gdb "print v.method ()\n"
- gdb_expect {
- -re "= 82.*$gdb_prompt $" {
- pass "calling method for small class"
- }
- -re "Address requested for identifier .v. which is in register.*$gdb_prompt $" {
- setup_xfail "*-*-*" 2972
- fail "calling method for small class"
- }
- -re ".*$gdb_prompt $" { fail "calling method for small class" }
- timeout { fail "calling method for small class (timeout)" }
- eof { fail "calling method for small class (eof)" }
- }
- }
-
-}
-
-do_tests
-
-send_gdb "maint demangle inheritance1__Fv\n"
-gdb_expect {
- -re "inheritance1\\(void\\).*$gdb_prompt $" { pass "demangle" }
- -re ".*$gdb_prompt $" { fail "demangle" }
- timeout { fail "(timeout) demangle" }
-}
diff --git a/gdb/testsuite/gdb.c++/cplusfuncs.cc b/gdb/testsuite/gdb.c++/cplusfuncs.cc
deleted file mode 100644
index 7f033d6d90c..00000000000
--- a/gdb/testsuite/gdb.c++/cplusfuncs.cc
+++ /dev/null
@@ -1,196 +0,0 @@
-#include <stddef.h>
-
-class foo {
-public:
- foo (int);
- foo (int, const char *);
- foo (foo&);
- ~foo ();
-
- void operator * (foo&);
- void operator % (foo&);
- void operator - (foo&);
- void operator >> (foo&);
- void operator != (foo&);
- void operator > (foo&);
- void operator >= (foo&);
- void operator | (foo&);
- void operator && (foo&);
- void operator ! (void);
- void operator ++ (int);
- void operator = (foo&);
- void operator += (foo&);
- void operator *= (foo&);
- void operator %= (foo&);
- void operator >>= (foo&);
- void operator |= (foo&);
- void operator , (foo&);
- void operator / (foo&);
- void operator + (foo&);
- void operator << (foo&);
- void operator == (foo&);
- void operator < (foo&);
- void operator <= (foo&);
- void operator & (foo&);
- void operator ^ (foo&);
- void operator || (foo&);
- void operator ~ (void);
- void operator -- (int);
- foo* operator -> (void);
- void operator -= (foo&);
- void operator /= (foo&);
- void operator <<= (foo&);
- void operator &= (foo&);
- void operator ^= (foo&);
- void operator ->* (foo&);
- void operator [] (foo&);
- void operator () (foo&);
- void* operator new (size_t) throw ();
- void operator delete (void *);
- /**/ operator int ();
- /**/ operator char* ();
-
- int foofunc (int); // forced to have int return type, which is required
- int foofunc (int, signed char *); // forced to have int return type, which is required
- int ifoo;
- const char *ccpfoo;
-};
-
-#ifdef usestubs
-extern "C" {
- void set_debug_traps();
- void breakpoint();
-};
-#endif
-
-int main () {
-#ifdef usestubs
- set_debug_traps();
- breakpoint();
-#endif
- int z=3;
-}
-
-foo::foo (int i) { ifoo = i;}
-foo::foo (int i, const char *ccp) { ifoo = i; ccpfoo = ccp; }
-foo::foo (foo& afoo) { afoo.ifoo = 0; }
-foo::~foo () {}
-
-void foo::operator * (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator % (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator - (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator >> (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator != (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator > (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator >= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator | (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator && (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator ! (void) {}
-void foo::operator ++ (int ival) { ival = 0; }
-void foo::operator = (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator += (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator *= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator %= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator >>= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator |= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator , (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator / (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator + (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator << (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator == (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator < (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator <= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator & (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator ^ (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator || (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator ~ (void) {}
-void foo::operator -- (int ival) { ival = 0; }
-foo* foo::operator -> (void) {return this;}
-void foo::operator -= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator /= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator <<= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator &= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator ^= (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator ->* (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator [] (foo& afoo) { afoo.ifoo = 0; }
-void foo::operator () (foo& afoo) { afoo.ifoo = 0; }
-void* foo::operator new (size_t ival) throw () { ival = 0; return 0; }
-void foo::operator delete (void *ptr) { ptr = 0; }
-/**/ foo::operator int () { return 0; }
-/**/ foo::operator char* () { return 0; }
-
-/* Some functions to test overloading by varying one argument type. */
-
-void overload1arg (void) { }
-void overload1arg (char arg) { arg = 0; }
-void overload1arg (signed char arg) { arg = 0; }
-void overload1arg (unsigned char arg) { arg = 0; }
-void overload1arg (short arg) { arg = 0; }
-void overload1arg (unsigned short arg) { arg = 0; }
-void overload1arg (int arg) { arg = 0; }
-void overload1arg (unsigned int arg) { arg = 0; }
-void overload1arg (long arg) { arg = 0; }
-void overload1arg (unsigned long arg) { arg = 0; }
-void overload1arg (float arg) { arg = 0; }
-void overload1arg (double arg) { arg = 0; }
-
-/* Some functions to test overloading by varying argument count. */
-
-void overloadargs (int a1) { a1 = 0; }
-void overloadargs (int a1, int a2) { a1 = a2 = 0; }
-void overloadargs (int a1, int a2, int a3) { a1 = a2 = a3 = 0; }
-void overloadargs (int a1, int a2, int a3, int a4)
- { a1 = a2 = a3 = a4 = 0; }
-void overloadargs (int a1, int a2, int a3, int a4, int a5)
- { a1 = a2 = a3 = a4 = a5 = 0; }
-void overloadargs (int a1, int a2, int a3, int a4, int a5, int a6)
- { a1 = a2 = a3 = a4 = a5 = a6 = 0; }
-void overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7)
- { a1 = a2 = a3 = a4 = a5 = a6 = a7 = 0; }
-void overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8)
- { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = 0; }
-void overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9)
- { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = 0; }
-void overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9, int a10)
- { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 =
- a10 = 0; }
-void overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9, int a10, int a11)
- { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 =
- a10 = a11 == 0; }
-
-/* Some hairy function definitions.
- Use typedefs to help maintain sanity. */
-
-typedef int (*PFPc_i)(char *);
-typedef short (*PFPl_s)(long *);
-typedef short (*PFPc_s)(char *);
-typedef int (*PFl_i)(long);
-typedef PFl_i (*PFPc_PFl_i)(char *);
-typedef PFl_i (*PFPi_PFl_i)(int *);
-typedef PFl_i (*PFPFPc_i_PFl_i)(PFPc_i);
-typedef PFl_i (*PFs_PFl_i)(short);
-typedef int (*PFPFPl_s_i)(PFPl_s);
-typedef int (*PFPFPc_s_i)(PFPc_s);
-
-PFs_PFl_i hairyfunc1 (int arg) { arg = 0; return 0; }
-int hairyfunc2 (PFPc_i arg) { arg = 0; return 0; }
-int hairyfunc3 (PFPFPl_s_i arg) { arg = 0; return 0; }
-int hairyfunc4 (PFPFPc_s_i arg) { arg = 0; return 0; }
-int hairyfunc5 (PFPc_PFl_i arg) { arg = 0; return 0; }
-int hairyfunc6 (PFPi_PFl_i arg) { arg = 0; return 0; }
-int hairyfunc7 (PFPFPc_i_PFl_i arg) { arg = 0; return 0; }
-
-/* gdb has two demanglers (one for g++ 2.95, one for g++ 3).
- These marker functions help me figure out which demangler is in use. */
-
-char * dm_type_char_star (char * p) { return p; }
-int dm_type_foo_ref (foo & foo) { return foo.ifoo; }
-int * dm_type_int_star (int * p) { return p; }
-long * dm_type_long_star (long * p) { return p; }
-int dm_type_unsigned_int (unsigned int i) { return i; }
-int dm_type_void (void) { return 0; }
-void * dm_type_void_star (void * p) { return p; }
diff --git a/gdb/testsuite/gdb.c++/cplusfuncs.exp b/gdb/testsuite/gdb.c++/cplusfuncs.exp
deleted file mode 100644
index 0a5e1b3f0a1..00000000000
--- a/gdb/testsuite/gdb.c++/cplusfuncs.exp
+++ /dev/null
@@ -1,564 +0,0 @@
-# Copyright 1992, 1997, 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-# Adapted for g++ 3.0 ABI by Michael Chastain. (chastain@redhat.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "cplusfuncs"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [get_compiler_info $binfile "c++"] } {
- return -1
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-#
-# g++ changed its ABI between 2.95 and 3.0. gdb has two demanglers
-# for the two different styles. The two demanglers have some subtle
-# discrepancies in their output.
-#
-# old demangler new demangler
-# --- --------- --- ---------
-# "operator, " "operator,"
-# "char *" "char*"
-# "int *" "int*"
-# "long *" "long*"
-# "void *" "void*"
-# "foo &" "foo&"
-# "unsigned int" "unsigned"
-# "void" ""
-#
-# I probe for the forms in use.
-# The defaults are for the v3 demangler (as of 2001-02-13).
-#
-
-set dm_operator_comma ","
-set dm_type_char_star "char*"
-set dm_type_char_star_quoted "char\\*"
-set dm_type_foo_ref "foo&"
-set dm_type_int_star "int*"
-set dm_type_long_star "long*"
-set dm_type_unsigned_int "unsigned"
-set dm_type_void ""
-set dm_type_void_star "void*"
-
-proc probe_demangler { } {
- global gdb_prompt
- global dm_operator_comma
- global dm_type_char_star
- global dm_type_char_star_quoted
- global dm_type_foo_ref
- global dm_type_int_star
- global dm_type_long_star
- global dm_type_unsigned_int
- global dm_type_void
- global dm_type_void_star
-
- send_gdb "print &'foo::operator,(foo&)'\n"
- gdb_expect {
- -re ".*foo::operator, \\(.*foo.*&.*\\).*\r\n$gdb_prompt $" {
- # v2 demangler
- set dm_operator_comma ", "
- pass "detect dm_operator_comma"
- }
- -re ".*foo::operator,\\(.*foo.*&.*\\).*\r\n$gdb_prompt $" {
- # v3 demangler
- pass "detect dm_operator_comma"
- }
- -re ".*$gdb_prompt $" {
- fail "detect dm_operator_comma"
- }
- timeout {
- fail "detect dm_operator_comma"
- }
- }
-
- send_gdb "print &'dm_type_char_star'\n"
- gdb_expect {
- -re ".*dm_type_char_star\\(char \\*\\).*\r\n$gdb_prompt $" {
- # v2 demangler
- set dm_type_char_star "char *"
- set dm_type_char_star_quoted "char \\*"
- pass "detect dm_type_char_star"
- }
- -re ".*dm_type_char_star\\(char\\*\\).*\r\n$gdb_prompt $" {
- # v3 demangler
- pass "detect dm_type_char_star"
- }
- -re ".*$gdb_prompt $" {
- fail "detect dm_type_char_star"
- }
- timeout {
- fail "detect dm_type_char_star (timeout)"
- }
- }
-
- send_gdb "print &'dm_type_foo_ref'\n"
- gdb_expect {
- -re ".*dm_type_foo_ref\\(foo &\\).*\r\n$gdb_prompt $" {
- # v2 demangler
- set dm_type_foo_ref "foo &"
- pass "detect dm_type_foo_ref"
- }
- -re ".*dm_type_foo_ref\\(foo&\\).*\r\n$gdb_prompt $" {
- # v3 demangler
- pass "detect dm_type_foo_ref"
- }
- -re ".*$gdb_prompt $" {
- fail "detect dm_type_foo_ref"
- }
- timeout {
- fail "detect dm_type_foo_ref (timeout)"
- }
- }
-
- send_gdb "print &'dm_type_int_star'\n"
- gdb_expect {
- -re ".*dm_type_int_star\\(int \\*\\).*\r\n$gdb_prompt $" {
- # v2 demangler
- set dm_type_int_star "int *"
- pass "detect dm_type_int_star"
- }
- -re ".*dm_type_int_star\\(int\\*\\).*\r\n$gdb_prompt $" {
- # v3 demangler
- pass "detect dm_type_int_star"
- }
- -re ".*$gdb_prompt $" {
- fail "detect dm_type_int_star"
- }
- timeout {
- fail "detect dm_type_int_star (timeout)"
- }
- }
-
- send_gdb "print &'dm_type_long_star'\n"
- gdb_expect {
- -re ".*dm_type_long_star\\(long \\*\\).*\r\n$gdb_prompt $" {
- # v2 demangler
- set dm_type_long_star "long *"
- pass "detect dm_type_long_star"
- }
- -re ".*dm_type_long_star\\(long\\*\\).*\r\n$gdb_prompt $" {
- # v3 demangler
- pass "detect dm_type_long_star"
- }
- -re ".*$gdb_prompt $" {
- fail "detect dm_type_long_star"
- }
- timeout {
- fail "detect dm_type_long_star (timeout)"
- }
- }
-
- send_gdb "print &'dm_type_unsigned_int'\n"
- gdb_expect {
- -re ".*dm_type_unsigned_int\\(unsigned int\\).*\r\n$gdb_prompt $" {
- # v2 demangler
- set dm_type_unsigned_int "unsigned int"
- pass "detect dm_type_unsigned_int"
- }
- -re ".*dm_type_unsigned_int\\(unsigned\\).*\r\n$gdb_prompt $" {
- # v3 demangler
- pass "detect dm_type_unsigned_int"
- }
- -re ".*$gdb_prompt $" {
- fail "detect dm_type_unsigned_int"
- }
- timeout {
- fail "detect dm_unsigned int (timeout)"
- }
- }
-
- send_gdb "print &'dm_type_void'\n"
- gdb_expect {
- -re ".*dm_type_void\\(void\\).*\r\n$gdb_prompt $" {
- # v2 demangler
- set dm_type_void "void"
- pass "detect dm_type_void"
- }
- -re ".*dm_type_void\\(\\).*\r\n$gdb_prompt $" {
- # v3 demangler
- pass "detect dm_type_void"
- }
- -re ".*$gdb_prompt $" {
- fail "detect dm_type_void"
- }
- timeout {
- fail "detect dm_type_void (timeout)"
- }
- }
-
- send_gdb "print &'dm_type_void_star'\n"
- gdb_expect {
- -re ".*dm_type_void_star\\(void \\*\\).*\r\n$gdb_prompt $" {
- # v2 demangler
- set dm_type_void_star "void *"
- pass "detect dm_type_void_star"
- }
- -re ".*dm_type_void_star\\(void\\*\\).*\r\n$gdb_prompt $" {
- # v3 demangler
- pass "detect dm_type_void_star"
- }
- -re ".*$gdb_prompt $" {
- fail "detect dm_type_void_star"
- }
- timeout {
- fail "detect dm_type_void_star (timeout)"
- }
- }
-}
-
-#
-# Lookup a specific C++ function and print the demangled type.
-# This form accepts the demangled type as a regexp.
-#
-
-proc info_func_regexp { name demangled } {
- global gdb_prompt
-
- send_gdb "info function $name\n"
- gdb_expect {
- -re ".*File .*:\r\n(class |)$demangled\r\n.*$gdb_prompt $" {
- pass "info function for \"$name\""
- }
- -re ".*$gdb_prompt $" {
- fail "info function for \"$name\""
- }
- timeout {
- fail "info function for \"$name\" (timeout)"
- }
- }
-}
-
-#
-# Lookup a specific C++ function and print the demangled type.
-# This form accepts the demangled type as a literal string.
-#
-
-proc info_func { name demangled } {
- info_func_regexp "$name" [string_to_regexp "$demangled"]
-}
-
-#
-# Print the address of a function.
-# This checks that I can lookup a fully qualified C++ function.
-# This also checks the argument types on the return string.
-
-# Note: carlton/2003-01-16: If you modify this, make a corresponding
-# modification to print_addr_2_kfail.
-
-proc print_addr_2 { name good } {
- global gdb_prompt
- global hex
-
- set good_pattern [string_to_regexp $good]
-
- send_gdb "print &'$name'\n"
- gdb_expect {
- -re ".* = .* $hex <$good_pattern>\r\n$gdb_prompt $" {
- pass "print &'$name'"
- }
- -re ".*$gdb_prompt $" {
- fail "print &'$name'"
- }
- timeout {
- fail "print &'$name' (timeout)"
- }
- }
-}
-
-# NOTE: carlton/2003-01-16: hairyfunc5-6 fail on GCC 3.x (for at least
-# x=1 and x=2.1). So I'm modifying print_addr_2 to accept a failure
-# condition. FIXME: It would be nice if the failure condition were
-# conditional on the compiler version, but I'm not sufficiently
-# motivated. I did hardwire in the versions of char * and int *,
-# which will give some compiler-specificity to the failure.
-
-proc print_addr_2_kfail { name good bad bugid } {
- global gdb_prompt
- global hex
-
- set good_pattern [string_to_regexp $good]
- set bad_pattern [string_to_regexp $bad]
-
- send_gdb "print &'$name'\n"
- gdb_expect {
- -re ".* = .* $hex <$good_pattern>\r\n$gdb_prompt $" {
- pass "print &'$name'"
- }
- -re ".* = .* $hex <$bad_pattern>\r\n$gdb_prompt $" {
- kfail $bugid "print &'$name'"
- }
- -re ".*$gdb_prompt $" {
- fail "print &'$name'"
- }
- timeout {
- fail "print &'$name' (timeout)"
- }
- }
-}
-
-#
-# Simple interfaces to print_addr_2.
-#
-
-proc print_addr { name } {
- print_addr_2 "$name" "$name"
-}
-
-#
-# Test name demangling for operators.
-#
-# The '(' at the end of each regex input pattern is so that we match only
-# the one we are looking for. I.E. "operator&" would match both
-# "operator&(foo &)" and "operator&&(foo &)".
-#
-# gdb-gnats bug gdb/18:
-# "gdb can't parse "info func operator*" or "info func operator\*".
-# The star in "operator*" is interpreted as a regexp, but the "\*"
-# in "operator\*" is not a legal operator.
-#
-
-proc test_lookup_operator_functions {} {
- global dm_operator_comma
- global dm_type_char_star
- global dm_type_char_star_quoted
- global dm_type_foo_ref
- global dm_type_void
- global dm_type_void_star
-
- # operator* requires quoting so that GDB does not treat it as a regexp.
- info_func "operator\\*(" "void foo::operator*($dm_type_foo_ref);"
- info_func "operator%(" "void foo::operator%($dm_type_foo_ref);"
- info_func "operator-(" "void foo::operator-($dm_type_foo_ref);"
- info_func "operator>>(" "void foo::operator>>($dm_type_foo_ref);"
- info_func "operator!=(" "void foo::operator!=($dm_type_foo_ref);"
- info_func "operator>(" "void foo::operator>($dm_type_foo_ref);"
- info_func "operator>=(" "void foo::operator>=($dm_type_foo_ref);"
- info_func "operator|(" "void foo::operator|($dm_type_foo_ref);"
- info_func "operator&&(" "void foo::operator&&($dm_type_foo_ref);"
- info_func "operator!(" "void foo::operator!($dm_type_void);"
- info_func "operator++(" "void foo::operator++(int);"
- info_func "operator=(" "void foo::operator=($dm_type_foo_ref);"
- info_func "operator+=(" "void foo::operator+=($dm_type_foo_ref);"
- # operator*= requires quoting so that GDB does not treat it as a regexp.
- info_func "operator\\*=(" "void foo::operator*=($dm_type_foo_ref);"
- info_func "operator%=(" "void foo::operator%=($dm_type_foo_ref);"
- info_func "operator>>=(" "void foo::operator>>=($dm_type_foo_ref);"
- info_func "operator|=(" "void foo::operator|=($dm_type_foo_ref);"
- info_func "operator$dm_operator_comma\(" \
- "void foo::operator$dm_operator_comma\($dm_type_foo_ref);"
- info_func "operator/(" "void foo::operator/($dm_type_foo_ref);"
- info_func "operator+(" "void foo::operator+($dm_type_foo_ref);"
- info_func "operator<<(" "void foo::operator<<($dm_type_foo_ref);"
- info_func "operator==(" "void foo::operator==($dm_type_foo_ref);"
- info_func "operator<(" "void foo::operator<($dm_type_foo_ref);"
- info_func "operator<=(" "void foo::operator<=($dm_type_foo_ref);"
- info_func "operator&(" "void foo::operator&($dm_type_foo_ref);"
- info_func "operator^(" "void foo::operator^($dm_type_foo_ref);"
- info_func "operator||(" "void foo::operator||($dm_type_foo_ref);"
- info_func "operator~(" "void foo::operator~($dm_type_void);"
- info_func "operator--(" "void foo::operator--(int);"
- info_func "operator->(" "foo *foo::operator->($dm_type_void);"
- info_func "operator-=(" "void foo::operator-=($dm_type_foo_ref);"
- info_func "operator/=(" "void foo::operator/=($dm_type_foo_ref);"
- info_func "operator<<=(" "void foo::operator<<=($dm_type_foo_ref);"
- info_func "operator&=(" "void foo::operator&=($dm_type_foo_ref);"
- info_func "operator^=(" "void foo::operator^=($dm_type_foo_ref);"
- # operator->* requires quoting so that GDB does not treat it as a regexp.
- info_func "operator->\\*(" "void foo::operator->*($dm_type_foo_ref);"
-
- # operator[] needs double backslashes, so that a single backslash
- # will be sent to GDB, preventing the square brackets from being
- # evaluated as a regular expression.
- info_func "operator\\\[\\\](" "void foo::operator\[\]($dm_type_foo_ref);"
-
- # These are gnarly because they might end with 'static'.
- set dm_type_void_star_regexp [string_to_regexp $dm_type_void_star]
- info_func_regexp "operator new(" "void \\*foo::operator new\\(.*\\)(| static);"
- info_func_regexp "operator delete(" "void foo::operator delete\\($dm_type_void_star_regexp\\)(| static);"
-
- info_func "operator int(" "int foo::operator int($dm_type_void);"
- info_func "operator()(" "void foo::operator()($dm_type_foo_ref);"
- info_func "operator $dm_type_char_star_quoted\(" \
- "char *foo::operator $dm_type_char_star\($dm_type_void);"
-
-}
-
-
-proc test_paddr_operator_functions {} {
- global hex
- global hp_aCC_compiler
- global dm_operator_comma
- global dm_type_char_star
- global dm_type_foo_ref
- global dm_type_long_star
- global dm_type_unsigned_int
- global dm_type_void
- global dm_type_void_star
-
- print_addr "foo::operator*($dm_type_foo_ref)"
- print_addr "foo::operator%($dm_type_foo_ref)"
- print_addr "foo::operator-($dm_type_foo_ref)"
- print_addr "foo::operator>>($dm_type_foo_ref)"
- print_addr "foo::operator!=($dm_type_foo_ref)"
- print_addr "foo::operator>($dm_type_foo_ref)"
- print_addr "foo::operator>=($dm_type_foo_ref)"
- print_addr "foo::operator|($dm_type_foo_ref)"
- print_addr "foo::operator&&($dm_type_foo_ref)"
- print_addr "foo::operator!($dm_type_void)"
- print_addr "foo::operator++(int)"
- print_addr "foo::operator=($dm_type_foo_ref)"
- print_addr "foo::operator+=($dm_type_foo_ref)"
- print_addr "foo::operator*=($dm_type_foo_ref)"
- print_addr "foo::operator%=($dm_type_foo_ref)"
- print_addr "foo::operator>>=($dm_type_foo_ref)"
- print_addr "foo::operator|=($dm_type_foo_ref)"
- print_addr "foo::operator$dm_operator_comma\($dm_type_foo_ref)"
- print_addr "foo::operator/($dm_type_foo_ref)"
- print_addr "foo::operator+($dm_type_foo_ref)"
- print_addr "foo::operator<<($dm_type_foo_ref)"
- print_addr "foo::operator==($dm_type_foo_ref)"
- print_addr "foo::operator<($dm_type_foo_ref)"
- print_addr "foo::operator<=($dm_type_foo_ref)"
- print_addr "foo::operator&($dm_type_foo_ref)"
- print_addr "foo::operator^($dm_type_foo_ref)"
- print_addr "foo::operator||($dm_type_foo_ref)"
- print_addr "foo::operator~($dm_type_void)"
- print_addr "foo::operator--(int)"
- print_addr "foo::operator->($dm_type_void)"
- print_addr "foo::operator-=($dm_type_foo_ref)"
- print_addr "foo::operator/=($dm_type_foo_ref)"
- print_addr "foo::operator<<=($dm_type_foo_ref)"
- print_addr "foo::operator&=($dm_type_foo_ref)"
- print_addr "foo::operator^=($dm_type_foo_ref)"
- print_addr "foo::operator->*($dm_type_foo_ref)"
- print_addr "foo::operator\[\]($dm_type_foo_ref)"
- print_addr "foo::operator()($dm_type_foo_ref)"
-
- gdb_test "print &'foo::operator new'" \
- " = .* $hex <foo::operator new\\(.*\\)(| static)>"
- if { !$hp_aCC_compiler } {
- print_addr "foo::operator delete($dm_type_void_star)"
- } else {
- gdb_test "print &'foo::operator delete($dm_type_void_star) static'" \
- " = .*(0x\[0-9a-f\]+|) <foo::operator delete.*>"
- }
-
- print_addr "foo::operator int($dm_type_void)"
- print_addr "foo::operator $dm_type_char_star\($dm_type_void)"
-}
-
-#
-# Test overloaded functions (1 arg).
-#
-
-proc test_paddr_overloaded_functions {} {
- global dm_type_unsigned_int
- global dm_type_void
-
- print_addr "overload1arg($dm_type_void)"
- print_addr "overload1arg(char)"
- print_addr "overload1arg(signed char)"
- print_addr "overload1arg(unsigned char)"
- print_addr "overload1arg(short)"
- print_addr "overload1arg(unsigned short)"
- print_addr "overload1arg(int)"
- print_addr "overload1arg($dm_type_unsigned_int)"
- print_addr "overload1arg(long)"
- print_addr "overload1arg(unsigned long)"
- print_addr "overload1arg(float)"
- print_addr "overload1arg(double)"
-
- print_addr "overloadargs(int)"
- print_addr "overloadargs(int, int)"
- print_addr "overloadargs(int, int, int)"
- print_addr "overloadargs(int, int, int, int)"
- print_addr "overloadargs(int, int, int, int, int)"
- print_addr "overloadargs(int, int, int, int, int, int)"
- print_addr "overloadargs(int, int, int, int, int, int, int)"
- print_addr "overloadargs(int, int, int, int, int, int, int, int)"
- print_addr "overloadargs(int, int, int, int, int, int, int, int, int)"
- print_addr "overloadargs(int, int, int, int, int, int, int, int, int, int)"
- print_addr "overloadargs(int, int, int, int, int, int, int, int, int, int, int)"
-}
-
-proc test_paddr_hairy_functions {} {
- global gdb_prompt
- global hex
- global dm_type_char_star
- global dm_type_int_star
- global dm_type_long_star
-
- print_addr_2 "hairyfunc1" "hairyfunc1(int)"
- print_addr_2 "hairyfunc2" "hairyfunc2(int (*)($dm_type_char_star))"
- print_addr_2 "hairyfunc3" "hairyfunc3(int (*)(short (*)($dm_type_long_star)))"
- print_addr_2 "hairyfunc4" "hairyfunc4(int (*)(short (*)($dm_type_char_star)))"
-
- # gdb-gnats bug gdb/19:
- # "gdb v3 demangler fails on hairyfunc5 hairyfunc6 hairyfunc7"
- print_addr_2_kfail "hairyfunc5" "hairyfunc5(int (*(*)($dm_type_char_star))(long))" "hairyfunc5(int (*)(long) (*)(char*))" "gdb/19"
- print_addr_2_kfail "hairyfunc6" "hairyfunc6(int (*(*)($dm_type_int_star))(long))" "hairyfunc6(int (*)(long) (*)(int*))" "gdb/19"
- print_addr_2_kfail "hairyfunc7" "hairyfunc7(int (*(*)(int (*)($dm_type_char_star)))(long))" "hairyfunc7(int (*)(long) (*)(int (*)(char*)))" "gdb/19"
-}
-
-proc do_tests {} {
- global prms_id
- global bug_id
- global subdir
- global objdir
- global srcdir
- global binfile
- global gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- send_gdb "set language c++\n"
- gdb_expect -re "$gdb_prompt $"
- send_gdb "set width 0\n"
- gdb_expect -re "$gdb_prompt $"
-
- runto_main
-
- probe_demangler
- test_paddr_overloaded_functions
- test_paddr_operator_functions
- test_paddr_hairy_functions
- test_lookup_operator_functions
-}
-
-do_tests
diff --git a/gdb/testsuite/gdb.c++/ctti.exp b/gdb/testsuite/gdb.c++/ctti.exp
deleted file mode 100644
index 96e9fcff81a..00000000000
--- a/gdb/testsuite/gdb.c++/ctti.exp
+++ /dev/null
@@ -1,269 +0,0 @@
-# Copyright 1998, 1999, 2001 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 part of the gdb testsuite
-# file written by Elena Zannoni (ezannoni@cygnus.com)
-#
-# source files cttiadd.cc, cttiadd1.cc, cttiadd2.cc, cttiadd3.cc
-#
-
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if { [skip_cplus_tests] } { continue }
-
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set testfile "cttiadd"
-set srcfile ${testfile}.cc
-set srcfile1 ${testfile}1.cc
-set srcfile2 ${testfile}2.cc
-set srcfile3 ${testfile}3.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1;
-}
-
-if { $gcc_compiled } then { continue }
-
-#if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3}" "${binfile}" executable {debug c++}] != "" } {
-# gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-#}
-
-set cmdline "$CXX_FOR_TARGET ${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1} ${srcdir}/${subdir}/${srcfile2} ${srcdir}/${subdir}/${srcfile3} -g -o ${binfile}"
-
-remote_exec build $cmdline
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*i = 2;.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*f = 4.5;.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*c = add\\(c, c\\);.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*i = add\\(i, i\\);.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*f = add\\(f, f\\);.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-send_gdb "n\n"
-gdb_expect {
- -re "$decimal.*add1\\(\\);.*$gdb_prompt $" {
- pass "next "
- }
- -re ".*$gdb_prompt $" { fail "next " }
- timeout { fail "next " }
- }
-
-send_gdb "print c\n"
-gdb_expect {
- -re ".$decimal = -62.*\r\n$gdb_prompt $" {
- pass "print value of c"
- }
- -re ".*$gdb_prompt $" { fail "print value of c" }
- timeout { fail "(timeout) print value of c" }
- }
-
-
-send_gdb "print f\n"
-gdb_expect {
- -re ".$decimal = 9\r\n$gdb_prompt $" {
- pass "print value of f"
- }
- -re ".*$gdb_prompt $" { fail "print value of f" }
- timeout { fail "(timeout) print value of f" }
- }
-
-
-send_gdb "print i\n"
-gdb_expect {
- -re ".$decimal = 4\r\n$gdb_prompt $" {
- pass "print value of i"
- }
- -re ".*$gdb_prompt $" { fail "print value of i" }
- timeout { fail "(timeout) print value of i" }
- }
-
-
-
-send_gdb "print add<int>(2,2)\n"
-gdb_expect {
- -re ".$decimal = 4\r\n$gdb_prompt $" {
- pass "print value of add<int>(2,2)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add<int>(2,2)" }
- timeout { fail "(timeout) print value of add<int>(2,2)" }
- }
-
-send_gdb "print add<float>(2.3,2.3)\n"
-gdb_expect {
- -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
- pass "print value of add<float>(2.3,2.3)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add<float>(2.3,2.3)" }
- timeout { fail "(timeout) print value of add<float>(2.3,2.3)" }
- }
-
-send_gdb "print add<char>('A','A')\n"
-gdb_expect {
- -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
- pass "print value of add<char>('A','A')"
- }
- -re ".*$gdb_prompt $" { fail "print value of add<char>('A','A')" }
- timeout { fail "(timeout) print value of add<char>('A','A')" }
- }
-
-
-send_gdb "print add2<int>(2,2)\n"
-gdb_expect {
- -re ".$decimal = 4\r\n$gdb_prompt $" {
- pass "print value of add2<int>(2,2)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add2<int>(2,2)" }
- timeout { fail "(timeout) print value of add2<int>(2,2)" }
- }
-
-send_gdb "print add2<float>(2.3,2.3)\n"
-gdb_expect {
- -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
- pass "print value of add2<float>(2.3,2.3)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add2<float>(2.3,2.3)" }
- timeout { fail "(timeout) print value of add2<float>(2.3,2.3)" }
- }
-
-send_gdb "print add2<char>('A','A')\n"
-gdb_expect {
- -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
- pass "print value of add2<char>('A','A')"
- }
- -re ".*$gdb_prompt $" { fail "print value of add2<char>('A','A')" }
- timeout { fail "(timeout) print value of add2<char>('A','A')" }
- }
-
-send_gdb "print add3<int>(2,2)\n"
-gdb_expect {
- -re ".$decimal = 4\r\n$gdb_prompt $" {
- pass "print value of add3<int>(2,2)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add3<int>(2,2)" }
- timeout { fail "(timeout) print value of add3<int>(2,2)" }
- }
-
-send_gdb "print add3<float>(2.3,2.3)\n"
-gdb_expect {
- -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
- pass "print value of add3<float>(2.3,2.3)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add3<float>(2.3,2.3)" }
- timeout { fail "(timeout) print value of add3<float>(2.3,2.3)" }
- }
-
-send_gdb "print add3<char>('A','A')\n"
-gdb_expect {
- -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
- pass "print value of add3<char>('A','A')"
- }
- -re ".*$gdb_prompt $" { fail "print value of add3<char>('A','A')" }
- timeout { fail "(timeout) print value of add3<char>('A','A')" }
- }
-
-send_gdb "print add4<int>(2,2)\n"
-gdb_expect {
- -re ".$decimal = 4\r\n$gdb_prompt $" {
- pass "print value of add4<int>(2,2)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add4<int>(2,2)" }
- timeout { fail "(timeout) print value of add4<int>(2,2)" }
- }
-
-send_gdb "print add4<float>(2.3,2.3)\n"
-gdb_expect {
- -re ".$decimal = 4\\.5\[0-9\]+\r\n$gdb_prompt $" {
- pass "print value of add4<float>(2.3,2.3)"
- }
- -re ".*$gdb_prompt $" { fail "print value of add4<float>(2.3,2.3)" }
- timeout { fail "(timeout) print value of add4<float>(2.3,2.3)" }
- }
-
-send_gdb "print add4<char>('A','A')\n"
-gdb_expect {
- -re ".$decimal = -126.*202.\r\n$gdb_prompt $" {
- pass "print value of add4<char>('A','A')"
- }
- -re ".*$gdb_prompt $" { fail "print value of add4<char>('A','A')" }
- timeout { fail "(timeout) print value of add4<char>('A','A')" }
- }
-
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.c++/cttiadd.cc b/gdb/testsuite/gdb.c++/cttiadd.cc
deleted file mode 100644
index 1f50fae24c1..00000000000
--- a/gdb/testsuite/gdb.c++/cttiadd.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-template<class T> T add(T v1, T v2)
-{
- T v3;
- v3 = v1;
- v3 += v2;
- return v3;
- }
-
-int main()
-{
- char c;
- int i;
- float f;
- extern void add1();
- extern void subr2();
- extern void subr3();
-
- c = 'a';
- i = 2;
- f = 4.5;
-
- c = add(c, c);
- i = add(i, i);
- f = add(f, f);
-
- add1();
- subr2();
- subr3();
-}
diff --git a/gdb/testsuite/gdb.c++/cttiadd1.cc b/gdb/testsuite/gdb.c++/cttiadd1.cc
deleted file mode 100644
index 7113ecea421..00000000000
--- a/gdb/testsuite/gdb.c++/cttiadd1.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-template<class T> T add(T v1, T v2);
-
-void add1()
-{
- char c;
- int i;
- float f;
-
- c = 'b';
- i = 3;
- f = 6.5;
-
- c = add(c, c);
- i = add(i, i);
- f = add(f, f);
-}
diff --git a/gdb/testsuite/gdb.c++/cttiadd2.cc b/gdb/testsuite/gdb.c++/cttiadd2.cc
deleted file mode 100644
index d0d9891fb2f..00000000000
--- a/gdb/testsuite/gdb.c++/cttiadd2.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-template<class T> T add2(T v1, T v2)
-{
- T v3;
- v3 = v1;
- v3 += v2;
- return v3;
-}
-
-void subr2()
-{
- char c;
- int i;
- float f;
-
- c = 'b';
- i = 3;
- f = 6.5;
-
- c = add2(c, c);
- i = add2(i, i);
- f = add2(f, f);
-}
diff --git a/gdb/testsuite/gdb.c++/cttiadd3.cc b/gdb/testsuite/gdb.c++/cttiadd3.cc
deleted file mode 100644
index 7ba1b019f16..00000000000
--- a/gdb/testsuite/gdb.c++/cttiadd3.cc
+++ /dev/null
@@ -1,33 +0,0 @@
-template<class T> T add3(T v1, T v2)
-{
- T v3;
- v3 = v1;
- v3 += v2;
- return v3;
-}
-
-template<class T> T add4(T v1, T v2)
-{
- T v3;
- v3 = v1;
- v3 += v2;
- return v3;
-}
-
-void subr3()
-{
- char c;
- int i;
- float f;
-
- c = 'b';
- i = 3;
- f = 6.5;
-
- c = add3(c, c);
- i = add3(i, i);
- f = add3(f, f);
- c = add4(c, c);
- i = add4(i, i);
- f = add4(f, f);
-}
diff --git a/gdb/testsuite/gdb.c++/demangle.exp b/gdb/testsuite/gdb.c++/demangle.exp
deleted file mode 100644
index 7bd9fc54d00..00000000000
--- a/gdb/testsuite/gdb.c++/demangle.exp
+++ /dev/null
@@ -1,1582 +0,0 @@
-# Copyright (C) 1992, 1997, 1999, 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if { [skip_cplus_tests] } { continue }
-
-### The demangling style we last sent to GDB.
-set current_demangling_style none
-
-### Set GDB's current demangling style to STYLE. Subsequent calls to
-### test_demangle will include STYLE in the test name when reporting
-### passes and failures.
-proc set_demangling_style {style} {
- global gdb_prompt
- global current_demangling_style
-
- send_gdb "set demangle-style $style\n"
- gdb_expect {
- -re "set demangle-style $style\[\r\n\]+$gdb_prompt $" {
- pass "$style: set demangle-style"
- }
- -re ".*$gdb_prompt $" {
- fail "$style: set demangle-style"
- error "set_demangling_style: set style"
- }
- timeout {
- fail "$style: set demangle-style (timeout)"
- error "set_demangling_style: set style"
- }
- }
-
- send_gdb "show demangle-style\n"
- gdb_expect {
- -re "The current C\[+\]+ demangling style is \"$style\".\r\n$gdb_prompt $" {
- pass "$style: check demangling style"
- }
- -re ".*$gdb_prompt $" {
- fail "$style: check demangling style"
- error "set_demangling_style: check style"
- }
- timeout {
- fail "$style: check demangling style (timeout)"
- error "set_demangling_style: check style"
- }
- }
-
- set current_demangling_style $style
-}
-
-
-### Utility function for test_demangling and test_demangling_exact.
-proc test_demangling_core {tester test result} {
- global current_demangling_style
-
- if {! [regexp {^([^ ]+): (.+)$} $test dummy style name]} {
- error "bad test name passed to test_demangling"
- }
-
- if {[string compare $style $current_demangling_style]} {
- set_demangling_style $style
- }
-
- $tester "maintenance demangle $name" $result $test
-}
-
-### Demangle an identifier, and check that the result matches a pattern.
-###
-### TEST should be of the form "STYLE: NAME", where STYLE is the name
-### of a demangling style (like "gnu" or "arm"), and NAME is a mangled
-### identifier to demangle. Pass when the result matches the regular
-### expression RESULT. Report passes and fails using TEST as the name
-### of the test.
-###
-### Why don't we just pass the STYLE and NAME as two separate
-### arguments, or let the style be a global variable? That would be
-### cleaner. However, doing it this way means that:
-###
-### 1) the name of the test, as recorded in the summary and log,
-### appears verbatim in the script, and
-###
-### 2) that test names are unique, even though we try to demangle the same
-### identifiers using several different mangling styles.
-###
-### This makes it a lot easier for people tracking down failures to
-### find the one they care about.
-
-proc test_demangling {test result} {
- test_demangling_core gdb_test $test $result
-}
-
-### Like test_demangling, above, except that RESULT is not a regexp,
-### but a string that must match exactly.
-
-proc test_demangling_exact {test result} {
- test_demangling_core gdb_test_exact $test $result
-}
-
-
-
-#
-# Test gnu style name demangling
-#
-
-proc test_gnu_style_demangling {} {
- global gdb_prompt
-
- test_demangling "gnu: Abort__FP6EditoriPCc" \
- "Abort\[(\]+Editor \[*\]+, int, (const char|char const) \[*\]+\[)\]+"
- test_demangling_exact "gnu: AddAlignment__9ivTSolverUiP12ivInteractorP7ivTGlue" "ivTSolver::AddAlignment(unsigned int, ivInteractor *, ivTGlue *)"
- test_demangling "gnu: Append__15NameChooserViewPCc" \
- "NameChooserView::Append\[(\]+(const char|char const) \[*\]+\[)\]+"
- test_demangling_exact "gnu: ArrowheadIntersects__9ArrowLineP9ArrowheadR6BoxObjP7Graphic" "ArrowLine::ArrowheadIntersects(Arrowhead *, BoxObj &, Graphic *)"
- test_demangling_exact "gnu: AtEnd__13ivRubberGroup" "ivRubberGroup::AtEnd(void)"
- test_demangling_exact "gnu: BgFilter__9ivTSolverP12ivInteractor" "ivTSolver::BgFilter(ivInteractor *)"
- test_demangling "gnu: BitPatterntoa__FRC10BitPatternccc" \
- "BitPatterntoa\[(\]+(const BitPattern|BitPattern const) &, char, char, char\[)\]+"
- test_demangling_exact "gnu: Check__6UArrayi" "UArray::Check(int)"
- test_demangling_exact "gnu: CoreConstDecls__8TextCodeR7ostream" "TextCode::CoreConstDecls(ostream &)"
- test_demangling_exact "gnu: Detach__8StateVarP12StateVarView" "StateVar::Detach(StateVarView *)"
- test_demangling_exact "gnu: Done__9ComponentG8Iterator" "Component::Done(Iterator)"
- test_demangling "gnu: DrawDestinationTransformedImage__FP7_XImageiiT0iiUlUiiiUiUlUlP4_XGCRC13ivTransformeriiii" \
- "DrawDestinationTransformedImage\[(\]+_XImage \[*\]+, int, int, _XImage \[*\]+, int, int, unsigned long, unsigned int, int, int, unsigned int, unsigned long, unsigned long, _XGC \[*\]+, (const ivTransformer|ivTransformer const) &, int, int, int, int\[)\]+"
-
- test_demangling "gnu: Edit__12StringEditorPCcii" \
- "StringEditor::Edit\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
- test_demangling_exact "gnu: Effect__11RelateManipR7ivEvent" "RelateManip::Effect(ivEvent &)"
- test_demangling "gnu: FilterName__FPCc" \
- "FilterName\[(\]+(const char|char const) \[*\]+\[)\]+"
- test_demangling "gnu: Filter__6PSTextPCci" \
- "PSText::Filter\[(\]+(const char|char const) \[*\]+, int\[)\]+"
- test_demangling "gnu: FindColor__7CatalogPCciii" \
- "Catalog::FindColor\[(\]+(const char|char const) \[*\]+, int, int, int\[)\]+"
- test_demangling_exact "gnu: FindFixed__FRP4CNetP4CNet" "FindFixed(CNet *&, CNet *)"
- test_demangling "gnu: FindFont__7CatalogPCcN21" \
- "Catalog::FindFont\[(\]+(const char|char const) \[*\]+, (const char|char const) \[*\]+, (const char|char const) \[*\]+\[)\]+"
- test_demangling_exact "gnu: Fix48_abort__FR8twolongs" "Fix48_abort(twolongs &)"
- test_demangling_exact "gnu: GetBarInfo__15iv2_6_VScrollerP13ivPerspectiveRiT2" "iv2_6_VScroller::GetBarInfo(ivPerspective *, int &, int &)"
- test_demangling_exact "gnu: GetBgColor__C9ivPainter" "ivPainter::GetBgColor(void) const"
-
- test_demangling "gnu: Iisdouble__FPC6IntRep" \
- "Iisdouble\[(\]+(const IntRep|IntRep const) \[*\]+\[)\]+"
- test_demangling_exact "gnu: InsertBody__15H_PullrightMenuii" "H_PullrightMenu::InsertBody(int, int)"
- test_demangling_exact "gnu: InsertCharacter__9TextManipc" "TextManip::InsertCharacter(char)"
-
- test_demangling_exact "gnu: InsertToplevel__7ivWorldP12ivInteractorT1" "ivWorld::InsertToplevel(ivInteractor *, ivInteractor *)"
- test_demangling_exact "gnu: InsertToplevel__7ivWorldP12ivInteractorT1iiUi" "ivWorld::InsertToplevel(ivInteractor *, ivInteractor *, int, int, unsigned int)"
- test_demangling "gnu: IsADirectory__FPCcR4stat" \
- "IsADirectory\[(\]+(const char|char const) \[*\]+, stat &\[)\]+"
- test_demangling_exact "gnu: IsAGroup__FP11GraphicViewP11GraphicComp" "IsAGroup(GraphicView *, GraphicComp *)"
- test_demangling_exact "gnu: IsA__10ButtonCodeUl" "ButtonCode::IsA(unsigned long)"
-
- test_demangling_exact "gnu: ReadName__FR7istreamPc" "ReadName(istream &, char *)"
- test_demangling_exact "gnu: Redraw__13StringBrowseriiii" "StringBrowser::Redraw(int, int, int, int)"
- test_demangling_exact "gnu: Rotate__13ivTransformerf" "ivTransformer::Rotate(float)"
- test_demangling_exact "gnu: Rotated__C13ivTransformerf" "ivTransformer::Rotated(float) const"
- test_demangling_exact "gnu: Round__Ff" "Round(float)"
-
- test_demangling_exact "gnu: SetExport__16MemberSharedNameUi" "MemberSharedName::SetExport(unsigned int)"
- test_demangling_exact "gnu: Set__14ivControlState13ControlStatusUi" "ivControlState::Set(ControlStatus, unsigned int)"
- test_demangling_exact "gnu: Set__5DFacePcii" "DFace::Set(char *, int, int)"
-
- test_demangling_exact "gnu: VConvert__9ivTSolverP12ivInteractorRP8TElementT2" "ivTSolver::VConvert(ivInteractor *, TElement *&, TElement *&)"
- test_demangling_exact "gnu: VConvert__9ivTSolverP7ivTGlueRP8TElement" "ivTSolver::VConvert(ivTGlue *, TElement *&)"
- test_demangling_exact "gnu: VOrder__9ivTSolverUiRP12ivInteractorT2" "ivTSolver::VOrder(unsigned int, ivInteractor *&, ivInteractor *&)"
- test_demangling "gnu: Valid__7CatalogPCcRP4Tool" \
- "Catalog::Valid\[(\]+(const char|char const) \[*\]+, Tool \[*\]+&\[)\]+"
- test_demangling_exact "gnu: _10PageButton\$__both" "PageButton::__both"
- test_demangling_exact "gnu: _3RNG\$singleMantissa" "RNG::singleMantissa"
- test_demangling_exact "gnu: _5IComp\$_release" "IComp::_release"
- test_demangling_exact "gnu: _\$_10BitmapComp" "BitmapComp::~BitmapComp(void)"
-
- test_demangling_exact "gnu: _\$_9__io_defs" "__io_defs::~__io_defs(void)"
- test_demangling_exact "gnu: _\$_Q23foo3bar" "foo::bar::~bar(void)"
- test_demangling_exact "gnu: _\$_Q33foo3bar4bell" "foo::bar::bell::~bell(void)"
- test_demangling_exact "gnu: __10ivTelltaleiP7ivGlyph" "ivTelltale::ivTelltale(int, ivGlyph *)"
- test_demangling_exact "gnu: __10ivViewportiP12ivInteractorUi" "ivViewport::ivViewport(int, ivInteractor *, unsigned int)"
- test_demangling_exact "gnu: __10ostrstream" "ostrstream::ostrstream(void)"
- test_demangling_exact "gnu: __10ostrstreamPcii" "ostrstream::ostrstream(char *, int, int)"
- test_demangling "gnu: __11BasicDialogiPCcP13ivButtonStateN22Ui" \
- "BasicDialog::BasicDialog\[(\]+int, (const char|char const) \[*\]+, ivButtonState \[*\]+, (const char|char const) \[*\]+, (const char|char const) \[*\]+, unsigned int\[)\]+"
- test_demangling_exact "gnu: __11BitmapTablei" "BitmapTable::BitmapTable(int)"
- test_demangling_exact "gnu: __12ViewportCodeP12ViewportComp" "ViewportCode::ViewportCode(ViewportComp *)"
- test_demangling "gnu: __12iv2_6_BorderiPCci" \
- "iv2_6_Border::iv2_6_Border\[(\]+int, (const char|char const) \[*\]+, int\[)\]+"
- test_demangling_exact "gnu: __12iv2_6_Borderii" "iv2_6_Border::iv2_6_Border(int, int)"
- test_demangling "gnu: __12ivBackgroundiP7ivGlyphPC7ivColor" \
- "ivBackground::ivBackground\[(\]+int, ivGlyph \[*\]+, (const ivColor|ivColor const) \[*\]+\[)\]+"
- test_demangling_exact "gnu: __12ivBreak_Listl" "ivBreak_List::ivBreak_List(long)"
- test_demangling "gnu: __14TextInteractoriPCcUi" \
- "TextInteractor::TextInteractor\[(\]+int, (const char|char const) \[*\]+, unsigned int\[)\]+"
- test_demangling_exact "gnu: __14iv2_6_MenuItemiP12ivInteractor" "iv2_6_MenuItem::iv2_6_MenuItem(int, ivInteractor *)"
- test_demangling "gnu: __14iv2_6_MenuItemiPCcP12ivInteractor" \
- "iv2_6_MenuItem::iv2_6_MenuItem\[(\]+int, (const char|char const) \[*\]+, ivInteractor \[*\]+\[)\]+"
-
- test_demangling_exact "gnu: __20DisplayList_IteratorR11DisplayList" "DisplayList_Iterator::DisplayList_Iterator(DisplayList &)"
- test_demangling_exact "gnu: __3fooRT0" "foo::foo(foo &)"
- test_demangling_exact "gnu: __3fooiN31" "foo::foo(int, int, int, int)"
- test_demangling "gnu: __3fooiPCc" \
- "foo::foo\[(\]+int, (const char|char const) \[*\]+\[)\]+"
- test_demangling_exact "gnu: __3fooiRT0iT2iT2" "foo::foo(int, foo &, int, foo &, int, foo &)"
- test_demangling "gnu: __6GetOptiPPcPCc" \
- "GetOpt::GetOpt\[(\]+int, char \[*\]+\[*\]+, (const char|char const) \[*\]+\[)\]+"
- test_demangling_exact "gnu: __6KeyMapPT0" "KeyMap::KeyMap(KeyMap *)"
- test_demangling "gnu: __7ivWorldPCcRiPPcPC12ivOptionDescPC14ivPropertyData" \
- "ivWorld::ivWorld\[(\]+(const char|char const) \[*\]+, int &, char \[*\]+\[*\]+, (const ivOptionDesc|ivOptionDesc const) \[*\]+, (const ivPropertyData|ivPropertyData const) \[*\]+\[)\]+"
- test_demangling "gnu: __7procbufPCci" \
- "procbuf::procbuf\[(\]+(const char|char const) \[*\]+, int\[)\]+"
- test_demangling_exact "gnu: __8ArrowCmdP6EditorUiUi" "ArrowCmd::ArrowCmd(Editor *, unsigned int, unsigned int)"
-
- test_demangling_exact "gnu: __9F_EllipseiiiiP7Graphic" "F_Ellipse::F_Ellipse(int, int, int, int, Graphic *)"
- test_demangling_exact "gnu: __9FrameDataP9FrameCompi" "FrameData::FrameData(FrameComp *, int)"
- test_demangling_exact "gnu: __9HVGraphicP9CanvasVarP7Graphic" "HVGraphic::HVGraphic(CanvasVar *, Graphic *)"
- test_demangling_exact "gnu: __Q23foo3bar" "foo::bar::bar(void)"
- test_demangling_exact "gnu: __Q33foo3bar4bell" "foo::bar::bell::bell(void)"
- test_demangling_exact "gnu: __aa__3fooRT0" "foo::operator&&(foo &)"
- test_demangling_exact "gnu: __aad__3fooRT0" "foo::operator&=(foo &)"
- test_demangling_exact "gnu: __ad__3fooRT0" "foo::operator&(foo &)"
- test_demangling_exact "gnu: __adv__3fooRT0" "foo::operator/=(foo &)"
- test_demangling_exact "gnu: __aer__3fooRT0" "foo::operator^=(foo &)"
- test_demangling_exact "gnu: __als__3fooRT0" "foo::operator<<=(foo &)"
- test_demangling_exact "gnu: __amd__3fooRT0" "foo::operator%=(foo &)"
- test_demangling_exact "gnu: __ami__3fooRT0" "foo::operator-=(foo &)"
- test_demangling_exact "gnu: __aml__3FixRT0" "Fix::operator*=(Fix &)"
- test_demangling_exact "gnu: __aml__5Fix16i" "Fix16::operator*=(int)"
- test_demangling_exact "gnu: __aml__5Fix32RT0" "Fix32::operator*=(Fix32 &)"
- test_demangling_exact "gnu: __aor__3fooRT0" "foo::operator|=(foo &)"
- test_demangling_exact "gnu: __apl__3fooRT0" "foo::operator+=(foo &)"
- test_demangling_exact "gnu: __ars__3fooRT0" "foo::operator>>=(foo &)"
-
- test_demangling_exact "gnu: __as__3fooRT0" "foo::operator=(foo &)"
- test_demangling_exact "gnu: __cl__3fooRT0" "foo::operator()(foo &)"
- test_demangling_exact "gnu: __cl__6Normal" "Normal::operator()(void)"
- test_demangling_exact "gnu: __cl__6Stringii" "String::operator()(int, int)"
- test_demangling_exact "gnu: __cm__3fooRT0" "foo::operator, (foo &)"
- test_demangling_exact "gnu: __co__3foo" "foo::operator~(void)"
- test_demangling_exact "gnu: __dl__3fooPv" "foo::operator delete(void *)"
- test_demangling_exact "gnu: __dv__3fooRT0" "foo::operator/(foo &)"
- test_demangling_exact "gnu: __eq__3fooRT0" "foo::operator==(foo &)"
- test_demangling_exact "gnu: __er__3fooRT0" "foo::operator^(foo &)"
- test_demangling_exact "gnu: __ge__3fooRT0" "foo::operator>=(foo &)"
- test_demangling_exact "gnu: __gt__3fooRT0" "foo::operator>(foo &)"
- test_demangling_exact "gnu: __le__3fooRT0" "foo::operator<=(foo &)"
- test_demangling_exact "gnu: __ls__3fooRT0" "foo::operator<<(foo &)"
- test_demangling_exact "gnu: __ls__FR7ostreamPFR3ios_R3ios" "operator<<(ostream &, ios &(*)(ios &))"
- test_demangling_exact "gnu: __ls__FR7ostreamR3Fix" "operator<<(ostream &, Fix &)"
- test_demangling_exact "gnu: __lt__3fooRT0" "foo::operator<(foo &)"
- test_demangling_exact "gnu: __md__3fooRT0" "foo::operator%(foo &)"
- test_demangling_exact "gnu: __mi__3fooRT0" "foo::operator-(foo &)"
- test_demangling_exact "gnu: __ml__3fooRT0" "foo::operator*(foo &)"
- test_demangling_exact "gnu: __mm__3fooi" "foo::operator--(int)"
-
- test_demangling_exact "gnu: __ne__3fooRT0" "foo::operator!=(foo &)"
- test_demangling "gnu: __ne__FRC7ComplexT0" \
- "operator!=\[(\]+(const Complex|Complex const) &, (const Complex|Complex const) &\[)\]+"
- test_demangling "gnu: __ne__FRC7Complexd" \
- "operator!=\[(\]+(const Complex|Complex const) &, double\[)\]+"
- test_demangling "gnu: __ne__FRC9SubStringRC6String" \
- "operator!=\[(\]+(const SubString|SubString const) &, (const String|String const) &\[)\]+"
- test_demangling_exact "gnu: __nt__3foo" "foo::operator!(void)"
- test_demangling_exact "gnu: __nw__3fooi" "foo::operator new(int)"
- test_demangling_exact "gnu: __oo__3fooRT0" "foo::operator||(foo &)"
- test_demangling_exact "gnu: __opPc__3foo" "foo::operator char *(void)"
- test_demangling_exact "gnu: __opi__3foo" "foo::operator int(void)"
- test_demangling_exact "gnu: __or__3fooRT0" "foo::operator|(foo &)"
- test_demangling_exact "gnu: __pl__3fooRT0" "foo::operator+(foo &)"
- test_demangling_exact "gnu: __pp__3fooi" "foo::operator++(int)"
- test_demangling_exact "gnu: __rf__3foo" "foo::operator->(void)"
- test_demangling_exact "gnu: __rm__3fooRT0" "foo::operator->*(foo &)"
- test_demangling_exact "gnu: __rs__3fooRT0" "foo::operator>>(foo &)"
- test_demangling "gnu: __vc__3fooRT0" "foo::operator\\\[\\\]\\(foo &\\)"
- test_demangling "gnu: _gsub__6StringRC5RegexPCci" \
- "String::_gsub\[(\]+(const Regex|Regex const) &, (const char|char const) \[*\]+, int\[)\]+"
- test_demangling_exact "gnu: _new_Fix__FUs" "_new_Fix(unsigned short)"
-
- # gcc 2.4.5 (and earlier) style virtual tables. We want to continue to
- # correctly demangle these even if newer compilers use a different form.
- test_demangling_exact "gnu: _vt.foo" "foo virtual table"
- test_demangling_exact "gnu: _vt.foo.bar" "foo::bar virtual table"
- test_demangling_exact "gnu: _vt\$foo" "foo virtual table"
- test_demangling_exact "gnu: _vt\$foo\$bar" "foo::bar virtual table"
-
- test_demangling_exact "gnu: append__7ivGlyphPT0" "ivGlyph::append(ivGlyph *)"
- test_demangling "gnu: arg__FRC7Complex" \
- "arg\[(\]+(const Complex|Complex const) &\[)\]+"
- test_demangling_exact "gnu: clearok__FP7_win_sti" "clearok(_win_st *, int)"
-
- test_demangling_exact "gnu: complexfunc2__FPFPc_i" "complexfunc2(int (*)(char *))"
- test_demangling_exact "gnu: complexfunc3__FPFPFPl_s_i" "complexfunc3(int (*)(short (*)(long *)))"
- test_demangling_exact "gnu: complexfunc4__FPFPFPc_s_i" "complexfunc4(int (*)(short (*)(char *)))"
- test_demangling_exact "gnu: complexfunc5__FPFPc_PFl_i" "complexfunc5(int (*(*)(char *))(long))"
- test_demangling_exact "gnu: complexfunc6__FPFPi_PFl_i" "complexfunc6(int (*(*)(int *))(long))"
- test_demangling_exact "gnu: complexfunc7__FPFPFPc_i_PFl_i" "complexfunc7(int (*(*)(int (*)(char *)))(long))"
- test_demangling "gnu: contains__C9BitStringRC10BitPattern" \
- "BitString::contains\[(\]+(const BitPattern|BitPattern const) &\[)\]+ const"
- test_demangling "gnu: contains__C9BitStringRC12BitSubStringi" \
- "BitString::contains\[(\]+(const BitSubString|BitSubString const) &, int\[)\]+ const"
- test_demangling "gnu: contains__C9BitStringRT0" \
- "BitString::contains\[(\]+(const BitString|BitString const) &\[)\]+ const"
- test_demangling "gnu: div__FPC6IntRepT0P6IntRep" \
- "div\[(\]+(const IntRep|IntRep const) \[*\]+, (const IntRep|IntRep const) \[*\]+, IntRep \[*\]+\[)\]+"
- test_demangling "gnu: div__FPC6IntReplP6IntRep" \
- "div\[(\]+(const IntRep|IntRep const) \[*\]+, long, IntRep \[*\]+\[)\]+"
- test_demangling "gnu: div__FRC8RationalT0R8Rational" \
- "div\[(\]+(const Rational|Rational const) &, (const Rational|Rational const) &, Rational &\[)\]+"
- test_demangling "gnu: divide__FRC7IntegerT0R7IntegerT2" \
- "divide\[(\]+(const Integer|Integer const) &, (const Integer|Integer const) &, Integer &, Integer &\[)\]+"
- test_demangling "gnu: divide__FRC7IntegerlR7IntegerRl" \
- "divide\[(\]+(const Integer|Integer const) &, long, Integer &, long &\[)\]+"
- test_demangling "gnu: enable__14DocumentViewerPCcUi" \
- "DocumentViewer::enable\[(\]+(const char|char const) \[*\]+, unsigned int\[)\]+"
-
- test_demangling_exact "gnu: foo__FiN30" "foo(int, int, int, int)"
- test_demangling_exact "gnu: foo__FiR3fooiT1iT1" "foo(int, foo &, int, foo &, int, foo &)"
- test_demangling_exact "gnu: foo___3barl" "bar::foo_(long)"
- test_demangling_exact "gnu: insert__15ivClippingStacklRP8_XRegion" "ivClippingStack::insert(long, _XRegion *&)"
- test_demangling_exact "gnu: insert__16ChooserInfo_ListlR11ChooserInfo" "ChooserInfo_List::insert(long, ChooserInfo &)"
- test_demangling_exact "gnu: insert__17FontFamilyRepListlRP15ivFontFamilyRep" "FontFamilyRepList::insert(long, ivFontFamilyRep *&)"
- test_demangling_exact "gnu: leaveok__FP7_win_stc" "leaveok(_win_st *, char)"
- test_demangling_exact "gnu: left_mover__C7ivMFKitP12ivAdjustableP7ivStyle" "ivMFKit::left_mover(ivAdjustable *, ivStyle *) const"
- test_demangling "gnu: matches__C9BitStringRC10BitPatterni" \
- "BitString::matches\[(\]+(const BitPattern|BitPattern const) &, int\[)\]+ const"
- test_demangling "gnu: matches__C9SubStringRC5Regex" \
- "SubString::matches\[(\]+(const Regex|Regex const) &\[)\]+ const"
-
- test_demangling_exact "gnu: overload1arg__FSc" "overload1arg(signed char)"
- test_demangling_exact "gnu: overload1arg__FUc" "overload1arg(unsigned char)"
- test_demangling_exact "gnu: overload1arg__FUi" "overload1arg(unsigned int)"
- test_demangling_exact "gnu: overload1arg__FUl" "overload1arg(unsigned long)"
- test_demangling_exact "gnu: overload1arg__FUs" "overload1arg(unsigned short)"
- test_demangling_exact "gnu: overload1arg__Fc" "overload1arg(char)"
- test_demangling_exact "gnu: overload1arg__Fd" "overload1arg(double)"
- test_demangling_exact "gnu: overload1arg__Ff" "overload1arg(float)"
- test_demangling_exact "gnu: overload1arg__Fi" "overload1arg(int)"
- test_demangling_exact "gnu: overload1arg__Fl" "overload1arg(long)"
- test_demangling_exact "gnu: overload1arg__Fs" "overload1arg(short)"
- test_demangling_exact "gnu: overload1arg__Fv" "overload1arg(void)"
- test_demangling_exact "gnu: overloadargs__Fi" "overloadargs(int)"
- test_demangling_exact "gnu: overloadargs__Fii" "overloadargs(int, int)"
- test_demangling_exact "gnu: overloadargs__Fiii" "overloadargs(int, int, int)"
- test_demangling_exact "gnu: overloadargs__Fiiii" "overloadargs(int, int, int, int)"
-
- test_demangling_exact "gnu: overloadargs__Fiiiii" "overloadargs(int, int, int, int, int)"
- test_demangling_exact "gnu: overloadargs__Fiiiiii" "overloadargs(int, int, int, int, int, int)"
- test_demangling_exact "gnu: overloadargs__Fiiiiiii" "overloadargs(int, int, int, int, int, int, int)"
- test_demangling_exact "gnu: overloadargs__Fiiiiiiii" "overloadargs(int, int, int, int, int, int, int, int)"
- test_demangling_exact "gnu: overloadargs__Fiiiiiiiii" "overloadargs(int, int, int, int, int, int, int, int, int)"
- test_demangling_exact "gnu: overloadargs__Fiiiiiiiiii" "overloadargs(int, int, int, int, int, int, int, int, int, int)"
- test_demangling_exact "gnu: overloadargs__Fiiiiiiiiiii" "overloadargs(int, int, int, int, int, int, int, int, int, int, int)"
- test_demangling "gnu: pick__13ivCompositionP8ivCanvasRC12ivAllocationiR5ivHit" \
- "ivComposition::pick\[(\]+ivCanvas \[*\]+, (const ivAllocation|ivAllocation const) &, int, ivHit &\[)\]+"
- test_demangling "gnu: pointer__C11ivHScrollerRC7ivEventRC12ivAllocation" \
- "ivHScroller::pointer\[(\]+(const ivEvent|ivEvent const) &, (const ivAllocation|ivAllocation const) &\[)\]+ const"
- test_demangling_exact "gnu: poke__8ivRasterUlUlffff" "ivRaster::poke(unsigned long, unsigned long, float, float, float, float)"
- test_demangling_exact "gnu: polar__Fdd" "polar(double, double)"
- test_demangling "gnu: read__10osStdInputRPCc" \
- "osStdInput::read\[(\]+(const char|char const) \[*\]+&\[)\]+"
-
- test_demangling_exact "gnu: scale__13ivTransformerff" "ivTransformer::scale(float, float)"
- test_demangling "gnu: scanw__12CursesWindowPCce" \
- "CursesWindow::scanw\[(\]+(const char|char const) \[*\]+,...\[)\]+"
- test_demangling "gnu: scmp__FPCcT0" \
- "scmp\[(\]+(const char|char const) \[*\]+, (const char|char const) \[*\]+\[)\]+"
- test_demangling_exact "gnu: sgetn__7filebufPci" "filebuf::sgetn(char *, int)"
- test_demangling_exact "gnu: shift__FP5_FrepiT0" "shift(_Frep *, int, _Frep *)"
- test_demangling_exact "gnu: test__C6BitSeti" "BitSet::test(int) const"
- test_demangling_exact "gnu: test__C6BitSetii" "BitSet::test(int, int) const"
- test_demangling "gnu: testbit__FRC7Integerl" \
- "testbit\[(\]+(const Integer|Integer const) &, long\[)\]+"
- test_demangling_exact "gnu: text_source__8Documentl" "Document::text_source(long)"
- test_demangling_exact "gnu: variance__6Erlangd" "Erlang::variance(double)"
- test_demangling "gnu: vform__8iostreamPCcPc" \
- "iostream::vform\[(\]+(const char|char const) \[*\]+, char \[*\]+\[)\]+"
- test_demangling_exact "gnu: view__14DocumentViewerP8ItemViewP11TabularItem" "DocumentViewer::view(ItemView *, TabularItem *)"
- test_demangling_exact "gnu: xy_extents__11ivExtensionffff" "ivExtension::xy_extents(float, float, float, float)"
- test_demangling_exact "gnu: zero__8osMemoryPvUi" "osMemory::zero(void *, unsigned int)"
- test_demangling_exact "gnu: _2T4\$N" "T4::N"
- test_demangling_exact "gnu: _Q22T42t1\$N" "T4::t1::N"
- test_demangling_exact "gnu: get__2T1" "T1::get(void)"
- test_demangling_exact "gnu: get__Q22T11a" "T1::a::get(void)"
- test_demangling_exact "gnu: get__Q32T11a1b" "T1::a::b::get(void)"
- test_demangling_exact "gnu: get__Q42T11a1b1c" "T1::a::b::c::get(void)"
- test_demangling_exact "gnu: get__Q52T11a1b1c1d" "T1::a::b::c::d::get(void)"
- test_demangling_exact "gnu: put__2T1i" "T1::put(int)"
- test_demangling_exact "gnu: put__Q22T11ai" "T1::a::put(int)"
- test_demangling_exact "gnu: put__Q32T11a1bi" "T1::a::b::put(int)"
- test_demangling_exact "gnu: put__Q42T11a1b1ci" "T1::a::b::c::put(int)"
- test_demangling_exact "gnu: put__Q52T11a1b1c1di" "T1::a::b::c::d::put(int)"
-
- test_demangling_exact "gnu: bar__3fooPv" "foo::bar(void *)"
- test_demangling "gnu: bar__3fooPCv" \
- "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+"
- test_demangling_exact "gnu: bar__C3fooPv" "foo::bar(void *) const"
- test_demangling "gnu: bar__C3fooPCv" \
- "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+ const"
- test_demangling_exact "gnu: __eq__3fooRT0" "foo::operator==(foo &)"
- test_demangling "gnu: __eq__3fooRC3foo" \
- "foo::operator==\[(\]+(const foo|foo const) &\[)\]+"
- test_demangling_exact "gnu: __eq__C3fooR3foo" "foo::operator==(foo &) const"
- test_demangling "gnu: __eq__C3fooRT0" \
- "foo::operator==\[(\]+(const foo|foo const) &\[)\]+ const"
-
- test_demangling_exact "gnu: elem__t6vector1Zdi" "vector<double>::elem(int)"
- test_demangling_exact "gnu: elem__t6vector1Zii" "vector<int>::elem(int)"
- test_demangling_exact "gnu: __t6vector1Zdi" "vector<double>::vector(int)"
- test_demangling_exact "gnu: __t6vector1Zii" "vector<int>::vector(int)"
- test_demangling_exact "gnu: _\$_t6vector1Zdi" "vector<double>::~vector(int)"
- test_demangling_exact "gnu: _\$_t6vector1Zii" "vector<int>::~vector(int)"
-
- test_demangling_exact "gnu: __nw__t2T11ZcUi" "T1<char>::operator new(unsigned int)"
- test_demangling_exact "gnu: __nw__t2T11Z1tUi" "T1<t>::operator new(unsigned int)"
- test_demangling_exact "gnu: __dl__t2T11ZcPv" "T1<char>::operator delete(void *)"
- test_demangling_exact "gnu: __dl__t2T11Z1tPv" "T1<t>::operator delete(void *)"
- test_demangling_exact "gnu: __t2T11Zci" "T1<char>::T1(int)"
- test_demangling_exact "gnu: __t2T11Zc" "T1<char>::T1(void)"
- test_demangling_exact "gnu: __t2T11Z1ti" "T1<t>::T1(int)"
- test_demangling_exact "gnu: __t2T11Z1t" "T1<t>::T1(void)"
-
- test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity3Pix" \
- "List<VHDLEntity>::Pix::Pix(void)"
-
- test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity3PixPQ2t4List1Z10VHDLEntity7element" \
- "List<VHDLEntity>::Pix::Pix(List<VHDLEntity>::element *)"
-
- test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity3PixRCQ2t4List1Z10VHDLEntity3Pix" \
- "List<VHDLEntity>::Pix::Pix(List<VHDLEntity>::Pix const &)"
-
- test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity7elementRC10VHDLEntityPT0" \
- "List<VHDLEntity>::element::element(VHDLEntity const &, List<VHDLEntity>::element *)"
-
- test_demangling_exact "gnu: __Q2t4List1Z10VHDLEntity7elementRCQ2t4List1Z10VHDLEntity7element" \
- "List<VHDLEntity>::element::element(List<VHDLEntity>::element const &)"
-
- test_demangling_exact "gnu: __cl__C11VHDLLibraryGt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \
- "VHDLLibrary::operator()(PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> >) const"
-
- test_demangling_exact "gnu: __cl__Ct4List1Z10VHDLEntityRCQ2t4List1Z10VHDLEntity3Pix" \
- "List<VHDLEntity>::operator()(List<VHDLEntity>::Pix const &) const"
-
- test_demangling_exact "gnu: __ne__FPvRCQ2t4List1Z10VHDLEntity3Pix" \
- "operator!=(void *, List<VHDLEntity>::Pix const &)"
-
- test_demangling_exact "gnu: __ne__FPvRCt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \
- "operator!=(void *, PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> > const &)"
-
- test_demangling_exact "gnu: __t4List1Z10VHDLEntityRCt4List1Z10VHDLEntity" \
- "List<VHDLEntity>::List(List<VHDLEntity> const &)"
-
- test_demangling_exact "gnu: __t4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \
- "PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> >::PixX(void)"
-
- test_demangling_exact "gnu: __t4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntityP14VHDLLibraryRepGQ2t4List1Z10VHDLEntity3Pix" \
- "PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> >::PixX(VHDLLibraryRep *, List<VHDLEntity>::Pix)"
-
- test_demangling_exact "gnu: __t4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntityRCt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \
- "PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> >::PixX(PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> > const &)"
-
- test_demangling_exact "gnu: nextE__C11VHDLLibraryRt4PixX3Z11VHDLLibraryZ14VHDLLibraryRepZt4List1Z10VHDLEntity" \
- "VHDLLibrary::nextE(PixX<VHDLLibrary, VHDLLibraryRep, List<VHDLEntity> > &) const"
-
- test_demangling_exact "gnu: next__Ct4List1Z10VHDLEntityRQ2t4List1Z10VHDLEntity3Pix" \
- "List<VHDLEntity>::next(List<VHDLEntity>::Pix &) const"
-
- test_demangling_exact "gnu: _GLOBAL_\$D\$set" "global destructors keyed to set"
-
- test_demangling_exact "gnu: _GLOBAL_\$I\$set" "global constructors keyed to set"
-
- test_demangling_exact "gnu: __as__t5ListS1ZUiRCt5ListS1ZUi" \
- "ListS<unsigned int>::operator=(ListS<unsigned int> const &)"
-
- test_demangling_exact "gnu: __cl__Ct5ListS1ZUiRCQ2t5ListS1ZUi3Vix" \
- "ListS<unsigned int>::operator()(ListS<unsigned int>::Vix const &) const"
-
- test_demangling_exact "gnu: __cl__Ct5SetLS1ZUiRCQ2t5SetLS1ZUi3Vix" \
- "SetLS<unsigned int>::operator()(SetLS<unsigned int>::Vix const &) const"
-
- test_demangling_exact "gnu: __t10ListS_link1ZUiRCUiPT0" \
- "ListS_link<unsigned int>::ListS_link(unsigned int const &, ListS_link<unsigned int> *)"
-
- test_demangling_exact "gnu: __t10ListS_link1ZUiRCt10ListS_link1ZUi" \
- "ListS_link<unsigned int>::ListS_link(ListS_link<unsigned int> const &)"
-
- test_demangling_exact "gnu: __t5ListS1ZUiRCt5ListS1ZUi" \
- "ListS<unsigned int>::ListS(ListS<unsigned int> const &)"
-
- test_demangling_exact "gnu: next__Ct5ListS1ZUiRQ2t5ListS1ZUi3Vix" \
- "ListS<unsigned int>::next(ListS<unsigned int>::Vix &) const"
-
- test_demangling_exact "gnu: __ne__FPvRCQ2t5SetLS1ZUi3Vix" \
- "operator!=(void *, SetLS<unsigned int>::Vix const &)"
- test_demangling_exact "gnu: __t8ListElem1Z5LabelRt4List1Z5Label" \
- "ListElem<Label>::ListElem(List<Label> &)"
- test_demangling_exact "gnu: __t8BDDHookV1ZPcRCPc" \
- "BDDHookV<char *>::BDDHookV(char *const &)"
-
- test_demangling_exact "gnu: _vt\$t8BDDHookV1ZPc" "BDDHookV<char *> virtual table"
-
- test_demangling_exact "gnu: __ne__FPvRCQ211BDDFunction4VixB" \
- "operator!=(void *, BDDFunction::VixB const &)"
- test_demangling_exact "gnu: __eq__FPvRCQ211BDDFunction4VixB" \
- "operator==(void *, BDDFunction::VixB const &)"
-
- test_demangling_exact "gnu: relativeId__CQ36T_phi210T_preserve8FPC_nextRCQ26T_phi210T_preserveRC10Parameters" \
- "T_phi2::T_preserve::FPC_next::relativeId(T_phi2::T_preserve const &, Parameters const &) const"
-
- test_demangling_exact "gnu: _Utf390_1__1_9223372036854775807__9223372036854775" \
- "Can't demangle \"_Utf390_1__1_9223372036854775807__9223372036854775\""
- test_demangling_exact "gnu: foo__I40" "foo(int64_t)"
- test_demangling_exact "gnu: foo__I_200_" "foo(int512_t)"
- test_demangling_exact "gnu: foo__I_200" "Can't demangle \"foo__I_200\""
-
- ## Buffer overrun. Should make GDB crash. Woo hoo!
- test_demangling_exact "gnu: foo__I_4000000000000000000000000000000000000000000000000000000000000000000000000" "Can't demangle \"foo__I_4000000000000000000000000000000000000000000000000000000000000000000000000\""
-
- ## 1999-04-19: "Fix from Dale Hawkins". Shouldn't segfault.
- # Accept even a dubious demangling; the string is ambiguous.
- send_gdb "maintenance demangle __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator\n"
- gdb_expect {
- -re "virtual function thunk \\(delta:-64\\) for CosNaming::_proxy_NamingContext::_0RL__list\\(unsigned long, _CORBA_Unbounded_Sequence<CosNaming::Binding> \\*\\&, CosNaming::BindingIterator \\*\\&\\)\r\n$gdb_prompt $" {
- pass "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator"
- }
- -re ".*Can't demangle \"__thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator\"\r\n$gdb_prompt $" {
- pass "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator"
- }
- -re ".*$gdb_prompt $" {
- fail "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator"
- }
- timeout {
- fail "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator (timeout)"
- }
- }
-}
-
-#
-# Test lucid style name demangling
-#
-
-proc test_lucid_style_demangling {} {
- test_demangling_exact "lucid: WS__FR7istream" "WS(istream &)"
- test_demangling_exact "lucid: __aa__3fooFR3foo" "foo::operator&&(foo &)"
- test_demangling_exact "lucid: __aad__3fooFR3foo" "foo::operator&=(foo &)"
- test_demangling_exact "lucid: __ad__3fooFR3foo" "foo::operator&(foo &)"
- test_demangling_exact "lucid: __adv__3fooFR3foo" "foo::operator/=(foo &)"
- test_demangling_exact "lucid: __adv__7complexF7complex" "complex::operator/=(complex)"
- test_demangling_exact "lucid: __aer__3fooFR3foo" "foo::operator^=(foo &)"
- test_demangling_exact "lucid: __als__3fooFR3foo" "foo::operator<<=(foo &)"
- test_demangling_exact "lucid: __amd__3fooFR3foo" "foo::operator%=(foo &)"
- test_demangling_exact "lucid: __ami__3fooFR3foo" "foo::operator-=(foo &)"
- test_demangling_exact "lucid: __amu__3fooFR3foo" "foo::operator*=(foo &)"
- test_demangling_exact "lucid: __amu__7complexF7complex" "complex::operator*=(complex)"
- test_demangling_exact "lucid: __aor__3fooFR3foo" "foo::operator|=(foo &)"
- test_demangling_exact "lucid: __apl__3fooFR3foo" "foo::operator+=(foo &)"
- test_demangling_exact "lucid: __ars__3fooFR3foo" "foo::operator>>=(foo &)"
- test_demangling_exact "lucid: __as__18istream_withassignFP9streambuf" "istream_withassign::operator=(streambuf *)"
- test_demangling_exact "lucid: __as__18istream_withassignFR7istream" "istream_withassign::operator=(istream &)"
- test_demangling_exact "lucid: __as__3fooFR3foo" "foo::operator=(foo &)"
- test_demangling_exact "lucid: __as__3iosFR3ios" "ios::operator=(ios &)"
- test_demangling_exact "lucid: __cl__3fooFR3foo" "foo::operator()(foo &)"
- test_demangling_exact "lucid: __cm__3fooFR3foo" "foo::operator, (foo &)"
-
- test_demangling_exact "lucid: __co__3fooFv" "foo::operator~(void)"
- test_demangling_exact "lucid: __ct__10istrstreamFPc" "istrstream::istrstream(char *)"
- test_demangling_exact "lucid: __ct__10istrstreamFPci" "istrstream::istrstream(char *, int)"
- test_demangling_exact "lucid: __ct__10ostrstreamFPciT2" "ostrstream::ostrstream(char *, int, int)"
- test_demangling_exact "lucid: __ct__10ostrstreamFv" "ostrstream::ostrstream(void)"
- test_demangling_exact "lucid: __ct__10smanip_intFPFR3iosi_R3iosi" "smanip_int::smanip_int(ios &(*)(ios &, int), int)"
- test_demangling "lucid: __ct__11c_exceptionFPcRC7complexT2" "c_exception::c_exception\[(\]+char \[*\]+, (const complex|complex const) &, (const complex|complex const) &\[)\]+"
- test_demangling "lucid: __ct__11fstreambaseFPCciT2" "fstreambase::fstreambase\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
- test_demangling_exact "lucid: __ct__11fstreambaseFi" "fstreambase::fstreambase(int)"
- test_demangling_exact "lucid: __ct__11fstreambaseFiPcT1" "fstreambase::fstreambase(int, char *, int)"
- test_demangling_exact "lucid: __ct__11fstreambaseFv" "fstreambase::fstreambase(void)"
- test_demangling_exact "lucid: __ct__11smanip_longFPFR3iosl_R3iosl" "smanip_long::smanip_long(ios &(*)(ios &, long), long)"
- test_demangling_exact "lucid: __ct__11stdiostreamFP4FILE" "stdiostream::stdiostream(FILE *)"
- test_demangling_exact "lucid: __ct__12strstreambufFPFl_PvPFPv_v" "strstreambuf::strstreambuf(void *(*)(long), void (*)(void *))"
- test_demangling_exact "lucid: __ct__12strstreambufFPUciT1" "strstreambuf::strstreambuf(unsigned char *, int, unsigned char *)"
- test_demangling_exact "lucid: __ct__12strstreambufFPciT1" "strstreambuf::strstreambuf(char *, int, char *)"
- test_demangling_exact "lucid: __ct__12strstreambufFi" "strstreambuf::strstreambuf(int)"
- test_demangling_exact "lucid: __ct__12strstreambufFv" "strstreambuf::strstreambuf(void)"
- test_demangling_exact "lucid: __ct__13strstreambaseFPciT1" "strstreambase::strstreambase(char *, int, char *)"
- test_demangling_exact "lucid: __ct__3fooFR3foo" "foo::foo(foo &)"
-
- test_demangling_exact "lucid: __ct__3fooFi" "foo::foo(int)"
- test_demangling_exact "lucid: __ct__3fooFiN31" "foo::foo(int, int, int, int)"
- test_demangling "lucid: __ct__3fooFiPCc" \
- "foo::foo\[(\]+int, (const char|char const) \[*\]+\[)\]+"
- test_demangling_exact "lucid: __ct__3fooFiR3fooT1T2T1T2" "foo::foo(int, foo &, int, foo &, int, foo &)"
- test_demangling_exact "lucid: __ct__3iosFP9streambuf" "ios::ios(streambuf *)"
- test_demangling_exact "lucid: __ct__7filebufFiPcT1" "filebuf::filebuf(int, char *, int)"
- test_demangling "lucid: __ct__7fstreamFPCciT2" \
- "fstream::fstream\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
- test_demangling_exact "lucid: __ct__7fstreamFiPcT1" "fstream::fstream(int, char *, int)"
- test_demangling_exact "lucid: __ct__7istreamFP9streambuf" "istream::istream(streambuf *)"
- test_demangling_exact "lucid: __ct__7istreamFP9streambufiP7ostream" "istream::istream(streambuf *, int, ostream *)"
- test_demangling_exact "lucid: __ct__7istreamFiPcT1" "istream::istream(int, char *, int)"
- test_demangling_exact "lucid: __ct__7istreamFiT1P7ostream" "istream::istream(int, int, ostream *)"
- test_demangling_exact "lucid: __ct__7ostreamFP9streambuf" "ostream::ostream(streambuf *)"
- test_demangling_exact "lucid: __ct__7ostreamFiPc" "ostream::ostream(int, char *)"
- test_demangling "lucid: __ct__8ifstreamFPCciT2" \
- "ifstream::ifstream\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
- test_demangling_exact "lucid: __ct__8ifstreamFiPcT1" "ifstream::ifstream(int, char *, int)"
-
- test_demangling_exact "lucid: __ct__Q23foo3barFv" "foo::bar::bar(void)"
- test_demangling_exact "lucid: __ct__Q33foo3bar4bellFv" "foo::bar::bell::bell(void)"
- test_demangling_exact "lucid: __dl__3fooSFPv" "foo::operator delete(void *) static"
- test_demangling_exact "lucid: __dl__FPv" "operator delete(void *)"
- test_demangling_exact "lucid: __dt__10istrstreamFv" "istrstream::~istrstream(void)"
-
- test_demangling_exact "lucid: __dt__Q23foo3barFv" "foo::bar::~bar(void)"
- test_demangling_exact "lucid: __dt__Q33foo3bar4bellFv" "foo::bar::bell::~bell(void)"
- test_demangling_exact "lucid: __dv__3fooFR3foo" "foo::operator/(foo &)"
- test_demangling_exact "lucid: __dv__F7complexT1" "operator/(complex, complex)"
- test_demangling_exact "lucid: __eq__3fooFR3foo" "foo::operator==(foo &)"
- test_demangling_exact "lucid: __er__3fooFR3foo" "foo::operator^(foo &)"
- test_demangling_exact "lucid: __ge__3fooFR3foo" "foo::operator>=(foo &)"
- test_demangling_exact "lucid: __gt__3fooFR3foo" "foo::operator>(foo &)"
- test_demangling_exact "lucid: __le__3fooFR3foo" "foo::operator<=(foo &)"
- test_demangling_exact "lucid: __ls__3fooFR3foo" "foo::operator<<(foo &)"
- test_demangling_exact "lucid: __ls__7ostreamFP9streambuf" "ostream::operator<<(streambuf *)"
-
- test_demangling "lucid: __ls__7ostreamFPCc" \
- "ostream::operator<<\[(\]+(const char|char const) \[*\]+\[)\]+"
- test_demangling_exact "lucid: __ls__7ostreamFPFR3ios_R3ios" "ostream::operator<<(ios &(*)(ios &))"
- test_demangling_exact "lucid: __ls__7ostreamFPv" "ostream::operator<<(void *)"
- test_demangling_exact "lucid: __ls__7ostreamFUi" "ostream::operator<<(unsigned int)"
- test_demangling_exact "lucid: __ls__7ostreamFUl" "ostream::operator<<(unsigned long)"
- test_demangling_exact "lucid: __ls__7ostreamFd" "ostream::operator<<(double)"
- test_demangling_exact "lucid: __ls__7ostreamFf" "ostream::operator<<(float)"
- test_demangling_exact "lucid: __ls__7ostreamFi" "ostream::operator<<(int)"
- test_demangling_exact "lucid: __ls__7ostreamFl" "ostream::operator<<(long)"
- test_demangling_exact "lucid: __ls__FR7ostream7complex" "operator<<(ostream &, complex)"
- test_demangling_exact "lucid: __lt__3fooFR3foo" "foo::operator<(foo &)"
- test_demangling_exact "lucid: __md__3fooFR3foo" "foo::operator%(foo &)"
- test_demangling_exact "lucid: __mi__3fooFR3foo" "foo::operator-(foo &)"
- test_demangling_exact "lucid: __ml__3fooFR3foo" "foo::operator*(foo &)"
- test_demangling_exact "lucid: __ml__F7complexT1" "operator*(complex, complex)"
- test_demangling_exact "lucid: __mm__3fooFi" "foo::operator--(int)"
- test_demangling_exact "lucid: __ne__3fooFR3foo" "foo::operator!=(foo &)"
- test_demangling_exact "lucid: __nt__3fooFv" "foo::operator!(void)"
- test_demangling_exact "lucid: __nw__3fooSFi" "foo::operator new(int) static"
- test_demangling_exact "lucid: __nw__FUi" "operator new(unsigned int)"
- test_demangling_exact "lucid: __nw__FUiPv" "operator new(unsigned int, void *)"
- test_demangling_exact "lucid: __oo__3fooFR3foo" "foo::operator||(foo &)"
- test_demangling_exact "lucid: __opPc__3fooFv" "foo::operator char *(void)"
- test_demangling_exact "lucid: __opi__3fooFv" "foo::operator int(void)"
- test_demangling_exact "lucid: __or__3fooFR3foo" "foo::operator|(foo &)"
-
- test_demangling_exact "lucid: __pl__3fooFR3foo" "foo::operator+(foo &)"
- test_demangling_exact "lucid: __pp__3fooFi" "foo::operator++(int)"
- test_demangling_exact "lucid: __pt__3fooFv" "foo::operator->(void)"
- test_demangling_exact "lucid: __rm__3fooFR3foo" "foo::operator->*(foo &)"
- test_demangling_exact "lucid: __rs__3fooFR3foo" "foo::operator>>(foo &)"
- test_demangling_exact "lucid: __rs__7istreamFP9streambuf" "istream::operator>>(streambuf *)"
- test_demangling_exact "lucid: __rs__7istreamFPFR3ios_R3ios" "istream::operator>>(ios &(*)(ios &))"
- test_demangling_exact "lucid: __rs__7istreamFPFR7istream_R7istream" "istream::operator>>(istream &(*)(istream &))"
- test_demangling_exact "lucid: __rs__7istreamFPUc" "istream::operator>>(unsigned char *)"
- test_demangling_exact "lucid: __rs__7istreamFPc" "istream::operator>>(char *)"
- test_demangling_exact "lucid: __rs__7istreamFRUi" "istream::operator>>(unsigned int &)"
- test_demangling_exact "lucid: __rs__7istreamFRUl" "istream::operator>>(unsigned long &)"
- test_demangling_exact "lucid: __rs__7istreamFRUs" "istream::operator>>(unsigned short &)"
- test_demangling_exact "lucid: __rs__7istreamFRd" "istream::operator>>(double &)"
- test_demangling_exact "lucid: __rs__7istreamFRf" "istream::operator>>(float &)"
- test_demangling_exact "lucid: __rs__7istreamFRi" "istream::operator>>(int &)"
- test_demangling_exact "lucid: __rs__7istreamFRl" "istream::operator>>(long &)"
- test_demangling_exact "lucid: __rs__7istreamFRs" "istream::operator>>(short &)"
- test_demangling_exact "lucid: __rs__FR7istreamR7complex" "operator>>(istream &, complex &)"
- test_demangling "lucid: __vc__3fooFR3foo" "foo::operator\\\[\\\]\\(foo &\\)"
- test_demangling_exact "lucid: __vtbl__10istrstream" "istrstream virtual table"
- test_demangling_exact "lucid: __vtbl__17ostream__iostream__19iostream_withassign" "iostream_withassign::ostream__iostream virtual table"
-
- test_demangling_exact "lucid: __vtbl__3ios" "ios virtual table"
- test_demangling_exact "lucid: __vtbl__3ios__13strstreambase" "strstreambase::ios virtual table"
-
- # GDB 930414 demangles this as t_cc_main_ (obviously wrong).
- # GDB 930701 gets into an infinite loop.
- # GDB 930727 says "Can't demangle".
- # What is the correct demangling? FIXME.
-
- # NOTE: carlton/2003-01-17: No, don't FIXME, just obsolete lucid.
- # I'm KFAILing this rather than deleting it for form's sake.
- setup_kfail "gdb/945" "*-*-*"
- test_demangling_exact "lucid: __vtbl__3foo__vt_cc_main_" ""
-
- test_demangling_exact "lucid: abs__F7complex" "abs(complex)"
- test_demangling_exact "lucid: allocate__9streambufFv" "streambuf::allocate(void)"
- test_demangling_exact "lucid: attach__11fstreambaseFi" "fstreambase::attach(int)"
- test_demangling_exact "lucid: bitalloc__3iosSFv" "ios::bitalloc(void) static"
- test_demangling_exact "lucid: chr__FiT1" "chr(int, int)"
- test_demangling_exact "lucid: complex_error__FR11c_exception" "complex_error(c_exception &)"
- test_demangling_exact "lucid: complexfunc2__FPFPc_i" "complexfunc2(int (*)(char *))"
- test_demangling_exact "lucid: complexfunc3__FPFPFPl_s_i" "complexfunc3(int (*)(short (*)(long *)))"
-
- test_demangling_exact "lucid: complexfunc4__FPFPFPc_s_i" "complexfunc4(int (*)(short (*)(char *)))"
- test_demangling_exact "lucid: complexfunc5__FPFPc_PFl_i" "complexfunc5(int (*(*)(char *))(long))"
- test_demangling_exact "lucid: complexfunc6__FPFPi_PFl_i" "complexfunc6(int (*(*)(int *))(long))"
- test_demangling_exact "lucid: complexfunc7__FPFPFPc_i_PFl_i" "complexfunc7(int (*(*)(int (*)(char *)))(long))"
- test_demangling_exact "lucid: complicated_put__7ostreamFc" "ostream::complicated_put(char)"
- test_demangling_exact "lucid: conv10__FlPc" "conv10(long, char *)"
- test_demangling_exact "lucid: conv16__FUlPc" "conv16(unsigned long, char *)"
- test_demangling_exact "lucid: dec__FR3ios" "dec(ios &)"
- test_demangling_exact "lucid: dec__Fli" "dec(long, int)"
- test_demangling_exact "lucid: dofield__FP7ostreamPciT2T3" "dofield(ostream *, char *, int, char *, int)"
-
- test_demangling_exact "lucid: flags__3iosFl" "ios::flags(long)"
- test_demangling_exact "lucid: flags__3iosFv" "ios::flags(void)"
- test_demangling_exact "lucid: foo__FiN31" "foo(int, int, int, int)"
- test_demangling_exact "lucid: foo__FiR3fooT1T2T1T2" "foo(int, foo &, int, foo &, int, foo &)"
- test_demangling_exact "lucid: foo___3barFl" "bar::foo_(long)"
- test_demangling "lucid: form__FPCce" "form\[(\]+(const char|char const) \[*\]+,...\[)\]+"
- test_demangling_exact "lucid: get__7istreamFPcic" "istream::get(char *, int, char)"
- test_demangling_exact "lucid: get__7istreamFR9streambufc" "istream::get(streambuf &, char)"
- test_demangling_exact "lucid: get_complicated__7istreamFRUc" "istream::get_complicated(unsigned char &)"
- test_demangling_exact "lucid: get_complicated__7istreamFRc" "istream::get_complicated(char &)"
- test_demangling_exact "lucid: getline__7istreamFPUcic" "istream::getline(unsigned char *, int, char)"
- test_demangling_exact "lucid: getline__7istreamFPcic" "istream::getline(char *, int, char)"
-
- test_demangling_exact "lucid: ignore__7istreamFiT1" "istream::ignore(int, int)"
- test_demangling_exact "lucid: init__12strstreambufFPciT1" "strstreambuf::init(char *, int, char *)"
- test_demangling_exact "lucid: init__3iosFP9streambuf" "ios::init(streambuf *)"
- test_demangling_exact "lucid: initcount__13Iostream_init" "Iostream_init::initcount"
- test_demangling_exact "lucid: ipfx__7istreamFi" "istream::ipfx(int)"
- test_demangling_exact "lucid: ls_complicated__7ostreamFUc" "ostream::ls_complicated(unsigned char)"
- test_demangling_exact "lucid: ls_complicated__7ostreamFc" "ostream::ls_complicated(char)"
- test_demangling "lucid: open__11fstreambaseFPCciT2" \
- "fstreambase::open\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
- test_demangling "lucid: open__7filebufFPCciT2" \
- "filebuf::open\[(\]+(const char|char const) \[*\]+, int, int\[)\]+"
-
- test_demangling_exact "lucid: overload1arg__FSc" "overload1arg(signed char)"
- test_demangling_exact "lucid: overload1arg__FUc" "overload1arg(unsigned char)"
- test_demangling_exact "lucid: overload1arg__FUi" "overload1arg(unsigned int)"
- test_demangling_exact "lucid: overload1arg__FUl" "overload1arg(unsigned long)"
- test_demangling_exact "lucid: overload1arg__FUs" "overload1arg(unsigned short)"
- test_demangling_exact "lucid: overload1arg__Fc" "overload1arg(char)"
- test_demangling_exact "lucid: overload1arg__Fd" "overload1arg(double)"
- test_demangling_exact "lucid: overload1arg__Ff" "overload1arg(float)"
- test_demangling_exact "lucid: overload1arg__Fi" "overload1arg(int)"
- test_demangling_exact "lucid: overload1arg__Fl" "overload1arg(long)"
- test_demangling_exact "lucid: overload1arg__Fs" "overload1arg(short)"
- test_demangling_exact "lucid: overload1arg__Fv" "overload1arg(void)"
- test_demangling_exact "lucid: overloadargs__FiN21" "overloadargs(int, int, int)"
- test_demangling_exact "lucid: overloadargs__FiN31" "overloadargs(int, int, int, int)"
- test_demangling_exact "lucid: overloadargs__FiN41" "overloadargs(int, int, int, int, int)"
- test_demangling_exact "lucid: overloadargs__FiN51" "overloadargs(int, int, int, int, int, int)"
- test_demangling_exact "lucid: overloadargs__FiN61" "overloadargs(int, int, int, int, int, int, int)"
-
- test_demangling_exact "lucid: overloadargs__FiN71" "overloadargs(int, int, int, int, int, int, int, int)"
- test_demangling_exact "lucid: overloadargs__FiN81" "overloadargs(int, int, int, int, int, int, int, int, int)"
- test_demangling_exact "lucid: overloadargs__FiN91" "overloadargs(int, int, int, int, int, int, int, int, int, int)"
- test_demangling_exact "lucid: overloadargs__FiN91N11" "overloadargs(int, int, int, int, int, int, int, int, int, int, int)"
- test_demangling_exact "lucid: overloadargs__FiT1" "overloadargs(int, int)"
- test_demangling_exact "lucid: polar__FdT1" "polar(double, double)"
- test_demangling_exact "lucid: pow__F7complexT1" "pow(complex, complex)"
- test_demangling_exact "lucid: pow__F7complexd" "pow(complex, double)"
- test_demangling_exact "lucid: pow__F7complexi" "pow(complex, int)"
- test_demangling_exact "lucid: pow__Fd7complex" "pow(double, complex)"
- test_demangling_exact "lucid: pstart__FPciT2" "pstart(char *, int, int)"
- test_demangling_exact "lucid: put__7ostreamFc" "ostream::put(char)"
-
- test_demangling_exact "lucid: read__7istreamFPci" "istream::read(char *, int)"
- test_demangling_exact "lucid: resetiosflags__FR3iosl" "resetiosflags(ios &, long)"
- test_demangling_exact "lucid: restore_errno__FRi" "restore_errno(int &)"
- test_demangling_exact "lucid: rs_complicated__7istreamFRUc" "istream::rs_complicated(unsigned char &)"
- test_demangling_exact "lucid: rs_complicated__7istreamFRc" "istream::rs_complicated(char &)"
- test_demangling_exact "lucid: seekg__7istreamFl8seek_dir" "istream::seekg(long, seek_dir)"
- test_demangling_exact "lucid: seekoff__12strstreambufFl8seek_diri" "strstreambuf::seekoff(long, seek_dir, int)"
- test_demangling_exact "lucid: seekoff__9streambufFlQ2_3ios12ios_seek_diri" "streambuf::seekoff(long, ios::ios_seek_dir, int)"
- test_demangling_exact "lucid: seekpos__9streambufFli" "streambuf::seekpos(long, int)"
- test_demangling_exact "lucid: set_new_handler__FPFv_v" "set_new_handler(void (*)(void))"
- test_demangling_exact "lucid: setb__9streambufFPcT1i" "streambuf::setb(char *, char *, int)"
-
- test_demangling_exact "lucid: setb__FR3iosi" "setb(ios &, int)"
- test_demangling_exact "lucid: setbuf__11fstreambaseFPci" "fstreambase::setbuf(char *, int)"
- test_demangling_exact "lucid: setbuf__9streambufFPUci" "streambuf::setbuf(unsigned char *, int)"
- test_demangling_exact "lucid: setbuf__9streambufFPciT2" "streambuf::setbuf(char *, int, int)"
- test_demangling_exact "lucid: setf__3iosFlT1" "ios::setf(long, long)"
- test_demangling_exact "lucid: setfill__FR3iosi" "setfill(ios &, int)"
- test_demangling_exact "lucid: setg__9streambufFPcN21" "streambuf::setg(char *, char *, char *)"
- test_demangling_exact "lucid: setp__9streambufFPcT1" "streambuf::setp(char *, char *)"
-
- test_demangling "lucid: sputn__9streambufFPCci" \
- "streambuf::sputn\[(\]+(const char|char const) \[*\]+, int\[)\]+"
- test_demangling "lucid: str__FPCci" \
- "str\[(\]+(const char|char const) \[*\]+, int\[)\]+"
- test_demangling_exact "lucid: tie__3iosFP7ostream" "ios::tie(ostream *)"
- test_demangling_exact "lucid: uconv10__FUlPc" "uconv10(unsigned long, char *)"
-
- test_demangling "lucid: write__7ostreamFPCci" \
- "ostream::write\[(\]+(const char|char const) \[*\]+, int\[)\]+"
- test_demangling_exact "lucid: xget__7istreamFPc" "istream::xget(char *)"
- test_demangling_exact "lucid: xsgetn__9streambufFPci" "streambuf::xsgetn(char *, int)"
- test_demangling "lucid: xsputn__9streambufFPCci" \
- "streambuf::xsputn\[(\]+(const char|char const) \[*\]+, int\[)\]+"
-
- test_demangling_exact "lucid: _Utf390_1__1_9223372036854775807__9223372036854775" \
- "Can't demangle \"_Utf390_1__1_9223372036854775807__9223372036854775\""
-}
-
-#
-# Test arm style name demangling
-#
-
-proc test_arm_style_demangling {} {
- test_demangling_exact "arm: __dt__21T5__pt__11_PFiPPdPv_iFv" "T5<int (*)(int, double **, void *)>::~T5(void)"
-
- test_demangling_exact "arm: __ct__1cFi" "c::c(int)"
-
- test_demangling_exact "arm: __dt__11T5__pt__2_iFv" "T5<int>::~T5(void)"
-
- test_demangling_exact "arm: __dt__11T5__pt__2_cFv" "T5<char>::~T5(void)"
-
- test_demangling_exact "arm: __ct__2T2Fi" "T2::T2(int)"
- test_demangling_exact "arm: __dt__2T1Fv" "T1::~T1(void)"
-
- test_demangling_exact "arm: __dt__12T5__pt__3_1xFv" "T5<x>::~T5(void)"
-
- test_demangling_exact "arm: __dt__17T5__pt__8_PFcPv_iFv" "T5<int (*)(char, void *)>::~T5(void)"
-
- test_demangling "arm: g__FP1cPC1cT1" \
- "g\[(\]+c *\[*\]+, (const c|c const) *\[*\]+, c *\[*\]+\[)\]+"
- test_demangling "arm: g__FPUlPCUlT1" \
- "g\[(\]+unsigned long \[*\]+, (const unsigned long|unsigned long const) \[*\]+, unsigned long \[*\]+\[)\]+"
- test_demangling "arm: g__FPUiPCUiT1" \
- "g\[(\]+unsigned int \[*\]+, (const unsigned int|unsigned int const) \[*\]+, unsigned int \[*\]+\[)\]+"
- test_demangling "arm: g__FPUsPCUsT1" \
- "g\[(\]+unsigned short \[*\]+, (const unsigned short|unsigned short const) \[*\]+, unsigned short \[*\]+\[)\]+"
- test_demangling "arm: g__FPUcPCUcT1" \
- "g\[(\]+unsigned char \[*\]+, (const unsigned char|unsigned char const) \[*\]+, unsigned char \[*\]+\[)\]+"
- test_demangling "arm: g__F1TPlPClT2" \
- "g\[(\]+T, long \[*\]+, (const long|long const) \[*\]+, long \[*\]+\[)\]+"
- test_demangling "arm: g__F1RRlRClT2" \
- "g\[(\]+R, long &, (const long|long const) &, long &\[)\]+"
- test_demangling "arm: g__F1TPiPCiT2" \
- "g\[(\]+T, int \[*\]+, (const int|int const) \[*\]+, int \[*\]+\[)\]+"
- test_demangling "arm: g__F1RRiRCiT2" \
- "g\[(\]+R, int &, (const int|int const) &, int &\[)\]+"
- test_demangling "arm: g__F1TPsPCsT2" \
- "g\[(\]+T, short \[*\]+, (const short|short const) \[*\]+, short \[*\]+\[)\]+"
- test_demangling "arm: g__F1RRsRCsT2" \
- "g\[(\]+R, short &, (const short|short const) &, short &\[)\]+"
- test_demangling "arm: g__F1TPcPCcT2" \
- "g\[(\]+T, char \[*\]+, (const char|char const) \[*\]+, char \[*\]+\[)\]+"
- test_demangling "arm: g__F1RRcRCcT2" \
- "g\[(\]+R, char &, (const char|char const) &, char &\[)\]+"
-
- test_demangling_exact "arm: __ct__21T5__pt__11_PFiPPdPv_iFi" "T5<int (*)(int, double **, void *)>::T5(int)"
-
- test_demangling "arm: __gt__FRC2T2c" \
- "operator>\[(\]+(const T2|T2 const) &, char\[)\]+"
- test_demangling "arm: __ge__FRC2T2c" \
- "operator>=\[(\]+(const T2|T2 const) &, char\[)\]+"
- test_demangling "arm: __lt__FRC2T2c" \
- "operator<\[(\]+(const T2|T2 const) &, char\[)\]+"
-
- test_demangling "arm: __le__FRC2T2c" \
- "operator<=\[(\]+(const T2|T2 const) &, char\[)\]+"
- test_demangling "arm: __ne__FRC2T2c" \
- "operator!=\[(\]+(const T2|T2 const) &, char\[)\]+"
- test_demangling "arm: __eq__FRC2T2c" \
- "operator==\[(\]+(const T2|T2 const) &, char\[)\]+"
- test_demangling_exact "arm: __amd__FR2T2i" "operator%=(T2 &, int)"
- test_demangling_exact "arm: __adv__FR2T2i" "operator/=(T2 &, int)"
- test_demangling_exact "arm: __amu__FR2T2i" "operator*=(T2 &, int)"
- test_demangling_exact "arm: __ami__FR2T2i" "operator-=(T2 &, int)"
- test_demangling_exact "arm: __apl__FR2T2i" "operator+=(T2 &, int)"
- test_demangling_exact "arm: __nw__2T1SFUi" "T1::operator new(unsigned int) static"
- test_demangling_exact "arm: __dl__2T1SFPv" "T1::operator delete(void *) static"
- test_demangling_exact "arm: put__2T7SFi" "T7::put(int) static"
-
- test_demangling_exact "arm: __dl__12T5__pt__3_1xSFPv" "T5<x>::operator delete(void *) static"
-
- test_demangling_exact "arm: h__FUc" "h(unsigned char)"
- test_demangling_exact "arm: f__Fic" "f(int, char)"
- test_demangling_exact "arm: h__FUi" "h(unsigned int)"
- test_demangling_exact "arm: h__Fci" "h(char, int)"
- test_demangling_exact "arm: h__FUl" "h(unsigned long)"
- test_demangling_exact "arm: h__Fcl" "h(char, long)"
- test_demangling_exact "arm: h__FUs" "h(unsigned short)"
- test_demangling_exact "arm: h__Fcs" "h(char, short)"
- test_demangling "arm: __amd__FR2T2RC2T2" \
- "operator%=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __adv__FR2T2RC2T2" \
- "operator/=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __amu__FR2T2RC2T2" \
- "operator\[*\]+=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __ami__FR2T2RC2T2" \
- "operator-=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __apl__FR2T2RC2T2" \
- "operator\[+\]+=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
-
- test_demangling "arm: g__F1SRPUlRPCUlT2" \
- "g\[(\]+S, unsigned long \[*\]+&, (const unsigned long|unsigned long const) \[*\]+&, unsigned long \[*\]+&\[)\]+"
- test_demangling "arm: g__F1SRPUiRPCUiT2" \
- "g\[(\]+S, unsigned int \[*\]+&, (const unsigned int|unsigned int const) \[*\]+&, unsigned int \[*\]+&\[)\]+"
- test_demangling "arm: g__F1SRPUsRPCUsT2" \
- "g\[(\]+S, unsigned short \[*\]+&, (const unsigned short|unsigned short const) \[*\]+&, unsigned short \[*\]+&\[)\]+"
- test_demangling "arm: g__F1SRPUcRPCUcT2" \
- "g\[(\]+S, unsigned char \[*\]+&, (const unsigned char|unsigned char const) \[*\]+&, unsigned char \[*\]+&\[)\]+"
- test_demangling "arm: g__F1T1SRPlRPClT3" \
- "g\[(\]+T, S, long \[*\]+&, (const long|long const) \[*\]+&, long \[*\]+&\[)\]+"
- test_demangling "arm: g__F1T1SRPiRPCiT3" \
- "g\[(\]+T, S, int \[*\]+&, (const int|int const) \[*\]+&, int \[*\]+&\[)\]+"
- test_demangling "arm: g__F1T1SRPcRPCcT3" \
- "g\[(\]+T, S, char \[*\]+&, (const char|char const) \[*\]+&, char \[*\]+&\[)\]+"
-
- test_demangling_exact "arm: X__12T5__pt__3_1x" "T5<x>::X"
-
- test_demangling_exact "arm: __ct__11T5__pt__2_iFi" "T5<int>::T5(int)"
-
- test_demangling_exact "arm: __ct__11T5__pt__2_cFi" "T5<char>::T5(int)"
-
- test_demangling "arm: __gt__FRC2T2T1" \
- "operator>\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __ge__FRC2T2T1" \
- "operator>=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __lt__FRC2T2T1" \
- "operator<\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __le__FRC2T2T1" \
- "operator<=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __ne__FRC2T2T1" \
- "operator!=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __eq__FRC2T2T1" \
- "operator==\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "arm: g__FcR1cRC1cT2" \
- "g\[(\]+char, c &, (const c|c const) &, c &\[)\]+"
- test_demangling "arm: g__FcRPdRPCdT2" \
- "g\[(\]+char, double *\[*\]+&, (const double|double const) *\[*\]+&, double *\[*\]+&\[)\]+"
- test_demangling "arm: g__FcRPfRPCfT2" \
- "g\[(\]+char, float *\[*\]+&, (const float|float const) *\[*\]+&, float *\[*\]+&\[)\]+"
- test_demangling_exact "arm: h__FcT1" "h(char, char)"
- test_demangling_exact "arm: f__Ficd" "f(int, char, double)"
- test_demangling "arm: g__F1T1SdRPsRPCsT4" \
- "g\[(\]+T, S, double, short \[*\]+&, (const short|short const) \[*\]+&, short \[*\]+&\[)\]+"
- test_demangling "arm: g__F1cC1cT1" \
- "g\[(\]+c, (const c|c const), c\[)\]+"
- test_demangling "arm: g__FPdPCdT1" \
- "g\[(\]+double *\[*\]+, (const double|double const) *\[*\]+, double *\[*\]+\[)\]+"
- test_demangling "arm: g__FPfPCfT1" \
- "g\[(\]+float *\[*\]+, (const float|float const) *\[*\]+, float *\[*\]+\[)\]+"
-
- test_demangling "arm: g__FUlCUlT1" \
- "g\[(\]+unsigned long, (const unsigned long|unsigned long const), unsigned long\[)\]+"
- test_demangling "arm: g__FPlPClT1" \
- "g\[(\]+long \[*\]+, (const long|long const) \[*\]+, long \[*\]+\[)\]+"
- test_demangling "arm: g__FUiCUiT1" \
- "g\[(\]+unsigned int, (const unsigned int|unsigned int const), unsigned int\[)\]+"
- test_demangling "arm: g__FPiPCiT1" \
- "g\[(\]+int \[*\]+, (const int|int const) \[*\]+, int \[*\]+\[)\]+"
- test_demangling "arm: g__FUsCUsT1" \
- "g\[(\]+unsigned short, (const unsigned short|unsigned short const), unsigned short\[)\]+"
- test_demangling "arm: g__FPsPCsT1" \
- "g\[(\]+short \[*\]+, (const short|short const) \[*\]+, short \[*\]+\[)\]+"
- test_demangling "arm: g__FUcCUcT1" \
- "g\[(\]+unsigned char, (const unsigned char|unsigned char const), unsigned char\[)\]+"
- test_demangling "arm: g__FPcPCcT1" \
- "g\[(\]+char \[*\]+, (const char|char const) \[*\]+, char \[*\]+\[)\]+"
- test_demangling "arm: g__F1TlClT2" \
- "g\[(\]+T, long, (const long|long const), long\[)\]+"
- test_demangling "arm: g__F1TiCiT2" \
- "g\[(\]+T, int, (const int|int const), int\[)\]+"
- test_demangling "arm: g__F1TsCsT2" \
- "g\[(\]+T, short, (const short|short const), short\[)\]+"
- test_demangling "arm: g__F1TcCcT2" \
- "g\[(\]+T, char, (const char|char const), char\[)\]+"
-
- test_demangling_exact "arm: __dl__17T5__pt__8_PFcPv_iSFPv" "T5<int (*)(char, void *)>::operator delete(void *) static"
-
- test_demangling "arm: printf__FPCce" \
- "printf\[(\]+(const char|char const) \[*\]+,...\[)\]+"
-
- test_demangling_exact "arm: X__17T5__pt__8_PFcPv_i" "T5<int (*)(char, void *)>::X"
-
- test_demangling_exact "arm: __ct__12T5__pt__3_1xFi" "T5<x>::T5(int)"
-
- test_demangling "arm: g__F1SRUlRCUlT2" \
- "g\[(\]+S, unsigned long &, (const unsigned long|unsigned long const) &, unsigned long &\[)\]+"
- test_demangling "arm: g__F1SRPlRPClT2" \
- "g\[(\]+S, long \[*\]+&, (const long|long const) \[*\]+&, long \[*\]+&\[)\]+"
- test_demangling "arm: g__F1RRUiRCUiT2" \
- "g\[(\]+R, unsigned int &, (const unsigned int|unsigned int const) &, unsigned int &\[)\]+"
- test_demangling "arm: g__F1SRPiRPCiT2" \
- "g\[(\]+S, int \[*\]+&, (const int|int const) \[*\]+&, int \[*\]+&\[)\]+"
- test_demangling "arm: g__F1RRUsRCUsT2" \
- "g\[(\]+R, unsigned short &, (const unsigned short|unsigned short const) &, unsigned short &\[)\]+"
- test_demangling "arm: g__F1SRPsRPCsT2" \
- "g\[(\]+S, short \[*\]+&, (const short|short const) \[*\]+&, short \[*\]+&\[)\]+"
- test_demangling "arm: g__F1RRUcRCUcT2" \
- "g\[(\]+R, unsigned char &, (const unsigned char|unsigned char const) &, unsigned char &\[)\]+"
- test_demangling "arm: g__F1SRPcRPCcT2" \
- "g\[(\]+S, char \[*\]+&, (const char|char const) \[*\]+&, char \[*\]+&\[)\]+"
- test_demangling "arm: g__F1T1RRlRClT3" \
- "g\[(\]+T, R, long &, (const long|long const) &, long &\[)\]+"
- test_demangling "arm: g__F1T1RRiRCiT3" \
- "g\[(\]+T, R, int &, (const int|int const) &, int &\[)\]+"
- test_demangling "arm: g__F1T1RRsRCsT3" \
- "g\[(\]+T, R, short &, (const short|short const) &, short &\[)\]+"
- test_demangling "arm: g__F1T1RRcRCcT3" \
- "g\[(\]+T, R, char &, (const char|char const) &, char &\[)\]+"
-
- test_demangling_exact "arm: __dl__21T5__pt__11_PFiPPdPv_iSFPv" "T5<int (*)(int, double **, void *)>::operator delete(void *) static"
-
- test_demangling_exact "arm: __std__foo" "global destructors keyed to foo"
-
- test_demangling_exact "arm: __sti__bar" "global constructors keyed to bar"
-
- test_demangling_exact "arm: f__FicdPcPFci_v" "f(int, char, double, char *, void (*)(char, int))"
- test_demangling_exact "arm: f__FicdPcPFic_v" "f(int, char, double, char *, void (*)(int, char))"
- test_demangling_exact "arm: get__2T7SFv" "T7::get(void) static"
-
- test_demangling_exact "arm: X__21T5__pt__11_PFiPPdPv_i" "T5<int (*)(int, double **, void *)>::X"
-
- test_demangling "arm: g__FcRdRCdT2" \
- "g\[(\]+char, double &, (const double|double const) &, double &\[)\]+"
- test_demangling "arm: g__FcRfRCfT2" \
- "g\[(\]+char, float &, (const float|float const) &, float &\[)\]+"
- test_demangling "arm: __md__FC2T2i" \
- "operator%\[(\]+(const T2|T2 const), int\[)\]+"
- test_demangling "arm: __dv__FC2T2i" \
- "operator/\[(\]+(const T2|T2 const), int\[)\]+"
- test_demangling "arm: __ml__FC2T2i" \
- "operator\[*\]+\[(\]+(const T2|T2 const), int\[)\]+"
- test_demangling "arm: __mi__FC2T2i" \
- "operator-\[(\]+(const T2|T2 const), int\[)\]+"
- test_demangling "arm: __pl__FC2T2i" \
- "operator\[+\]+\[(\]+(const T2|T2 const), int\[)\]+"
-
- test_demangling_exact "arm: __dl__11T5__pt__2_iSFPv" "T5<int>::operator delete(void *) static"
-
- test_demangling_exact "arm: __dl__11T5__pt__2_cSFPv" "T5<char>::operator delete(void *) static"
-
- test_demangling_exact "arm: h__Fc" "h(char)"
- test_demangling_exact "arm: h__Fd" "h(double)"
- test_demangling_exact "arm: h__Ff" "h(float)"
- test_demangling_exact "arm: h__Fi" "h(int)"
- test_demangling_exact "arm: f__Fi" "f(int)"
- test_demangling_exact "arm: h__Fl" "h(long)"
-
- test_demangling_exact "arm: h__Fs" "h(short)"
- test_demangling "arm: __md__FC2T2RC2T2" \
- "operator%\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __dv__FC2T2RC2T2" \
- "operator/\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __ml__FC2T2RC2T2" \
- "operator\[*\]+\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __mi__FC2T2RC2T2" \
- "operator-\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
- test_demangling "arm: __pl__FC2T2RC2T2" \
- "operator\[+\]+\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
- test_demangling "arm: g__FcRP1cRPC1cT2" \
- "g\[(\]+char, c *\[*\]+&, (const c|c const) *\[*\]+&, c *\[*\]+&\[)\]+"
-
- test_demangling_exact "arm: X__11T5__pt__2_c" "T5<char>::X"
-
- test_demangling_exact "arm: X__11T5__pt__2_i" "T5<int>::X"
-
- test_demangling "arm: g__FdCdT1" \
- "g\[(\]+double, (const double|double const), double\[)\]+"
- test_demangling "arm: g__FfCfT1" \
- "g\[(\]+float, (const float|float const), float\[)\]+"
- test_demangling "arm: g__FlClT1" \
- "g\[(\]+long, (const long|long const), long\[)\]+"
- test_demangling "arm: g__FiCiT1" \
- "g\[(\]+int, (const int|int const), int\[)\]+"
- test_demangling "arm: g__FsCsT1" \
- "g\[(\]+short, (const short|short const), short\[)\]+"
- test_demangling "arm: g__FcCcT1" \
- "g\[(\]+char, (const char|char const), char\[)\]+"
-
- test_demangling_exact "arm: __ct__17T5__pt__8_PFcPv_iFi" "T5<int (*)(char, void *)>::T5(int)"
-
- test_demangling_exact "arm: f__FicdPc" "f(int, char, double, char *)"
- test_demangling_exact "arm: __nw__FUi" "operator new(unsigned int)"
- test_demangling_exact "arm: __ct__Q3_2T11a1bSFi" "T1::a::b::b(int) static"
- test_demangling_exact "arm: __dt__Q3_2T11a1bSFi" "T1::a::b::~b(int) static"
- test_demangling_exact "arm: put__Q3_2T11a1bSFi" "T1::a::b::put(int) static"
- test_demangling_exact "arm: get__Q2_2T11aSFv" "T1::a::get(void) static"
- test_demangling_exact "arm: put__2T1SFi" "T1::put(int) static"
- test_demangling_exact "arm: put__Q5_2T11a1b1c1dSFi" "T1::a::b::c::d::put(int) static"
- test_demangling_exact "arm: get__Q4_2T11a1b1cSFv" "T1::a::b::c::get(void) static"
- test_demangling_exact "arm: put__Q2_2T11aSFi" "T1::a::put(int) static"
- test_demangling_exact "arm: put__Q4_2T11a1b1cSFi" "T1::a::b::c::put(int) static"
- test_demangling_exact "arm: get__Q3_2T11a1bSFv" "T1::a::b::get(void) static"
- test_demangling_exact "arm: get__2T1SFv" "T1::get(void) static"
- test_demangling_exact "arm: get__Q5_2T11a1b1c1dSFv" "T1::a::b::c::d::get(void) static"
-
- test_demangling_exact "arm: __dt__11T1__pt__2_cFv" "T1<char>::~T1(void)"
-
- test_demangling_exact "arm: __dt__12T1__pt__3_1tFv" "T1<t>::~T1(void)"
-
- test_demangling_exact "arm: __dl__12T1__pt__3_1tSFPv" "T1<t>::operator delete(void *) static"
-
- test_demangling_exact "arm: __ct__11T1__pt__2_cFi" "T1<char>::T1(int)"
-
- test_demangling_exact "arm: __ct__11T1__pt__2_cFv" "T1<char>::T1(void)"
-
- test_demangling_exact "arm: __ct__12T1__pt__3_1tFi" "T1<t>::T1(int)"
-
- test_demangling_exact "arm: __ct__12T1__pt__3_1tFv" "T1<t>::T1(void)"
-
- test_demangling_exact "arm: __dl__11T1__pt__2_cSFPv" "T1<char>::operator delete(void *) static"
-
- test_demangling_exact "arm: bar__3fooFPv" "foo::bar(void *)"
- test_demangling "arm: bar__3fooFPCv" \
- "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+"
- test_demangling_exact "arm: bar__3fooCFPv" "foo::bar(void *) const"
- test_demangling "arm: bar__3fooCFPCv" \
- "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+ const"
- test_demangling_exact "arm: __eq__3fooFR3foo" "foo::operator==(foo &)"
- test_demangling "arm: __eq__3fooFRC3foo" \
- "foo::operator==\[(\]+(const foo|foo const) &\[)\]+"
- test_demangling_exact "arm: __eq__3fooCFR3foo" "foo::operator==(foo &) const"
- test_demangling "arm: __eq__3fooCFRC3foo" \
- "foo::operator==\[(\]+(const foo|foo const) &\[)\]+ const"
-
- test_demangling_exact "arm: elem__15vector__pt__2_dFi" "vector<double>::elem(int)"
-
- test_demangling_exact "arm: elem__15vector__pt__2_iFi" "vector<int>::elem(int)"
-
- test_demangling_exact "arm: __ct__15vector__pt__2_dFi" "vector<double>::vector(int)"
-
- test_demangling_exact "arm: __ct__15vector__pt__2_iFi" "vector<int>::vector(int)"
-
- test_demangling_exact "arm: __ct__25DListNode__pt__9_R6RLabelFR6RLabelP25DListNode__pt__9_R6RLabelT2" \
- "DListNode<RLabel &>::DListNode(RLabel &, DListNode<RLabel &> *, DListNode<RLabel &> *)"
-
- test_demangling_exact "arm: bar__3fooFiT16FooBar" "foo::bar(int, int, FooBar)"
-
- test_demangling_exact "arm: bar__3fooFPiN51PdN37PcN211T1iN215" \
- "foo::bar(int *, int *, int *, int *, int *, int *, double *, double *, double *, double *, char *, char *, char *, int *, int, int, int)"
-
- test_demangling_exact "arm: _Utf390_1__1_9223372036854775807__9223372036854775" \
- "Can't demangle \"_Utf390_1__1_9223372036854775807__9223372036854775\""
-}
-
-proc test_hp_style_demangling {} {
-
- # HP aCC mangling style is based on ARM for all the basic stuff,
- # so first we use some of the ARM tests here. Later we have HP-specific
- # tests.
-
- test_demangling "hp: g__FP1cPC1cT1" \
- "g\[(\]+c *\[*\]+, (const c|c const) *\[*\]+, c *\[*\]+\[)\]+"
- test_demangling "hp: g__FPUlPCUlT1" \
- "g\[(\]+unsigned long \[*\]+, (const unsigned long|unsigned long const) \[*\]+, unsigned long \[*\]+\[)\]+"
- test_demangling "hp: g__FPUiPCUiT1" \
- "g\[(\]+unsigned int \[*\]+, (const unsigned int|unsigned int const) \[*\]+, unsigned int \[*\]+\[)\]+"
- test_demangling "hp: g__FPUsPCUsT1" \
- "g\[(\]+unsigned short \[*\]+, (const unsigned short|unsigned short const) \[*\]+, unsigned short \[*\]+\[)\]+"
- test_demangling "hp: g__FPUcPCUcT1" \
- "g\[(\]+unsigned char \[*\]+, (const unsigned char|unsigned char const) \[*\]+, unsigned char \[*\]+\[)\]+"
- test_demangling "hp: g__F1TPlPClT2" \
- "g\[(\]+T, long \[*\]+, (const long|long const) \[*\]+, long \[*\]+\[)\]+"
- test_demangling "hp: g__F1RRlRClT2" \
- "g\[(\]+R, long &, (const long|long const) &, long &\[)\]+"
- test_demangling "hp: g__F1TPiPCiT2" \
- "g\[(\]+T, int \[*\]+, (const int|int const) \[*\]+, int \[*\]+\[)\]+"
- test_demangling "hp: g__F1RRiRCiT2" \
- "g\[(\]+R, int &, (const int|int const) &, int &\[)\]+"
- test_demangling "hp: g__F1TPsPCsT2" \
- "g\[(\]+T, short \[*\]+, (const short|short const) \[*\]+, short \[*\]+\[)\]+"
- test_demangling "hp: g__F1RRsRCsT2" \
- "g\[(\]+R, short &, (const short|short const) &, short &\[)\]+"
- test_demangling "hp: g__F1TPcPCcT2" \
- "g\[(\]+T, char \[*\]+, (const char|char const) \[*\]+, char \[*\]+\[)\]+"
- test_demangling "hp: g__F1RRcRCcT2" \
- "g\[(\]+R, char &, (const char|char const) &, char &\[)\]+"
-
- test_demangling "hp: __gt__FRC2T2c" \
- "operator>\[(\]+(const T2|T2 const) &, char\[)\]+"
- test_demangling "hp: __ge__FRC2T2c" \
- "operator>=\[(\]+(const T2|T2 const) &, char\[)\]+"
- test_demangling "hp: __lt__FRC2T2c" \
- "operator<\[(\]+(const T2|T2 const) &, char\[)\]+"
-
- test_demangling "hp: __le__FRC2T2c" \
- "operator<=\[(\]+(const T2|T2 const) &, char\[)\]+"
- test_demangling "hp: __ne__FRC2T2c" \
- "operator!=\[(\]+(const T2|T2 const) &, char\[)\]+"
- test_demangling "hp: __eq__FRC2T2c" \
- "operator==\[(\]+(const T2|T2 const) &, char\[)\]+"
- test_demangling_exact "hp: __amd__FR2T2i" "operator%=(T2 &, int)"
- test_demangling_exact "hp: __adv__FR2T2i" "operator/=(T2 &, int)"
- test_demangling_exact "hp: __amu__FR2T2i" "operator*=(T2 &, int)"
- test_demangling_exact "hp: __ami__FR2T2i" "operator-=(T2 &, int)"
- test_demangling_exact "hp: __apl__FR2T2i" "operator+=(T2 &, int)"
- test_demangling_exact "hp: __nw__2T1SFUi" "T1::operator new(unsigned int) static"
- test_demangling_exact "hp: __dl__2T1SFPv" "T1::operator delete(void *) static"
- test_demangling_exact "hp: put__2T7SFi" "T7::put(int) static"
-
- test_demangling_exact "hp: h__FUc" "h(unsigned char)"
- test_demangling_exact "hp: f__Fic" "f(int, char)"
- test_demangling_exact "hp: h__FUi" "h(unsigned int)"
- test_demangling_exact "hp: h__Fci" "h(char, int)"
- test_demangling_exact "hp: h__FUl" "h(unsigned long)"
- test_demangling_exact "hp: h__Fcl" "h(char, long)"
- test_demangling_exact "hp: h__FUs" "h(unsigned short)"
- test_demangling_exact "hp: h__Fcs" "h(char, short)"
- test_demangling "hp: __amd__FR2T2RC2T2" \
- "operator%=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __adv__FR2T2RC2T2" \
- "operator/=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __amu__FR2T2RC2T2" \
- "operator\[*\]+=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __ami__FR2T2RC2T2" \
- "operator-=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __apl__FR2T2RC2T2" \
- "operator\[+\]+=\[(\]+T2 &, (const T2|T2 const) &\[)\]+"
-
- test_demangling "hp: g__F1SRPUlRPCUlT2" \
- "g\[(\]+S, unsigned long \[*\]+&, (const unsigned long|unsigned long const) \[*\]+&, unsigned long \[*\]+&\[)\]+"
- test_demangling "hp: g__F1SRPUiRPCUiT2" \
- "g\[(\]+S, unsigned int \[*\]+&, (const unsigned int|unsigned int const) \[*\]+&, unsigned int \[*\]+&\[)\]+"
- test_demangling "hp: g__F1SRPUsRPCUsT2" \
- "g\[(\]+S, unsigned short \[*\]+&, (const unsigned short|unsigned short const) \[*\]+&, unsigned short \[*\]+&\[)\]+"
- test_demangling "hp: g__F1SRPUcRPCUcT2" \
- "g\[(\]+S, unsigned char \[*\]+&, (const unsigned char|unsigned char const) \[*\]+&, unsigned char \[*\]+&\[)\]+"
- test_demangling "hp: g__F1T1SRPlRPClT3" \
- "g\[(\]+T, S, long \[*\]+&, (const long|long const) \[*\]+&, long \[*\]+&\[)\]+"
- test_demangling "hp: g__F1T1SRPiRPCiT3" \
- "g\[(\]+T, S, int \[*\]+&, (const int|int const) \[*\]+&, int \[*\]+&\[)\]+"
- test_demangling "hp: g__F1T1SRPcRPCcT3" \
- "g\[(\]+T, S, char \[*\]+&, (const char|char const) \[*\]+&, char \[*\]+&\[)\]+"
-
-
- test_demangling "hp: __gt__FRC2T2T1" \
- "operator>\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __ge__FRC2T2T1" \
- "operator>=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __lt__FRC2T2T1" \
- "operator<\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __le__FRC2T2T1" \
- "operator<=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __ne__FRC2T2T1" \
- "operator!=\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __eq__FRC2T2T1" \
- "operator==\[(\]+(const T2|T2 const) &, (const T2|T2 const) &\[)\]+"
- test_demangling "hp: g__FcR1cRC1cT2" \
- "g\[(\]+char, c &, (const c|c const) &, c &\[)\]+"
- test_demangling "hp: g__FcRPdRPCdT2" \
- "g\[(\]+char, double *\[*\]+&, (const double|double const) *\[*\]+&, double *\[*\]+&\[)\]+"
- test_demangling "hp: g__FcRPfRPCfT2" \
- "g\[(\]+char, float *\[*\]+&, (const float|float const) *\[*\]+&, float *\[*\]+&\[)\]+"
- test_demangling_exact "hp: h__FcT1" "h(char, char)"
- test_demangling_exact "hp: f__Ficd" "f(int, char, double)"
- test_demangling "hp: g__F1T1SdRPsRPCsT4" \
- "g\[(\]+T, S, double, short \[*\]+&, (const short|short const) \[*\]+&, short \[*\]+&\[)\]+"
- test_demangling "hp: g__F1cC1cT1" \
- "g\[(\]+c, (const c|c const), c\[)\]+"
- test_demangling "hp: g__FPdPCdT1" \
- "g\[(\]+double *\[*\]+, (const double|double const) *\[*\]+, double *\[*\]+\[)\]+"
- test_demangling "hp: g__FPfPCfT1" \
- "g\[(\]+float *\[*\]+, (const float|float const) *\[*\]+, float *\[*\]+\[)\]+"
-
- test_demangling "hp: g__FUlCUlT1" \
- "g\[(\]+unsigned long, (const unsigned long|unsigned long const), unsigned long\[)\]+"
- test_demangling "hp: g__FPlPClT1" \
- "g\[(\]+long \[*\]+, (const long|long const) \[*\]+, long \[*\]+\[)\]+"
- test_demangling "hp: g__FUiCUiT1" \
- "g\[(\]+unsigned int, (const unsigned int|unsigned int const), unsigned int\[)\]+"
- test_demangling "hp: g__FPiPCiT1" \
- "g\[(\]+int \[*\]+, (const int|int const) \[*\]+, int \[*\]+\[)\]+"
- test_demangling "hp: g__FUsCUsT1" \
- "g\[(\]+unsigned short, (const unsigned short|unsigned short const), unsigned short\[)\]+"
- test_demangling "hp: g__FPsPCsT1" \
- "g\[(\]+short \[*\]+, (const short|short const) \[*\]+, short \[*\]+\[)\]+"
- test_demangling "hp: g__FUcCUcT1" \
- "g\[(\]+unsigned char, (const unsigned char|unsigned char const), unsigned char\[)\]+"
- test_demangling "hp: g__FPcPCcT1" \
- "g\[(\]+char \[*\]+, (const char|char const) \[*\]+, char \[*\]+\[)\]+"
- test_demangling "hp: g__F1TlClT2" \
- "g\[(\]+T, long, (const long|long const), long\[)\]+"
- test_demangling "hp: g__F1TiCiT2" \
- "g\[(\]+T, int, (const int|int const), int\[)\]+"
- test_demangling "hp: g__F1TsCsT2" \
- "g\[(\]+T, short, (const short|short const), short\[)\]+"
- test_demangling "hp: g__F1TcCcT2" \
- "g\[(\]+T, char, (const char|char const), char\[)\]+"
-
- test_demangling "hp: printf__FPCce" \
- "printf\[(\]+(const char|char const) \[*\]+,...\[)\]+"
-
-
- test_demangling "hp: g__F1SRUlRCUlT2" \
- "g\[(\]+S, unsigned long &, (const unsigned long|unsigned long const) &, unsigned long &\[)\]+"
- test_demangling "hp: g__F1SRPlRPClT2" \
- "g\[(\]+S, long \[*\]+&, (const long|long const) \[*\]+&, long \[*\]+&\[)\]+"
- test_demangling "hp: g__F1RRUiRCUiT2" \
- "g\[(\]+R, unsigned int &, (const unsigned int|unsigned int const) &, unsigned int &\[)\]+"
- test_demangling "hp: g__F1SRPiRPCiT2" \
- "g\[(\]+S, int \[*\]+&, (const int|int const) \[*\]+&, int \[*\]+&\[)\]+"
- test_demangling "hp: g__F1RRUsRCUsT2" \
- "g\[(\]+R, unsigned short &, (const unsigned short|unsigned short const) &, unsigned short &\[)\]+"
- test_demangling "hp: g__F1SRPsRPCsT2" \
- "g\[(\]+S, short \[*\]+&, (const short|short const) \[*\]+&, short \[*\]+&\[)\]+"
- test_demangling "hp: g__F1RRUcRCUcT2" \
- "g\[(\]+R, unsigned char &, (const unsigned char|unsigned char const) &, unsigned char &\[)\]+"
- test_demangling "hp: g__F1SRPcRPCcT2" \
- "g\[(\]+S, char \[*\]+&, (const char|char const) \[*\]+&, char \[*\]+&\[)\]+"
- test_demangling "hp: g__F1T1RRlRClT3" \
- "g\[(\]+T, R, long &, (const long|long const) &, long &\[)\]+"
- test_demangling "hp: g__F1T1RRiRCiT3" \
- "g\[(\]+T, R, int &, (const int|int const) &, int &\[)\]+"
- test_demangling "hp: g__F1T1RRsRCsT3" \
- "g\[(\]+T, R, short &, (const short|short const) &, short &\[)\]+"
- test_demangling "hp: g__F1T1RRcRCcT3" \
- "g\[(\]+T, R, char &, (const char|char const) &, char &\[)\]+"
-
-
- test_demangling_exact "hp: f__FicdPcPFci_v" "f(int, char, double, char *, void (*)(char, int))"
- test_demangling_exact "hp: f__FicdPcPFic_v" "f(int, char, double, char *, void (*)(int, char))"
- test_demangling_exact "hp: get__2T7SFv" "T7::get(void) static"
-
-
- test_demangling "hp: g__FcRdRCdT2" \
- "g\[(\]+char, double &, (const double|double const) &, double &\[)\]+"
- test_demangling "hp: g__FcRfRCfT2" \
- "g\[(\]+char, float &, (const float|float const) &, float &\[)\]+"
- test_demangling "hp: __md__FC2T2i" \
- "operator%\[(\]+(const T2|T2 const), int\[)\]+"
- test_demangling "hp: __dv__FC2T2i" \
- "operator/\[(\]+(const T2|T2 const), int\[)\]+"
- test_demangling "hp: __ml__FC2T2i" \
- "operator\[*\]+\[(\]+(const T2|T2 const), int\[)\]+"
- test_demangling "hp: __mi__FC2T2i" \
- "operator-\[(\]+(const T2|T2 const), int\[)\]+"
- test_demangling "hp: __pl__FC2T2i" \
- "operator\[+\]+\[(\]+(const T2|T2 const), int\[)\]+"
-
-
- test_demangling_exact "hp: h__Fc" "h(char)"
- test_demangling_exact "hp: h__Fd" "h(double)"
- test_demangling_exact "hp: h__Ff" "h(float)"
- test_demangling_exact "hp: h__Fi" "h(int)"
- test_demangling_exact "hp: f__Fi" "f(int)"
- test_demangling_exact "hp: h__Fl" "h(long)"
-
- test_demangling_exact "hp: h__Fs" "h(short)"
- test_demangling "hp: __md__FC2T2RC2T2" \
- "operator%\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __dv__FC2T2RC2T2" \
- "operator/\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __ml__FC2T2RC2T2" \
- "operator\[*\]+\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __mi__FC2T2RC2T2" \
- "operator-\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
- test_demangling "hp: __pl__FC2T2RC2T2" \
- "operator\[+\]+\[(\]+(const T2|T2 const), (const T2|T2 const) &\[)\]+"
- test_demangling "hp: g__FcRP1cRPC1cT2" \
- "g\[(\]+char, c *\[*\]+&, (const c|c const) *\[*\]+&, c *\[*\]+&\[)\]+"
-
-
- test_demangling "hp: g__FdCdT1" \
- "g\[(\]+double, (const double|double const), double\[)\]+"
- test_demangling "hp: g__FfCfT1" \
- "g\[(\]+float, (const float|float const), float\[)\]+"
- test_demangling "hp: g__FlClT1" \
- "g\[(\]+long, (const long|long const), long\[)\]+"
- test_demangling "hp: g__FiCiT1" \
- "g\[(\]+int, (const int|int const), int\[)\]+"
- test_demangling "hp: g__FsCsT1" \
- "g\[(\]+short, (const short|short const), short\[)\]+"
- test_demangling "hp: g__FcCcT1" \
- "g\[(\]+char, (const char|char const), char\[)\]+"
-
-
- test_demangling_exact "hp: f__FicdPc" "f(int, char, double, char *)"
- test_demangling_exact "hp: __nw__FUi" "operator new(unsigned int)"
- test_demangling_exact "hp: __ct__Q3_2T11a1bSFi" "T1::a::b::b(int) static"
- test_demangling_exact "hp: __dt__Q3_2T11a1bSFi" "T1::a::b::~b(int) static"
- test_demangling_exact "hp: put__Q3_2T11a1bSFi" "T1::a::b::put(int) static"
- test_demangling_exact "hp: get__Q2_2T11aSFv" "T1::a::get(void) static"
- test_demangling_exact "hp: put__2T1SFi" "T1::put(int) static"
- test_demangling_exact "hp: put__Q5_2T11a1b1c1dSFi" "T1::a::b::c::d::put(int) static"
- test_demangling_exact "hp: get__Q4_2T11a1b1cSFv" "T1::a::b::c::get(void) static"
- test_demangling_exact "hp: put__Q2_2T11aSFi" "T1::a::put(int) static"
- test_demangling_exact "hp: put__Q4_2T11a1b1cSFi" "T1::a::b::c::put(int) static"
- test_demangling_exact "hp: get__Q3_2T11a1bSFv" "T1::a::b::get(void) static"
- test_demangling_exact "hp: get__2T1SFv" "T1::get(void) static"
- test_demangling_exact "hp: get__Q5_2T11a1b1c1dSFv" "T1::a::b::c::d::get(void) static"
-
-
- test_demangling_exact "hp: bar__3fooFPv" "foo::bar(void *)"
- test_demangling "hp: bar__3fooFPCv" \
- "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+"
- test_demangling_exact "hp: bar__3fooCFPv" "foo::bar(void *) const"
- test_demangling "hp: bar__3fooCFPCv" \
- "foo::bar\[(\]+(const void|void const) *\[*\]+\[)\]+ const"
- test_demangling_exact "hp: __eq__3fooFR3foo" "foo::operator==(foo &)"
- test_demangling "hp: __eq__3fooFRC3foo" \
- "foo::operator==\[(\]+(const foo|foo const) &\[)\]+"
- test_demangling_exact "hp: __eq__3fooCFR3foo" "foo::operator==(foo &) const"
- test_demangling "hp: __eq__3fooCFRC3foo" \
- "foo::operator==\[(\]+(const foo|foo const) &\[)\]+ const"
-
- test_demangling_exact "hp: bar__3fooFiT16FooBar" "foo::bar(int, int, FooBar)"
-
- test_demangling_exact "hp: bar__3fooFPiN51PdN37PcN211T1iN215" \
- "foo::bar(int *, int *, int *, int *, int *, int *, double *, double *, double *, double *, char *, char *, char *, int *, int, int, int)"
-
-
- # HP aCC specific tests. HP aCC demangling does not use __pt__ for
- # template specifications. There are other differences as well.
-
- test_demangling_exact "hp: __dt__2T5XTPFiPPdPv_i__Fv" "T5<int (*)(int, double **, void *)>::~T5(void)"
-
- test_demangling_exact "hp: __ct__1cFi" "c::c(int)"
-
- test_demangling_exact "hp: __dt__2T5XTi__Fv" "T5<int>::~T5(void)"
-
- test_demangling_exact "hp: __dt__2T5XTc__Fv" "T5<char>::~T5(void)"
-
- test_demangling_exact "hp: __ct__2T2Fi" "T2::T2(int)"
- test_demangling_exact "hp: __dt__2T1Fv" "T1::~T1(void)"
-
- test_demangling_exact "hp: __dt__2T5XT1x__Fv" "T5<x>::~T5(void)"
-
- test_demangling_exact "hp: __dt__2T5XTPFcPv_i__Fv" "T5<int (*)(char, void *)>::~T5(void)"
-
- test_demangling_exact "hp: __ct__2T5XTPFiPPdPv_i__Fi" "T5<int (*)(int, double **, void *)>::T5(int)"
-
- test_demangling_exact "hp: __dl__2T5XT1x__SFPv" "T5<x>::operator delete(void *) static"
-
- test_demangling_exact "hp: X__2T5XT1x" "T5<x>::X"
-
- test_demangling_exact "hp: __ct__2T5XTi__Fi" "T5<int>::T5(int)"
-
- test_demangling_exact "hp: __ct__2T5XTc__Fi" "T5<char>::T5(int)"
-
- test_demangling_exact "hp: __dl__2T5XTPFcPv_i__SFPv" "T5<int (*)(char, void *)>::operator delete(void *) static"
-
- test_demangling_exact "hp: X__2T5XTPFcPv_i" "T5<int (*)(char, void *)>::X"
-
- test_demangling_exact "hp: __ct__2T5XT1x__Fi" "T5<x>::T5(int)"
-
- test_demangling_exact "hp: __dl__2T5XTPFiPPdPv_i__SFPv" "T5<int (*)(int, double **, void *)>::operator delete(void *) static"
- test_demangling_exact "hp: X__2T5XTPFiPPdPv_i" "T5<int (*)(int, double **, void *)>::X"
-
- test_demangling_exact "hp: __dl__2T5XTi__SFPv" "T5<int>::operator delete(void *) static"
-
- test_demangling_exact "hp: __dl__2T5XTc__SFPv" "T5<char>::operator delete(void *) static"
-
- test_demangling_exact "hp: X__2T5XTc" "T5<char>::X"
-
- test_demangling_exact "hp: X__2T5XTi" "T5<int>::X"
-
- test_demangling_exact "hp: __ct__2T5XTPFcPv_i__Fi" "T5<int (*)(char, void *)>::T5(int)"
-
- test_demangling_exact "hp: __dt__2T1XTc__Fv" "T1<char>::~T1(void)"
-
- test_demangling_exact "hp: __dt__2T1XT1t__Fv" "T1<t>::~T1(void)"
-
- test_demangling_exact "hp: __dl__2T1XT1t__SFPv" "T1<t>::operator delete(void *) static"
-
- test_demangling_exact "hp: __ct__2T1XTc__Fi" "T1<char>::T1(int)"
-
- test_demangling_exact "hp: __ct__2T1XTc__Fv" "T1<char>::T1(void)"
-
- test_demangling_exact "hp: __ct__2T1XT1t__Fi" "T1<t>::T1(int)"
-
- test_demangling_exact "hp: __ct__2T1XT1t__Fv" "T1<t>::T1(void)"
-
- test_demangling_exact "hp: __dl__2T1XTc__SFPv" "T1<char>::operator delete(void *) static"
-
- test_demangling_exact "hp: elem__6vectorXTd__Fi" "vector<double>::elem(int)"
-
- test_demangling_exact "hp: elem__6vectorXTi__Fi" "vector<int>::elem(int)"
-
- test_demangling_exact "hp: __ct__6vectorXTd__Fi" "vector<double>::vector(int)"
-
- test_demangling_exact "hp: __ct__6vectorXTi__Fi" "vector<int>::vector(int)"
-
- test_demangling_exact "hp: __ct__9DListNodeXTR6RLabel__FR6RLabelP9DListNodeXTR6RLabel_T2" \
- "DListNode<RLabel &>::DListNode(RLabel &, DListNode<RLabel &> *, DListNode<RLabel &> *)"
-
-
- # Absolute integer constants in template args
-
- test_demangling_exact "hp: elem__6vectorXTiUP34__Fi" "vector<int,34U>::elem(int)"
- test_demangling_exact "hp: elem__6vectorXUP2701Td__Fi" "vector<2701U,double>::elem(int)"
- test_demangling_exact "hp: elem__6vectorXTiSP334__Fi" "vector<int,334>::elem(int)"
- test_demangling_exact "hp: elem__6vectorXTiSN67__Fi" "vector<int,-67>::elem(int)"
- test_demangling_exact "hp: elem__6vectorXTiSM__SCFPPd" "vector<int,-2147483648>::elem(double **) static const"
- test_demangling_exact "hp: elem__6vectorXTiSN67UP4000TRs__Fi" "vector<int,-67,4000U,short &>::elem(int)"
- test_demangling_exact "hp: elem__6vectorXTiSN67TRdTFPv_i__Fi" "vector<int,-67,double &,int (void *)>::elem(int)"
- test_demangling_exact "hp: X__6vectorXTiSN67TdTPvUP5TRs" "vector<int,-67,double,void *,5U,short &>::X"
-
- # Named constants in template args
-
- test_demangling_exact "hp: elem__6vectorXTiA3foo__Fi" "vector<int,&foo>::elem(int)"
- test_demangling_exact "hp: elem__6vectorXTiA3fooTPvA5Label__FiPPvT2" "vector<int,&foo,void *,&Label>::elem(int, void **, void **)"
- test_demangling_exact "hp: elem__6vectorXTiSN42A3foo__Fi" "vector<int,-42,&foo>::elem(int)"
-
- # Alternate entry points for functions
-
- test_demangling_exact "hp: __ct__2T5XTPFcPv_i__Fi_2" "T5<int (*)(char, void *)>::T5(int)"
- test_demangling_exact "hp: __ct__2T5XTPFcPv_i__Fi_19" "T5<int (*)(char, void *)>::T5(int)"
- test_demangling_exact "hp: f__FicdPcPFci_v_34" "f(int, char, double, char *, void (*)(char, int))"
-
-
- # Template partial specializations
-
-# FIXME! The # characters don't go through expect, and backslashes don't seem to work.
-# test_demangling_exact "hp: spec__13Spec<#1,#1.*>XTiTPi_FPi" "Spec<int,int *>::spec(int *)"
-# test_demangling_exact "hp: spec__16Spec<#1,#1.&,#1>XTiTRiTi_FPi" "Spec<int,int &, int>::spec(int *)"
-# Fake test -- replace # with %
- test_demangling_exact "hp: spec__13Spec<%1,%1.*>XTiTPi_FPi" "Spec<int,int *>::spec(int *)"
- test_demangling_exact "hp: spec__16Spec<%1,%1.&,%1>XTiTRiTi_FPi" "Spec<int,int &,int>::spec(int *)"
-
- # Global template functions
-
- test_demangling_exact "hp: add__XTc_FcT1" "add<char>(char, char)"
- test_demangling_exact "hp: add__XTcSP9A5label_FcPPlT1" "add<char,9,&label>(char, long **, char)"
- test_demangling_exact "hp: add__XTPfTFPd_f_FcT1" "add<float *,float (double *)>(char, char)"
-
- # Template for template arg
-
- test_demangling_exact "hp: unLink__12basic_stringXTcT18string_char_traitsXTc_T9allocator_Fv" "basic_string<char,string_char_traits<char>,allocator>::unLink(void)"
-
- test_demangling_exact "hp: _Utf390_1__1_9223372036854775807__9223372036854775" \
- "Can't demangle \"_Utf390_1__1_9223372036854775807__9223372036854775\""
-}
-
-
-proc catch_demangling_errors {command} {
- if {[catch $command result]} {
- puts "ERROR: demangle.exp: while running $command: $result"
- }
-}
-
-# Test support for different demangling styles. Note that this does
-# not depend upon running the test program and does not depend upon
-# gdb being able to lookup any C++ symbols. It simply calls the
-# internal demangler with synthesized strings and tests the results.
-
-proc do_tests {} {
- global prms_id
- global bug_id
- global subdir
- global gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
-
- send_gdb "set language c++\n"
- gdb_expect -re "$gdb_prompt $"
- send_gdb "set width 0\n"
- gdb_expect -re "$gdb_prompt $"
-
- # Using catch_demangling_errors this way ensures that, if one of
- # the functions raises a Tcl error, then it'll get reported, and
- # the rest of the functions will still run.
- catch_demangling_errors test_lucid_style_demangling
- catch_demangling_errors test_gnu_style_demangling
- catch_demangling_errors test_arm_style_demangling
- catch_demangling_errors test_hp_style_demangling
-}
-
-do_tests
diff --git a/gdb/testsuite/gdb.c++/derivation.cc b/gdb/testsuite/gdb.c++/derivation.cc
deleted file mode 100644
index f6d42e7d1de..00000000000
--- a/gdb/testsuite/gdb.c++/derivation.cc
+++ /dev/null
@@ -1,240 +0,0 @@
-class A {
-public:
- int a;
- int aa;
-
- A()
- {
- a=1;
- aa=2;
- }
- int afoo();
- int foo();
-
-};
-
-
-
-class B {
-public:
- int b;
- int bb;
-
- B()
- {
- b=3;
- bb=4;
- }
- int bfoo();
- int foo();
-
-};
-
-
-
-class C {
-public:
- int c;
- int cc;
-
- C()
- {
- c=5;
- cc=6;
- }
- int cfoo();
- int foo();
-
-};
-
-
-
-class D : private A, public B, protected C {
-public:
- int d;
- int dd;
-
- D()
- {
- d =7;
- dd=8;
- }
- int dfoo();
- int foo();
-
-};
-
-
-class E : public A, B, protected C {
-public:
- int e;
- int ee;
-
- E()
- {
- e =9;
- ee=10;
- }
- int efoo();
- int foo();
-
-};
-
-
-class F : A, public B, C {
-public:
- int f;
- int ff;
-
- F()
- {
- f =11;
- ff=12;
- }
- int ffoo();
- int foo();
-
-};
-
-class G : private A, public B, protected C {
-public:
- int g;
- int gg;
- int a;
- int b;
- int c;
-
- G()
- {
- g =13;
- gg =14;
- a=15;
- b=16;
- c=17;
-
- }
- int gfoo();
- int foo();
-
-};
-
-
-
-
-int A::afoo() {
- return 1;
-}
-
-int B::bfoo() {
- return 2;
-}
-
-int C::cfoo() {
- return 3;
-}
-
-int D::dfoo() {
- return 4;
-}
-
-int E::efoo() {
- return 5;
-}
-
-int F::ffoo() {
- return 6;
-}
-
-int G::gfoo() {
- return 77;
-}
-
-int A::foo()
-{
- return 7;
-
-}
-
-int B::foo()
-{
- return 8;
-
-}
-
-int C::foo()
-{
- return 9;
-
-}
-
-int D::foo()
-{
- return 10;
-
-}
-
-int E::foo()
-{
- return 11;
-
-}
-
-int F::foo()
-{
- return 12;
-
-}
-
-int G::foo()
-{
- return 13;
-
-}
-
-
-void marker1()
-{
-}
-
-
-int main(void)
-{
-
- A a_instance;
- B b_instance;
- C c_instance;
- D d_instance;
- E e_instance;
- F f_instance;
- G g_instance;
-
- #ifdef usestubs
- set_debug_traps();
- breakpoint();
- #endif
-
-
- marker1(); // marker1-returns-here
-
- a_instance.a = 20; // marker1-returns-here
- a_instance.aa = 21;
- b_instance.b = 22;
- b_instance.bb = 23;
- c_instance.c = 24;
- c_instance.cc = 25;
- d_instance.d = 26;
- d_instance.dd = 27;
- e_instance.e = 28;
- e_instance.ee =29;
- f_instance.f =30;
- f_instance.ff =31;
-
-
-
-
- return 0;
-
-}
-
-
-
diff --git a/gdb/testsuite/gdb.c++/derivation.exp b/gdb/testsuite/gdb.c++/derivation.exp
deleted file mode 100644
index 38a46a2beaa..00000000000
--- a/gdb/testsuite/gdb.c++/derivation.exp
+++ /dev/null
@@ -1,337 +0,0 @@
-# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Elena Zannoni (ezannoni@cygnus.com)
-
-# This file is part of the gdb testsuite
-#
-
-#
-# tests for inheritance, with several derivations types combinations (private,
-# public, protected)
-# classes have simple members and member functions.
-#
-
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "derivation"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-#
-# set it up at a breakpoint so we can play with the variable values
-#
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-if ![runto 'marker1'] then {
- perror "couldn't run to marker1"
- continue
-}
-
-gdb_test "up" ".*main.*" "up from marker1"
-
-
-
-send_gdb "print a_instance\n"
-gdb_expect {
- -re ".\[0-9\]* = \{a = 1, aa = 2\}\r\n$gdb_prompt $" {
- pass "print value of a_instance"
- }
- -re ".*$gdb_prompt $" { fail "print value of a_instance" }
- timeout { fail "(timeout) print value of a_instance" }
- }
-
-
-send_gdb "ptype a_instance\n"
-gdb_expect {
- -re "type = class A \{\r\n\[\t \]*public:\r\n\[\t \]*int a;\r\n\[\t \]*int aa;\[\r\n\t ]+A & operator=\\(A const ?&\\);\[\r\n\t ]+A\\((A const|const A) ?&\\);\[\r\n\t ]+A\\((void|)\\);\r\n\[\t \]*int afoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype a_instance (with synth ops)" }
- -re "type = class A \{\r\n\[\t \]*public:\r\n\[\t \]*int a;\r\n\[\t \]*int aa;\[\r\n\t \]+A\\(void\\);\r\n\[\t \]*int afoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype a_instance (no synth ops)" }
- -re ".*$gdb_prompt $" { fail "ptype a_instance" }
- timeout { fail "(timeout) ptype a_instance" }
-}
-
-
-send_gdb "print d_instance\n"
-gdb_expect {
- -re ".\[0-9\]* = \{<A> = \{a = 1, aa = 2\}, <B> = \{b = 3, bb = 4\}, <C> = \{c = 5, cc = 6\}, d = 7, dd = 8\}\r\n$gdb_prompt $" {
- pass "print value of d_instance"
- }
- -re ".\[0-9\]* = \{<class A> = \{a = 1, aa = 2\}, <class B> = \{b = 3, bb = 4\}, <class C> = \{c = 5, cc = 6\}, d = 7, dd = 8\}\r\n$gdb_prompt $" {
- pass "print value of d_instance"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance" }
- timeout { fail "(timeout) print value of d_instance" }
- }
-
- if {$gcc_compiled} then {
- send_gdb "ptype d_instance\n"
- gdb_expect {
- -re "type = class D : private A, public B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const ?&\\);\[\r\n\t ]+D\\((D const|const D) ?&\\);\[\r\n\t \]+D\\((void|)\\);\r\n\[\t \]*int dfoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
- -re "type = class D : private A, public B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t ]+D & operator=\\(D const ?&\\);\[\r\n\t ]+D\\((D const|const D) ?&\\);\[\r\n\t \]+D\\((void|)\\);\r\n\[\t \]*int dfoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
- -re "type = class D : private A, public B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
- -re ".*$gdb_prompt $" { fail "ptype d_instance" }
- timeout { fail "(timeout) ptype d_instance" }
- }
- } else {
- send_gdb "ptype d_instance\n"
- gdb_expect {
- -re "type = class D : private A, public B, protected C \{\r\n\[\t \]*public:\r\n\[\t \]*int d;\r\n\[\t \]*int dd;\[\r\n\t \]+D\\(void\\);\r\n\[\t \]*int dfoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype d_instance" }
- -re ".*$gdb_prompt $" { fail "ptype d_instance" }
- timeout { fail "(timeout) ptype d_instance" }
- }
- }
-
-
-send_gdb "print e_instance\n"
-gdb_expect {
- -re ".\[0-9\]* = \{<A> = \{a = 1, aa = 2\}, <B> = \{b = 3, bb = 4\}, <C> = \{c = 5, cc = 6\}, e = 9, ee = 10\}\r\n$gdb_prompt $" {
- pass "print value of e_instance"
- }
- -re ".\[0-9\]* = \{<class A> = \{a = 1, aa = 2\}, <class B> = \{b = 3, bb = 4\}, <class C> = \{c = 5, cc = 6\}, e = 9, ee = 10\}\r\n$gdb_prompt $" {
- pass "print value of e_instance"
- }
- -re ".*$gdb_prompt $" { fail "print value of e_instance" }
- timeout { fail "(timeout) print value of e_instance" }
- }
-
- if {$gcc_compiled} {
- send_gdb "ptype e_instance\n"
- gdb_expect {
- -re "type = class E : public A, private B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t ]+E & operator=\\(E const ?&\\);\[\r\n\t ]+E\\((E const|const E) ?&\\);\[\r\n\t \]+E\\((void|)\\);\r\n\[\t \]*int efoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
- -re "type = class E : public A, private B, (protected|private) C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t \]+E\\((void|)\\);\r\n\[\t \]*int efoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
- -re ".*$gdb_prompt $" { fail "ptype e_instance" }
- timeout { fail "(timeout) ptype e_instance" }
- }
- } else {
- send_gdb "ptype e_instance\n"
- gdb_expect {
- -re "type = class E : public A, private B, protected C \{\r\n\[\t \]*public:\r\n\[\t \]*int e;\r\n\[\t \]*int ee;\[\r\n\t \]+E\\((void|)\\);\r\n\[\t \]*int efoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype e_instance" }
- -re ".*$gdb_prompt $" { fail "ptype e_instance" }
- timeout { fail "(timeout) ptype e_instance" }
- }
- }
-
-
-send_gdb "print f_instance\n"
-gdb_expect {
- -re ".\[0-9\]* = \{<A> = \{a = 1, aa = 2\}, <B> = \{b = 3, bb = 4\}, <C> = \{c = 5, cc = 6\}, f = 11, ff = 12\}\r\n$gdb_prompt $" {
- pass "print value of f_instance"
- }
- -re ".\[0-9\]* = \{<class A> = \{a = 1, aa = 2\}, <class B> = \{b = 3, bb = 4\}, <class C> = \{c = 5, cc = 6\}, f = 11, ff = 12\}\r\n$gdb_prompt $" {
- pass "print value of f_instance"
- }
- -re ".*$gdb_prompt $" { fail "print value of f_instance" }
- timeout { fail "(timeout) print value of f_instance" }
- }
-
-send_gdb "ptype f_instance\n"
-gdb_expect {
- -re "type = class F : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int f;\r\n\[\t \]*int ff;\[\r\n\t ]+F & operator=\\(F const ?&\\);\[\r\n\t ]+F\\((F const|const F) ?&\\);\[\r\n\t \]+F\\((void|)\\);\r\n\[\t \]*int ffoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype f_instance" }
- -re "type = class F : private A, public B, private C \{\r\n\[\t \]*public:\r\n\[\t \]*int f;\r\n\[\t \]*int ff;\[\r\n\t \]+F\\((void|)\\);\r\n\[\t \]*int ffoo\\((void|)\\);\r\n\[\t \]*int foo\\((void|)\\);\r\n\}.*$gdb_prompt $" { pass "ptype f_instance" }
- -re ".*$gdb_prompt $" { fail "ptype f_instance" }
- timeout { fail "(timeout) ptype f_instance" }
-}
-
-
-
-send_gdb "print d_instance.a\n"
-gdb_expect {
- -re ".\[0-9\]* = 1.*$gdb_prompt $" {
- pass "print value of d_instance.a"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.a" }
- timeout { fail "(timeout) print value of d_instance.a" }
- }
-
-send_gdb "print d_instance.aa\n"
-gdb_expect {
- -re ".\[0-9\]* = 2.*$gdb_prompt $" {
- pass "print value of d_instance.aa"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.aa" }
- timeout { fail "(timeout) print value of d_instance.aa" }
- }
-
-send_gdb "print d_instance.b\n"
-gdb_expect {
- -re ".\[0-9\]* = 3.*$gdb_prompt $" {
- pass "print value of d_instance.b"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.b" }
- timeout { fail "(timeout) print value of d_instance.b" }
- }
-
-send_gdb "print d_instance.bb\n"
-gdb_expect {
- -re ".\[0-9\]* = 4.*$gdb_prompt $" {
- pass "print value of d_instance.bb"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.bb" }
- timeout { fail "(timeout) print value of d_instance.bb" }
- }
-
-send_gdb "print d_instance.c\n"
-gdb_expect {
- -re ".\[0-9\]* = 5.*$gdb_prompt $" {
- pass "print value of d_instance.c"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.c" }
- timeout { fail "(timeout) print value of d_instance.c" }
- }
-
-send_gdb "print d_instance.cc\n"
-gdb_expect {
- -re ".\[0-9\]* = 6.*$gdb_prompt $" {
- pass "print value of d_instance.cc"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.cc" }
- timeout { fail "(timeout) print value of d_instance.cc" }
- }
-
-send_gdb "print d_instance.d\n"
-gdb_expect {
- -re ".\[0-9\]* = 7.*$gdb_prompt $" {
- pass "print value of d_instance.d"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.d" }
- timeout { fail "(timeout) print value of d_instance.d" }
- }
-
-send_gdb "print d_instance.dd\n"
-gdb_expect {
- -re ".\[0-9\]* = 8.*$gdb_prompt $" {
- pass "print value of d_instance.dd"
- }
- -re ".*$gdb_prompt $" { fail "print value of d_instance.dd" }
- timeout { fail "(timeout) print value of d_instance.dd" }
- }
-
-send_gdb "print g_instance.a\n"
-gdb_expect {
- -re "warning.*$gdb_prompt $" {
- # The compiler doesn't think this is ambiguous.
- fail "print value of g_instance.a"
- }
- -re ".\[0-9\]* = 15.*$gdb_prompt $" {
- pass "print value of g_instance.a"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.a" }
- timeout { fail "(timeout) print value of g_instance.a" }
- }
-
-send_gdb "print g_instance.b\n"
-gdb_expect {
- -re "warning.*$gdb_prompt $" {
- # The compiler doesn't think this is ambiguous.
- fail "print value of g_instance.b"
- }
- -re ".\[0-9\]* = 16.*$gdb_prompt $" {
- pass "print value of g_instance.b"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.b" }
- timeout { fail "(timeout) print value of g_instance.b" }
- }
-
-send_gdb "print g_instance.c\n"
-gdb_expect {
- -re "warning.*$gdb_prompt $" {
- # The compiler doesn't think this is ambiguous.
- fail "print value of g_instance.c"
- }
- -re ".\[0-9\]* = 17.*$gdb_prompt $" {
- pass "print value of g_instance.c"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.c" }
- timeout { fail "(timeout) print value of g_instance.c" }
- }
-
-send_gdb "print g_instance.afoo()\n"
-gdb_expect {
- -re ".\[0-9\]* = 1.*$gdb_prompt $" {
- pass "print value of g_instance.afoo()"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.afoo()" }
- timeout { fail "(timeout) print value of g_instance.afoo()" }
- }
-
-
-# If GDB fails to restore the selected frame properly after the
-# inferior function call above (see GDB PR 1155 for an explanation of
-# why this might happen), all the subsequent tests will fail. We
-# should detect report that failure, but let the marker call finish so
-# that the rest of the tests can run undisturbed.
-gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
- -re "#0 marker1.*$gdb_prompt $" {
- setup_kfail "gdb/1155" s390-*-linux-gnu
- fail "re-selected 'main' frame after inferior call"
- gdb_test "finish" ".*main.*at .*derivation.cc:.*// marker1-returns-here.*" \
- "finish call to marker1"
- }
- -re "#1 ($hex in )?main.*$gdb_prompt $" {
- pass "re-selected 'main' frame after inferior call"
- }
-}
-
-send_gdb "print g_instance.bfoo()\n"
-gdb_expect {
- -re ".\[0-9\]* = 2.*$gdb_prompt $" {
- pass "print value of g_instance.bfoo()"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.bfoo()" }
- timeout { fail "(timeout) print value of g_instance.bfoo()" }
- }
-
-send_gdb "print g_instance.cfoo()\n"
-gdb_expect {
- -re ".\[0-9\]* = 3.*$gdb_prompt $" {
- pass "print value of g_instance.cfoo()"
- }
- -re ".*$gdb_prompt $" { fail "print value of g_instance.cfoo()" }
- timeout { fail "(timeout) print value of g_instance.cfoo()" }
- }
diff --git a/gdb/testsuite/gdb.c++/hang.H b/gdb/testsuite/gdb.c++/hang.H
deleted file mode 100644
index 26fec8792ad..00000000000
--- a/gdb/testsuite/gdb.c++/hang.H
+++ /dev/null
@@ -1,12 +0,0 @@
-struct A
-{
- struct B *b_ptr_in_a;
-};
-
-struct C
-{
- struct B
- {
- int member_of_B_in_C;
- };
-};
diff --git a/gdb/testsuite/gdb.c++/hang.exp b/gdb/testsuite/gdb.c++/hang.exp
deleted file mode 100644
index 4c117a10744..00000000000
--- a/gdb/testsuite/gdb.c++/hang.exp
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright (C) 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile hang
-set binfile ${objdir}/${subdir}/${testfile}
-
-foreach file {hang1 hang2 hang3} {
- if {[gdb_compile "${srcdir}/${subdir}/${file}.C" "${file}.o" object {c++ debug}] != ""} {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
- }
-}
-
-if {[gdb_compile "hang1.o hang2.o hang3.o" ${binfile} executable {c++ debug}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-# As of May 1, 2002, GDB hangs trying to read the debug info for the
-# `hang2.o' compilation unit from the executable `hang', when compiled
-# by g++ 2.96 with STABS debugging info. Here's what's going on, as
-# best as I can tell.
-#
-# The definition of `struct A' in `hang.H' refers to `struct B' as an
-# incomplete type. The stabs declare type number (1,3) to be a cross-
-# reference type, `xsB:'.
-#
-# The definition of `struct C' contains a nested definition for
-# `struct B' --- or more properly, `struct C::B'. However, the stabs
-# fail to qualify the structure tag: it just looks like a definition
-# for `struct B'. I think this is a compiler bug, but perhaps GCC
-# doesn't emit qualified names for a reason.
-#
-# `hang.H' gets #included by both `hang1.C' and `hang2.C'. So the
-# stabs for `struct A', the incomplete `struct B', and `struct C'
-# appear in both hang1.o's and hang2.o's stabs.
-#
-# When those two files are linked together, since hang2.o appears
-# later in the command line, its #inclusion of `hang.H' gets replaced
-# with an N_EXCL stab, referring back to hang1.o's stabs for the
-# header file.
-#
-# When GDB builds psymtabs for the executable hang, it notes that
-# hang2.o's stabs contain an N_EXCL referring to a header that appears
-# in full in hang1.o's stabs. So hang2.o's psymtab lists a dependency
-# on hang1.o's psymtab.
-#
-# When the user types the command `print var_in_b', GDB scans the
-# psymtabs for a symbol by that name, and decides to read full symbols
-# for `hang2.o'.
-#
-# Since `hang2.o''s psymtab lists `hang1.o' as a dependency, GDB first
-# reads `hang1.o''s symbols. When GDB sees `(1,3)=xsB:', it creates a
-# type object for `struct B', sets its TYPE_FLAG_STUB flag, and
-# records it as type number `(1,3)'.
-#
-# When GDB finds the definition of `struct C::B', since the stabs
-# don't indicate that the type is nested within C, it treats it as
-# a definition of `struct B'.
-#
-# When GDB is finished reading `hang1.o''s symbols, it calls
-# `cleanup_undefined_types'. This function mistakes the definition of
-# `struct C::B' for a definition for `struct B', and overwrites the
-# incomplete type object for the real `struct B', using `memcpy'. Now
-# stabs type number `(1,3)' refers to this (incorrect) complete type.
-# Furthermore, the `memcpy' simply copies the original's `cv_type'
-# field to the target, giving the target a corrupt `cv_type' ring: the
-# chain does not point back to the target type.
-#
-# Having satisfied `hang2.o''s psymtab's dependencies, GDB begins to
-# read `hang2.o''s symbols. These contain the true definition for
-# `struct B', which refers to type number `(1,3)' as the type it's
-# defining. GDB looks up type `(1,3)', and finds the (incorrect)
-# complete type established by the call to `cleanup_undefined_types'
-# above. However, it doesn't notice that the type is already defined,
-# and passes it to `read_struct_type', which then writes the new
-# definition's size, field list, etc. into the type object which
-# already has those fields initialized. Adding insult to injury,
-# `read_struct_type' then calls `finish_cv_type'; since the `memcpy'
-# in `cleanup_undefined_types' corrupted the target type's `cv_type'
-# ring, `finish_cv_type' enters an infinite loop.
-
-# This checks that GDB recognizes when a structure is about to be
-# overwritten, and refuses, with a complaint.
-gdb_test "print var_in_b" " = 1729" "doesn't overwrite struct type"
-
-# This checks that cleanup_undefined_types doesn't create corrupt
-# cv_type chains. Note that var_in_hang3 does need to be declared in
-# a separate compilation unit, whose psymtab depends on hang1.o's
-# psymtab. Otherwise, GDB won't call cleanup_undefined_types (as it
-# finishes hang1.o's symbols) before it calls make_cv_type (while
-# reading hang3.o's symbols).
-#
-# The bug only happens when you compile with -gstabs+; Otherwise, GCC
-# won't include the `const' qualifier on `const_B_ptr' in `hang3.o''s
-# STABS, so GDB won't try to create a const variant of the smashed
-# struct type, and get caught by the corrupted cv_type chain.
-gdb_test "print var_in_hang3" " = 42" "doesn't corrupt cv_type chain"
diff --git a/gdb/testsuite/gdb.c++/hang1.C b/gdb/testsuite/gdb.c++/hang1.C
deleted file mode 100644
index 4b04d77e68c..00000000000
--- a/gdb/testsuite/gdb.c++/hang1.C
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "hang.H"
-
-int main (int argc, char **argv) { return 0; }
diff --git a/gdb/testsuite/gdb.c++/hang2.C b/gdb/testsuite/gdb.c++/hang2.C
deleted file mode 100644
index 59732f87d63..00000000000
--- a/gdb/testsuite/gdb.c++/hang2.C
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "hang.H"
-
-struct B
-{
- int member_of_B;
-};
-
-int var_in_b = 1729;
diff --git a/gdb/testsuite/gdb.c++/hang3.C b/gdb/testsuite/gdb.c++/hang3.C
deleted file mode 100644
index 92c82fa2441..00000000000
--- a/gdb/testsuite/gdb.c++/hang3.C
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "hang.H"
-
-const struct B *const_B_ptr;
-int var_in_hang3 = 42;
diff --git a/gdb/testsuite/gdb.c++/inherit.exp b/gdb/testsuite/gdb.c++/inherit.exp
deleted file mode 100644
index 86c1f834f11..00000000000
--- a/gdb/testsuite/gdb.c++/inherit.exp
+++ /dev/null
@@ -1,996 +0,0 @@
-# Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-set ws "\[\r\n\t \]+"
-set nl "\[\r\n\]+"
-
-# The format of a g++ virtual base pointer.
-set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if { [skip_cplus_tests] } { continue }
-
-# Note - create separate "inherit" executable from misc.cc
-
-set testfile "inherit"
-set srcfile misc.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-#
-# Single inheritance, print individual members.
-#
-
-proc test_print_si_members {} {
- # Print all members of g_A using fully qualified form.
-
- gdb_test "print g_A.A::a" ".* = 1" "print g_A.A::a"
-
- gdb_test "print g_A.A::x" ".* = 2" "print g_A.A::x"
-
- # Print members of g_A using nonambiguous compact form.
-
- gdb_test "print g_A.a" ".* = 1" "print g_A.a"
-
- gdb_test "print g_A.x" ".* = 2" "print g_A.x"
-
- # Print all members of g_B using fully qualified form.
-
- gdb_test "print g_B.A::a" ".* = 3" "print g_B.A::a"
-
- gdb_test "print g_B.A::x" ".* = 4" "print g_B.A::x"
-
- gdb_test "print g_B.B::b" ".* = 5" "print g_B.B::b"
-
- gdb_test "print g_B.B::x" ".* = 6" "print g_B.B::x"
-
- # Print members of g_B using nonambiguous compact form.
-
- gdb_test "print g_B.a" ".* = 3" "print g_B.a"
-
- gdb_test "print g_B.b" ".* = 5" "print g_B.b"
-
- gdb_test "print g_B.x" ".* = 6" "print g_B.x"
-
- # Print all members of g_C using fully qualified form.
-
- gdb_test "print g_C.A::a" ".* = 7" "print g_C.A::a"
-
- gdb_test "print g_C.A::x" ".* = 8" "print g_C.A::x"
-
- gdb_test "print g_C.C::c" ".* = 9" "print g_C.C::c"
-
- gdb_test "print g_C.C::x" ".* = 10" "print g_C.C::x"
-
- # Print members of g_C using nonambiguous compact form.
-
- gdb_test "print g_C.a" ".* = 7" "print g_C.a"
-
- gdb_test "print g_C.c" ".* = 9" "print g_C.c"
-
- gdb_test "print g_C.x" ".* = 10" "print g_C.x"
-}
-
-#
-# Single inheritance, print type definitions.
-#
-
-proc test_ptype_si {} {
- global gdb_prompt
- global ws
- global nl
- global hp_aCC_compiler
-
- # Print class A as a type.
-
- send_gdb "ptype A\n"
- gdb_expect {
- -re "type = class A \{$nl.*\[ \]*int a;$nl\[ \]*int x;$nl.*\[ \]*\}$nl$gdb_prompt $" {
- pass "ptype A (FIXME)"
- }
- -re "type = struct A \{$nl\[ \]*int a;$nl\[ \]*int x;$nl\[ \]*\}$nl$gdb_prompt $" {
- setup_xfail "*-*-*"
- fail "ptype A (FIXME)"
- }
- -re ".*$gdb_prompt $" { fail "ptype A" }
- timeout { fail "ptype A (timeout)" ; return }
- }
-
- # Print class A as an explicit class.
-
- send_gdb "ptype class A\n"
- gdb_expect {
- -re "type = class A \{$nl.*\[ \]*int a;$nl\[ \]*int x;$nl.*\[ \]*\}$nl$gdb_prompt $" {
- pass "ptype class A (FIXME)"
- }
- -re "type = struct A \{$nl\[ \]*int a;$nl\[ \]*int x;$nl\[ \]*\}$nl$gdb_prompt $" {
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
- fail "ptype class A (FIXME)"
- }
- -re ".*$gdb_prompt $" { fail "ptype class A" }
- timeout { fail "ptype class A (timeout)" ; return }
- }
-
- # Print type of an object of type A.
-
- send_gdb "ptype g_A\n"
- gdb_expect {
- -re "type = class A \{$nl.*\[ \]*int a;$nl\[ \]*int x;$nl.*\[ \]*\}$nl$gdb_prompt $" {
- pass "ptype g_A (FIXME)"
- }
- -re "type = struct A \{$nl\[ \]*int a;$nl\[ \]*int x;$nl\[ \]*\}$nl$gdb_prompt $" {
- if {!$hp_aCC_compiler} {setup_xfail "*-*-*"}
- fail "ptype g_A (FIXME)"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_A" }
- timeout { fail "ptype g_A (timeout)" ; return }
- }
-
- # Print class B as a type.
-
- gdb_test "ptype B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype B"
-
- # Print class B as an explicit class.
-
- gdb_test "ptype class B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype class B"
-
- # Print type of an object of type B.
-
- gdb_test "ptype g_B" "type = class B : public A \{$nl\[ \]*public:$nl\[ \]*int b;$nl\[ \]*int x;$nl.*\}" "ptype g_B"
-
- # Print class C as a type.
-
- gdb_test "ptype C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype C"
-
- # Print class C as an explicit class.
-
- gdb_test "ptype class C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype class C"
-
- # Print type of an object of type g_C.
-
- gdb_test "ptype g_C" "type = class C : public A \{$nl\[ \]*public:$nl\[ \]*int c;$nl\[ \]*int x;$nl.*\}" "ptype g_C"
-
- # gcc cygnus-2.3.3 (Q1) has this bug, but it was fixed as of
- # cygnus-2.3.3-930417. PR 2819.
- send_gdb "ptype tagless_struct\n"
- gdb_expect {
- -re "type = class \{${ws}public:${ws}int one;${ws}int two;${ws}tagless_struct & operator=\\(tagless_struct (const ?)?&\\);${ws}tagless_struct\\(tagless_struct (const ?)?&\\);${ws}tagless_struct\\(\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype tagless struct"
- }
- -re "type = class \{${ws}public:${ws}int one;${ws}int two;;${ws}\}$nl$gdb_prompt $" {
- pass "ptype tagless struct"
- }
- -re "type = (struct|class).*\{.*int one;.*int two;.*\}$nl$gdb_prompt $" {
- pass "ptype tagless struct (obsolete gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype tagless struct"
- }
- timeout {
- fail "ptype tagless struct (timeout)"
- }
- }
-
- send_gdb "ptype v_tagless\n"
- gdb_expect {
- -re "type = class \{${ws}public:${ws}int one;${ws}int two;${ws}tagless_struct & operator=\\(tagless_struct (const ?)?&\\);${ws}tagless_struct\\(tagless_struct (const ?)?&\\);${ws}tagless_struct\\(\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype variable of type tagless struct"
- }
- -re "type = class \{${ws}public:${ws}int one;${ws}int two;;${ws}\}$nl$gdb_prompt $" {
- pass "ptype tagless struct"
- }
- -re "type = (struct|class).*\{.*int one;.*int two;.*\}$nl$gdb_prompt $" {
- pass "ptype variable of type tagless struct (obsolete gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype variable of type tagless struct"
- }
- timeout {
- fail "ptype variable of type tagless struct (timeout)"
- }
- }
-}
-
-#
-# Single inheritance, print complete classes.
-#
-
-proc test_print_si_classes {} {
- # Print all members of g_A.
-
- gdb_test "print g_A" ".* = \{a = 1, x = 2\}" "print g_A"
-
- # Print all members of g_B.
-
- gdb_test "print g_B" ".* = \{\<(class |)A\> = \{a = 3, x = 4\}, b = 5, x = 6\}" "print g_B"
-
- # Print all members of g_C.
-
- gdb_test "print g_C" ".* = \{\<(class |)A\> = \{a = 7, x = 8\}, c = 9, x = 10\}" "print g_C"
-}
-
-#
-# Single inheritance, print anonymous unions.
-# GDB versions prior to 4.14 entered an infinite loop when printing
-# the type of a class containing an anonymous union, and they were also
-# incapable of printing the member of an anonymous union.
-# We test the printing of the member first, and perform the other tests
-# only if the test succeeds, to avoid the infinite loop.
-#
-
-proc test_print_anon_union {} {
- global gdb_prompt
- global ws
- global nl
-
- gdb_test "print g_anon_union.a" ".* = 2" "print anonymous union member"
- send_gdb "print g_anon_union\n"
- gdb_expect {
- -re ".* = \{one = 1, ( = |)\{a = 2, b = 2\}\}$nl$gdb_prompt $" {
- pass "print variable of type anonymous union"
- }
- -re ".* = .*\{one = 1, ( = |)\{a = 2, b = .*\}\}$nl$gdb_prompt $" {
- pass "print variable of type anonymous union (obsolete gcc or gdb)"
- }
- -re ".*$nl$gdb_prompt $" {
- fail "print variable of type anonymous union"
- }
- timeout {
- fail "print variableof type anonymous union (timeout)"
- }
- }
- send_gdb "ptype g_anon_union\n"
- gdb_expect {
- -re "type = class class_with_anon_union \{${ws}public:${ws}int one;${ws}union \{${ws}public:${ws}int a;${ws}long int b;${ws}union \{\.\.\.\} & operator=\\(union \{\.\.\.\} &\\);${ws}\\\$_0 \\(union \{\.\.\.\} &\\);${ws}\\\$_0 \\(\\);${ws}\};${ws}class_with_anon_union & operator=\\(class_with_anon_union const &\\);${ws}class_with_anon_union\\(class_with_anon_union const &\\);${ws}class_with_anon_union\\(void\\);${ws}\}$nl$gdb_prompt $" {
- pass "print type of anonymous union"
- }
- -re "type = class class_with_anon_union \{${ws}public:${ws}int one;${ws}union \{${ws}int a;${ws}long int b;${ws}\};${ws}class_with_anon_union & operator=\\(class_with_anon_union const ?&\\);${ws}class_with_anon_union\\(class_with_anon_union const ?&\\);${ws}class_with_anon_union\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "print type of anonymous union"
- }
- -re "type = class class_with_anon_union \{${ws}public:${ws}int one;${ws}union \{${ws}int a;${ws}long int b;${ws}\};${ws}\}$nl$gdb_prompt $" {
- pass "print type of anonymous union"
- }
- -re "type = (struct|class).*\{.*int one;.*union \{.*int a;.*(long|long int|int) b;.*\};.*\}$nl$gdb_prompt $" {
- pass "print type of anonymous union (obsolete gcc or gdb)"
- }
- -re ".*$nl$gdb_prompt $" {
- fail "print type of anonymous union"
- }
- timeout {
- fail "print type of anonymous union (timeout)"
- }
- }
-}
-
-#
-# Multiple inheritance, print individual members.
-#
-
-proc test_print_mi_members {} {
- global gdb_prompt
- global nl
- global hp_aCC_compiler
-
- # Print all members of g_A.
-
- gdb_test "print g_A.A::a" ".* = 1" "print g_A.A::a"
-
- gdb_test "print g_A.A::x" ".* = 2" "print g_A.A::x"
-
- # Print all members of g_B.
-
- gdb_test "print g_B.A::a" ".* = 3" "print g_B.A::a"
-
- gdb_test "print g_B.A::x" ".* = 4" "print g_B.A::x"
-
- gdb_test "print g_B.B::b" ".* = 5" "print g_B.B::b"
-
- gdb_test "print g_B.B::x" ".* = 6" "print g_B.B::x"
-
- # Print all members of g_C.
-
- gdb_test "print g_C.A::a" ".* = 7" "print g_C.A::a"
-
- gdb_test "print g_C.A::x" ".* = 8" "print g_C.A::x"
-
- gdb_test "print g_C.C::c" ".* = 9" "print g_C.C::c"
-
- gdb_test "print g_C.C::x" ".* = 10" "print g_C.C::x"
-
- # Print all members of g_D.
-
- # The following is ambiguous, and gdb should detect this.
- # For now, accept gdb's behavior as an expected failure if it
- # simply prints either member correctly.
-
- send_gdb "print g_D.A::a\n"
- gdb_expect {
- -re "warning: A ambiguous; using D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 15$nl$gdb_prompt $" {
- pass "print g_D.A::a"
- }
- -re "warning: A ambiguous; using D::B::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 11$nl$gdb_prompt $" {
- pass "print g_D.A::a (using B)"
- }
- -re ".* = 15$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_D.A::a"
- }
- -re ".* = 11$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_D.A::a"
- }
- -re ".*$gdb_prompt $" { fail "print g_D.A::a" }
- timeout { fail "print g_D.A::a (timeout)" ; return }
- }
-
- # The following is ambiguous, and gdb should detect this.
- # For now, accept gdb's behavior as an expected failure if it
- # simply prints either member correctly.
-
- send_gdb "print g_D.A::x\n"
- gdb_expect {
- -re "warning: A ambiguous; using D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 16$nl$gdb_prompt $" {
- pass "print g_D.A::x"
- }
- -re "warning: A ambiguous; using D::B::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 12$nl$gdb_prompt $" {
- pass "print g_D.A::x (using B)"
- }
- -re ".* = 16$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_D.A::x"
- }
- -re ".* = 12$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_D.A::x"
- }
- -re ".*$gdb_prompt $" { fail "print g_D.A::x" }
- timeout { fail "print g_D.A::x (timeout)" ; return }
- }
-
- gdb_test "print g_D.B::b" ".* = 13" "print g_D.B::b"
-
- gdb_test "print g_D.B::x" ".* = 14" "print g_D.B::x"
-
- gdb_test "print g_D.C::c" ".* = 17" "print g_D.C::c"
-
- gdb_test "print g_D.C::x" ".* = 18" "print g_D.C::x"
-
- gdb_test "print g_D.D::d" ".* = 19" "print g_D.D::d"
-
- gdb_test "print g_D.D::x" ".* = 20" "print g_D.D::x"
-
- # Print all members of g_E.
-
- # The following is ambiguous, and gdb should detect this.
- # For now, accept gdb's behavior as an expected failure if it
- # simply prints either member correctly.
-
- send_gdb "print g_E.A::a\n"
- gdb_expect {
- -re ".* = 21$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_E.A::a"
- }
- -re ".* = 25$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_E.A::a"
- }
- -re ".*$gdb_prompt $" { fail "print g_E.A::a" }
- timeout { fail "print g_E.A::a (timeout)" ; return }
- }
-
- # The following is ambiguous, and gdb should detect this.
- # For now, accept gdb's behavior as an expected failure if it
- # simply prints either member correctly.
-
- send_gdb "print g_E.A::x\n"
- gdb_expect {
- -re "warning: A ambiguous; using E::D::C::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 26$nl$gdb_prompt $" {
- pass "print g_E.A::x"
- }
- -re "warning: A ambiguous; using E::D::B::A. Use a cast to disambiguate.$nl\\$\[0-9\]* = 22$nl$gdb_prompt $" {
- pass "print g_E.A::x (using B)"
- }
- -re ".* = 26$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_E.A::x"
- }
- -re ".* = 22$nl$gdb_prompt $" {
- kfail "gdb/68" "print g_E.A::x"
- }
- -re ".*$gdb_prompt $" { fail "print g_E.A::x" }
- timeout { fail "print g_E.A::x (timeout)" ; return }
- }
-
- gdb_test "print g_E.B::b" ".* = 23" "print g_E.B::b"
-
- gdb_test "print g_E.B::x" ".* = 24" "print g_E.B::x"
-
- gdb_test "print g_E.C::c" ".* = 27" "print g_E.C::c"
-
- gdb_test "print g_E.C::x" ".* = 28" "print g_E.C::x"
-
- gdb_test "print g_E.D::d" ".* = 29" "print g_E.D::d"
-
- gdb_test "print g_E.D::x" ".* = 30" "print g_E.D::x"
-
- gdb_test "print g_E.E::e" ".* = 31" "print g_E.E::e"
-
- gdb_test "print g_E.E::x" ".* = 32" "print g_E.E::x"
-}
-
-#
-# Multiple inheritance, print type definitions.
-#
-
-proc test_ptype_mi {} {
- global nl
-
- gdb_test "ptype D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype D"
-
- gdb_test "ptype class D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype class D"
-
- gdb_test "ptype g_D" "type = class D : public B, public C \{$nl\[ \]*public:$nl\[ \]*int d;$nl\[ \]*int x;$nl.*\}" "ptype g_D"
-
- gdb_test "ptype E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype E"
-
- gdb_test "ptype class E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype class E"
-
- gdb_test "ptype g_E" "type = class E : public D \{$nl\[ \]*public:$nl\[ \]*int e;$nl\[ \]*int x;$nl.*\}" "ptype g_E"
-}
-
-#
-# Multiple inheritance, print complete classes.
-#
-
-proc test_print_mi_classes {} {
- # Print all members of g_D.
-
- gdb_test "print g_D" ".* = \{\<(class |)B\> = \{\<(class |)A\> = \{a = 11, x = 12\}, b = 13, x = 14\}, \<(class |)C\> = \{\<(class |)A\> = \{a = 15, x = 16\}, c = 17, x = 18\}, d = 19, x = 20\}" "print g_D"
-
- # Print all members of g_E.
-
- gdb_test "print g_E" ".* = \{\<(class |)D\> = \{\<(class |)B\> = \{\<(class |)A\> = \{a = 21, x = 22\}, b = 23, x = 24\}, \<(class |)C\> = \{\<(class |)A\> = \{a = 25, x = 26\}, c = 27, x = 28\}, d = 29, x = 30\}, e = 31, x = 32\}" "print g_E"
-}
-
-#
-# Single virtual inheritance, print individual members.
-#
-
-proc test_print_svi_members {} {
- global gdb_prompt
- global decimal
- global nl
-
- # Print all members of g_vA.
-
- gdb_test "print g_vA.vA::va" ".* = 1" "print g_vA.vA::va"
-
- gdb_test "print g_vA.vA::vx" ".* = 2" "print g_vA.vA::vx"
-
- # Print members of g_vA using compact form.
-
- gdb_test "print g_vA.va" ".* = 1" "print g_vA.va"
-
- gdb_test "print g_vA.vx" ".* = 2" "print g_vA.vx"
-
- # Print all members of g_vB.
-
- send_gdb "print g_vB.vA::va\n"
- gdb_expect {
- -re ".* = 3$nl$gdb_prompt $" { pass "print g_vB.vA::va" }
- -re ".*virtual baseclass botch.*$gdb_prompt $" {
- # Does not happen with gcc cygnus-2.4.5-930828
- fail "print g_vB.vA::va (known bug with gcc cygnus-2.4.5-930417)"
- # Many of the rest of these tests have the same problem.
- return 0
- }
- -re ".*$gdb_prompt $" { fail "print g_vB.vA::va" }
- timeout { fail "print g_vB.vA::va (timeout)" ; return }
- }
-
- gdb_test "print g_vB.vA::vx" ".* = 4" "print g_vB.vA::vx"
-
- gdb_test "print g_vB.vB::vb" ".* = 5" "print g_vB.vB::vb"
-
- gdb_test "print g_vB.vB::vx" ".* = 6" "print g_vB.vB::vx"
-
- # Print members of g_vB using compact form.
-
- gdb_test "print g_vB.va" ".* = 3" "print g_vB.va"
-
- gdb_test "print g_vB.vb" ".* = 5" "print g_vB.vb"
-
- gdb_test "print g_vB.vx" ".* = 6" "print g_vB.vx"
-
- # Print all members of g_vC.
-
- gdb_test "print g_vC.vA::va" ".* = 7" "print g_vC.vA::va"
-
- gdb_test "print g_vC.vA::vx" ".* = 8" "print g_vC.vA::vx"
-
- gdb_test "print g_vC.vC::vc" ".* = 9" "print g_vC.vC::vc"
-
- gdb_test "print g_vC.vC::vx" ".* = 10" "print g_vC.vC::vx"
-
- # Print members of g_vC using compact form.
-
- gdb_test "print g_vC.va" ".* = 7" "print g_vC.va"
-
- gdb_test "print g_vC.vc" ".* = 9" "print g_vC.vc"
-
- gdb_test "print g_vC.vx" ".* = 10" "print g_vC.vx"
-}
-
-#
-# Single virtual inheritance, print type definitions.
-#
-
-proc test_ptype_vi {} {
- global gdb_prompt
- global ws
- global nl
- global vbptr
-
- # This class does not use any C++-specific features, so it's fine for
- # it to print as "struct".
- send_gdb "ptype vA\n"
- gdb_expect {
- -re "type = class vA \{$nl\[ \]*public:$nl\[ \]*int va;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype vA"
- }
- -re "type = struct vA \{$nl\[ \]*int va;$nl\[ \]*int vx;$nl\}$nl$gdb_prompt $" {
- pass "ptype vA"
- }
- -re ".*$gdb_prompt $" { fail "ptype vA" }
- timeout { fail "ptype vA (timeout)" ; return }
- }
-
- # This class does not use any C++-specific features, so it's fine for
- # it to print as "struct".
- send_gdb "ptype class vA\n"
- gdb_expect {
- -re "type = class vA \{$nl\[ \]*public:$nl\[ \]*int va;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class vA"
- }
- -re "type = struct vA \{$nl\[ \]*int va;$nl\[ \]*int vx;$nl\}$nl$gdb_prompt $" {
- pass "ptype class vA"
- }
- -re ".*$gdb_prompt $" { fail "ptype class vA" }
- timeout { fail "ptype class vA (timeout)" ; return }
- }
-
- # This class does not use any C++-specific features, so it's fine for
- # it to print as "struct".
- send_gdb "ptype g_vA\n"
- gdb_expect {
- -re "type = class vA \{$nl\[ \]*public:$nl\[ \]*int va;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype g_vA"
- }
- -re "type = struct vA \{$nl\[ \]*int va;$nl\[ \]*int vx;$nl\}$nl$gdb_prompt $" {
- pass "ptype g_vA"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_vA" }
- timeout { fail "ptype g_vA (timeout)" ; return }
- }
-
- send_gdb "ptype vB\n"
- gdb_expect {
- -re "ptype vB${nl}type = class vB : public virtual vA \{$nl private:${ws}vA \\*${vbptr}vA;$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype vB"
- }
- -re "ptype vB${nl}type = class vB : public virtual vA \{$nl public:${ws}int vb;${ws}int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype vB (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype vB" }
- timeout { fail "ptype vB (timeout)" }
- }
-
- send_gdb "ptype class vB\n"
- gdb_expect {
- -re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class vB"
- }
- -re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class vB (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype class vB" }
- timeout { fail "ptype class vB (timeout)" }
- }
-
- send_gdb "ptype g_vB\n"
- gdb_expect {
- -re "type = class vB : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype g_vB"
- }
- -re "type = class vB : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vb;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype g_vB (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_vB" }
- timeout { fail "ptype g_vB (timeout)" }
- }
-
- send_gdb "ptype vC\n"
- gdb_expect {
- -re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype vC"
- }
- -re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype vC (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype vC" }
- timeout { fail "ptype vC (timeout)" }
- }
-
- send_gdb "ptype class vC\n"
- gdb_expect {
- -re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class vC"
- }
- -re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype class vC (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype class vC" }
- timeout { fail "ptype class vC (timeout)" }
- }
-
- send_gdb "ptype g_vC\n"
- gdb_expect {
- -re "type = class vC : public virtual vA \{$nl\[ \]*private:$nl\[ \]*vA \\*${vbptr}vA;$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype g_vC"
- }
- -re "type = class vC : public virtual vA \{$nl\[ \]*public:$nl\[ \]*int vc;$nl\[ \]*int vx;$nl.*\}$nl$gdb_prompt $" {
- pass "ptype g_vC (aCC)"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_vC" }
- timeout { fail "ptype g_vC (timeout)" }
- }
-}
-
-#
-# Single virtual inheritance, print complete classes.
-#
-
-proc test_print_svi_classes {} {
- global gdb_prompt
- global hex
- global decimal
- global nl
- global vbptr
-
- # Print all members of g_vA.
-
- gdb_test "print g_vA" ".* = \{va = 1, vx = 2\}" "print g_vA"
-
- # Print all members of g_vB.
-
- send_gdb "print g_vB\n"
- gdb_expect {
- -re ".* = \{\<class vA\> = \{va = 3, vx = 4\}, vb = 5, vx = 6, Virtual table at $hex\}$nl$gdb_prompt $" {
- pass "print g_vB (aCC)"
- }
- -re ".* = \{\<class vA\> = \{va = 3, vx = 4\}, vb = 5, vx = 6, __vfp = $hex\}$nl$gdb_prompt $" {
- pass "print g_vB (aCC)"
- }
- -re ".* = \{\<vA\> = \{va = 3, vx = 4\}, ${vbptr}vA = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
- pass "print g_vB"
- }
- -re ".* = \{\<vA\> = \{va = 3, vx = 4\}, _vptr.vB = $hex, vb = 5, vx = 6\}$nl$gdb_prompt $" {
- pass "print g_vB (FIXME v3 vtbl ptr)"
- }
- -re ".*invalid address 0x0.*$gdb_prompt $" {
- # Does not happen with gcc cygnus-2.4.5-930828
- fail "print g_vB (known bug with gcc cygnus-2.4.5-930417)"
- # Many of the rest of these tests have the same problem.
- return 0
- }
- -re ".*$gdb_prompt $" { fail "print g_vB" }
- timeout { fail "print g_vB (timeout)" ; return }
- }
-
- # Print all members of g_vC.
-
- send_gdb "print g_vC\n"
- gdb_expect {
- -re ".* = \{\<class vA\> = \{va = 7, vx = 8\}, vc = 9, vx = 10, Virtual table at $hex\}$nl$gdb_prompt $" {
- pass "print g_vC (aCC)"
- }
- -re ".* = \{\<class vA\> = \{va = 7, vx = 8\}, vc = 9, vx = 10, __vfp = $hex\}$nl$gdb_prompt $" {
- pass "print g_vC (aCC)"
- }
- -re ".* = \{\<vA\> = \{va = 7, vx = 8\}, ${vbptr}vA = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
- pass "print g_vC"
- }
- -re ".* = \{\<vA\> = \{va = 7, vx = 8\}, _vptr.vC = $hex, vc = 9, vx = 10\}$nl$gdb_prompt $" {
- pass "print g_vC (FIXME v3 vtbl ptr)"
- }
- -re ".*$gdb_prompt $" { fail "print g_vC" }
- timeout { fail "print g_vC (timeout)" }
- }
-}
-
-#
-# Multiple virtual inheritance, print individual members.
-#
-
-proc test_print_mvi_members {} {
- global gdb_prompt
- global decimal
- global nl
-
- # Print all members of g_vD.
-
- send_gdb "print g_vD.vA::va\n"
- gdb_expect {
- -re ".* = 19$nl$gdb_prompt $" { pass "print g_vD.vA::va" }
- -re ".*virtual baseclass botch.*$gdb_prompt $" {
- # Does not happen with gcc cygnus-2.4.5-930828
- fail "print g_vD.vA::va (known bug with gcc cygnus-2.4.5-930417)"
- # Many of the rest of these tests have the same problem.
- return 0
- }
- -re ".*$gdb_prompt $" { fail "print g_vD.vA::va" }
- timeout { fail "print g_vD.vA::va (timeout)" ; return }
- }
-
- gdb_test "print g_vD.vA::vx" ".* = 20" "print g_vD.vA::vx"
-
- gdb_test "print g_vD.vB::vb" ".* = 21" "print g_vD.vB::vb"
-
- gdb_test "print g_vD.vB::vx" ".* = 22" "print g_vD.vB::vx"
-
- gdb_test "print g_vD.vC::vc" ".* = 23" "print g_vD.vC::vc"
-
- gdb_test "print g_vD.vC::vx" ".* = 24" "print g_vD.vC::vx"
-
- gdb_test "print g_vD.vD::vd" ".* = 25" "print g_vD.vD::vd"
-
- gdb_test "print g_vD.vD::vx" ".* = 26" "print g_vD.vD::vx"
-
- # Print all members of g_vE.
-
- gdb_test "print g_vE.vA::va" ".* = 0" "print g_vE.vA::va"
-
- gdb_test "print g_vE.vA::vx" ".* = 0" "print g_vE.vA::vx"
-
- gdb_test "print g_vE.vB::vb" ".* = 0" "print g_vE.vB::vb"
-
- gdb_test "print g_vE.vB::vx" ".* = 0" "print g_vE.vB::vx"
-
- gdb_test "print g_vE.vC::vc" ".* = 0" "print g_vE.vC::vc"
-
- gdb_test "print g_vE.vC::vx" ".* = 0" "print g_vE.vC::vx"
-
- gdb_test "print g_vE.vD::vd" ".* = 0" "print g_vE.vD::vd"
-
- gdb_test "print g_vE.vD::vx" ".* = 0" "print g_vE.vD::vx"
-
- gdb_test "print g_vE.vE::ve" ".* = 27" "print g_vE.vE::ve"
-
- gdb_test "print g_vE.vE::vx" ".* = 28" "print g_vE.vE::vx"
-}
-
-#
-# Multiple virtual inheritance, print type definitions.
-#
-
-proc test_ptype_mvi {} {
- global gdb_prompt
- global ws
- global nl
- global vbptr
-
- send_gdb "ptype vD\n"
- gdb_expect {
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype vD"
- }
- -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
- pass "ptype vD"
- }
- -re ".*$gdb_prompt $" { fail "ptype vD" }
- timeout { fail "(timeout) ptype vD" }
- }
-
- send_gdb "ptype class vD\n"
- gdb_expect {
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype class vD"
- }
- -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;.*\}.*$gdb_prompt $" {
- pass "ptype class vD"
- }
- -re ".*$gdb_prompt $" { fail "ptype class vD" }
- timeout { fail "(timeout) ptype class vD" }
- }
-
- send_gdb "ptype g_vD\n"
- gdb_expect {
- -re "type = class vD : public virtual vB, public virtual vC \{${ws}private:${ws}vC \\*${vbptr}vC;${ws}vB \\*${vbptr}vB;${ws}public:${ws}int vd;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype g_vD"
- }
- -re ".*class vD : public virtual vB, public virtual vC \{${ws}public:${ws}int vd;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
- pass "ptype g_vD"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_vD" }
- timeout { fail "(timeout) ptype g_vD" }
- }
-
- send_gdb "ptype vE\n"
- gdb_expect {
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype vE"
- }
- -re ".*class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
- pass "ptype vE"
- }
- -re ".*$gdb_prompt $" { fail "ptype vE" }
- timeout { fail "(timeout) ptype vE" }
- }
-
- send_gdb "ptype class vE\n"
- gdb_expect {
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype class vE"
- }
- -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
- pass "ptype class vE"
- }
- -re ".*$gdb_prompt $" { fail "ptype class vE" }
- timeout { fail "(timeout) ptype class vE" }
- }
-
- send_gdb "ptype g_vE\n"
- gdb_expect {
- -re "type = class vE : public virtual vD \{${ws}private:${ws}vD \\*${vbptr}vD;${ws}public:${ws}int ve;${ws}int vx;$nl.*\}.*$gdb_prompt $" {
- pass "ptype g_vE"
- }
- -re "type = class vE : public virtual vD \{${ws}public:${ws}int ve;${ws}int vx;\r\n.*\}.*$gdb_prompt $" {
- pass "ptype g_vE"
- }
- -re ".*$gdb_prompt $" { fail "ptype g_vE" }
- timeout { fail "(timeout) ptype g_vE" }
- }
-}
-
-#
-# Multiple virtual inheritance, print complete classes.
-#
-
-proc test_print_mvi_classes {} {
- global gdb_prompt
- global hex
- global decimal
- global nl
- global vbptr
-
- # Print all members of g_vD.
-
- send_gdb "print g_vD\n"
- gdb_expect {
- -re ".* = \{\<class vB\> = \{\<class vA\> = \{va = 19, vx = 20\}, vb = 21, vx = 22, Virtual table at $hex\}, \<class vC\> = \{vc = 23, vx = 24, Virtual table at $hex\}, vd = 25, vx = 26, Virtual table at $hex\}$nl$gdb_prompt $" {
- pass "print g_vD (aCC)"
- }
- -re ".* = \{\<class vB\> = \{\<class vA\> = \{va = 19, vx = 20\}, vb = 21, vx = 22, __vfp = $hex\}, \<class vC\> = \{vc = 23, vx = 24, __vfp = $hex\}, vd = 25, vx = 26, __vfp = $hex\}$nl$gdb_prompt $" {
- pass "print g_vD (aCC)"
- }
- -re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, ${vbptr}vA = $hex, vb = 21, vx = 22\}, \<vC\> = \{${vbptr}vA = $hex, vc = 23, vx = 24\}, ${vbptr}vC = $hex, ${vbptr}vB = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
- pass "print g_vD"
- }
- -re ".* = \{\<vB\> = \{\<vA\> = \{va = 19, vx = 20\}, _vptr.vB = $hex, vb = 21, vx = 22\}, \<vC\> = \{_vptr.vC = $hex, vc = 23, vx = 24\}, _vptr.vD = $hex, vd = 25, vx = 26\}$nl$gdb_prompt $" {
- pass "print g_vD (FIXME v3 vtbl ptr)"
- }
- -re ".*invalid address 0x0.*$gdb_prompt $" {
- # Does not happen with gcc cygnus-2.4.5-930828
- fail "print g_vD (known bug with gcc cygnus-2.4.5-930417)"
- # Many of the rest of these tests have the same problem.
- return 0
- }
- -re ".*$gdb_prompt $" { fail "print g_vD" }
- timeout { fail "print g_vD (timeout)" ; return }
- }
-
- # Print all members of g_vE.
-
- send_gdb "print g_vE\n"
- gdb_expect {
- -re ".* = \{\<class vD\> = \{\<class vB\> = \{\<class vA\> = \{va = 0, vx = 0\}, vb = 0, vx = 0, Virtual table at $hex\}, \<class vC\> = \{vc = 0, vx = 0, Virtual table at $hex\}, vd = 0, vx = 0, Virtual table at $hex\}, ve = 27, vx = 28, Virtual table at $hex\}$nl$gdb_prompt $" {
- pass "print g_vE (aCC)"
- }
- -re ".* = \{\<class vD\> = \{\<class vB\> = \{\<class vA\> = \{va = 0, vx = 0\}, vb = 0, vx = 0, __vfp = $hex\}, \<class vC\> = \{vc = 0, vx = 0, __vfp = $hex\}, vd = 0, vx = 0, __vfp = $hex\}, ve = 27, vx = 28, __vfp = $hex\}$nl$gdb_prompt $" {
- pass "print g_vE (aCC)"
- }
- -re ".* = \{\<vD\> = \{\<vB\> = \{\<vA\> = \{va = 0, vx = 0\}, ${vbptr}vA = $hex, vb = 0, vx = 0\}, \<vC\> = \{${vbptr}vA = $hex, vc = 0, vx = 0\}, ${vbptr}vC = $hex, ${vbptr}vB = $hex, vd = 0, vx = 0\}, ${vbptr}vD = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
- pass "print g_vE"
- }
- -re ".* = \{\<vD\> = \{\<vB\> = \{\<vA\> = \{va = 0, vx = 0\}, _vptr.vB = $hex *(\<VTT for vD\>)?, vb = 0, vx = 0\}, \<vC\> = \{_vptr.vC = $hex *(\<VTT for vD\>)?, vc = 0, vx = 0\}, _vptr.vD = $hex, vd = 0, vx = 0\}, _vptr.vE = $hex, ve = 27, vx = 28\}$nl$gdb_prompt $" {
- pass "print g_vE (FIXME v3 vtbl ptr)"
- }
- -re ".*$gdb_prompt $" { fail "print g_vE" }
- timeout { fail "print g_vE (timeout)" }
- }
-}
-
-proc do_tests {} {
- global prms_id
- global bug_id
- global subdir
- global objdir
- global srcdir
- global binfile
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- gdb_test "set language c++" ""
- gdb_test "set width 0" ""
-
- # Get the debug format for the compiled test case.
-
- if { ![ runto_main] } {
- gdb_suppress_tests;
- }
-
- test_ptype_si
- test_ptype_mi
- test_ptype_vi
- test_ptype_mvi
-
- gdb_stop_suppressing_tests;
-
- if { ![ runto 'inheritance2' ] } {
- gdb_suppress_tests;
- }
-
- test_print_si_members
- test_print_si_classes
- test_print_mi_members
- test_print_mi_classes
- test_print_anon_union
-
- gdb_stop_suppressing_tests;
-
- if { ![ runto 'inheritance4' ] } {
- gdb_suppress_tests;
- }
-
- test_print_svi_members
- test_print_svi_classes
- test_print_mvi_members
- test_print_mvi_classes
-}
-
-do_tests
diff --git a/gdb/testsuite/gdb.c++/local.cc b/gdb/testsuite/gdb.c++/local.cc
deleted file mode 100644
index 85fd6e14a87..00000000000
--- a/gdb/testsuite/gdb.c++/local.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Tests for local types
-
-void marker1 (void)
-{
-}
-
-void marker2 (void)
-{
-}
-
-int foobar (int x)
-{
- class Local {
- public:
- int loc1;
- char loc_foo (char c)
- {
- return c + 3;
- }
- };
-
- Local l;
- static Local l1;
- char c;
-
- marker1 ();
-
- l.loc1 = 23;
-
- c = l.loc_foo('x');
- return c + 2;
-}
-
-int main()
-{
- int c;
-
- c = foobar (31);
-
- { // inner block
- class InnerLocal {
- public:
- char ilc;
- int * ip;
- int il_foo (unsigned const char & uccr)
- {
- return uccr + 333;
- }
- class NestedInnerLocal {
- public:
- int nil;
- int nil_foo (int i)
- {
- return i * 27;
- }
- };
- NestedInnerLocal nest1;
- };
-
- InnerLocal il;
-
- il.ilc = 'b';
- il.ip = &c;
- marker2();
- }
-}
diff --git a/gdb/testsuite/gdb.c++/local.exp b/gdb/testsuite/gdb.c++/local.exp
deleted file mode 100644
index 21ceb7ae3db..00000000000
--- a/gdb/testsuite/gdb.c++/local.exp
+++ /dev/null
@@ -1,228 +0,0 @@
-# Copyright 1998, 1999, 2000, 2001, 2002, 2003 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
-
-# tests for local variables
-# Written by Satish Pai <pai@apollo.hp.com> 1997-07-08
-# Cleaned by Michael Chastain <mec@shout.net> 2002-04-08
-
-
-# This file is part of the gdb testsuite
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "local"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info $binfile "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-#
-# set it up at a breakpoint so we can play with the variable values
-#
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-if ![runto 'marker1'] then {
- perror "couldn't run to marker1"
- continue
-}
-
-gdb_test "up" ".*foobar.*" "up from marker1"
-
-# Local classes in g++ get names like "main.1::InnerLocal", just like local
-# static variables. Some targets use "___" instead of ".".
-
-# ---
-# Pattern 1:
-# PASS
-# dwarf-2
-# gcc 2.95.3
-#
-# Pattern 2:
-# FAIL
-# This has a duplicate "char loc_foo" line. This is a bug.
-# Historically this has been an XFAIL.
-# dwarf-2
-# gcc 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
-#
-# Pattern 3:
-# PASS
-# stabs+
-# gcc 2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
-#
-# Pattern 4:
-# This an old pattern from the hppa aCC version of this file.
-# I left it alone.
-#
-# chastain 2002-04-08
-
-set sep "(\[.\]|___)\[0-9\]"
-
-send_gdb "ptype Local\n"
-gdb_expect {
- -re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype Local" }
- -re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*char loc_foo\\((const *|)char\\);\[\r\n\t \]*\}.*$gdb_prompt $" {
- kfail "gdb/483" "ptype Local"
- }
- -re "type = class Local \{\[\r\n\t \]*public:\[\r\n\t \]*int loc1;\[\r\n\t \]*Local & operator *=\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((foobar__Fi${sep}::|)Local const *&\\);\[\r\n\t \]*Local\\((void|)\\);\[\r\n\t \]*char loc_foo\\(char\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype Local" }
- -re "type = class Local \{\r\n\[\t \]*public:\r\n\[\t \]*int loc1;\r\n\r\n\[\t \]*char loc_foo\\(char\\);\r\n\[\t \]*\\(Local at.*local\\.cc:\[0-9\]*\\)\r\n\}.*$gdb_prompt $" { xpass "ptype Local (old aCC)" }
- -re ".*$gdb_prompt $" { fail "ptype Local" }
- timeout { fail "(timeout) ptype Local" }
-}
-
-gdb_test "break marker2"
-gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker2.*" \
- "continuing to marker2"
-
-gdb_test "up" ".*main.*" "up from marker2"
-
-# Make sure that `Local' isn't in scope here; it's local to foobar.
-# setup_kfail "gdb/825"
-send_gdb "ptype Local\n"
-set eol "\[\t \]*\[\r\n\]+\[\t \]*"
-gdb_expect {
- -re "No symbol \"Local\" in current context.*${gdb_prompt} $" {
- pass "Local out of scope"
- }
- -re "ptype Local${eol}type = class Local {${eol} public:${eol} int loc1;${eol}.*${eol} char loc_foo\\(char\\);${eol}}${eol}${gdb_prompt} " {
- # GCC emits STABS debugging information in a way that doesn't
- # properly preserve the scoping of local classes. I think
- # we'd need to start using Sun's extensions to stabs to get
- # this right.
- kfail gdb/825 "Local out of scope"
- }
- -re ".*${gdb_prompt} $" {
- fail "Local out of scope"
- }
- timeout {
- fail "Local out of scope (timeout)"
- }
-}
-
-
-# DTS CLLbs14316 and CLLbs17058
-# coulter - I added a clause for HP's aCC compiler. We print out the type
-# as xx instead of const unsigned char, but we still have an expected failure
-# because of two reasons:
-# There is a number at the end of InnerLocal4 which should not be there,
-# DTS CLLbs14316
-# The line number for the class
-# setup_xfail "hppa*-*-*" CLLbs14316
-
-# ---
-# Pattern 1:
-# PASS
-# dwarf-2
-# 2.95.3, 2.96-rh, 3.0.4, 3.1, gcc-3_1-branch, HEAD
-#
-# Pattern 2:
-# PASS
-# stabs+
-# 2.95.3, 2.96-rh, 3.0.4, 3.1, gcc-3_1-branch, HEAD
-#
-# Pattern 3:
-# Old hppa pattern.
-#
-# Pattern 4:
-# Old hppa pattern.
-#
-# chastain 2002-05-27
-
-send_gdb "ptype InnerLocal\n"
-gdb_expect {
- -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*int il_foo\\((unsigned char const|const unsigned char) *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 1)" }
- -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 2)" }
- -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" }
- -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal4::NestedInnerLocal nest1;\r\n\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\\(Local at.*local\.cc:\[0-9\]+\\)\r\n\}.*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" }
- -re ".*$gdb_prompt $" { fail "ptype InnerLocal" }
- timeout { fail "(timeout) ptype InnerLocal" }
-}
-
-#---
-# Pattern 1:
-# PASS
-# dwarf-2
-# gcc 2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
-#
-# Pattern 2:
-# PASS
-# stabs+
-# gcc 2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
-#
-# chastain 2002-04-08
-
-send_gdb "ptype NestedInnerLocal\n"
-gdb_expect {
- -re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
- -re "type = class NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*NestedInnerLocal *& *operator *= *\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((void|)\\);\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype NestedInnerLocal" }
- -re ".*$gdb_prompt $" { fail "ptype NestedInnerLocal" }
- timeout { fail "(timeout) ptype NestedInnerLocal" }
-}
-
-# gdb incorrectly interprets the NestedInnerLocal in
-# InnerLocal::NestedInnerLocal as field name instead of a type name;
-# See CLLbs14784.
-
-#---
-# Pattern 3:
-# FAIL
-# The comment above, about CLLbs14784, is still correct.
-# dwarf-2
-# gcc 2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
-# stabs+
-# gcc 2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
-#
-# chastain 2002-04-08
-
-send_gdb "ptype InnerLocal::NestedInnerLocal\n"
-gdb_expect {
- -re "type = class InnerLocal::NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal::NestedInnerLocal" }
- -re "type = class InnerLocal::NestedInnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*int nil;\[\r\n\t \]*NestedInnerLocal *& *operator *= *\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((main${sep}::|)InnerLocal::NestedInnerLocal const *&\\);\[\r\n\t \]*NestedInnerLocal\\((void|)\\);\[\r\n\t \]*int nil_foo\\(int\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal::NestedInnerLocal" }
- -re "There is no field named NestedInnerLocal.*$gdb_prompt $" {
- setup_kfail "gdb/482" *-*-*
- fail "ptype InnerLocal::NestedInnerLocal"
- }
- -re "No symbol .*NestedInnerLocal.* in current context.*$gdb_prompt $" { fail "ptype InnerLocal::NestedInnerLocal (bogus symbol lookup)" }
- -re ".*$gdb_prompt $" { fail "ptype InnerLocal::NestedInnerLocal" }
- timeout { fail "(timeout) ptype InnerLocal::NestedInnerLocal" }
-}
diff --git a/gdb/testsuite/gdb.c++/m-data.cc b/gdb/testsuite/gdb.c++/m-data.cc
deleted file mode 100644
index c97e7195f77..00000000000
--- a/gdb/testsuite/gdb.c++/m-data.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// 2002-05-13
-
-enum region { oriental, egyptian, greek, etruscan, roman };
-
-// Test one.
-class gnu_obj_1
-{
-protected:
- typedef region antiquities;
- const bool test;
- const int key1;
- long key2;
-
- antiquities value;
-
-public:
- gnu_obj_1(antiquities a, long l): test(true), key1(5), key2(l), value(a) {}
-};
-
-// Test two.
-template<typename T>
-class gnu_obj_2: public virtual gnu_obj_1
-{
-protected:
- antiquities value_derived;
-
-public:
- gnu_obj_2(antiquities b): gnu_obj_1(oriental, 7), value_derived(b) { }
-};
-
-// Test three.
-template<typename T>
-class gnu_obj_3
-{
-protected:
- typedef region antiquities;
- gnu_obj_2<int> data;
-
-public:
- gnu_obj_3(antiquities b): data(etruscan) { }
-};
-
-int shadow = 0;
-
-class C
-{
-public:
- C (int x) : shadow (x) {}
- void marker () {}
-private:
- int shadow;
-};
-
-int main()
-{
- gnu_obj_1 test1(egyptian, 4589);
- gnu_obj_2<long> test2(roman);
- gnu_obj_3<long> test3(greek);
-
- C theC (1); // breakpoint: first-constructs-done
- theC.marker ();
-
- return 0;
-}
diff --git a/gdb/testsuite/gdb.c++/m-data.exp b/gdb/testsuite/gdb.c++/m-data.exp
deleted file mode 100644
index 85adb5e5200..00000000000
--- a/gdb/testsuite/gdb.c++/m-data.exp
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Tests for member data
-# 2002-05-13 Benjamin Kosnik <bkoz@redhat.com>
-
-# This file is part of the gdb testsuite
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-if { [skip_cplus_tests] } { continue }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-set testfile "m-data"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-# First, run to after we've constructed all the gnu_obj_N's:
-
-gdb_breakpoint [gdb_get_line_number "first-constructs-done"]
-gdb_continue_to_breakpoint "end of first constructors"
-
-# One.
-
-# simple object, const bool
-gdb_test "print test1.test" "\\$\[0-9\]* = true" "simple object, const bool"
-
-# simple object, const int
-gdb_test "print test1.key1" "\\$\[0-9\]* = 5" "simple object, const int"
-
-# simple object, long
-gdb_test "print test1.key2" "\\$\[0-9\]* = 4589" "simple object, long"
-
-# simple object, enum
-gdb_test "print test1.value" "\\$\[0-9\]* = egyptian" "simple object, enum"
-
-# Two.
-
-# derived template object, base const bool
-gdb_test "print test2.test" "\\$\[0-9\]* = true" "derived template object, base const bool"
-
-# derived template object, base const int
-gdb_test "print test2.key1" "\\$\[0-9\]* = 5" "derived template object, base const int"
-
-# derived template object, base long
-gdb_test "print test2.key2" "\\$\[0-9\]* = 7" "derived template object, base long"
-
-# derived template object, base enum
-gdb_test "print test2.value" "\\$\[0-9\]* = oriental" "derived template object, base enum"
-
-# derived template object, enum
-gdb_test "print test2.value_derived" "\\$\[0-9\]* = roman" "derived template object, derived enum"
-
-# Three.
-
-# template object, derived template data member's base const bool
-gdb_test "print test3.data.test" "\\$\[0-9\]* = true" "template object, const bool"
-
-# template object, derived template data member's base const int
-gdb_test "print test3.data.key1" "\\$\[0-9\]* = 5" "template object, const int"
-
-# template object, derived template data member's base long
-gdb_test "print test3.data.key2" "\\$\[0-9\]* = 7" "template object, long"
-
-# template object, derived template data member's base enum
-gdb_test "print test3.data.value" "\\$\[0-9\]* = oriental" "template object, base enum"
-
-# template object, derived template data member's enum
-gdb_test "print test3.data.value_derived" "\\$\[0-9]\* = etruscan" "template object, derived enum"
-
-# Now some tests for shadowing (see PR gdb/804):
-
-gdb_breakpoint "C::marker"
-gdb_continue_to_breakpoint "continue to shadow breakpoint"
-
-gdb_test "print shadow" "\\$\[0-9]\* = 1" "shadowing member"
-gdb_test "print ::shadow" "\\$\[0-9]\* = 0" "shadowed global variable"
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.c++/m-static.cc b/gdb/testsuite/gdb.c++/m-static.cc
deleted file mode 100644
index 6d08cb063ea..00000000000
--- a/gdb/testsuite/gdb.c++/m-static.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// 2002-05-13
-
-enum region { oriental, egyptian, greek, etruscan, roman };
-
-// Test one.
-class gnu_obj_1
-{
-protected:
- typedef region antiquities;
- static const bool test = true;
- static const int key1 = 5;
- static long key2;
-
- static antiquities value;
-
-public:
- gnu_obj_1(antiquities a, long l) {}
-};
-
-const bool gnu_obj_1::test;
-const int gnu_obj_1::key1;
-long gnu_obj_1::key2 = 77;
-gnu_obj_1::antiquities gnu_obj_1::value = oriental;
-
-
-// Test two.
-template<typename T>
-class gnu_obj_2: public virtual gnu_obj_1
-{
-public:
- static antiquities value_derived;
-
-public:
- gnu_obj_2(antiquities b): gnu_obj_1(oriental, 7) { }
-};
-
-template<typename T>
-typename gnu_obj_2<T>::antiquities gnu_obj_2<T>::value_derived = etruscan;
-
-// Test three.
-template<typename T>
-class gnu_obj_3
-{
-public:
- typedef region antiquities;
- static gnu_obj_2<int> data;
-
-public:
- gnu_obj_3(antiquities b) { }
-};
-
-template<typename T>
-gnu_obj_2<int> gnu_obj_3<T>::data(etruscan);
-
-// 2002-08-16
-// Test four.
-#include "m-static.h"
-
-// instantiate templates explicitly so their static members will exist
-template class gnu_obj_2<int>;
-template class gnu_obj_2<long>;
-template class gnu_obj_3<long>;
-
-int main()
-{
- gnu_obj_1 test1(egyptian, 4589);
- gnu_obj_2<long> test2(roman);
- gnu_obj_3<long> test3(greek);
- gnu_obj_4 test4;
-
- return 0; // breakpoint: constructs-done
-}
diff --git a/gdb/testsuite/gdb.c++/m-static.exp b/gdb/testsuite/gdb.c++/m-static.exp
deleted file mode 100644
index d291135fb06..00000000000
--- a/gdb/testsuite/gdb.c++/m-static.exp
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Tests for member static data
-# 2002-05-13 Benjamin Kosnik <bkoz@redhat.com>
-# 2002-08-22 David Carlton <carlton@math.stanford.edu>
-
-# This file is part of the gdb testsuite
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-if { [skip_cplus_tests] } { continue }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-set testfile "m-static"
-set srcfile ${testfile}.cc
-set srcfile1 ${testfile}1.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-# First, run to after we've constructed all the objects:
-
-gdb_breakpoint [gdb_get_line_number "constructs-done"]
-gdb_continue_to_breakpoint "end of constructors"
-
-
-# One.
-
-# simple object, static const bool
-gdb_test "print test1.test" "\\$\[0-9\]* = true" "simple object, static const bool"
-
-# simple object, static const int
-gdb_test "print test1.key1" "\\$\[0-9\]* = 5" "simple object, static const int"
-
-# simple object, static long
-gdb_test "print test1.key2" "\\$\[0-9\]* = 77" "simple object, static long"
-
-# simple object, static enum
-gdb_test "print test1.value" "\\$\[0-9\]* = oriental" "simple object, static enum"
-
-# Two.
-
-# derived template object, base static const bool
-gdb_test "print test2.test" "\\$\[0-9\]* = true" "derived template object, base static const bool"
-
-# derived template object, base static const int
-gdb_test "print test2.key1" "\\$\[0-9\]* = 5" "derived template object, base static const int"
-
-# derived template object, base static long
-gdb_test "print test2.key2" "\\$\[0-9\]* = 77" "derived template object, base static long"
-
-# derived template object, base static enum
-gdb_test "print test2.value" "\\$\[0-9\].* = oriental" "derived template object, base static enum"
-
-# derived template object, static enum
-gdb_test "print test2.value_derived" "\\$\[0-9\].* = etruscan" "derived template object, static enum"
-
-# Three.
-
-# template object, static derived template data member's base static const bool
-gdb_test "print test3.data.test" "\\$\[0-9\].* = true" "template object, static const bool"
-
-# template object, static derived template data member's base static const int
-gdb_test "print test3.data.key1" "\\$\[0-9\].* = 5" "template object, static const int"
-
-# template object, static derived template data member's base static long
-gdb_test "print test3.data.key2" "\\$\[0-9\].* = 77" "template object, static long"
-
-# template object, static derived template data member's base static enum
-gdb_test "print test3.data.value" "\\$\[0-9\].* = oriental" "template object, static enum"
-
-# template object, static derived template data member's static enum
-gdb_test "print test3.data.value_derived" "\\$\[0-9\].* = etruscan" "template object, static derived enum"
-
-# 2002-08-16
-# Four.
-
-# static const int initialized in another file.
-gdb_test "print test4.elsewhere" "\\$\[0-9\].* = 221" "static const int initialized elsewhere"
-
-# static const int that nobody initializes. From PR gdb/635.
-gdb_test "print test4.nowhere" "field nowhere is nonexistent or has been optimised out" "static const int initialized nowhere"
-
-# Perhaps at some point test4 should also include a test for a static
-# const int that was initialized in the header file. But I'm not sure
-# that GDB's current behavior in such situations is either consistent
-# across platforms or optimal, so I'm not including one now.
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.c++/m-static.h b/gdb/testsuite/gdb.c++/m-static.h
deleted file mode 100644
index 137d3b75c50..00000000000
--- a/gdb/testsuite/gdb.c++/m-static.h
+++ /dev/null
@@ -1,11 +0,0 @@
-// 2002-08-16
-
-class gnu_obj_4
-{
- public:
- static const int elsewhere;
- static const int nowhere;
- // At some point, perhaps:
- // static const int everywhere = 317;
-};
-
diff --git a/gdb/testsuite/gdb.c++/m-static1.cc b/gdb/testsuite/gdb.c++/m-static1.cc
deleted file mode 100644
index 302a5ada254..00000000000
--- a/gdb/testsuite/gdb.c++/m-static1.cc
+++ /dev/null
@@ -1,5 +0,0 @@
-// 2002-08-16
-
-#include "m-static.h"
-
-const int gnu_obj_4::elsewhere = 221;
diff --git a/gdb/testsuite/gdb.c++/maint.exp b/gdb/testsuite/gdb.c++/maint.exp
deleted file mode 100644
index a0f15f96bc5..00000000000
--- a/gdb/testsuite/gdb.c++/maint.exp
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 2003 Free Software Foundation Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-
-# This file tests C++-specific maintenance commands and help on those.
-
-# Currently, no source file is used.
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-# Test the help messages.
-
-proc test_help {} {
- gdb_test "help maintenance cplus" "C\\+\\+ maintenance commands.\r\n\r\nList of maintenance cplus subcommands:\r\n\r\nmaintenance cplus first_component -- Print the first class/namespace component of NAME\r\n\r\nType \"help maintenance cplus\" followed by maintenance cplus subcommand name for full documentation.\r\nCommand name abbreviations are allowed if unambiguous."
-
- gdb_test "help maint cp" "C\\+\\+ maintenance commands.\r\n\r\nList of maintenance cplus subcommands:\r\n\r\nmaintenance cplus first_component -- Print the first class/namespace component of NAME\r\n\r\nType \"help maintenance cplus\" followed by maintenance cplus subcommand name for full documentation.\r\nCommand name abbreviations are allowed if unambiguous."
-
- gdb_test "maint cp" "\"maintenance cplus\" must be followed by the name of a command.\r\nList of maintenance cplus subcommands:\r\n\r\nmaintenance cplus first_component -- Print the first class/namespace component of NAME\r\n\r\nType \"help maintenance cplus\" followed by maintenance cplus subcommand name for full documentation.\r\nCommand name abbreviations are allowed if unambiguous."
-
- gdb_test "help maint cp first_component" "Print the first class/namespace component of NAME."
-}
-
-# This is used when NAME should contain only a single component. Be
-# careful to make sure that parentheses get escaped properly.
-proc test_single_component {name} {
- set matchname [string_to_regexp "$name"]
- gdb_test "maint cp first_component $name" "$matchname"
-}
-
-proc test_first_component {} {
- test_single_component "foo"
- test_single_component "operator<<"
- test_single_component "operator>>"
- test_single_component "operator ->"
- test_single_component "operator()"
- test_single_component "operator>"
- test_single_component "operator<"
- test_single_component "operator ->"
- test_single_component "operator ->"
-
- test_single_component "foo()"
- test_single_component "foo(int)"
- test_single_component "foo(X::Y)"
- test_single_component "foo(X::Y, A::B)"
- test_single_component "foo(std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >)"
- test_single_component "operator>(X::Y)"
-
- # Operator names can show up in weird places.
-
- test_single_component "int operator<< <char>()"
- test_single_component "T<Cooperator>"
-
- # NOTE: carlton/2003-04-23: I've only seen the first of these
- # produced by the demangler, but I'm including two more just to be
- # on the safe side.
- test_single_component "int foo<&(operator<<(C, C))>()"
- test_single_component "int foo<&operator<<(C, C)>()"
- test_single_component "int foo<operator<<(C, C)>()"
-
- gdb_test "maint cp first_component foo::bar" "foo"
- gdb_test "maint cp first_component foo::bar::baz" "foo"
- gdb_test "maint cp first_component C<A>::bar" "C<A>"
- gdb_test "maint cp first_component C<std::basic_streambuf<wchar_t,std::char_traits<wchar_t> > >::bar" "C<std::basic_streambuf<wchar_t,std::char_traits<wchar_t> > >"
-}
-
-gdb_exit
-gdb_start
-
-test_help
-test_first_component
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.c++/member-ptr.cc b/gdb/testsuite/gdb.c++/member-ptr.cc
deleted file mode 100644
index 4beb92616d4..00000000000
--- a/gdb/testsuite/gdb.c++/member-ptr.cc
+++ /dev/null
@@ -1,106 +0,0 @@
-extern "C" {
-#include <stdio.h>
-}
-
-
-class A {
-public:
- A();
- int foo (int x);
- int bar (int y);
- virtual int baz (int z);
- char c;
- int j;
- int jj;
- static int s;
-};
-
-class B {
-public:
- static int s;
-};
-
-int A::s = 10;
-int B::s = 20;
-
-A::A()
-{
- c = 'x';
- j = 5;
-}
-
-int A::foo (int dummy)
-{
- j += 3;
- return j + dummy;
-}
-
-int A::bar (int dummy)
-{
- int r;
- j += 13;
- r = this->foo(15);
- return r + j + 2 * dummy;
-}
-
-int A::baz (int dummy)
-{
- int r;
- j += 15;
- r = this->foo(15);
- return r + j + 12 * dummy;
-}
-
-int fum (int dummy)
-{
- return 2 + 13 * dummy;
-}
-
-typedef int (A::*PMF)(int);
-
-typedef int A::*PMI;
-
-int main ()
-{
- A a;
- A * a_p;
- PMF pmf;
-
- PMF * pmf_p;
- PMI pmi;
-
- a.j = 121;
- a.jj = 1331;
-
- int k;
-
- a_p = &a;
-
- pmi = &A::j;
- pmf = &A::bar;
- pmf_p = &pmf;
-
- pmi = NULL;
-
- k = (a.*pmf)(3);
-
- pmi = &A::jj;
- pmf = &A::foo;
- pmf_p = &pmf;
-
- k = (a.*pmf)(4);
-
- k = (a.**pmf_p)(5);
-
- k = a.*pmi;
-
-
- k = a.bar(2);
-
- k += fum (4);
-
- B b;
-
- k += b.s;
-
-}
diff --git a/gdb/testsuite/gdb.c++/member-ptr.exp b/gdb/testsuite/gdb.c++/member-ptr.exp
deleted file mode 100644
index f21cd1506e7..00000000000
--- a/gdb/testsuite/gdb.c++/member-ptr.exp
+++ /dev/null
@@ -1,549 +0,0 @@
-# Copyright 1998, 1999 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-# Tests for pointer-to-member support
-# Written by Satish Pai <pai@apollo.hp.com> 1997-08-19
-
-# This file is part of the gdb testsuite
-
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-if { [skip_cplus_tests] } { continue }
-
-#
-# test running programs
-#
-
-# Start with a fresh gdb
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-
-set prms_id 0
-set bug_id 0
-
-set testfile "member-ptr"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-# Nearly all of these tests fail when compiled with G++, so just give up
-# until GDB gets enhanced. -sts 1999-06-22
-
-if {$gcc_compiled} {
- continue
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-send_gdb "break 83\n"
-gdb_expect {
- -re "Breakpoint \[0-9\]*.*line 83\\.\r\n$gdb_prompt $" {
- pass "set break at 83"
- }
- -re ".*$gdb_prompt $" { fail "set break at 83" }
- timeout { fail "(timeout) set break at 83" }
-}
-
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing\\.\r\n\r\nBreakpoint.*at.*member-ptr\\.cc:83\r\n83\[ \t]*pmi = NULL;\r\n$gdb_prompt $" {
- pass "continue to 83"
- }
- -re ".*$gdb_prompt $" { fail "continue to 83" }
- timeout { fail "(timeout) continue to 83" }
-}
-
-# ptype on pointer to data member
-
-send_gdb "ptype pmi\n"
-gdb_expect {
- -re "type = int \\( A::\\*\\)\r\n$gdb_prompt $" {
- pass "ptype pmi"
- }
- -re ".*$gdb_prompt $" { fail "ptype pmi" }
- timeout { fail "(timeout) ptype pmi" }
-}
-
-# print pointer to data member
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\) &A::j\r\n$gdb_prompt $" {
- pass "print pmi"
- }
- -re ".*$gdb_prompt $" { fail "print pmi" }
- timeout { fail "(timeout) print pmi" }
-}
-
-
-# print dereferenced pointer to data member
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 121\r\n$gdb_prompt $" {
- pass "print a.*pmi"
- }
- -re ".*$gdb_prompt $" { fail "print a.*pmi" }
- timeout { fail "(timeout) print a.*pmi" }
-}
-
-# print dereferenced pointer to data member
-# this time, dereferenced through a pointer
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a_p->*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 121\r\n$gdb_prompt $" {
- pass "print a->*pmi"
- }
- -re ".*$gdb_prompt $" { fail "print a->*pmi" }
- timeout { fail "(timeout) print a->*pmi" }
-}
-
-
-# set the pointer to data member
-
-send_gdb "set var pmi = &A::jj\n"
-gdb_expect {
- -re "$gdb_prompt $" {
- pass "set var (not really a pass)"
- }
- timeout { fail "(timeout) " }
-}
-
-# Now print the pointer again
-
-send_gdb "print pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\) &A::jj\r\n$gdb_prompt $" {
- pass "print pmi after setting"
- }
- -re ".*$gdb_prompt $" { fail "print pmi after setting" }
- timeout { fail "(timeout) print pmi after setting" }
-}
-
-# print dereferenced pointer to data member again
-
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 1331\r\n$gdb_prompt $" {
- pass "print a.*pmi after setting"
- }
- -re ".*$gdb_prompt $" { fail "print a.*pmi after setting" }
- timeout { fail "(timeout) print a.*pmi after setting" }
-}
-
-# set the pointer to data member back to A::j
-
-send_gdb "set var pmi = &A::j\n"
-gdb_expect {
- -re "$gdb_prompt $" {
- pass "set var back to A::j (not really a pass)"
- }
- timeout { fail "(timeout) set var pmi" }
-}
-
-# print dereferenced pointer to data member yet again (extra check, why not)
-
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 121\r\n$gdb_prompt $" {
- pass "print a.*pmi after resetting"
- }
- -re ".*$gdb_prompt $" { fail "print a.*pmi after resetting" }
- timeout { fail "(timeout) print a.*pmi after resetting" }
-}
-
-# Set the data member pointed to.
-
-send_gdb "print a.*pmi = 33\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 33\r\n$gdb_prompt $" {
- pass "print command to set"
- }
- -re ".*$gdb_prompt $" { fail "print command to set" }
- timeout { fail "(timeout) print command to set" }
-}
-
-# Now check that the data really was changed
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 33\r\n$gdb_prompt $" {
- pass "print a.*pmi after setting member pointed to"
- }
- -re ".*$gdb_prompt $" { fail "print a.*pmi after setting member pointed to" }
- timeout { fail "(timeout) print a.*pmi after setting member pointed to" }
-}
-
-# Double-check by printing a.
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{c = 120 'x', j = 33, jj = 1331, static s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
- pass "print a after setting member pointed to by pmi"
- }
- -re ".*$gdb_prompt $" { fail "print a after setting member pointed to by pmi" }
- timeout { fail "(timeout) print a after setting member pointed to by pmi" }
-}
-
-
-# Set the data member pointed to, using ->*
-
-send_gdb "print a_p->*pmi = 44\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 44\r\n$gdb_prompt $" {
- pass "print command to set (->)"
- }
- -re ".*$gdb_prompt $" { fail "print command to set (->)" }
- timeout { fail "(timeout) print command to set (->)" }
-}
-
-# Now check that the data really was changed
-send_gdb "print a_p->*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 44\r\n$gdb_prompt $" {
- pass "print a_p->*pmi after setting member pointed to"
- }
- -re ".*$gdb_prompt $" { fail "print a_p->*pmi after setting member pointed to" }
- timeout { fail "(timeout) print a_p->*pmi after setting member pointed to" }
-}
-
-# Double-check by printing a.
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{c = 120 'x', j = 44, jj = 1331, static s = 10, Virtual table at $hex\}\r\n$gdb_prompt $" {
- pass "print a after setting member pointed to by pmi (->) "
- }
- -re ".*$gdb_prompt $" { fail "print a after setting member pointed to by pmi (->) " }
- timeout { fail "(timeout) print a after setting member pointed to by pmi (->) " }
-}
-
-
-# Do a ptype on the dereferenced pointer to member
-# pai/1997-08-20 Doesn't work
-
-# send_gdb "ptype a.*pmi\n"
-# gdb_expect {
-# -re "type = int\r\n$gdb_prompt $" {
-# pass "ptype a.*pmi"
-# }
-# -re ".*$gdb_prompt $" { fail "ptype a.*pmi" }
-# timeout { fail "(timeout) ptype a.*pmi" }
-#}
-
-# Try to dereference the pointer to data member without any object
-
-send_gdb "print *pmi\n"
-gdb_expect {
- -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
- pass "attempt to print ptr to member without object"
- }
- -re ".*$gdb_prompt $" { fail "attempt to print ptr to member without object" }
- timeout { fail "(timeout) attempt to print ptr to member without object" }
-}
-
-# Try to ptype a dereference of the pointer to data member without any object
-
-send_gdb "ptype *pmi\n"
-gdb_expect {
- -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
- pass "attempt to ptype ptr to member without object"
- }
- -re ".*$gdb_prompt $" { fail "attempt to ptype ptr to member without object" }
- timeout { fail "(timeout) attempt to ptype ptr to member without object" }
-}
-
-# Ptype a pointer to a method.
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "ptype pmf\n"
-gdb_expect {
- -re "type = int \\( A::\\*\\)\\(\\.\\.\\.\\)\r\n$gdb_prompt $" {
- pass "ptype pmf"
- }
- -re ".*$gdb_prompt $" { fail "ptype pmf" }
- timeout { fail "(timeout) ptype pmf" }
-}
-
-# print a pointer to a method
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print pmf\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\(\\.\\.\\.\\)\\) \\?\\? <not supported with HP aCC>\r\n$gdb_prompt $" {
- pass "print pmf"
- }
- -re ".*$gdb_prompt $" { fail "print pmf" }
- timeout { fail "(timeout) print pmf" }
-}
-
-
-# Ptype a pointer to a pointer to a method
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "ptype pmf_p\n"
-gdb_expect {
- -re "type = int \\( A::\\*\\*\\)\\(\\.\\.\\.\\)\r\n$gdb_prompt $" {
- pass "ptype pmf_p"
- }
- -re ".*$gdb_prompt $" { fail "ptype pmf_p" }
- timeout { fail "(timeout) ptype pmf_p" }
-}
-
-# print a pointer to a pointer to a method
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print pmf_p\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(int \\( A::\\*\\*\\)\\(\\.\\.\\.\\)\\) $hex\r\n$gdb_prompt $" {
- pass "print pmf_p"
- }
- -re ".*$gdb_prompt $" { fail "print pmf_p" }
- timeout { fail "(timeout) print pmf_p" }
-}
-
-# print dereferenced pointer to method
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a.*pmf\n"
-gdb_expect {
- -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
- pass "print a.*pmf (known aCC limitation)"
- }
- -re ".*$gdb_prompt $" { fail "print a.*pmf" }
- timeout { fail "(timeout) print a.*pmf" }
-}
-
-# print dereferenced pointer to method, using ->*
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a_p->*pmf\n"
-gdb_expect {
- -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
- pass "print a_p->*pmf (known aCC limitation)"
- }
- -re ".*$gdb_prompt $" { fail "print a_p->*pmf" }
- timeout { fail "(timeout) print a_p->*pmf" }
-}
-
-# set the pointer to data member
-
-setup_xfail "hppa*-*-*"
-send_gdb "set var pmf = &A::foo\n"
-gdb_expect {
- -re "Assignment to pointers to methods not implemented with HP aCC\r\n$gdb_prompt $" {
- pass "set var pmf (known aCC limitation)"
- }
- -re ".*$gdb_prompt $" { fail "set var pmf" }
- timeout { fail "(timeout) set var pmf" }
-}
-
-# Try to dereference the pointer to method without any object
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print *pmf\n"
-gdb_expect {
- -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
- pass "attempt to print ptr to method without object"
- }
- -re ".*$gdb_prompt $" { fail "attempt to print ptr to method without object" }
- timeout { fail "(timeout) attempt to print ptr to method without object" }
-}
-
-# Try to ptype a dereference of the pointer to method without any object
-
-send_gdb "ptype *pmi\n"
-gdb_expect {
- -re "Attempt to dereference pointer to member without an object\r\n$gdb_prompt $" {
- pass "attempt to ptype ptr to member without object"
- }
- -re ".*$gdb_prompt $" { fail "attempt to ptype ptr to member without object" }
- timeout { fail "(timeout) attempt to ptype ptr to member without object" }
-}
-
-# Check cast of pointer to member to integer
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print (int) pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 8\r\n$gdb_prompt $" {
- pass "casting pmi to int"
- }
- -re ".*$gdb_prompt $" { fail "casting pmi to int" }
- timeout { fail "(timeout) casting pmi to int" }
-}
-
-# Check cast of pointer to method to integer
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print (int) pmf\n"
-gdb_expect {
- -re "Pointers to methods not supported with HP aCC\r\n$gdb_prompt $" {
- pass "casting pmf to int (known aCC limitation)"
- }
- -re ".*$gdb_prompt $" { fail "casting pmf to int" }
- timeout { fail "(timeout) casting pmf to int" }
-}
-
-# Try to invoke a function through a pointer to data member
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print (a.*pmi)(3)\n"
-gdb_expect {
- -re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
- pass "print (a.*pmi)(3) -- error message should be different"
- }
- -re ".*$gdb_prompt $" { fail "print (a.*pmi)(3)" }
- timeout { fail "(timeout) print (a.*pmi)(3)" }
-}
-
-# Try to invoke a function through a pointer to a method
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print (a.*pmf)(3)\n"
-gdb_expect {
- -re "Not implemented: function invocation through pointer to method with HP aCC\r\n$gdb_prompt $" {
- pass "print (a.*pmi)(3) -- known aCC limitation"
- }
- -re ".*$gdb_prompt $" { fail "print (a.*pmf)(3)" }
- timeout { fail "(timeout) print (a.*pmf)(3)" }
-}
-
-
-# Go past assignment of NULL to pmi
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "next\n"
-gdb_expect {
- -re "\r\n85\[ \t\]*k = \\(a.\\*pmf\\)\\(3\\);\r\n$gdb_prompt $" {
- pass "next past 83"
- }
- -re ".*$gdb_prompt $" { fail "next past 83" }
- timeout { fail "(timeout) next past 83" }
-}
-
-#send_gdb "print pmi\n"
-#gdb_expect {
-# -re "Attempted dereference of null pointer-to-member\r\n$gdb_prompt $" {
-# pass ""
-# }
-# -re ".*$gdb_prompt $" { fail "" }
-# timeout { fail "(timeout) " }
-#}
-
-# Dereference the null pointer to member
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "Attempted dereference of null pointer-to-member\r\n$gdb_prompt $" {
- pass "print a.*NULL"
- }
- -re ".*$gdb_prompt $" { fail "print a.*NULL" }
- timeout { fail "(timeout) print a.*NULL" }
-}
-
-
-# Go to another part of the program
-send_gdb "break 91\n"
-gdb_expect {
- -re "Breakpoint \[0-9\]*.*line 91\\.\r\n$gdb_prompt $" {
- pass "set break at 91"
- }
- -re ".*$gdb_prompt $" { fail "set break at 91" }
- timeout { fail "(timeout) set break at 91" }
-}
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "continue\n"
-gdb_expect {
- -re "Continuing\\.\r\n\r\nBreakpoint.*at.*member-ptr\\.cc:91\r\n91\[ \t]*k = \\(a.\\*pmf\\)\\(4\\);\r\n$gdb_prompt $" {
- pass "continue to 91"
- }
- -re ".*$gdb_prompt $" { fail "continue to 91" }
- timeout { fail "(timeout) continue to 91" }
-}
-
-
-# Now check again that pmi works even when not set to
-# something that's at the beginning of the object
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(int \\( A::\\*\\)\\) &A::jj\r\n$gdb_prompt $" {
- pass "print pmi (2)"
- }
- -re ".*$gdb_prompt $" { fail "print pmi (2)" }
- timeout { fail "(timeout) print pmi (2)" }
-}
-
-
-# print dereferenced pointer to data member
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a.*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 1331\r\n$gdb_prompt $" {
- pass "print a.*pmi (2)"
- }
- -re ".*$gdb_prompt $" { fail "print a.*pmi (2)" }
- timeout { fail "(timeout) print a.*pmi (2)" }
-}
-
-# print dereferenced pointer to data member
-# this time, dereferenced through a pointer
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "print a_p->*pmi\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 1331\r\n$gdb_prompt $" {
- pass "print a->*pmi"
- }
- -re ".*$gdb_prompt $" { fail "print a->*pmi (2)" }
- timeout { fail "(timeout) print a->*pmi (2)" }
-}
-
-
-# p a.*pmf - fail
-
-# p pmi
-
-# p a.*pmi
-
diff --git a/gdb/testsuite/gdb.c++/method.cc b/gdb/testsuite/gdb.c++/method.cc
deleted file mode 100644
index 949b027a02e..00000000000
--- a/gdb/testsuite/gdb.c++/method.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Class funk has a constructor and an ordinary method
-// Test for CHFts23426
-
-class funk
-{
-public:
- funk();
- void getFunky(int a, int b);
- int data_;
-};
-
-funk::funk()
- : data_(33)
-{
-}
-
-void funk::getFunky(int a, int b)
-{
- int res;
- res = a + b - data_;
- data_ = res;
-}
-
-// Class A has const and volatile methods
-
-class A {
-public:
- int x;
- int y;
- int foo (int arg);
- int bar (int arg) const;
- int baz (int arg, char c) volatile;
- int qux (int arg, float f) const volatile;
-};
-
-int A::foo (int arg)
-{
- x += arg;
- return arg *2;
-}
-
-int A::bar (int arg) const
-{
- return arg + 2 * x;
-}
-
-int A::baz (int arg, char c) volatile
-{
- return arg - 2 * x + c;
-}
-
-int A::qux (int arg, float f) const volatile
-{
- if (f > 0)
- return 2 * arg - x;
- else
- return 2 * arg + x;
-}
-
-
-int main()
-{
- A a;
- int k;
-
- k = 10;
- a.x = k * 2;
-
- k = a.foo(13);
-
- k += a.bar(15);
-
- // Test for CHFts23426 follows
- funk f;
- f.getFunky(1, 2);
- return 0;
-}
-
-
-
diff --git a/gdb/testsuite/gdb.c++/method.exp b/gdb/testsuite/gdb.c++/method.exp
deleted file mode 100644
index a085b14cdcc..00000000000
--- a/gdb/testsuite/gdb.c++/method.exp
+++ /dev/null
@@ -1,194 +0,0 @@
-# Copyright 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 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
-
-# tests for misc. C++ method stuff
-# Written by Satish Pai <pai@apollo.hp.com> 1997-07-08
-
-# This file is part of the gdb testsuite
-
-# This tests:
-# 0. method arguments are correct
-# 1. access to class data members inside method scopes
-# 2. correct param types for methods in ptype.
-# 3. const and volatile methods
-
-# (#0 and #1 above relate to an HP specific problem -- GDB must correctly
-# integrate FPARAM symbols in HP debug info into the local var list
-# for the function or method's block.)
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "method"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info $binfile "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-#
-# set it up at a breakpoint so we can play with the variable values
-#
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-gdb_test "break A::foo" \
- "Breakpoint \[0-9\]* at $hex.*file .*method.cc, line 38\\."
-
-gdb_test "continue" \
- "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, A::foo(\\(int\\)|) \\(this=$hex, arg=13\\) at .*method\\.cc:38\r\n38\[\t \]*x \\+= arg;" \
- "continue to A::foo"
-
-# Check ability to access this-relative stuff.
-
-gdb_test "print x" \
- "\\$\[0-9\]* = 20" \
- "print x in A::foo"
-
-# Check access to this pointer
-
-gdb_test "print this" \
- "\\$\[0-9\]* = \\((class |)A *\\* *(const|)\\) $hex" \
- "print this in A::foo"
-
-# Now do everything over again for A::bar, because sometimes processing one method
-# (the first one) is fine, but the second one's debug info gets munged beyond recognition.
-
-gdb_test "break A::bar" \
- "Breakpoint \[0-9\]* at $hex.*file .*method.cc, line 44\\."
-
-gdb_test "continue" \
- "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, A::bar(\\(int\\) const|) \\(this=$hex, arg=15\\) at .*method\\.cc:44\r\n44\[\t \]*return arg \\+ 2 \\* x;" \
- "continue to A::bar"
-
-# Check ability to access this-relative stuff.
-
-gdb_test "print x" \
- "\\$\[0-9\]* = 33" \
- "print x in A::bar"
-
-# Check access to this pointer
-
-get_debug_format
-
-send_gdb "print this\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\(const (class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" {
- pass "print this in A::bar"
- }
- -re "\\$\[0-9\]* = \\((class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" {
- # gcc versions up to 3.0.4 with -gstabs+ do not emit "const" indicators,
- # so the output is "A *". It should be "const A *" or "const A * const".
- setup_xfail_format "stabs"
- fail "print this in A::bar (missing const)"
- }
- -re "\\$\[0-9\]* = \\(const (class |)\{\\.\\.\\.\} *\\* *(const|)\\) $hex\r\n$gdb_prompt $" {
- # gcc versions gcc-3_1-branch%20020404 and HEAD%20020404 with -gstabs+
- # produce good stabs, but gdb prints "const class {...} *" const.
- # This is PR gdb/277.
- # setup_kfail "gdb/277"
- fail "print this in A::bar (gdb/277)"
- }
- -re ".*$gdb_prompt $" { fail "print this in A::bar" }
- timeout { fail "(timeout) print this in A::bar" }
-}
-
-# Check again with funk::getFunky (this is the original test case
-# for CHFts23426); sometimes having a constructor with no arguments
-# will nuke the debug info read in for other methods in the class.
-
-gdb_test "break 21" \
- "Breakpoint \[0-9\]* at $hex.*file .*method.cc, line 21\\."
-
-gdb_test "continue" \
- "Continuing\\.\r\n\r\nBreakpoint \[0-9\]*, funk::getFunky(\\(int, int\\)|) \\(this=$hex, a=1, b=2\\) at .*method\\.cc:21\r\n21\[\t \]*data_ = res;" \
- "continue to 21"
-
-# Check ability to access this-relative stuff.
-
-gdb_test "print data_" \
- "\\$\[0-9\]* = 33" \
- "print data_ in funk::getFunky"
-
-# Check access to this pointer
-
-gdb_test "print this" \
- "\\$\[0-9\]* = \\((class |)funk *\\* *(const|)\\) $hex" \
- "print this in funk::getFunky"
-
-# Check access to local variable
-
-gdb_test "print res" \
- "\\$\[0-9\]* = -30" \
- "print res in funk::getFunky"
-
-# Check ptype of class -- should show const/volatile methods
-
-send_gdb "ptype A\n"
-gdb_expect {
- -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) (const volatile|volatile const);\r\n\}\r\n$gdb_prompt $" {
- pass "ptype A"
- }
- -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*A & operator=\\(A const ?&\\);\r\n\[ \]*A\\(A const ?&\\);\r\n\[ \]*A\\((void|)\\);\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) (const volatile|volatile const);\r\n\}\r\n$gdb_prompt $" {
- pass "ptype A"
- }
- -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\);\r\n\[ \]*int qux\\(int, float\\) const;\r\n\}\r\n$gdb_prompt $" {
- pass "ptype A (HP aCC bug -- volatile not indicated)"
- }
- -re "type = class A \{\r\n\[ \]*public:\r\n\[ \]*int x;\r\n\[ \]*int y;\r\n\r\n\[ \]*int foo\\(int\\);\r\n\[ \]*int bar\\(int\\) const;\r\n\[ \]*int baz\\(int, char\\) volatile;\r\n\[ \]*int qux\\(int, float\\) const volatile;\r\n\}\r\n$gdb_prompt $" {
- pass "ptype A"
- }
- -re ".*$gdb_prompt $" { fail "ptype A" }
- timeout { fail "(timeout) ptype A" }
-}
-
-send_gdb "cont\n"
-gdb_expect {
- -re "Continuing.\r\n\r\nProgram exited normally.*$gdb_prompt $" {
- pass "finish program"
- }
- -re "Continuing.* EXIT code 0.*Program exited normally.*$gdb_prompt $" {
- pass "finish program (exit wrapper)"
- }
- -re ".*$gdb_prompt $" { fail "finish program" }
- default:{ fail "finish program (timeout)" }
-}
-
diff --git a/gdb/testsuite/gdb.c++/misc.cc b/gdb/testsuite/gdb.c++/misc.cc
deleted file mode 100644
index 286c02bc6df..00000000000
--- a/gdb/testsuite/gdb.c++/misc.cc
+++ /dev/null
@@ -1,587 +0,0 @@
-// Test various -*- C++ -*- things.
-
-// ====================== basic C++ types =======================
-bool v_bool;
-bool v_bool_array[2];
-
-typedef struct fleep fleep;
-struct fleep { int a; } s;
-
-// ====================== simple class structures =======================
-
-struct default_public_struct {
- // defaults to public:
- int a;
- int b;
-};
-
-struct explicit_public_struct {
- public:
- int a;
- int b;
-};
-
-struct protected_struct {
- protected:
- int a;
- int b;
-};
-
-struct private_struct {
- private:
- int a;
- int b;
-};
-
-struct mixed_protection_struct {
- public:
- int a;
- int b;
- private:
- int c;
- int d;
- protected:
- int e;
- int f;
- public:
- int g;
- private:
- int h;
- protected:
- int i;
-};
-
-class public_class {
- public:
- int a;
- int b;
-};
-
-class protected_class {
- protected:
- int a;
- int b;
-};
-
-class default_private_class {
- // defaults to private:
- int a;
- int b;
-};
-
-class explicit_private_class {
- private:
- int a;
- int b;
-};
-
-class mixed_protection_class {
- public:
- int a;
- int b;
- private:
- int c;
- int d;
- protected:
- int e;
- int f;
- public:
- int g;
- private:
- int h;
- protected:
- int i;
-};
-
-class const_vol_method_class {
-public:
- int a;
- int b;
- int foo (int &) const;
- int bar (int &) volatile;
- int baz (int &) const volatile;
-};
-
-int const_vol_method_class::foo (int & ir) const
-{
- return ir + 3;
-}
-int const_vol_method_class::bar (int & ir) volatile
-{
- return ir + 4;
-}
-int const_vol_method_class::baz (int & ir) const volatile
-{
- return ir + 5;
-}
-
-// ========================= simple inheritance ==========================
-
-class A {
- public:
- int a;
- int x;
-};
-
-A g_A;
-
-class B : public A {
- public:
- int b;
- int x;
-};
-
-B g_B;
-
-class C : public A {
- public:
- int c;
- int x;
-};
-
-C g_C;
-
-class D : public B, public C {
- public:
- int d;
- int x;
-};
-
-D g_D;
-
-class E : public D {
- public:
- int e;
- int x;
-};
-
-E g_E;
-
-class class_with_anon_union
-{
- public:
- int one;
- union
- {
- int a;
- long b;
- };
-};
-
-class_with_anon_union g_anon_union;
-
-void inheritance2 (void)
-{
-}
-
-void inheritance1 (void)
-{
- int ival;
- int *intp;
-
- // {A::a, A::x}
-
- g_A.A::a = 1;
- g_A.A::x = 2;
-
- // {{A::a,A::x},B::b,B::x}
-
- g_B.A::a = 3;
- g_B.A::x = 4;
- g_B.B::b = 5;
- g_B.B::x = 6;
-
- // {{A::a,A::x},C::c,C::x}
-
- g_C.A::a = 7;
- g_C.A::x = 8;
- g_C.C::c = 9;
- g_C.C::x = 10;
-
- // {{{A::a,A::x},B::b,B::x},{{A::a,A::x},C::c,C::x},D::d,D::x}
-
- // The following initialization code is non-portable, but allows us
- // to initialize all members of g_D until we can fill in the missing
- // initialization code with legal C++ code.
-
- for (intp = (int *) &g_D, ival = 11;
- intp < ((int *) &g_D + sizeof (g_D) / sizeof (int));
- intp++, ival++)
- {
- *intp = ival;
- }
-
- // Overlay the nonportable initialization with legal initialization.
-
- // ????? = 11; (g_D.A::a = 11; is ambiguous)
- // ????? = 12; (g_D.A::x = 12; is ambiguous)
-/* djb 6-3-2000
-
- This should take care of it. Rather than try to initialize using an ambiguous
- construct, use 2 unambiguous ones for each. Since the ambiguous a/x member is
- coming from C, and B, initialize D's C::a, and B::a, and D's C::x and B::x.
- */
- g_D.C::a = 15;
- g_D.C::x = 12;
- g_D.B::a = 11;
- g_D.B::x = 12;
- g_D.B::b = 13;
- g_D.B::x = 14;
- // ????? = 15;
- // ????? = 16;
- g_D.C::c = 17;
- g_D.C::x = 18;
- g_D.D::d = 19;
- g_D.D::x = 20;
-
-
- // {{{{A::a,A::x},B::b,B::x},{{A::a,A::x},C::c,C::x},D::d,D::x}},E::e,E::x}
-
- // The following initialization code is non-portable, but allows us
- // to initialize all members of g_D until we can fill in the missing
- // initialization code with legal C++ code.
-
- for (intp = (int *) &g_E, ival = 21;
- intp < ((int *) &g_E + sizeof (g_E) / sizeof (int));
- intp++, ival++)
- {
- *intp = ival;
- }
-
- // Overlay the nonportable initialization with legal initialization.
-
- // ????? = 21; (g_E.A::a = 21; is ambiguous)
- // ????? = 22; (g_E.A::x = 22; is ambiguous)
- g_E.B::b = 23;
- g_E.B::x = 24;
- // ????? = 25;
- // ????? = 26;
- g_E.C::c = 27;
- g_E.C::x = 28;
- g_E.D::d = 29;
- g_E.D::x = 30;
- g_E.E::e = 31;
- g_E.E::x = 32;
-
- g_anon_union.one = 1;
- g_anon_union.a = 2;
-
- inheritance2 ();
-}
-
-// ======================== static member functions =====================
-
-class Static {
-public:
- static void ii(int, int);
-};
-void Static::ii (int, int) { }
-
-// ======================== virtual base classes=========================
-
-class vA {
- public:
- int va;
- int vx;
-};
-
-vA g_vA;
-
-class vB : public virtual vA {
- public:
- int vb;
- int vx;
-};
-
-vB g_vB;
-
-class vC : public virtual vA {
- public:
- int vc;
- int vx;
-};
-
-vC g_vC;
-
-class vD : public virtual vB, public virtual vC {
- public:
- int vd;
- int vx;
-};
-
-vD g_vD;
-
-class vE : public virtual vD {
- public:
- int ve;
- int vx;
-};
-
-vE g_vE;
-
-void inheritance4 (void)
-{
-}
-
-void inheritance3 (void)
-{
- int ival;
- int *intp;
-
- // {vA::va, vA::vx}
-
- g_vA.vA::va = 1;
- g_vA.vA::vx = 2;
-
- // {{vA::va, vA::vx}, vB::vb, vB::vx}
-
- g_vB.vA::va = 3;
- g_vB.vA::vx = 4;
- g_vB.vB::vb = 5;
- g_vB.vB::vx = 6;
-
- // {{vA::va, vA::vx}, vC::vc, vC::vx}
-
- g_vC.vA::va = 7;
- g_vC.vA::vx = 8;
- g_vC.vC::vc = 9;
- g_vC.vC::vx = 10;
-
- // {{{{vA::va, vA::vx}, vB::vb, vB::vx}, vC::vc, vC::vx}, vD::vd,vD::vx}
-
- g_vD.vA::va = 11;
- g_vD.vA::vx = 12;
- g_vD.vB::vb = 13;
- g_vD.vB::vx = 14;
- g_vD.vC::vc = 15;
- g_vD.vC::vx = 16;
- g_vD.vD::vd = 17;
- g_vD.vD::vx = 18;
-
-
- // {{{{{vA::va,vA::vx},vB::vb,vB::vx},vC::vc,vC::vx},vD::vd,vD::vx},vE::ve,vE::vx}
-
- g_vD.vA::va = 19;
- g_vD.vA::vx = 20;
- g_vD.vB::vb = 21;
- g_vD.vB::vx = 22;
- g_vD.vC::vc = 23;
- g_vD.vC::vx = 24;
- g_vD.vD::vd = 25;
- g_vD.vD::vx = 26;
- g_vE.vE::ve = 27;
- g_vE.vE::vx = 28;
-
- inheritance4 ();
-}
-
-// ======================================================================
-
-class Base1 {
- public:
- int x;
- Base1(int i) { x = i; }
-};
-
-class Foo
-{
- public:
- int x;
- int y;
- static int st;
- Foo (int i, int j) { x = i; y = j; }
- int operator! ();
- operator int ();
- int times (int y);
-};
-
-class Bar : public Base1, public Foo {
- public:
- int z;
- Bar (int i, int j, int k) : Base1 (10*k), Foo (i, j) { z = k; }
-};
-
-int Foo::operator! () { return !x; }
-
-int Foo::times (int y) { return x * y; }
-
-int Foo::st = 100;
-
-Foo::operator int() { return x; }
-
-Foo foo(10, 11);
-Bar bar(20, 21, 22);
-
-class ClassWithEnum {
-public:
- enum PrivEnum { red, green, blue, yellow = 42 };
- PrivEnum priv_enum;
- int x;
-};
-
-void enums2 (void)
-{
-}
-
-/* classes.exp relies on statement order in this function for testing
- enumeration fields. */
-
-void enums1 ()
-{
- ClassWithEnum obj_with_enum;
- obj_with_enum.priv_enum = ClassWithEnum::red;
- obj_with_enum.x = 0;
- enums2 ();
- obj_with_enum.priv_enum = ClassWithEnum::green;
-}
-
-class ClassParam {
-public:
- int Aptr_a (A *a) { return a->a; }
- int Aptr_x (A *a) { return a->x; }
- int Aref_a (A &a) { return a.a; }
- int Aref_x (A &a) { return a.x; }
- int Aval_a (A a) { return a.a; }
- int Aval_x (A a) { return a.x; }
-};
-
-ClassParam class_param;
-
-class Contains_static_instance
-{
- public:
- int x;
- int y;
- Contains_static_instance (int i, int j) { x = i; y = j; }
- static Contains_static_instance null;
-};
-
-Contains_static_instance Contains_static_instance::null(0,0);
-Contains_static_instance csi(10,20);
-
-class Contains_nested_static_instance
-{
- public:
- class Nested
- {
- public:
- Nested(int i) : z(i) {}
- int z;
- static Contains_nested_static_instance xx;
- };
-
- Contains_nested_static_instance(int i, int j) : x(i), y(j) {}
-
- int x;
- int y;
-
- static Contains_nested_static_instance null;
- static Nested yy;
-};
-
-Contains_nested_static_instance Contains_nested_static_instance::null(0, 0);
-Contains_nested_static_instance::Nested Contains_nested_static_instance::yy(5);
-Contains_nested_static_instance
- Contains_nested_static_instance::Nested::xx(1,2);
-Contains_nested_static_instance cnsi(30,40);
-
-typedef struct {
- int one;
- int two;
-} tagless_struct;
-tagless_struct v_tagless;
-
-/* Try to get the compiler to allocate a class in a register. */
-class small {
- public:
- int x;
- int method ();
-};
-
-int
-small::method ()
-{
- return x + 5;
-}
-
-void marker_reg1 () {}
-
-int
-register_class ()
-{
- /* We don't call any methods for v, so gcc version cygnus-2.3.3-930220
- might put this variable in a register. This is a lose, though, because
- it means that GDB can't call any methods for that variable. */
- register small v;
-
- int i;
-
- /* Perform a computation sufficiently complicated that optimizing compilers
- won't optimized out the variable. If some compiler constant-folds this
- whole loop, maybe using a parameter to this function here would help. */
- v.x = 0;
- for (i = 0; i < 13; ++i)
- v.x += i;
- --v.x; /* v.x is now 77 */
- marker_reg1 ();
- return v.x + 5;
-}
-
-void dummy()
-{
- v_bool = true;
- v_bool_array[0] = false;
- v_bool_array[1] = v_bool;
-}
-
-void use_methods ()
-{
- /* Refer to methods so that they don't get optimized away. */
- int i;
- i = class_param.Aptr_a (&g_A);
- i = class_param.Aptr_x (&g_A);
- i = class_param.Aref_a (g_A);
- i = class_param.Aref_x (g_A);
- i = class_param.Aval_a (g_A);
- i = class_param.Aval_x (g_A);
-}
-
-
-int
-main()
-{
-#ifdef usestubs
- set_debug_traps();
- breakpoint();
-#endif
- dummy();
- inheritance1 ();
- inheritance3 ();
- enums1 ();
- register_class ();
-
- /* FIXME: pmi gets optimized out. Need to do some more computation with
- it or something. (No one notices, because the test is xfail'd anyway,
- but that probably won't always be true...). */
- int Foo::* pmi = &Foo::y;
-
- /* Make sure the AIX linker doesn't remove the variable. */
- v_tagless.one = 5;
-
- use_methods ();
-
- return foo.*pmi;
-}
-
-/* Create an instance for some classes, otherwise they get optimized away. */
-
-default_public_struct default_public_s;
-explicit_public_struct explicit_public_s;
-protected_struct protected_s;
-private_struct private_s;
-mixed_protection_struct mixed_protection_s;
-public_class public_c;
-protected_class protected_c;
-default_private_class default_private_c;
-explicit_private_class explicit_private_c;
-mixed_protection_class mixed_protection_c;
diff --git a/gdb/testsuite/gdb.c++/misc.exp b/gdb/testsuite/gdb.c++/misc.exp
deleted file mode 100644
index a2d122fc69e..00000000000
--- a/gdb/testsuite/gdb.c++/misc.exp
+++ /dev/null
@@ -1,159 +0,0 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2002 Free Software
-# Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "misc"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-#
-# Deduce language of main()
-#
-
-proc deduce_language_of_main {} {
- global gdb_prompt
-
- # See what language gdb thinks main() is, prior to reading full symbols.
- # I think this fails for COFF targets.
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"auto; currently c\[+\]+\".*$gdb_prompt $" {
- pass "deduced language is C++, before full symbols"
- }
- -re ".*$gdb_prompt $" {
- fail "source language not correct for C++ (psymtabs only)"
- return
- }
- timeout {
- fail "can't show language (timeout)"
- return
- }
- }
-
- runto_main
-
- # See if our idea of the language has changed.
-
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"auto; currently c\[+\]+\".*$gdb_prompt $" {
- pass "deduced language is C++, after full symbols"
- }
- -re ".*$gdb_prompt $" {
- fail "source language not correct for C++ (full symbols)"
- return
- }
- timeout {
- fail "can't show language (timeout)"
- return
- }
- }
-}
-
-proc test_expr { args } {
- if { [llength $args] % 2 } {
- warning "an even # of arguments should be passed to test_expr"
- }
- set last_ent [expr [llength $args] - 1];
- set testname [lindex $args $last_ent];
- if [gdb_test [lindex $args 0] "" "$testname (setup)"] {
- gdb_suppress_tests;
- }
- for {set x 1} {$x < $last_ent} {set x [expr $x + 2]} {
- if [gdb_test [lindex $args $x] [lindex $args [expr $x + 1]] "$testname ([lindex $args $x])"] {
- gdb_suppress_tests;
- }
- }
- gdb_stop_suppressing_tests;
-}
-
-proc do_tests {} {
- global prms_id
- global bug_id
- global subdir
- global objdir
- global srcdir
- global binfile
- global gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- deduce_language_of_main
- # Check for fixes for PRs 8916 and 8630
- gdb_test "print s.a" ".* = 0" "print s.a for foo struct (known gcc 2.7.2 and earlier bug)"
-}
-
-do_tests
-
-test_expr "set language c++" \
- "print 1 == 1" "print.*\\$\[0-9\]* = true" \
- "print 1 == 2" "print.*\\$\[0-9\]* = false" \
- "print as bool"
-
-# Test bool type printing, etc.
-# Note: Language is already set to C++ above!
-gdb_test "print v_bool" "\\$\[0-9\]* = false" "print a bool var"
-
-# set a bool variable
-test_expr "set variable v_bool = true" \
- "print v_bool" "\\$\[0-9\]* = true" \
- "set a bool var"
-
-# next print an array of bool
-gdb_test "print v_bool_array" "\\$\[0-9\]* = \\{false, false\\}" "print a bool array"
-
-# set elements of a bool array
-test_expr "set variable v_bool_array\[1\] = true" \
- "print v_bool_array" "\\$\[0-9\]* = \\{false, true\\}" \
- "set a bool array elem"
-
-# bool constants
-gdb_test "print true" "\\$\[0-9\]* = true" "print true"
-gdb_test "print false" "\\$\[0-9\]* = false" "print false"
-
-# arithmetic conversions
-gdb_test "print 1 + true" "\\$\[0-9\]* = 2" "1 + true"
-gdb_test "print 3 + false" "\\$\[0-9\]* = 3" "3 + false"
-gdb_test "print 1 < 2 < 3" "\\$\[0-9\]* = true" "1 < 2 < 3"
-gdb_test "print 2 < 1 > 4" "\\$\[0-9\]* = false" "2 < 1 > 4"
-gdb_test "print (bool)43" "\\$\[0-9\]* = true" "(bool)43"
-gdb_test "print (bool)0" "\\$\[0-9\]* = false" "(bool)0"
-gdb_test "print (bool)17.93" "\\$\[0-9\]* = true" "(bool)17.93"
-gdb_test "print (bool)0.0" "\\$\[0-9\]* = false" "(bool)0.0"
-gdb_test "print (int)true" "\\$\[0-9\]* = 1" "(int)true"
-gdb_test "print (int)false" "\\$\[0-9\]* = 0" "(int)false"
diff --git a/gdb/testsuite/gdb.c++/namespace.cc b/gdb/testsuite/gdb.c++/namespace.cc
deleted file mode 100644
index 7b9a173d819..00000000000
--- a/gdb/testsuite/gdb.c++/namespace.cc
+++ /dev/null
@@ -1,163 +0,0 @@
-namespace AAA {
- char c;
- int i;
- int A_xyzq (int);
- char xyzq (char);
- class inA {
- public:
- int xx;
- int fum (int);
- };
-};
-
-int AAA::inA::fum (int i)
-{
- return 10 + i;
-}
-
-namespace BBB {
- char c;
- int i;
- int B_xyzq (int);
- char xyzq (char);
-
- namespace CCC {
- char xyzq (char);
- };
-
- class Class {
- public:
- char xyzq (char);
- int dummy;
- };
-};
-
-int AAA::A_xyzq (int x)
-{
- return 2 * x;
-}
-
-char AAA::xyzq (char c)
-{
- return 'a';
-}
-
-
-int BBB::B_xyzq (int x)
-{
- return 3 * x;
-}
-
-char BBB::xyzq (char c)
-{
- return 'b';
-}
-
-char BBB::CCC::xyzq (char c)
-{
- return 'z';
-}
-
-char BBB::Class::xyzq (char c)
-{
- return 'o';
-}
-
-void marker1(void)
-{
- return;
-}
-
-namespace
-{
- int X = 9;
-
- namespace G
- {
- int Xg = 10;
- }
-}
-
-namespace C
-{
- int c = 1;
- int shadow = 12;
-
- namespace
- {
- int cX = 6;
-
- namespace F
- {
- int cXf = 7;
- }
- }
-
- namespace C
- {
- int cc = 2;
- }
-
- namespace D
- {
- int cd = 3;
- int shadow = 13;
-
- namespace E
- {
- int cde = 5;
- }
-
- void marker2 (void)
- {
- // NOTE: carlton/2003-04-23: I'm listing the expressions that I
- // plan to have GDB try to print out, just to make sure that the
- // compiler and I agree which ones should be legal! It's easy
- // to screw up when testing the boundaries of namespace stuff.
- c;
- //cc;
- C::cc;
- cd;
- E::cde;
- shadow;
- cX;
- F::cXf;
- X;
- G::Xg;
- //cXOtherFile;
- //XOtherFile;
-
- return;
- }
-
- }
-}
-
-int main ()
-{
- using AAA::inA;
- char c1;
-
- using namespace BBB;
-
- c1 = xyzq ('x');
- c1 = AAA::xyzq ('x');
- c1 = BBB::CCC::xyzq ('m');
-
- inA ina;
-
- ina.xx = 33;
-
- int y;
-
- y = AAA::A_xyzq (33);
- y += B_xyzq (44);
-
- BBB::Class cl;
-
- c1 = cl.xyzq('e');
-
- marker1();
-
- C::D::marker2 ();
-}
diff --git a/gdb/testsuite/gdb.c++/namespace.exp b/gdb/testsuite/gdb.c++/namespace.exp
deleted file mode 100644
index f4efaf64d23..00000000000
--- a/gdb/testsuite/gdb.c++/namespace.exp
+++ /dev/null
@@ -1,219 +0,0 @@
-# Copyright 1997, 1998, 2000, 2001, 2002, 2003 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
-
-# tests for namespaces
-# Written by Satish Pai <pai@apollo.hp.com> 1997-07-23
-
-# This file is part of the gdb testsuite
-
-# Note: These tests are geared to the HP aCC compiler,
-# which has an idiosyncratic way of emitting debug info
-# for namespaces.
-# Note: As of 2000-06-03, these pass under g++ - djb
-
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "namespace"
-set srcfile ${testfile}.cc
-set objfile ${objdir}/${subdir}/${testfile}.o
-set srcfile1 ${testfile}1.cc
-set objfile1 ${objdir}/${subdir}/${testfile}1.o
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info ${binfile}] {
- return -1;
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if { [gdb_compile "${objfile} ${objfile1}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-#
-# set it up at a breakpoint so we can play with the variable values
-#
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-if ![runto 'marker1'] then {
- perror "couldn't run to marker1"
- continue
-}
-
-gdb_test "up" ".*main.*" "up from marker1"
-
-# Access a data item inside a namespace using colons and
-# single quotes :-(
-
-send_gdb "print 'AAA::c'\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 0 '\\\\(0|000)'\r\n$gdb_prompt $" { pass "print 'AAA::c'" }
- -re ".*$gdb_prompt $" { fail "print 'AAA::c'" }
- timeout { fail "(timeout) print 'AAA::c'" }
-}
-
-# An object declared using "using".
-
-send_gdb "print ina\n"
-gdb_expect {
- -re "\\$\[0-9\]+ = {xx = 33}.*$gdb_prompt $" {
- pass "print ina"
- }
- -re ".*$gdb_prompt $" { fail "print ina" }
- timeout { fail "(timeout) print ina" }
-}
-
-send_gdb "ptype ina\n"
-gdb_expect {
- -re "type = class (AAA::|)inA \{\r\n\[ \]*public:\r\n\[ \]*int xx;\r\n\[ \]*\r\n\[ \]*.*int fum\\(int\\);\r\n\}\r\n$gdb_prompt $" {
- pass "ptype ina"
- }
- -re ".*$gdb_prompt $" { fail "ptype ina" }
- timeout { fail "(timeout) ptype ina" }
-}
-
-# Check all functions are known to GDB
-
-setup_xfail hppa*-*-*11* CLLbs14869
-send_gdb "info func xyzq\n"
-gdb_expect {
- -re "All functions.*File.*namespace.cc:\r\nint AAA::A_xyzq\\(int\\);\r\nint BBB::B_xyzq\\(int\\);\r\nchar AAA::xyzq\\(char\\);\r\nchar BBB::xyzq\\(char\\);\r\nchar BBB::CCC::xyzq\\(char\\);\r\nchar BBB::Class::xyzq\\(char\\);\r\n$gdb_prompt $" {
- pass "info func xyzq"
- }
- -re "All functions.*File.*namespace.cc:\r\nint AAA::A_xyzq\\(int\\);\r\nchar AAA::xyzq\\(char\\);\r\nint BBB::B_xyzq\\(int\\);\r\nchar BBB::CCC::xyzq\\(char\\);\r\nchar BBB::Class::xyzq\\(char\\);\r\nchar BBB::xyzq\\(char\\);\r\n$gdb_prompt $" {
- pass "info func xyzq"
- }
- -re ".*$gdb_prompt $" { fail "info func xyzq" }
- timeout { fail "(timeout) info func xyzq" }
-}
-
-# Call a function in a namespace
-
-send_gdb "print 'AAA::xyzq'('x')\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 97 'a'\r\n$gdb_prompt $" {
- pass "print 'AAA::xyzq'('x')"
- }
- -re ".*$gdb_prompt $" { fail "print 'AAA::xyzq'('x')" }
- timeout { fail "(timeout) print 'AAA::xyzq'('x')" }
-}
-
-# Break on a function in a namespace
-
-send_gdb "break AAA::xyzq\n"
-gdb_expect {
- -re "Breakpoint.*at $hex: file.*namespace.cc, line 42\\.\r\n$gdb_prompt $" {
- pass "break AAA::xyzq"
- }
- -re ".*$gdb_prompt $" { fail "break AAA::xyzq" }
- timeout { fail "(timeout) break AAA::xyzq" }
-}
-
-# Call a function in a nested namespace
-
-send_gdb "print 'BBB::CCC::xyzq'('x')\n"
-gdb_expect {
- -re "\\$\[0-9\]* = 122 'z'\r\n$gdb_prompt $" {
- pass "print 'BBB::CCC::xyzq'('x')"
- }
- -re ".*$gdb_prompt $" { fail "print 'BBB::CCC::xyzq'('x')" }
- timeout { fail "(timeout) print 'BBB::CCC::xyzq'('x')" }
-}
-
-# Break on a function in a nested namespace
-
-send_gdb "break BBB::CCC::xyzq\n"
-gdb_expect {
- -re "Breakpoint.*at $hex: file.*namespace.cc, line 58\\.\r\n$gdb_prompt $" {
- pass "break BBB::CCC::xyzq"
- }
- -re ".*$gdb_prompt $" { fail "break BBB::CCC::xyzq" }
- timeout { fail "(timeout) break BBB::CCC::xyzq" }
-}
-
-# Print address of a function in a class in a namespace
-
-send_gdb "print 'BBB::Class::xyzq'\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \{char \\((BBB::|)Class \\*( const|), (char|int)\\)\} $hex <BBB::Class::xyzq\\(char\\)>\r\n$gdb_prompt $" {
- pass "print 'BBB::Class::xyzq'"
- }
- -re ".*$gdb_prompt $" { fail "print 'BBB::Class::xyzq'" }
- timeout { fail "(timeout) print 'BBB::Class::xyzq'" }
-}
-
-# Break on a function in a class in a namespace
-
-send_gdb "break BBB::Class::xyzq\n"
-gdb_expect {
- -re "Breakpoint.*at $hex: file.*namespace.cc, line 63\\.\r\n$gdb_prompt $" {
- pass "break BBB::Class::xyzq"
- }
- -re ".*$gdb_prompt $" { fail "break BBB::Class::xyzq" }
- timeout { fail "(timeout) break BBB::Class::xyzq" }
-}
-
-# Test to see if the appropriate namespaces are in scope when trying
-# to print out stuff from within a function defined within a
-# namespace.
-
-if ![runto "C::D::marker2"] then {
- perror "couldn't run to marker2"
- continue
-}
-
-gdb_test "print c" "\\$\[0-9\].* = 1"
-gdb_test "print cc" "No symbol \"cc\" in current context."
-gdb_test "print 'C::cc'" "\\$\[0-9\].* = 2"
-gdb_test "print cd" "\\$\[0-9\].* = 3"
-gdb_test "print 'E::cde'" "\\$\[0-9\].* = 5"
-gdb_test "print shadow" "\\$\[0-9\].* = 13"
-gdb_test "print cOtherFile" "\\$\[0-9\].* = 316"
-
-# Some anonymous namespace tests.
-
-gdb_test "print cX" "\\$\[0-9\].* = 6"
-gdb_test "print 'F::cXf'" "\\$\[0-9\].* = 7"
-gdb_test "print X" "\\$\[0-9\].* = 9"
-gdb_test "print 'G::Xg'" "\\$\[0-9\].* = 10"
-gdb_test "print cXOtherFile" "No symbol \"cXOtherFile\" in current context."
-gdb_test "print XOtherFile" "No symbol \"XOtherFile\" in current context."
diff --git a/gdb/testsuite/gdb.c++/namespace1.cc b/gdb/testsuite/gdb.c++/namespace1.cc
deleted file mode 100644
index 4a5900a8b3d..00000000000
--- a/gdb/testsuite/gdb.c++/namespace1.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2003 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 */
-
-namespace C
-{
- namespace {
- int cXOtherFile = 29;
- };
-
- int cOtherFile = 316;
-}
-
-namespace {
- int XOtherFile = 317;
-}
diff --git a/gdb/testsuite/gdb.c++/overload.cc b/gdb/testsuite/gdb.c++/overload.cc
deleted file mode 100644
index 56afc96884e..00000000000
--- a/gdb/testsuite/gdb.c++/overload.cc
+++ /dev/null
@@ -1,168 +0,0 @@
-#include <stddef.h>
-
-class foo {
-public:
- foo (int);
- foo (int, const char *);
- foo (foo&);
- ~foo ();
- void foofunc (int);
- void foofunc (int, signed char *);
- int ifoo;
- const char *ccpfoo;
-
-int overload1arg (void);
-int overload1arg (char);
-int overload1arg (signed char);
-int overload1arg (unsigned char);
-int overload1arg (short);
-int overload1arg (unsigned short);
-int overload1arg (int);
-int overload1arg (unsigned int);
-int overload1arg (long);
-int overload1arg (unsigned long);
-int overload1arg (float);
-int overload1arg (double);
-
-int overloadfnarg (void);
-int overloadfnarg (int);
-int overloadfnarg (int, int (*) (int));
-
-int overloadargs (int a1);
-int overloadargs (int a1, int a2);
-int overloadargs (int a1, int a2, int a3);
-int overloadargs (int a1, int a2, int a3, int a4);
-int overloadargs (int a1, int a2, int a3, int a4, int a5);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9, int a10);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9, int a10, int a11);
-
-
-};
-
-int intToChar (char c)
-{
- return 297;
-}
-
-void marker1()
-{}
-
-int main ()
-{
- char arg2 = 2;
- signed char arg3 =3;
- unsigned char arg4 =4;
- short arg5 =5;
- unsigned short arg6 =6;
- int arg7 =7;
- unsigned int arg8 =8;
- long arg9 =9;
- unsigned long arg10 =10;
- float arg11 =100.0;
- double arg12 = 200.0;
-
- char *str = (char *) "A";
- foo foo_instance1(111);
- foo foo_instance2(222, str);
- foo foo_instance3(foo_instance2);
-
- #ifdef usestubs
- set_debug_traps();
- breakpoint();
- #endif
-
- // Verify that intToChar should work:
- intToChar(1);
-
- marker1(); // marker1-returns-here
- return 0; // marker1-returns-here
-}
-
-foo::foo (int i) { ifoo = i; ccpfoo = NULL; }
-foo::foo (int i, const char *ccp) { ifoo = i; ccpfoo = ccp; }
-foo::foo (foo& afoo) { ifoo = afoo.ifoo; ccpfoo = afoo.ccpfoo;}
-foo::~foo () {}
-
-
-/* Some functions to test overloading by varying one argument type. */
-
-int foo::overload1arg (void) { return 1; }
-int foo::overload1arg (char arg) { arg = 0; return 2;}
-int foo::overload1arg (signed char arg) { arg = 0; return 3;}
-int foo::overload1arg (unsigned char arg) { arg = 0; return 4;}
-int foo::overload1arg (short arg) { arg = 0; return 5;}
-int foo::overload1arg (unsigned short arg) { arg = 0; return 6;}
-int foo::overload1arg (int arg) { arg = 0; return 7;}
-int foo::overload1arg (unsigned int arg) { arg = 0; return 8;}
-int foo::overload1arg (long arg) { arg = 0; return 9;}
-int foo::overload1arg (unsigned long arg) { arg = 0; return 10;}
-int foo::overload1arg (float arg) { arg = 0; return 11;}
-int foo::overload1arg (double arg) { arg = 0; return 12;}
-
-/* Test to see that we can explicitly request overloaded functions
- with function pointers in the prototype. */
-
-int foo::overloadfnarg (void) { return ifoo * 20; }
-int foo::overloadfnarg (int arg) { arg = 0; return 13;}
-int foo::overloadfnarg (int arg, int (*foo) (int)) { return foo(arg); }
-
-/* Some functions to test overloading by varying argument count. */
-
-int foo::overloadargs (int a1)
-{ a1 = 0;
-return 1;}
-
-int foo::overloadargs (int a1, int a2)
-{ a1 = a2 = 0;
-return 2;}
-
-int foo::overloadargs (int a1, int a2, int a3)
-{ a1 = a2 = a3 = 0;
-return 3;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4)
-{ a1 = a2 = a3 = a4 = 0;
-return 4;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5)
-{ a1 = a2 = a3 = a4 = a5 = 0;
-return 5;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6)
-{ a1 = a2 = a3 = a4 = a5 = a6 = 0;
-return 6;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7)
-{ a1 = a2 = a3 = a4 = a5 = a6 = a7 = 0;
-return 7;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8)
-{ a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = 0;
-return 8;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9)
-{
- a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = 0;
- return 9;
-}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9, int a10)
- { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 =
- a10 = 0; return 10;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9, int a10, int a11)
- { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 =
- a10 = a11 = 0; return 11;}
-
-
-
diff --git a/gdb/testsuite/gdb.c++/overload.exp b/gdb/testsuite/gdb.c++/overload.exp
deleted file mode 100644
index 3e14678e4c2..00000000000
--- a/gdb/testsuite/gdb.c++/overload.exp
+++ /dev/null
@@ -1,400 +0,0 @@
-# Copyright 1998, 1999, 2000, 2001, 2002, 2003 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
-
-# written by Elena Zannoni (ezannoni@cygnus.com)
-
-# This file is part of the gdb testsuite
-#
-# tests for overloaded member functions. Command Line calls
-#
-
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "overload"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-# set it up at a breakpoint so we can play with the variable values
-#
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-if ![runto 'marker1'] then {
- perror "couldn't run to marker1"
- continue
-}
-
-gdb_test "up" ".*main.*" "up from marker1"
-
-send_gdb "print foo_instance1\n"
-gdb_expect {
- -re ".\[0-9\]* = \{ifoo = 111, ccpfoo = 0x0\}\r\n$gdb_prompt $" {
- pass "print foo_instance1"
- }
- -re ".*$gdb_prompt $" { fail "print foo_instance1" }
- timeout { fail "(timeout) print foo_instance1" }
- }
-
-
-setup_xfail "hppa*-*-*" CLLbs16901
-send_gdb "ptype foo_instance1\n"
-gdb_expect {
- -re "type = class foo \{.*public:.*int ifoo;.*const char \\*ccpfoo;.*foo\\(int\\);.*foo\\(int, (const char|char const) \\*\\);.*foo\\(foo &\\);.*~foo\\(void\\);.*void foofunc\\(int\\);.*void foofunc\\(int, signed char \\*\\);.*int overload1arg\\(void\\);.*int overload1arg\\(char\\);.*int overload1arg\\(signed char\\);.*int overload1arg\\(unsigned char\\);.*int overload1arg\\(short\\);.*int overload1arg\\(unsigned short\\);.*int overload1arg\\(int\\);.*int overload1arg\\(unsigned int\\);.*int overload1arg\\(long\\);.*int overload1arg\\(unsigned long\\);.*int overload1arg\\(float\\);.*int overload1arg\\(double\\);.*int overloadargs\\(int\\);.*int overloadargs\\(int, int\\);.*int overloadargs\\(int, int, int\\);.*int overloadargs\\(int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int, int, int\\);.*int overloadargs\\(int, int, int, int, int, int, int, int, int, int, int\\);\r\n\}\r\n$gdb_prompt $" {
- pass "ptype foo_instance1 (HP aCC -- known quirk with ~foo parameter list)"
- }
- -re "type = class foo .*int overloadargs\\(int, int, int, int, int, int, int, int, int, int, int\\);\r\n\}\r\n$gdb_prompt $" {
- pass "ptype foo_instance1 (shorter match)"
- }
- -re ".*$gdb_prompt $" { fail "ptype foo_instance1" }
- timeout { fail "(timeout) ptype foo_instance1" }
- }
-
-send_gdb "print foo_instance2\n"
-gdb_expect {
- -re ".\[0-9\]* = \{ifoo = 222, ccpfoo = $hex \"A\"\}\r\n$gdb_prompt $" {
- pass "print foo_instance2"
- }
- -re ".*$gdb_prompt $" { fail "print foo_instance2" }
- timeout { fail "(timeout) print foo_instance2" }
- }
-
-send_gdb "print foo_instance3\n"
-gdb_expect {
- -re ".\[0-9\]* = \{ifoo = 222, ccpfoo = $hex \"A\"\}\r\n$gdb_prompt $" {
- pass "print foo_instance3"
- }
- -re ".*$gdb_prompt $" { fail "print foo_instance3" }
- timeout { fail "(timeout) print foo_instance3" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1)\n"
-gdb_expect {
- -re ".\[0-9\]* = 1\r\n$gdb_prompt $" {
- pass "print call overloaded func 1 arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 1 arg" }
- timeout { fail "(timeout) print call overloaded func 1 arg" }
- }
-
-
-# If GDB fails to restore the selected frame properly after the
-# inferior function call above (see GDB PR 1155 for an explanation of
-# why this might happen), all the subsequent tests will fail. We
-# should detect and report that failure, but let the marker call
-# finish so that the rest of the tests can run undisturbed.
-gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
- -re "#0 marker1.*$gdb_prompt $" {
- setup_kfail "gdb/1155" s390-*-linux-gnu
- fail "re-selected 'main' frame after inferior call"
- gdb_test "finish" ".*main.*at .*overload.cc:.*// marker1-returns-here.*" \
- "finish call to marker1"
- }
- -re "#1 ($hex in )?main.*$gdb_prompt $" {
- pass "re-selected 'main' frame after inferior call"
- }
-}
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2)\n"
-gdb_expect {
- -re ".\[0-9\]* = 2\r\n$gdb_prompt $" {
- pass "print call overloaded func 2 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 2 args" }
- timeout { fail "(timeout) print call overloaded func 2 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3)\n"
-gdb_expect {
- -re ".\[0-9\]* = 3\r\n$gdb_prompt $" {
- pass "print call overloaded func 3 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 3 args" }
- timeout { fail "(timeout) print call overloaded func 3 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4)\n"
-gdb_expect {
- -re ".\[0-9\]* = 4\r\n$gdb_prompt $" {
- pass "print call overloaded func 4 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 4 args" }
- timeout { fail "(timeout) print call overloaded func 4 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5)\n"
-gdb_expect {
- -re ".\[0-9\]* = 5\r\n$gdb_prompt $" {
- pass "print call overloaded func 5 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 5 args" }
- timeout { fail "(timeout) print call overloaded func 5 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6)\n"
-gdb_expect {
- -re ".\[0-9\]* = 6\r\n$gdb_prompt $" {
- pass "print call overloaded func 6 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 6 args" }
- timeout { fail "(timeout) print call overloaded func 6 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7)\n"
-gdb_expect {
- -re ".\[0-9\]* = 7\r\n$gdb_prompt $" {
- pass "print call overloaded func 7 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 7 args" }
- timeout { fail "(timeout) print call overloaded func 7 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8)\n"
-gdb_expect {
- -re ".\[0-9\]* = 8\r\n$gdb_prompt $" {
- pass "print call overloaded func 8 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 8 args" }
- timeout { fail "(timeout) print call overloaded func 8 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9)\n"
-gdb_expect {
- -re ".\[0-9\]* = 9\r\n$gdb_prompt $" {
- pass "print call overloaded func 9 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 9 args" }
- timeout { fail "(timeout) print call overloaded func 9 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)\n"
-gdb_expect {
- -re ".\[0-9\]* = 10\r\n$gdb_prompt $" {
- pass "print call overloaded func 10 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 10 args" }
- timeout { fail "(timeout) print call overloaded func 10 args" }
- }
-
-
-send_gdb "print foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)\n"
-gdb_expect {
- -re ".\[0-9\]* = 11\r\n$gdb_prompt $" {
- pass "print call overloaded func 11 args"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func 11 args" }
- timeout { fail "(timeout) print call overloaded func 11 args" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg()\n"
-gdb_expect {
- -re ".\[0-9\]* = 1\r\n$gdb_prompt $" {
- pass "print call overloaded func void arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func void arg" }
- timeout { fail "(timeout) print call overloaded func void arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((char)arg2)\n"
-gdb_expect {
- -re ".\[0-9\]* = 2\r\n$gdb_prompt $" {
- pass "print call overloaded func char arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func char arg" }
- timeout { fail "(timeout) print call overloaded func char arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((signed char)arg3)\n"
-gdb_expect {
- -re ".\[0-9\]* = 3\r\n$gdb_prompt $" {
- pass "print call overloaded func signed char arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func signed char arg" }
- timeout { fail "(timeout) print call overloaded func signed char arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((unsigned char)arg4)\n"
-gdb_expect {
- -re ".\[0-9\]* = 4\r\n$gdb_prompt $" {
- pass "print call overloaded func unsigned char arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func unsigned char arg" }
- timeout { fail "(timeout) print call overloaded func unsigned char arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((short)arg5)\n"
-gdb_expect {
- -re ".\[0-9\]* = 5\r\n$gdb_prompt $" {
- pass "print call overloaded func short arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func short arg" }
- timeout { fail "(timeout) print call overloaded func short arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((unsigned short)arg6)\n"
-gdb_expect {
- -re ".\[0-9\]* = 6\r\n$gdb_prompt $" {
- pass "print call overloaded func unsigned short arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func unsigned short arg" }
- timeout { fail "(timeout) print call overloaded func unsigned short arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((int)arg7)\n"
-gdb_expect {
- -re ".\[0-9\]* = 7\r\n$gdb_prompt $" {
- pass "print call overloaded func int arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func int arg" }
- timeout { fail "(timeout) print call overloaded func int arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((unsigned int)arg8)\n"
-gdb_expect {
- -re ".\[0-9\]* = 8\r\n$gdb_prompt $" {
- pass "print call overloaded func unsigned int arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func unsigned int arg" }
- timeout { fail "(timeout) print call overloaded func unsigned int arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((long)arg9)\n"
-gdb_expect {
- -re ".\[0-9\]* = 9\r\n$gdb_prompt $" {
- pass "print call overloaded func long arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func long arg" }
- timeout { fail "(timeout) print call overloaded func long arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((unsigned long)arg10)\n"
-gdb_expect {
- -re ".\[0-9\]* = 10\r\n$gdb_prompt $" {
- pass "print call overloaded func unsigned long arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func unsigned long arg" }
- timeout { fail "(timeout) print call overloaded func unsigned long arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((float)arg11)\n"
-gdb_expect {
- -re ".\[0-9\]* = 11\r\n$gdb_prompt $" {
- pass "print call overloaded func float arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func float arg" }
- timeout { fail "(timeout) print call overloaded func float arg" }
- }
-
-
-send_gdb "print foo_instance1.overload1arg((double)arg12)\n"
-gdb_expect {
- -re ".\[0-9\]* = 12\r\n$gdb_prompt $" {
- pass "print call overloaded func double arg"
- }
- -re ".*$gdb_prompt $" { fail "print call overloaded func double arg" }
- timeout { fail "(timeout) print call overloaded func double arg" }
- }
-
-# Now some tests to see if we can list overloaded functions properly:
-
-gdb_test "set listsize 1" "" ""
-# send_gdb "set listsize 1\n"
-# gdb_expect -re ".*$gdb_prompt $"
-
-#
-# Decide whether to use "()" or "(void)"
-#
-
-send_gdb "info func overloadfnarg\n"
-gdb_expect {
- -re ".*overloadfnarg\\(void\\).*$gdb_prompt $" {
- gdb_test "list foo::overloadfnarg(void)"\
- ".*int foo::overloadfnarg.*\\(void\\).*" \
- "list overloaded function with no args"
- }
- -re ".*overloadfnarg\\(\\).*$gdb_prompt $" {
- gdb_test "list foo::overloadfnarg()"\
- ".*int foo::overloadfnarg.*\\(void\\).*" \
- "list overloaded function with no args"
- }
- -re ".*$gdb_prompt $" {
- fail "list overloaded function with no args (no matching symbol)"
- }
-}
-
-gdb_test "list foo::overloadfnarg(int)"\
- "int foo::overloadfnarg.*\\(int arg\\).*" \
- "list overloaded function with int arg"
-
-gdb_test "list foo::overloadfnarg(int, int (*)(int))" \
- "int foo::overloadfnarg.*\\(int arg, int \\(\\*foo\\) \\(int\\)\\).*" \
- "list overloaded function with function ptr args"
-
-# This one crashes GDB. Don't know why yet.
-gdb_test "list \"foo::overloadfnarg(int, int (*)(int))\"" \
- "int foo::overloadfnarg.*\\(int arg, int \\(\\*foo\\) \\(int\\)\\).*" \
- "list overloaded function with function ptr args - quotes around argument"
-
-gdb_test "print intToChar(1)" ".\[0-9\]* = 297"
diff --git a/gdb/testsuite/gdb.c++/ovldbreak.cc b/gdb/testsuite/gdb.c++/ovldbreak.cc
deleted file mode 100644
index 9a5b5cbf7c7..00000000000
--- a/gdb/testsuite/gdb.c++/ovldbreak.cc
+++ /dev/null
@@ -1,177 +0,0 @@
-#include <stddef.h>
-
-class foo {
-public:
- foo (int);
- foo (int, const char *);
- foo (foo&);
- ~foo ();
- void foofunc (int);
- void foofunc (int, signed char *);
- int ifoo;
- const char *ccpfoo;
-
-int overload1arg (void);
-int overload1arg (char);
-int overload1arg (signed char);
-int overload1arg (unsigned char);
-int overload1arg (short);
-int overload1arg (unsigned short);
-int overload1arg (int);
-int overload1arg (unsigned int);
-int overload1arg (long);
-int overload1arg (unsigned long);
-int overload1arg (float);
-int overload1arg (double);
-
-int overloadargs (int a1);
-int overloadargs (int a1, int a2);
-int overloadargs (int a1, int a2, int a3);
-int overloadargs (int a1, int a2, int a3, int a4);
-int overloadargs (int a1, int a2, int a3, int a4, int a5);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9, int a10);
-int overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9, int a10, int a11);
-
-
-};
-
-void marker1()
-{}
-
-int main ()
-{
- char arg2 = 2;
- signed char arg3 =3;
- unsigned char arg4 =4;
- short arg5 =5;
- unsigned short arg6 =6;
- int arg7 =7;
- unsigned int arg8 =8;
- long arg9 =9;
- unsigned long arg10 =10;
- float arg11 =100.0;
- double arg12 = 200.0;
-
- char ch='A';
- foo foo_instance1(111);
- foo foo_instance2(222, &ch);
- foo foo_instance3(foo_instance2);
-
- foo_instance1.overload1arg();
- foo_instance1.overload1arg(arg2);
- foo_instance1.overload1arg(arg3);
- foo_instance1.overload1arg(arg4);
- foo_instance1.overload1arg(arg5);
- foo_instance1.overload1arg(arg6);
- foo_instance1.overload1arg(arg7);
- foo_instance1.overload1arg(arg8);
- foo_instance1.overload1arg(arg9);
- foo_instance1.overload1arg(arg10);
- foo_instance1.overload1arg(arg11);
- foo_instance1.overload1arg(arg12);
-
- foo_instance1.overloadargs(1);
- foo_instance1.overloadargs(1, 2);
- foo_instance1.overloadargs(1, 2, 3);
- foo_instance1.overloadargs(1, 2, 3, 4);
- foo_instance1.overloadargs(1, 2, 3, 4, 5);
- foo_instance1.overloadargs(1, 2, 3, 4, 5, 6);
- foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7);
- foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8);
- foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9);
- foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
- foo_instance1.overloadargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
-
-
- #ifdef usestubs
- set_debug_traps();
- breakpoint();
- #endif
-
-
- marker1();
- return 0;
-}
-
-foo::foo (int i) { ifoo = i;}
-foo::foo (int i, const char *ccp) { ifoo = i; ccpfoo = ccp; }
-foo::foo (foo& afoo) { ifoo = afoo.ifoo; ccpfoo = afoo.ccpfoo;}
-foo::~foo () {}
-
-
-/* Some functions to test overloading by varying one argument type. */
-
-int foo::overload1arg (void) { return 1; }
-int foo::overload1arg (char arg) { arg = 0; return 2;}
-int foo::overload1arg (signed char arg) { arg = 0; return 3;}
-int foo::overload1arg (unsigned char arg) { arg = 0; return 4;}
-int foo::overload1arg (short arg) { arg = 0; return 5;}
-int foo::overload1arg (unsigned short arg) { arg = 0; return 6;}
-int foo::overload1arg (int arg) { arg = 0; return 7;}
-int foo::overload1arg (unsigned int arg) { arg = 0; return 8;}
-int foo::overload1arg (long arg) { arg = 0; return 9;}
-int foo::overload1arg (unsigned long arg) { arg = 0; return 10;}
-int foo::overload1arg (float arg) { arg = 0; return 11;}
-int foo::overload1arg (double arg) { arg = 0; return 12;}
-
-
-/* Some functions to test overloading by varying argument count. */
-
-int foo::overloadargs (int a1)
-{ a1 = 0;
-return 1;}
-
-int foo::overloadargs (int a1, int a2)
-{ a1 = a2 = 0;
-return 2;}
-
-int foo::overloadargs (int a1, int a2, int a3)
-{ a1 = a2 = a3 = 0;
-return 3;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4)
-{ a1 = a2 = a3 = a4 = 0;
-return 4;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5)
-{ a1 = a2 = a3 = a4 = a5 = 0;
-return 5;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6)
-{ a1 = a2 = a3 = a4 = a5 = a6 = 0;
-return 6;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7)
-{ a1 = a2 = a3 = a4 = a5 = a6 = a7 = 0;
-return 7;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8)
-{ a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = 0;
-return 8;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9)
-{
- a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = 0;
- return 9;
-}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9, int a10)
- { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 =
- a10 = 0; return 10;}
-
-int foo::overloadargs (int a1, int a2, int a3, int a4, int a5, int a6, int a7,
- int a8, int a9, int a10, int a11)
- { a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 =
- a10 = a11 = 0; return 11;}
-
-
-
diff --git a/gdb/testsuite/gdb.c++/ovldbreak.exp b/gdb/testsuite/gdb.c++/ovldbreak.exp
deleted file mode 100644
index 043243d23ff..00000000000
--- a/gdb/testsuite/gdb.c++/ovldbreak.exp
+++ /dev/null
@@ -1,360 +0,0 @@
-# Copyright (C) 1998, 1999, 2001 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
-
-# written by Elena Zannoni (ezannoni@cygnus.com)
-# modified by Michael Chastain (chastain@redhat.com)
-
-# This file is part of the gdb testsuite
-#
-# tests for overloaded member functions. Set breakpoints on
-# overloaded member functions
-#
-
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "ovldbreak"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-# set it up at a breakpoint so we can play with the variable values
-#
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-
-
-# When I ask gdb to set a breakpoint on an overloaded function,
-# gdb gives me a choice menu. I might get stuck in that choice menu
-# (for example, if C++ name mangling is not working properly).
-#
-# This procedure issues a command that works at either the menu
-# prompt or the command prompt to get back to the command prompt.
-#
-# Note that an empty line won't do it (it means 'repeat the previous command'
-# at top level). A line with a single space in it works nicely.
-
-proc take_gdb_out_of_choice_menu {} {
- global gdb_prompt
- send_gdb " \n"
- gdb_expect {
- -re ".*$gdb_prompt $" {
- }
- timeout {
- perror "could not resynchronize to command prompt (timeout)"
- continue
- }
- }
-}
-
-
-
-# This procedure sets an overloaded breakpoint.
-# When I ask for such a breakpoint, gdb gives me a menu of 'cancel' 'all'
-# and a bunch of choices. I then choose from that menu by number.
-
-proc set_bp_overloaded {name expectedmenu mychoice bpnumber linenumber} {
- global gdb_prompt hex srcfile
-
- # Get into the overload menu.
- send_gdb "break $name\n"
- gdb_expect {
- -re "$expectedmenu" {
- pass "bp menu for $name choice $mychoice"
-
- # Choose my choice.
- send_gdb "$mychoice\n"
- gdb_expect {
- -re "Breakpoint $bpnumber at $hex: file.*$srcfile, line $linenumber.\r\n$gdb_prompt $" {
- pass "set bp $bpnumber on $name $mychoice line $linenumber"
- }
- -re ".*$gdb_prompt $" {
- fail "set bp $bpnumber on $name $mychoice line $linenumber (bad bp)"
- }
- timeout {
- fail "set bp $bpnumber on $name $mychoice line $linenumber (timeout)"
- take_gdb_out_of_choice_menu
- }
- }
- }
- -re ".*\r\n> " {
- fail "bp menu for $name choice $mychoice (bad menu)"
- take_gdb_out_of_choice_menu
- }
- -re ".*$gdb_prompt $" {
- fail "bp menu for $name choice $mychoice (no menu)"
- }
- timeout {
- fail "bp menu for $name choice $mychoice (timeout)"
- take_gdb_out_of_choice_menu
- }
- }
-}
-
-# This is the expected menu for overload1arg.
-# Note the arg type variations on lines 6 and 13.
-# This accommodates different versions of g++.
-
-set menu_overload1arg "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\((unsigned int|unsigned)\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\((void|)\\) at.*$srcfile:110\r\n> $"
-
-
-
-# Set breakpoints on foo::overload1arg, one by one.
-
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 12 2 111
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 11 3 112
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 10 4 113
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 9 5 114
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 8 6 115
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 7 7 116
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 6 8 117
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 5 9 118
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 4 10 119
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 3 11 120
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 2 12 121
-set_bp_overloaded "foo::overload1arg" "$menu_overload1arg" 13 13 110
-
-
-
-# Verify the breakpoints.
-
-gdb_test "info break" \
- "Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in main at.*$srcfile:49\r
-\[\t \]+breakpoint already hit 1 time\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(char\\) at.*$srcfile:111\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(short\\) at.*$srcfile:114\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(int\\) at.*$srcfile:116\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((unsigned|unsigned int)\\) at.*$srcfile:117\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(long\\) at.*$srcfile:118\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(float\\) at.*$srcfile:120\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(double\\) at.*$srcfile:121\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((void|)\\) at.*$srcfile:110" \
- "breakpoint info (after setting one-by-one)"
-
-
-
-# Test choice "cancel".
-# This is copy-and-paste from set_bp_overloaded.
-
-send_gdb "break foo::overload1arg\n"
-gdb_expect {
- -re "$menu_overload1arg" {
- pass "bp menu for foo::overload1arg choice cancel"
- # Choose cancel.
- send_gdb "0\n"
- gdb_expect {
- -re "canceled\r\n$gdb_prompt $" {
- pass "set bp on overload1arg canceled"
- }
- -re "cancelled\r\n$gdb_prompt $" {
- pass "set bp on overload1arg canceled"
- }
- -re ".*$gdb_prompt $" {
- fail "set bp on overload1arg canceled (bad message)"
- }
- timeout {
- fail "set bp on overload1arg canceled (timeout)"
- take_gdb_out_of_choice_menu
- }
- }
- }
- -re ".*\r\n> " {
- fail "bp menu for foo::overload1arg choice cancel (bad menu)"
- take_gdb_out_of_choice_menu
- }
- -re ".*$gdb_prompt $" {
- fail "bp menu for foo::overload1arg choice cancel (no menu)"
- }
- timeout {
- fail "bp menu for foo::overload1arg choice cancel (timeout)"
- take_gdb_out_of_choice_menu
- }
-}
-
-gdb_test "info break" \
- "Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in main at.*$srcfile:49\r
-\[\t \]+breakpoint already hit 1 time\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(char\\) at.*$srcfile:111\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(short\\) at.*$srcfile:114\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(int\\) at.*$srcfile:116\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((unsigned|unsigned int)\\) at.*$srcfile:117\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(long\\) at.*$srcfile:118\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(float\\) at.*$srcfile:120\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(double\\) at.*$srcfile:121\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((void|)\\) at.*$srcfile:110" \
- "breakpoint info (after cancel)"
-
-
-
-# Delete these breakpoints.
-
-send_gdb "delete breakpoints\n"
-gdb_expect {
- -re "Delete all breakpoints.* $" {
- send_gdb "y\n"
- gdb_expect {
- -re ".*$gdb_prompt $" {
- pass "delete all breakpoints"
- }
- timeout {
- fail "delete all breakpoints (timeout)"
- }
- }
- }
- timeout {
- fail "delete all breakpoints (timeout)"
- }
-}
-
-gdb_test "info breakpoints" "No breakpoints or watchpoints." "breakpoint info (after delete)"
-
-
-
-# Test choice "all".
-# This is copy-and-paste from set_bp_overloaded.
-
-send_gdb "break foo::overload1arg\n"
-gdb_expect {
- -re "$menu_overload1arg" {
- pass "bp menu for foo::overload1arg choice all"
- # Choose all.
- send_gdb "1\n"
- gdb_expect {
- -re "Breakpoint $decimal at $hex: file.*$srcfile, line 121.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 120.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 119.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 118.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 117.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 116.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 115.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 114.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 113.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 112.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 111.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 110.\r\nwarning: Multiple breakpoints were set.\r\nwarning: Use the .delete. command to delete unwanted breakpoints.\r\n$gdb_prompt $" {
- pass "set bp on overload1arg all"
- }
- -re ".*$gdb_prompt $" {
- fail "set bp on overload1arg all (bad message)"
- }
- timeout {
- fail "set bp on overload1arg all (timeout)"
- take_gdb_out_of_choice_menu
- }
- }
- }
- -re ".*\r\n> " {
- fail "bp menu for foo::overload1arg choice all (bad menu)"
- take_gdb_out_of_choice_menu
- }
- -re ".*$gdb_prompt $" {
- fail "bp menu for foo::overload1arg choice all (no menu)"
- }
- timeout {
- fail "bp menu for foo::overload1arg choice all (timeout)"
- take_gdb_out_of_choice_menu
- }
-}
-
-gdb_test "info break" \
- "Num Type\[\t \]+Disp Enb Address\[\t \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(double\\) at.*$srcfile:121\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(float\\) at.*$srcfile:120\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(long\\) at.*$srcfile:118\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((unsigned|unsigned int)\\) at.*$srcfile:117\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(int\\) at.*$srcfile:116\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(short\\) at.*$srcfile:114\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(signed char\\) at.*$srcfile:112\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\(char\\) at.*$srcfile:111\r
-\[0-9\]+\[\t \]+breakpoint keep y\[\t \]+$hex\[\t \]+in foo::overload1arg\\((void|)\\) at.*$srcfile:110" \
- "breakpoint info (after setting on all)"
-
-
-
-# Run through each breakpoint.
-
-# NOTE: carlton/2003-02-03: I'm seeing failures on some of the tests,
-# with the wrong arg being printed out. Michael Chastain sees
-# failures at times, too, albeit fewer than I do.
-
-proc continue_to_bp_overloaded {might_kfail bpnumber argtype actuals} {
- global gdb_prompt hex decimal srcfile
-
- send_gdb "continue\n"
- gdb_expect {
- -re "Continuing.\r\n\r\nBreakpoint ${bpnumber}, (${hex} in )?foo::overload1arg(\\(${argtype}\\))? \\(this=${hex}(, )?${actuals}\\) at.*${srcfile}:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${argtype}( arg)?\\).*\r\n.*$gdb_prompt $" {
- pass "continue to bp overloaded : ${argtype}"
- }
- -re "Continuing.\r\n\r\nBreakpoint ${bpnumber}, (${hex} in )?foo::overload1arg(\\(${argtype}\\))? \\(this=${hex}, arg=.*\\) at.*${srcfile}:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${argtype}( arg)?\\).*\r\n.*$gdb_prompt $" {
- if $might_kfail {
- kfail "gdb/1025" "continue to bp overloaded : ${argtype}"
- } else {
- fail "continue to bp overloaded : ${argtype}"
- }
- }
- -re ".*$gdb_prompt $" {
- fail "continue to bp overloaded : ${argtype}"
- }
- timeout {
- fail "continue to bp overloaded : ${argtype} (timeout)"
- }
- }
-}
-
-continue_to_bp_overloaded 0 25 "(void|)" ""
-continue_to_bp_overloaded 1 24 "char" "arg=2 \\'\\\\002\\'"
-continue_to_bp_overloaded 1 23 "signed char" "arg=3 \\'\\\\003\\'"
-continue_to_bp_overloaded 1 22 "unsigned char" "arg=4 \\'\\\\004\\'"
-continue_to_bp_overloaded 1 21 "short" "arg=5"
-continue_to_bp_overloaded 1 20 "unsigned short" "arg=6"
-continue_to_bp_overloaded 0 19 "int" "arg=7"
-continue_to_bp_overloaded 0 18 "(unsigned|unsigned int)" "arg=8"
-continue_to_bp_overloaded 0 17 "long" "arg=9"
-continue_to_bp_overloaded 0 16 "unsigned long" "arg=10"
-continue_to_bp_overloaded 0 15 "float" "arg=100"
-continue_to_bp_overloaded 1 14 "double" "arg=200"
-
-
-
-# That's all, folks.
-
-gdb_continue_to_end "finish program"
diff --git a/gdb/testsuite/gdb.c++/pr-1023.cc b/gdb/testsuite/gdb.c++/pr-1023.cc
deleted file mode 100644
index 758308481dc..00000000000
--- a/gdb/testsuite/gdb.c++/pr-1023.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-class myClass
-{
- public:
- myClass() {};
- ~myClass() {};
- void performUnblocking( short int cell_index );
- void performBlocking( int cell_index );
-};
-
-void myClass::performUnblocking( short int cell_index ) {}
-
-void myClass::performBlocking( int cell_index ) {}
-
-int main ()
-{
- myClass mc;
- mc.performBlocking (0);
- mc.performUnblocking (0);
-}
-
diff --git a/gdb/testsuite/gdb.c++/pr-1023.exp b/gdb/testsuite/gdb.c++/pr-1023.exp
deleted file mode 100644
index c8c98027471..00000000000
--- a/gdb/testsuite/gdb.c++/pr-1023.exp
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 2003 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.
-
-# Tests for PR gdb/1023.
-# 2003-02-03 Michael Chastain <mec@shout.net>
-
-# This file is part of the gdb testsuite.
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-if { [skip_cplus_tests] } { continue }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-set testfile "pr-1023"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-send_gdb "break myClass::performBlocking\n"
-gdb_expect {
- -re "Breakpoint $decimal at $hex: file .*$srcfile, line 12.*$gdb_prompt $" {
- pass "break myClass::performBlocking"
- }
- -re "the class myClass does not have any method named performBlocking.*$gdb_prompt $" {
- # fails with gcc 2.95.3 -gstabs+, native i686-pc-linux-gnu
- # -- chastain 2003-02-03
- kfail "gdb/1023" "break myClass::performBlocking"
- }
- -re ".*$gdb_prompt $" {
- fail "break myClass::performBlocking"
- }
- timeout {
- fail "break myClass::performBlocking (timeout)"
- }
-}
-
-gdb_test \
- "break myClass::performUnblocking" \
- "Breakpoint $decimal at $hex: file .*$srcfile, line 10.*"
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.c++/pr-574.cc b/gdb/testsuite/gdb.c++/pr-574.cc
deleted file mode 100644
index eb06b61b7ae..00000000000
--- a/gdb/testsuite/gdb.c++/pr-574.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- An attempt to replicate PR gdb/574 with a shorter program.
-
- Printing out *theB failed if the program was compiled with GCC 2.95.
-*/
-
-class A {
-public:
- virtual void foo() {}; // Stick in a virtual function.
- int a; // Stick in a data member.
-};
-
-class B : public A {
- static int b; // Stick in a static data member.
-};
-
-int main()
-{
- B *theB = new B;
-
- return 0; // breakpoint: constructs-done
-}
diff --git a/gdb/testsuite/gdb.c++/pr-574.exp b/gdb/testsuite/gdb.c++/pr-574.exp
deleted file mode 100644
index 5beacd10fee..00000000000
--- a/gdb/testsuite/gdb.c++/pr-574.exp
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Tests for the bug mentioned in PR gdb/574. It's a bit
-# idiosyncratic, so I gave it its own file.
-
-# 2002-08-16 David Carlton <carlton@math.stanford.edu>
-
-# This file is part of the gdb testsuite
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-if { [skip_cplus_tests] } { continue }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-set testfile "pr-574"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-# First, run to after we've constructed the object:
-
-gdb_breakpoint [gdb_get_line_number "constructs-done"]
-gdb_continue_to_breakpoint "end of constructors"
-
-# This failed, as long as the code was compiled with GCC v. 2.
-
-# Different compilers order the data for <A> differently, so I'm not
-# matching the result exactly.
-
-gdb_test "print *theB" "\\$\[0-9\]* = {<A> = {\[^}\]*}, static b = <optimized out>}" "PR gdb/574"
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.c++/printmethod.cc b/gdb/testsuite/gdb.c++/printmethod.cc
deleted file mode 100644
index d32e1b1d1c4..00000000000
--- a/gdb/testsuite/gdb.c++/printmethod.cc
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Create some objects, and try to print out their methods. */
-
-class A {
-public:
- virtual void virt() {};
- void nonvirt() {};
-};
-
-int main()
-{
- A *theA = new A;
-
- return 0; // breakpoint: constructs-done
-}
diff --git a/gdb/testsuite/gdb.c++/printmethod.exp b/gdb/testsuite/gdb.c++/printmethod.exp
deleted file mode 100644
index a45393f34d9..00000000000
--- a/gdb/testsuite/gdb.c++/printmethod.exp
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 2002, 2003 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.
-
-# This tries to print out methods of classes.
-
-# 2002-08-16 David Carlton <carlton@math.stanford.edu>
-
-# This file is part of the gdb testsuite
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-if { [skip_cplus_tests] } { continue }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-set testfile "printmethod"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-# First, run to after we've constructed the object:
-
-gdb_breakpoint [gdb_get_line_number "constructs-done"]
-gdb_continue_to_breakpoint "end of constructors"
-
-# The first of these is for PR gdb/653.
-
-gdb_test "print theA->virt" "\\$\[0-9\]* = &A::virt\\((void|)\\)" "print virtual method."
-gdb_test "print theA->nonvirt" "Cannot take address of a method" "print nonvirtual method."
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.c++/psmang.exp b/gdb/testsuite/gdb.c++/psmang.exp
deleted file mode 100644
index 31dd34643f0..00000000000
--- a/gdb/testsuite/gdb.c++/psmang.exp
+++ /dev/null
@@ -1,226 +0,0 @@
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file is part of the gdb testsuite
-
-# Looking up methods by name, in programs with multiple compilation units.
-
-# ====== PLEASE BE VERY CAREFUL WHEN CHANGING THIS TEST. =====
-#
-# The bug we're testing for (circa October 2002) is very sensitive to
-# various conditions that are hard to control directly in the test
-# suite. If you change the test, please revert this change, and make
-# sure the test still fails:
-#
-# 2002-08-29 Jim Blandy <jimb@redhat.com>
-#
-# * symtab.c (lookup_symbol_aux): In the cases where we find a
-# minimal symbol of an appropriate name and use its address to
-# select a symtab to read and search, use `name' (as passed to us)
-# as the demangled name when searching the symtab's global and
-# static blocks, not the minsym's name.
-#
-# The original bug was that you'd try to set a breakpoint on a method
-# (e.g., `break s::method1'), and you'd get an error, but if you
-# repeated the command, it would work the second time:
-#
-# (gdb) break s::method1
-# the class s does not have any method named method1
-# Hint: try 's::method1<TAB> or 's::method1<ESC-?>
-# (Note leading single quote.)
-# (gdb) break s::method1
-# Breakpoint 1 at 0x804841b: file psmang1.cc, line 13.
-# (gdb)
-#
-# We observed this bug first using Stabs, and then using Dwarf 2.
-#
-# The problem was in lookup_symbol_aux: when looking up s::method1, it
-# would fail to find it in any symtabs, find the minsym with the
-# corresponding mangled name (say, `_ZN1S7method1Ev'), pass the
-# minsym's address to find_pc_sect_symtab to look up the symtab
-# (causing the compilation unit's full symbols to be read in), and
-# then look up the symbol in that symtab's global block. All that is
-# correct. However, it would pass the minsym's name as the NAME
-# argument to lookup_block_symbol; a minsym's name is mangled, whereas
-# lookup_block_symbol's NAME argument should be demangled.
-#
-# This is a pretty simple bug, but it turns out to be a bear to
-# construct a test for. That's why this test case is so delicate. If
-# you can see how to make it less so, please contribute a patch.
-#
-# Here are the twists:
-#
-# The bug only manifests itself when we call lookup_symbol to look up
-# a method name (like "s::method1" or "s::method2"), and that method's
-# definition is in a compilation unit for which we have read partial
-# symbols, but not full symbols. The partial->full conversion must be
-# caused by that specific lookup. (If we already have full symbols
-# for the method's compilation unit, we won't need to look up the
-# minsym, find the symtab for the minsym's address, and then call
-# lookup_block_symbol; it's that last call where things go awry.)
-#
-# Now, when asked to set a breakpoint at `s::method1', GDB will first
-# look up `s' to see if that is, in fact, the name of a class, and
-# then look up 's::method1'. So we have to make sure that looking up
-# `s' doesn't cause full symbols to be read for the compilation unit
-# containing the definition of `s::method1'.
-#
-# The partial symbol tables for `psmang1.cc' and `psmang2.cc' will
-# both have entries for `s'; GDB will read full symbols for whichever
-# compilation unit's partial symbol table appears first in the
-# objfile's list. The order in which compilation units appear in the
-# partial symbol table list depends on how the program is linked, and
-# how the debug info reader does the partial symbol scan. Ideally,
-# the test shouldn't rely on them appearing in any particular order.
-#
-# So, since we don't know which compilation unit's full symbols are
-# going to get read, we simply try looking up one method from each of
-# the two compilation units. One of them has to come after the other
-# in the partial symbol table list, so whichever comes later will
-# still need its partial symbols read by the time we go to look up
-# 's::methodX'.
-#
-# Second twist: don't move the common definition of `struct s' into a
-# header file. If the compiler emits identical stabs for the
-# #inclusion of that header file into psmang1.cc and into psmang2.cc,
-# then the linker will do stabs compression, and replace one of the
-# BINCL/EINCL regions with an EXCL stab, pointing to the other
-# BINCL/EINCL region. GDB will read this, and record that the
-# compilation unit that got the EXCL depends on the compilation unit
-# that kept the BINCL/EINCL. Then, when it decides it needs to read
-# full symbols for the former, it'll also read full symbols for the
-# latter. Now, if it just so happens that the compilation unit that
-# got the EXCL is also the first one with a definition of `s' in the
-# partial symbol table list, then that first probe for `s' will cause
-# both compilation units' full symbols to be read --- again defeating
-# the test.
-#
-# We could work around this by having three compilation units, or by
-# ensuring that the header file produces different stabs each time
-# it's #included, but it seems simplest just to avoid compilation unit
-# dependencies altogether, drop the header file, and duplicate the
-# (pretty trivial) struct definition.
-#
-# Note that #including any header file at all into both compilation
-# units --- say, <stdio.h> --- could create this sort of dependency.
-#
-# This is the aspect of the test which the debug format is most likely
-# to affect, I think. The different formats create different kinds of
-# inter-CU dependencies, which could mask the bug. It might be
-# possible for the test to check that at least one of the partial
-# symtabs remains unread, and fail otherwise --- the failure
-# indicating that the test itself isn't going to catch the bug it was
-# meant to, not that GDB is misbehaving.
-#
-# Third twist: given the way lookup_block_symbol is written, it's
-# possible to find the symbol even when it gets passed a mangled name
-# for its NAME parameter. There are three ways lookup_block_symbol
-# might search a block, depending on how it was constructed:
-#
-# linear search. In this case, this bug will never manifest itself,
-# since we check every symbol against NAME using SYMBOL_MATCHES_NAME.
-# Since that macro checks its second argument (NAME) against both the
-# mangled and demangled names of the symbol, this will always find the
-# symbol successfully, so, no bug.
-#
-# hash table. If both the mangled and demangled names hash to the
-# same bucket, then you'll again find the symbol "by accident", since
-# we search the entire bucket using SYMBOL_SOURCE_NAME. Since GDB
-# chooses the number of buckets based on the number of symbols, small
-# compilation units may have only one hash bucket; in this case, the
-# search always succeeds, even though we hashed on the wrong name.
-# This test works around that by having a lot of dummy variables,
-# making it less likely that the mangled and demangled names fall in
-# the same bucket.
-#
-# binary search. (GDB 5.2 produced these sorts of blocks, and this
-# test tries to detect the bug there, but subsequent versions of GDB
-# almost never build them, and they may soon be removed entirely.) In
-# this case, the symbols in the block are sorted by their
-# SYMBOL_SOURCE_NAME (whose behavior depends on the current demangling
-# setting, so that's wrong, but let's try to stay focussed).
-# lookup_block_symbol does a binary search comparing NAME with
-# SYMBOL_SOURCE_NAME until the range has been narrowed down to only a
-# few symbols; then it starts a linear search forward from the lower
-# end of that range, until it reaches a symbol whose
-# SYMBOL_SOURCE_NAME follows NAME in lexicographic order. This means
-# that, if you're doing a binary search for a mangled name in a block
-# sorted by SYMBOL_SOURCE_NAME, you might find the symbol `by
-# accident' if the mangled and demangled names happen to fall near
-# each other in the ordering. The initial version of this patch used
-# a class called `S'; all the other symbols in the compilation unit
-# started with lower-case letters, so the demangled name `S::method1'
-# sorted at the same place as the mangled name `_ZN1S7method1Ev': at
-# the very beginning. Using a lower-case 's' as the name ensures that
-# the demangled name falls after all the dummy symbols introduced for
-# the hash table, as described above.
-#
-# This is all so tortured, someone will probably come up with still
-# other ways this test could fail to do its job. If you need to make
-# revisions, please be very careful.
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-#
-# test running programs
-#
-
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "psmang"
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1;
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.cc" "${testfile}1.o" object {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.cc" "${testfile}2.o" object {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if { [gdb_compile "${testfile}1.o ${testfile}2.o" ${binfile} executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-gdb_test "break s::method1" "Breakpoint .* at .*: file .*psmang1.cc.*"
-
-# We have to exit and restart GDB here, to make sure that all the
-# compilation units are psymtabs again.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-gdb_test "break s::method2" "Breakpoint .* at .*: file .*psmang2.cc.*"
diff --git a/gdb/testsuite/gdb.c++/psmang1.cc b/gdb/testsuite/gdb.c++/psmang1.cc
deleted file mode 100644
index 19a9283bbb4..00000000000
--- a/gdb/testsuite/gdb.c++/psmang1.cc
+++ /dev/null
@@ -1,159 +0,0 @@
-/* Do not move this definition into a header file! See the comments
- in psmang.exp. */
-struct s
-{
- int value;
- void method1 (void);
- void method2 (void);
-};
-
-void
-s::method1 ()
-{
- value = 42;
-}
-
-int
-main (int argc, char **argv)
-{
- s si;
-
- si.method1 ();
- si.method2 ();
-}
-
-
-/* The presence of these variables ensures there will be so many
- symbols in psmang1.cc's symtab's global block that it will have a
- non-trivial hash table. When there are only a very few symbols,
- the block only has one hash bucket, so even if we compute the hash
- value for the wrong symbol name, we'll still find a symbol that
- matches. */
-int ax;
-int bx;
-int a1x;
-int b1x;
-int a2x;
-int b2x;
-int a12x;
-int b12x;
-int a3x;
-int b3x;
-int a13x;
-int b13x;
-int a23x;
-int b23x;
-int a123x;
-int b123x;
-int a4x;
-int b4x;
-int a14x;
-int b14x;
-int a24x;
-int b24x;
-int a124x;
-int b124x;
-int a34x;
-int b34x;
-int a134x;
-int b134x;
-int a234x;
-int b234x;
-int a1234x;
-int b1234x;
-int a5x;
-int b5x;
-int a15x;
-int b15x;
-int a25x;
-int b25x;
-int a125x;
-int b125x;
-int a35x;
-int b35x;
-int a135x;
-int b135x;
-int a235x;
-int b235x;
-int a1235x;
-int b1235x;
-int a45x;
-int b45x;
-int a145x;
-int b145x;
-int a245x;
-int b245x;
-int a1245x;
-int b1245x;
-int a345x;
-int b345x;
-int a1345x;
-int b1345x;
-int a2345x;
-int b2345x;
-int a12345x;
-int b12345x;
-int a6x;
-int b6x;
-int a16x;
-int b16x;
-int a26x;
-int b26x;
-int a126x;
-int b126x;
-int a36x;
-int b36x;
-int a136x;
-int b136x;
-int a236x;
-int b236x;
-int a1236x;
-int b1236x;
-int a46x;
-int b46x;
-int a146x;
-int b146x;
-int a246x;
-int b246x;
-int a1246x;
-int b1246x;
-int a346x;
-int b346x;
-int a1346x;
-int b1346x;
-int a2346x;
-int b2346x;
-int a12346x;
-int b12346x;
-int a56x;
-int b56x;
-int a156x;
-int b156x;
-int a256x;
-int b256x;
-int a1256x;
-int b1256x;
-int a356x;
-int b356x;
-int a1356x;
-int b1356x;
-int a2356x;
-int b2356x;
-int a12356x;
-int b12356x;
-int a456x;
-int b456x;
-int a1456x;
-int b1456x;
-int a2456x;
-int b2456x;
-int a12456x;
-int b12456x;
-int a3456x;
-int b3456x;
-int a13456x;
-int b13456x;
-int a23456x;
-int b23456x;
-int a123456x;
-int b123456x;
diff --git a/gdb/testsuite/gdb.c++/psmang2.cc b/gdb/testsuite/gdb.c++/psmang2.cc
deleted file mode 100644
index b9b1bb55b15..00000000000
--- a/gdb/testsuite/gdb.c++/psmang2.cc
+++ /dev/null
@@ -1,152 +0,0 @@
-#include <stdio.h>
-
-/* Do not move this definition into a header file! See the comments
- in psmang.exp. */
-struct s
-{
- int value;
- void method1 (void);
- void method2 (void);
-};
-
-void
-s::method2 (void)
-{
- printf ("%d\n", value);
-}
-
-
-/* The presence of these variables ensures there will be so many
- symbols in psmang2.cc's symtab's global block that it will have a
- non-trivial hash table. When there are only a very few symbols,
- the block only has one hash bucket, so even if we compute the hash
- value for the wrong symbol name, we'll still find a symbol that
- matches. */
-int a;
-int b;
-int a1;
-int b1;
-int a2;
-int b2;
-int a12;
-int b12;
-int a3;
-int b3;
-int a13;
-int b13;
-int a23;
-int b23;
-int a123;
-int b123;
-int a4;
-int b4;
-int a14;
-int b14;
-int a24;
-int b24;
-int a124;
-int b124;
-int a34;
-int b34;
-int a134;
-int b134;
-int a234;
-int b234;
-int a1234;
-int b1234;
-int a5;
-int b5;
-int a15;
-int b15;
-int a25;
-int b25;
-int a125;
-int b125;
-int a35;
-int b35;
-int a135;
-int b135;
-int a235;
-int b235;
-int a1235;
-int b1235;
-int a45;
-int b45;
-int a145;
-int b145;
-int a245;
-int b245;
-int a1245;
-int b1245;
-int a345;
-int b345;
-int a1345;
-int b1345;
-int a2345;
-int b2345;
-int a12345;
-int b12345;
-int a6;
-int b6;
-int a16;
-int b16;
-int a26;
-int b26;
-int a126;
-int b126;
-int a36;
-int b36;
-int a136;
-int b136;
-int a236;
-int b236;
-int a1236;
-int b1236;
-int a46;
-int b46;
-int a146;
-int b146;
-int a246;
-int b246;
-int a1246;
-int b1246;
-int a346;
-int b346;
-int a1346;
-int b1346;
-int a2346;
-int b2346;
-int a12346;
-int b12346;
-int a56;
-int b56;
-int a156;
-int b156;
-int a256;
-int b256;
-int a1256;
-int b1256;
-int a356;
-int b356;
-int a1356;
-int b1356;
-int a2356;
-int b2356;
-int a12356;
-int b12356;
-int a456;
-int b456;
-int a1456;
-int b1456;
-int a2456;
-int b2456;
-int a12456;
-int b12456;
-int a3456;
-int b3456;
-int a13456;
-int b13456;
-int a23456;
-int b23456;
-int a123456;
-int b123456;
diff --git a/gdb/testsuite/gdb.c++/ref-types.cc b/gdb/testsuite/gdb.c++/ref-types.cc
deleted file mode 100644
index 23cc51095e3..00000000000
--- a/gdb/testsuite/gdb.c++/ref-types.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-int main2(void);
-
-void marker1 (void)
-{
-
-}
-
-
-
-int main(void)
-{
- short s;
- short &rs = s;
- short *ps;
- short *&rps = ps;
- short as[4];
- short (&ras)[4] = as;
- s = -1;
- ps = &s;
- as[0] = 0;
- as[1] = 1;
- as[2] = 2;
- as[3] = 3;
-
- #ifdef usestubs
- set_debug_traps();
- breakpoint();
- #endif
- marker1();
-
- main2();
-
- return 0;
-}
-
-int f()
-{
- int f1;
- f1 = 1;
- return f1;
-}
-
-int main2(void)
-{
- char C;
- unsigned char UC;
- short S;
- unsigned short US;
- int I;
- unsigned int UI;
- long L;
- unsigned long UL;
- float F;
- double D;
- char &rC = C;
- unsigned char &rUC = UC;
- short &rS = S;
- unsigned short &rUS = US;
- int &rI = I;
- unsigned int &rUI = UI;
- long &rL = L;
- unsigned long &rUL = UL;
- float &rF = F;
- double &rD = D;
- C = 'A';
- UC = 21;
- S = -14;
- US = 7;
- I = 102;
- UI = 1002;
- L = -234;
- UL = 234;
- F = 1.25E10;
- D = -1.375E-123;
- I = f();
-
- return 0;
-
-}
diff --git a/gdb/testsuite/gdb.c++/ref-types.exp b/gdb/testsuite/gdb.c++/ref-types.exp
deleted file mode 100644
index dd06f027111..00000000000
--- a/gdb/testsuite/gdb.c++/ref-types.exp
+++ /dev/null
@@ -1,663 +0,0 @@
-# Tests for reference types with short type variables in GDB.
-# Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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
-
-# written by Elena Zannoni (ezannoni@cygnus.com)
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "ref-types"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-#
-# set it up at a breakpoint so we can play with the variable values
-#
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-if ![runto 'marker1'] then {
- perror "couldn't run to marker1"
- continue
-}
-
-gdb_test "up" ".*main.*" "up from marker1 1"
-
-proc gdb_start_again {} {
- global srcdir
- global subdir
- global binfile
- global gdb_prompt
- global decimal
-
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load ${binfile}
-
- source ${binfile}.ci
-
- #
- # set it up at a breakpoint so we can play with the variable values
- #
- if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
- }
-
- if ![runto 'marker1'] then {
- perror "couldn't run to marker1"
- continue
- }
-
- gdb_test "up" ".*main.*" "up from marker1 2"
-}
-
-
-
-send_gdb "print s\n"
-gdb_expect {
- -re ".\[0-9\]* = -1.*$gdb_prompt $" {
- pass "print value of s"
- }
- -re ".*$gdb_prompt $" { fail "print value of s" }
- timeout { fail "(timeout) print value of s" }
- }
-
-
-send_gdb "ptype s\n"
-gdb_expect {
- -re "type = short.*$gdb_prompt $" { pass "ptype s" }
- -re ".*$gdb_prompt $" { fail "ptype s" }
- timeout { fail "(timeout) ptype s" }
-}
-
-
-send_gdb "print *ps\n"
-gdb_expect {
- -re ".\[0-9\]* = -1.*$gdb_prompt $" {
- pass "print value of ps"
- }
- -re ".*$gdb_prompt $" { fail "print value of ps" }
- timeout { fail "(timeout) print value of ps" }
- }
-
-
-send_gdb "ptype ps\n"
-gdb_expect {
- -re "type = short \*.*$gdb_prompt $" { pass "ptype ps" }
- -re ".*$gdb_prompt $" { fail "ptype ps" }
- timeout { fail "(timeout) ptype ps" }
-}
-
-send_gdb "print as\[0\]\n"
-gdb_expect {
- -re ".\[0-9\]* = 0.*$gdb_prompt $" {
- pass "print value of as\[0\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of as\[0\]" }
- timeout { fail "(timeout) print value of as\[0\]" }
- }
-
-
-send_gdb "ptype as\n"
-gdb_expect {
- -re "type = short \\\[4\\\].*$gdb_prompt $" { pass "ptype as" }
- -re "type = short int \\\[4\\\].*$gdb_prompt $" { pass "ptype as" }
- -re ".*$gdb_prompt $" { fail "ptype as" }
- timeout { fail "(timeout) ptype as" }
-}
-
-send_gdb "print as\[1\]\n"
-gdb_expect {
- -re ".\[0-9\]* = 1.*$gdb_prompt $" {
- pass "print value of as\[1\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of as\[1\]" }
- timeout { fail "(timeout) print value of as\[1\]" }
- }
-
-send_gdb "print as\[2\]\n"
-gdb_expect {
- -re ".\[0-9\]* = 2.*$gdb_prompt $" {
- pass "print value of as\[2\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of as\[2\]" }
- timeout { fail "(timeout) print value of as\[2\]" }
- }
-
-send_gdb "print as\[3\]\n"
-gdb_expect {
- -re ".\[0-9\]* = 3.*$gdb_prompt $" {
- pass "print value of as\[3\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of as\[3\]" }
- timeout { fail "(timeout) print value of as\[3\]" }
- }
-
-send_gdb "print rs\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(short &\\) @$hex: -1.*$gdb_prompt $" {
- pass "print value of rs"
- }
- -re ".\[0-9\]* = \\(short int &\\) @$hex: -1.*$gdb_prompt $" {
- pass "print value of rs"
- }
- -re ".*$gdb_prompt $" { fail "print value of rs" }
- timeout { fail "(timeout) print value of rs" }
- eof { fail "print rs ($GDB dumped core) (FIXME)" ; gdb_start_again ; }
-
- }
-
-send_gdb "ptype rs\n"
-gdb_expect {
- -re "type = short &.*$gdb_prompt $" { pass "ptype rs" }
- -re "type = short int &.*$gdb_prompt $" { pass "ptype rs" }
- -re ".*$gdb_prompt $" { fail "ptype rs" }
- timeout { fail "(timeout) ptype rs" }
-}
-
-
-send_gdb "print *rps\n"
-gdb_expect {
- -re ".\[0-9\]* = -1.*$gdb_prompt $" {
- pass "print value of *rps"
- }
- -re ".*$gdb_prompt $" { fail "print value of *rps" }
- timeout { fail "(timeout) print value of *rps" }
- }
-
-
-send_gdb "ptype rps\n"
-gdb_expect {
- -re "type = short \\*&.*$gdb_prompt $" { pass "ptype rps" }
- -re "type = short int \\*&.*$gdb_prompt $" { pass "ptype rps" }
- -re ".*$gdb_prompt $" { fail "ptype rps" }
- timeout { fail "(timeout) ptype rps" }
-}
-
-
-
-send_gdb "print ras\[0\]\n"
-gdb_expect {
- -re ".\[0-9\]* = 0.*$gdb_prompt $" {
- pass "print value of ras\[0\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of ras\[0\]" }
- timeout { fail "(timeout) print value of ras\[0\]" }
- }
-
-
-send_gdb "ptype ras\n"
-gdb_expect {
- -re "type = short \\\(&\\\)\\\[4\\\].*$gdb_prompt $" { pass "ptype ras" }
- -re "type = short int \\\(&\\\)\\\[4\\\].*$gdb_prompt $" { pass "ptype ras" }
- -re ".*$gdb_prompt $" { fail "ptype ras" }
- timeout { fail "(timeout) ptype ras" }
-}
-
-send_gdb "print ras\[1\]\n"
-gdb_expect {
- -re ".\[0-9\]* = 1.*$gdb_prompt $" {
- pass "print value of ras\[1\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of ras\[1\]" }
- timeout { fail "(timeout) print value of ras\[1\]" }
- }
-
-send_gdb "print ras\[2\]\n"
-gdb_expect {
- -re ".\[0-9\]* = 2.*$gdb_prompt $" {
- pass "print value of ras\[2\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of ras\[2\]" }
- timeout { fail "(timeout) print value of ras\[2\]" }
- }
-
-send_gdb "print ras\[3\]\n"
-gdb_expect {
- -re ".\[0-9\]* = 3.*$gdb_prompt $" {
- pass "print value of ras\[3\]"
- }
- -re ".*$gdb_prompt $" { fail "print value of ras\[3\]" }
- timeout { fail "(timeout) print value of ras\[3\]" }
- }
-
-
-if ![runto 'f'] then {
- perror "couldn't run to f"
- continue
-}
-
-gdb_test "up" ".main2.*" "up from f"
-
-send_gdb "print C\n"
-gdb_expect {
- -re ".\[0-9\]* = 65 \'A\'.*$gdb_prompt $" {
- pass "print value of C"
- }
- -re ".*$gdb_prompt $" { fail "print value of C" }
- timeout { fail "(timeout) print value of C" }
- }
-
-
-send_gdb "ptype C\n"
-gdb_expect {
- -re "type = char.*$gdb_prompt $" { pass "ptype C" }
- -re ".*$gdb_prompt $" { fail "ptype C" }
- timeout { fail "(timeout) ptype C" }
-}
-
-
-send_gdb "print UC\n"
-gdb_expect {
- -re ".\[0-9\]* = 21 '\.025'\.*$gdb_prompt $" {
- pass "print value of UC"
- }
- -re ".*$gdb_prompt $" { fail "print value of UC" }
- timeout { fail "(timeout) print value of UC" }
- }
-
-
-send_gdb "ptype UC\n"
-gdb_expect {
- -re "type = unsigned char.*$gdb_prompt $" { pass "ptype UC" }
- -re ".*$gdb_prompt $" { fail "ptype UC" }
- timeout { fail "(timeout) ptype UC" }
-}
-
-
-send_gdb "print S\n"
-gdb_expect {
- -re ".\[0-9\]* = -14.*$gdb_prompt $" {
- pass "print value of S"
- }
- -re ".*$gdb_prompt $" { fail "print value of S" }
- timeout { fail "(timeout) print value of S" }
- }
-
-
-send_gdb "ptype S\n"
-gdb_expect {
- -re "type = short.*$gdb_prompt $" { pass "ptype S" }
- -re ".*$gdb_prompt $" { fail "ptype S" }
- timeout { fail "(timeout) ptype S" }
-}
-
-
-send_gdb "print US\n"
-gdb_expect {
- -re ".\[0-9\]* = 7.*$gdb_prompt $" {
- pass "print value of US"
- }
- -re ".*$gdb_prompt $" { fail "print value of US" }
- timeout { fail "(timeout) print value of US" }
- }
-
-
-send_gdb "ptype US\n"
-gdb_expect {
- -re "type = unsigned short.*$gdb_prompt $" { pass "ptype US" }
- -re "type = short unsigned.*$gdb_prompt $" { pass "ptype US" }
- -re ".*$gdb_prompt $" { fail "ptype US" }
- timeout { fail "(timeout) ptype US" }
-}
-
-
-send_gdb "print I\n"
-gdb_expect {
- -re ".\[0-9\]* = 102.*$gdb_prompt $" {
- pass "print value of I"
- }
- -re ".*$gdb_prompt $" { fail "print value of I" }
- timeout { fail "(timeout) print value of I" }
- }
-
-
-send_gdb "ptype I\n"
-gdb_expect {
- -re "type = int.*$gdb_prompt $" { pass "ptype I" }
- -re ".*$gdb_prompt $" { fail "ptype I" }
- timeout { fail "(timeout) ptype I" }
-}
-
-
-send_gdb "print UI\n"
-gdb_expect {
- -re ".\[0-9\]* = 1002.*$gdb_prompt $" {
- pass "print value of UI"
- }
- -re ".*$gdb_prompt $" { fail "print value of UI" }
- timeout { fail "(timeout) print value of UI" }
- }
-
-
-send_gdb "ptype UI\n"
-gdb_expect {
- -re "type = unsigned int.*$gdb_prompt $" { pass "ptype UI" }
- -re ".*$gdb_prompt $" { fail "ptype UI" }
- timeout { fail "(timeout) ptype UI" }
-}
-
-
-send_gdb "print L\n"
-gdb_expect {
- -re ".\[0-9\]* = -234.*$gdb_prompt $" {
- pass "print value of L"
- }
- -re ".*$gdb_prompt $" { fail "print value of L" }
- timeout { fail "(timeout) print value of L" }
- }
-
-
-send_gdb "ptype L\n"
-gdb_expect {
- -re "type = long.*$gdb_prompt $" { pass "ptype L" }
- -re ".*$gdb_prompt $" { fail "ptype L" }
- timeout { fail "(timeout) ptype L" }
-}
-
-
-send_gdb "print UL\n"
-gdb_expect {
- -re ".\[0-9\]* = 234.*$gdb_prompt $" {
- pass "print value of UL"
- }
- -re ".*$gdb_prompt $" { fail "print value of UL" }
- timeout { fail "(timeout) print value of UL" }
- }
-
-
-send_gdb "ptype UL\n"
-gdb_expect {
- -re "type = unsigned long.*$gdb_prompt $" { pass "ptype UL" }
- -re "type = long unsigned.*$gdb_prompt $" { pass "ptype UL" }
- -re ".*$gdb_prompt $" { fail "ptype UL" }
- timeout { fail "(timeout) ptype UL" }
-}
-
-
-send_gdb "print F\n"
-gdb_expect {
- -re ".\[0-9\]* = 1.2\[0-9\]*e\\+10.*$gdb_prompt $" {
- pass "print value of F"
- }
- -re ".*$gdb_prompt $" { fail "print value of F" }
- timeout { fail "(timeout) print value of F" }
- }
-
-
-
-send_gdb "ptype F\n"
-gdb_expect {
- -re "type = float.*$gdb_prompt $" { pass "ptype F" }
- -re ".*$gdb_prompt $" { fail "ptype F" }
- timeout { fail "(timeout) ptype F" }
-}
-
-
-send_gdb "print D\n"
-gdb_expect {
- -re ".\[0-9\]* = -1.375e-123.*$gdb_prompt $" {
- pass "print value of D"
- }
- -re ".*$gdb_prompt $" { fail "print value of D" }
- timeout { fail "(timeout) print value of D" }
- }
-
-
-send_gdb "ptype D\n"
-gdb_expect {
- -re "type = double.*$gdb_prompt $" { pass "ptype D" }
- -re ".*$gdb_prompt $" { fail "ptype D" }
- timeout { fail "(timeout) ptype D" }
-}
-
-
-
-#
-# test reference types
-#
-
-
-
-
-send_gdb "ptype rC\n"
-gdb_expect {
- -re "type = char &.*$gdb_prompt $" { pass "ptype rC" }
- -re ".*$gdb_prompt $" { fail "ptype rC" }
- timeout { fail "(timeout) ptype rC" }
-}
-
-
-
-
-send_gdb "ptype rUC\n"
-gdb_expect {
- -re "type = unsigned char &.*$gdb_prompt $" { pass "ptype rUC" }
- -re ".*$gdb_prompt $" { fail "ptype rUC" }
- timeout { fail "(timeout) ptype rUC" }
-}
-
-
-
-send_gdb "ptype rS\n"
-gdb_expect {
- -re "type = short &.*$gdb_prompt $" { pass "ptype rS" }
- -re "type = short int &.*$gdb_prompt $" { pass "ptype rS" }
- -re ".*$gdb_prompt $" { fail "ptype rS" }
- timeout { fail "(timeout) ptype rS" }
-}
-
-
-
-send_gdb "ptype rUS\n"
-gdb_expect {
- -re "type = unsigned short &.*$gdb_prompt $" { pass "ptype rUS" }
- -re "type = short unsigned int &.*$gdb_prompt $" { pass "ptype rUS" }
- -re ".*$gdb_prompt $" { fail "ptype rUS" }
- timeout { fail "(timeout) ptype rUS" }
-}
-
-
-send_gdb "ptype rI\n"
-gdb_expect {
- -re "type = int &.*$gdb_prompt $" { pass "ptype rI" }
- -re ".*$gdb_prompt $" { fail "ptype rI" }
- timeout { fail "(timeout) ptype rI" }
-}
-
-
-
-send_gdb "ptype rUI\n"
-gdb_expect {
- -re "type = unsigned int &.*$gdb_prompt $" { pass "ptype rUI" }
- -re ".*$gdb_prompt $" { fail "ptype rUI" }
- timeout { fail "(timeout) ptype rUI" }
-}
-
-
-
-send_gdb "ptype rL\n"
-gdb_expect {
- -re "type = long &.*$gdb_prompt $" { pass "ptype rL" }
- -re "type = long int &.*$gdb_prompt $" { pass "ptype rL" }
- -re ".*$gdb_prompt $" { fail "ptype rL" }
- timeout { fail "(timeout) ptype rL" }
-}
-
-
-send_gdb "ptype rUL\n"
-gdb_expect {
- -re "type = unsigned long &.*$gdb_prompt $" { pass "ptype rUL" }
- -re "type = long unsigned int &.*$gdb_prompt $" { pass "ptype rUL" }
- -re ".*$gdb_prompt $" { fail "ptype rUL" }
- timeout { fail "(timeout) ptype rUL" }
-}
-
-
-send_gdb "ptype rF\n"
-gdb_expect {
- -re "type = float &.*$gdb_prompt $" { pass "ptype rF" }
- -re ".*$gdb_prompt $" { fail "ptype rF" }
- timeout { fail "(timeout) ptype rF" }
-}
-
-
-send_gdb "ptype rD\n"
-gdb_expect {
- -re "type = double &.*$gdb_prompt $" { pass "ptype rD" }
- -re ".*$gdb_prompt $" { fail "ptype rD" }
- timeout { fail "(timeout) ptype rD" }
-}
-
-
-send_gdb "print rC\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(char &\\) @$hex: 65 \'A\'.*$gdb_prompt $" {
- pass "print value of rC"
- }
- -re ".*$gdb_prompt $" { fail "print value of rC" }
- timeout { fail "(timeout) print value of rC" }
- }
-
-
-send_gdb "print rUC\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(unsigned char &\\) @$hex: 21 \'.025\'.*$gdb_prompt $" {
- pass "print value of rUC"
- }
- -re ".*$gdb_prompt $" { fail "print value of rUC" }
- timeout { fail "(timeout) print value of rUC" }
- }
-
-
-send_gdb "print rS\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(short &\\) @$hex: -14.*$gdb_prompt $" {
- pass "print value of rS"
- }
- -re ".\[0-9\]* = \\(short int &\\) @$hex: -14.*$gdb_prompt $" {
- pass "print value of rS"
- }
- -re ".*$gdb_prompt $" { fail "print value of rS" }
- timeout { fail "(timeout) print value of rS" }
- }
-
-
-send_gdb "print rUS\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(unsigned short &\\) @$hex: 7.*$gdb_prompt $" {
- pass "print value of rUS"
- }
- -re ".\[0-9\]* = \\(short unsigned int &\\) @$hex: 7.*$gdb_prompt $" {
- pass "print value of rUS"
- }
- -re ".*$gdb_prompt $" { fail "print value of rUS" }
- timeout { fail "(timeout) print value of rUS" }
- }
-
-
-send_gdb "print rI\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(int &\\) @$hex: 102.*$gdb_prompt $" {
- pass "print value of rI"
- }
- -re ".*$gdb_prompt $" { fail "print value of rI" }
- timeout { fail "(timeout) print value of rI" }
- }
-
-
-send_gdb "print rUI\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(unsigned int &\\) @$hex: 1002.*$gdb_prompt $" {
- pass "print value of UI"
- }
- -re ".*$gdb_prompt $" { fail "print value of rUI" }
- timeout { fail "(timeout) print value of rUI" }
- }
-
-
-send_gdb "print rL\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(long &\\) @$hex: -234.*$gdb_prompt $" {
- pass "print value of rL"
- }
- -re ".\[0-9\]* = \\(long int &\\) @$hex: -234.*$gdb_prompt $" {
- pass "print value of rL"
- }
- -re ".*$gdb_prompt $" { fail "print value of rL" }
- timeout { fail "(timeout) print value of rL" }
- }
-
-
-
-send_gdb "print rUL\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(unsigned long &\\) @$hex: 234.*$gdb_prompt $" {
- pass "print value of rUL"
- }
- -re ".\[0-9\]* = \\(long unsigned int &\\) @$hex: 234.*$gdb_prompt $" {
- pass "print value of rUL"
- }
- -re ".*$gdb_prompt $" { fail "print value of rUL" }
- timeout { fail "(timeout) print value of rUL" }
- }
-
-
-send_gdb "print rF\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(float &\\) @$hex: 1.2\[0-9\]*e\\+10.*$gdb_prompt $" {
- pass "print value of rF"
- }
- -re ".*$gdb_prompt $" { fail "print value of rF" }
- timeout { fail "(timeout) print value of rF" }
- }
-
-
-send_gdb "print rD\n"
-gdb_expect {
- -re ".\[0-9\]* = \\(double &\\) @$hex: -1.375e-123.*$gdb_prompt $" {
- pass "print value of rD"
- }
- -re ".*$gdb_prompt $" { fail "print value of rD" }
- timeout { fail "(timeout) print value of rD" }
- }
-
diff --git a/gdb/testsuite/gdb.c++/rtti.exp b/gdb/testsuite/gdb.c++/rtti.exp
deleted file mode 100644
index f99637a28a9..00000000000
--- a/gdb/testsuite/gdb.c++/rtti.exp
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright 2003 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.
-
-# This file is part of the gdb testsuite.
-
-# This contains tests for GDB's use of RTTI information. This stems
-# from a bug reported in PR gdb/488 and other places, which leads to
-# statements like 'warning: can't find class named 'C::D', as given by
-# C++ RTTI'. It arises from GDB not knowing about classes that are
-# defined in namespaces.
-
-# NOTE: carlton/2003-05-16: I suspect it could arise from nested class
-# issues, too, and even once we fix that, there might be situations
-# (involving templates, in particular) where this problem triggers
-# because GDB and GCC have different ideas what a class is called.
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-if { [skip_cplus_tests] } { continue }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-set testfile "rtti"
-set srcfile1 "${srcdir}/${subdir}/${testfile}1.cc"
-set objfile1 "${objdir}/${subdir}/${testfile}1.o"
-set srcfile2 "${srcdir}/${subdir}/${testfile}2.cc"
-set objfile2 "${objdir}/${subdir}/${testfile}2.o"
-set binfile ${objdir}/${subdir}/${testfile}
-
-# gdb_get_line_number needs this to be called srcfile.
-set srcfile "${srcfile1}"
-
-if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if { [gdb_compile "${srcfile2}" "${objfile2}" object {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if { [gdb_compile "${objfile1} ${objfile2}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-# First, run to after we've constructed the object:
-
-gdb_breakpoint [gdb_get_line_number "constructs-done"]
-gdb_continue_to_breakpoint "end of constructors"
-
-gdb_test_multiple "print *e1" "print *e1" {
- -re "warning: can't find class named `n1::D1', as given by C\\+\\+ RTTI.*$gdb_prompt $" {
- kfail "gdb/488" "print *e1"
- }
- -re "\\$\[0-9\]* = {<n1::Base1> = .*}\r\n$gdb_prompt $" {
- pass "print *e1"
- }
- -re "\\$\[0-9\]* = {<Base1> = .*}\r\n$gdb_prompt $" {
- # NOTE: carlton/2003-05-16: If code is compiled by GCC2, we
- # don't print the warning (for no particular reason), but we
- # still call the class via the wrong name; PR gdb/57 is our
- # catch-all PR for nested type problems.
- kfail "gdb/57" "print *e1"
- }
-}
-
-# NOTE: carlton/2003-05-16: This test fails on my branch with an
-# "<incomplete type>" message because, within rtt1.cc, GDB has no way
-# of knowing that the class is called 'n2::D2' instead of just 'D2'.
-# This is an artifical test case, though: if we were using these
-# classes in a more substantial way, G++ would emit more debug info.
-# As is, I don't think there's anything that GDB can do about this
-# case until G++ starts emitting DW_TAG_namespace info; when that part
-# of the branch gets merged in, then we'll probably want to convert
-# that fail branch to an xfail.
-
-gdb_test_multiple "print *e2" "print *e2" {
- -re "warning: can't find class named `n2::D2', as given by C\\+\\+ RTTI.*$gdb_prompt $" {
- kfail "gdb/488" "print *e2"
- }
- -re "\\$\[0-9\]* = <incomplete type>\r\n$gdb_prompt $" {
- # See above NOTE.
- fail "print *e2"
- }
- -re "\\$\[0-9\]* = {<n2::Base2> = .*}\r\n$gdb_prompt $" {
- pass "print *e2"
- }
- -re "\\$\[0-9\]* = {<Base2> = .*}\r\n$gdb_prompt $" {
- kfail "gdb/57" "print *e2"
- }
-}
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.c++/rtti.h b/gdb/testsuite/gdb.c++/rtti.h
deleted file mode 100644
index 879896d0dc8..00000000000
--- a/gdb/testsuite/gdb.c++/rtti.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Code to go along with tests in rtti.exp.
-
- Copyright 2003 Free Software Foundation, Inc.
-
- Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
- Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-namespace n2 {
-
- class C2;
-
- class Base2 {
- public:
- virtual ~Base2() { }
- };
-
-
- class C2: public Base2 {
- public:
- };
-
- class D2 : public C2{
- public:
- D2(C2 *, C2 *);
-
- C2* expr_1_;
- C2* expr_2_;
- };
-
- extern C2 *create2();
-}
diff --git a/gdb/testsuite/gdb.c++/rtti1.cc b/gdb/testsuite/gdb.c++/rtti1.cc
deleted file mode 100644
index 6e9d862bb13..00000000000
--- a/gdb/testsuite/gdb.c++/rtti1.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Code to go along with tests in rtti.exp.
-
- Copyright 2003 Free Software Foundation, Inc.
-
- Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
- Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "rtti.h"
-
-namespace n1 {
-
- class C1;
-
- class Base1 {
- public:
- virtual ~Base1() { }
- };
-
-
- class C1: public Base1 {
- public:
- };
-
- class D1 : public C1{
- public:
- D1(C1 *, C1 *);
-
- C1* expr_1_;
- C1* expr_2_;
- };
-
- D1::D1(C1 *expr_1, C1 *expr_2)
- : expr_1_(expr_1), expr_2_(expr_2) { }
-
- C1 *create1() {
- return new D1(0, 0);
- }
-
-} // n1
-
-int main()
-{
- using namespace n1;
- using namespace n2;
-
- C1 *e1 = create1();
- C2 *e2 = create2();
-
- return 0; // constructs-done
-}
diff --git a/gdb/testsuite/gdb.c++/rtti2.cc b/gdb/testsuite/gdb.c++/rtti2.cc
deleted file mode 100644
index 8bb1ed6c99f..00000000000
--- a/gdb/testsuite/gdb.c++/rtti2.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Code to go along with tests in rtti.exp.
-
- Copyright 2003 Free Software Foundation, Inc.
-
- Contributed by David Carlton <carlton@bactrian.org> and by Kealia,
- Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or (at
- your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "rtti.h"
-
-namespace n2 {
-
- D2::D2(C2 *expr_1, C2 *expr_2)
- : expr_1_(expr_1), expr_2_(expr_2) { }
-
- C2 *create2() {
- return new D2(0, 0);
- }
-
-}
diff --git a/gdb/testsuite/gdb.c++/templates.cc b/gdb/testsuite/gdb.c++/templates.cc
deleted file mode 100644
index c13f18b643f..00000000000
--- a/gdb/testsuite/gdb.c++/templates.cc
+++ /dev/null
@@ -1,785 +0,0 @@
-/* This test code is from Wendell Baker (wbaker@comet.berkeley.edu) */
-
-#include <stddef.h>
-
-int a_i;
-char a_c;
-double a_d;
-
-typedef void *Pix;
-
-int
-f(int i)
-{ return 0; }
-
-int
-f(int i, char c)
-{ return 0; }
-
-int
-f(int i, char c, double d)
-{ return 0; }
-
-int
-f(int i, char c, double d, char *cs)
-{ return 0; }
-
-int
-f(int i, char c, double d, char *cs, void (*fig)(int, char))
-{ return 0; }
-
-int
-f(int i, char c, double d, char *cs, void (*fig)(char, int))
-{ return 0; }
-
-class R {
-public:
- int i;
-};
-class S {
-public:
- int i;
-};
-class T {
-public:
- int i;
-};
-
-char g(char, const char, volatile char)
-{ return 'c'; }
-char g(R, char&, const char&, volatile char&)
-{ return 'c'; }
-char g(char*, const char*, volatile char*)
-{ return 'c'; }
-char g(S, char*&, const char*&, volatile char*&)
-{ return 'c'; }
-
-signed char g(T,signed char, const signed char, volatile signed char)
-{ return 'c'; }
-signed char g(T, R, signed char&, const signed char&, volatile signed char&)
-{ return 'c'; }
-signed char g(T, signed char*, const signed char*, volatile signed char*)
-{ return 'c'; }
-signed char g(T, S, signed char*&, const signed char*&, volatile signed char*&)
-{ return 'c'; }
-
-unsigned char g(unsigned char, const unsigned char, volatile unsigned char)
-{ return 'c'; }
-unsigned char g(R, unsigned char&, const unsigned char&, volatile unsigned char&)
-{ return 'c'; }
-unsigned char g(unsigned char*, const unsigned char*, volatile unsigned char*)
-{ return 'c'; }
-unsigned char g(S, unsigned char*&, const unsigned char*&, volatile unsigned char*&)
-{ return 'c'; }
-
-short g(short, const short, volatile short)
-{ return 0; }
-short g(R, short&, const short&, volatile short&)
-{ return 0; }
-short g(short*, const short*, volatile short*)
-{ return 0; }
-short g(S, short*&, const short*&, volatile short*&)
-{ return 0; }
-
-signed short g(T, signed short, const signed short, volatile signed short)
-{ return 0; }
-signed short g(T, R, signed short&, const signed short&, volatile signed short&)
-{ return 0; }
-signed short g(T, signed short*, const signed short*, volatile signed short*)
-{ return 0; }
-signed short g(T, S, double, signed short*&, const signed short*&, volatile signed short*&)
-{ return 0; }
-
-unsigned short g(unsigned short, const unsigned short, volatile unsigned short)
-{ return 0; }
-unsigned short g(R, unsigned short&, const unsigned short&, volatile unsigned short&)
-{ return 0; }
-unsigned short g(unsigned short*, const unsigned short*, volatile unsigned short*)
-{ return 0; }
-unsigned short g(S, unsigned short*&, const unsigned short*&, volatile unsigned short*&)
-{ return 0; }
-
-int g(int, const int, volatile int)
-{ return 0; }
-int g(R, int&, const int&, volatile int&)
-{ return 0; }
-int g(int*, const int*, volatile int*)
-{ return 0; }
-int g(S, int*&, const int*&, volatile int*&)
-{ return 0; }
-
-signed int g(T, signed int, const signed int, volatile signed int)
-{ return 0; }
-signed int g(T, R, signed int&, const signed int&, volatile signed int&)
-{ return 0; }
-signed int g(T, signed int*, const signed int*, volatile signed int*)
-{ return 0; }
-signed int g(T, S, signed int*&, const signed int*&, volatile signed int*&)
-{ return 0; }
-
-unsigned int g(unsigned int, const unsigned int, volatile unsigned int)
-{ return 0; }
-unsigned int g(R, unsigned int&, const unsigned int&, volatile unsigned int&)
-{ return 0; }
-unsigned int g(unsigned int*, const unsigned int*, volatile unsigned int*)
-{ return 0; }
-unsigned int g(S, unsigned int*&, const unsigned int*&, volatile unsigned int*&)
-{ return 0; }
-
-long g(long, const long, volatile long)
-{ return 0; }
-long g(R, long&, const long&, volatile long&)
-{ return 0; }
-long g(long*, const long*, volatile long*)
-{ return 0; }
-long g(S, long*&, const long*&, volatile long*&)
-{ return 0; }
-
-signed long g(T, signed long, const signed long, volatile signed long)
-{ return 0; }
-signed long g(T, R, signed long&, const signed long&, volatile signed long&)
-{ return 0; }
-signed long g(T, signed long*, const signed long*, volatile signed long*)
-{ return 0; }
-signed long g(T, S, signed long*&, const signed long*&, volatile signed long*&)
-{ return 0; }
-
-unsigned long g(unsigned long, const unsigned long, volatile unsigned long)
-{ return 0; }
-unsigned long g(S, unsigned long&, const unsigned long&, volatile unsigned long&)
-{ return 0; }
-unsigned long g(unsigned long*, const unsigned long*, volatile unsigned long*)
-{ return 0; }
-unsigned long g(S, unsigned long*&, const unsigned long*&, volatile unsigned long*&)
-{ return 0; }
-
-#ifdef __GNUC__
-long long g(long long, const long long, volatile long long)
-{ return 0; }
-long long g(S, long long&, const long long&, volatile long long&)
-{ return 0; }
-long long g(long long*, const long long*, volatile long long*)
-{ return 0; }
-long long g(R, long long*&, const long long*&, volatile long long*&)
-{ return 0; }
-
-signed long long g(T, signed long long, const signed long long, volatile signed long long)
-{ return 0; }
-signed long long g(T, R, signed long long&, const signed long long&, volatile signed long long&)
-{ return 0; }
-signed long long g(T, signed long long*, const signed long long*, volatile signed long long*)
-{ return 0; }
-signed long long g(T, S, signed long long*&, const signed long long*&, volatile signed long long*&)
-{ return 0; }
-
-unsigned long long g(unsigned long long, const unsigned long long, volatile unsigned long long)
-{ return 0; }
-unsigned long long g(R, unsigned long long*, const unsigned long long*, volatile unsigned long long*)
-{ return 0; }
-unsigned long long g(unsigned long long&, const unsigned long long&, volatile unsigned long long&)
-{ return 0; }
-unsigned long long g(S, unsigned long long*&, const unsigned long long*&, volatile unsigned long long*&)
-{ return 0; }
-#endif
-
-float g(float, const float, volatile float)
-{ return 0; }
-float g(char, float&, const float&, volatile float&)
-{ return 0; }
-float g(float*, const float*, volatile float*)
-{ return 0; }
-float g(char, float*&, const float*&, volatile float*&)
-{ return 0; }
-
-double g(double, const double, volatile double)
-{ return 0; }
-double g(char, double&, const double&, volatile double&)
-{ return 0; }
-double g(double*, const double*, volatile double*)
-{ return 0; }
-double g(char, double*&, const double*&, volatile double*&)
-{ return 0; }
-
-#ifdef __GNUC__
-long double g(long double, const long double, volatile long double)
-{ return 0; }
-long double g(char, long double&, const long double&, volatile long double&)
-{ return 0; }
-long double g(long double*, const long double*, volatile long double*)
-{ return 0; }
-long double g(char, long double*&, const long double*&, volatile long double*&)
-{ return 0; }
-#endif
-
-class c {
-public:
- c(int) {};
- int i;
-};
-
-class c g(c, const c, volatile c)
-{ return 0; }
-c g(char, c&, const c&, volatile c&)
-{ return 0; }
-c g(c*, const c*, volatile c*)
-{ return 0; }
-c g(char, c*&, const c*&, volatile c*&)
-{ return 0; }
-
-/*
-void h(char = 'a')
-{ }
-void h(char, signed char = 'a')
-{ }
-void h(unsigned char = 'a')
-{ }
-*/
-/*
-void h(char = (char)'a')
-{ }
-void h(char, signed char = (signed char)'a')
-{ }
-void h(unsigned char = (unsigned char)'a')
-{ }
-
-
-void h(short = (short)43)
-{ }
-void h(char, signed short = (signed short)43)
-{ }
-void h(unsigned short = (unsigned short)43)
-{ }
-
-void h(int = (int)43)
-{ }
-void h(char, signed int = (signed int)43)
-{ }
-void h(unsigned int = (unsigned int)43)
-{ }
-
-
-void h(long = (long)43)
-{ }
-void h(char, signed long = (signed long)43)
-{ }
-void h(unsigned long = (unsigned long)43)
-{ }
-
-#ifdef __GNUC__
-void h(long long = 43)
-{ }
-void h(char, signed long long = 43)
-{ }
-void h(unsigned long long = 43)
-{ }
-#endif
-
-void h(float = 4.3e-10)
-{ }
-void h(double = 4.3)
-{ }
-#ifdef __GNUC__
-void h(long double = 4.33e33)
-{ }
-#endif
-*/
-
-/* An unneeded printf() definition - actually, just a stub - used to occupy
- this space. It has been removed and replaced with this comment which
- exists to occupy some lines so that templates.exp won't need adjustment. */
-
-class T1 {
-public:
- static void* operator new(size_t) throw ();
- static void operator delete(void *pointer);
-
- void operator=(const T1&);
- T1& operator=(int);
-
- int operator==(int) const;
- int operator==(const T1&) const;
- int operator!=(int) const;
- int operator!=(const T1&) const;
-
- int operator<=(int) const;
- int operator<=(const T1&) const;
- int operator<(int) const;
- int operator<(const T1&) const;
- int operator>=(int) const;
- int operator>=(const T1&) const;
- int operator>(int) const;
- int operator>(const T1&) const;
-
- void operator+(int) const;
- T1& operator+(const T1&) const;
- void operator+=(int) const;
- T1& operator+=(const T1&) const;
-
- T1& operator++() const;
-
- void operator-(int) const;
- T1& operator-(const T1&) const;
- void operator-=(int) const;
- T1& operator-=(const T1&) const;
-
- T1& operator--() const;
-
- void operator*(int) const;
- T1& operator*(const T1&) const;
- void operator*=(int) const;
- T1& operator*=(const T1&) const;
-
- void operator/(int) const;
- T1& operator/(const T1&) const;
- void operator/=(int) const;
- T1& operator/=(const T1&) const;
-
- void operator%(int) const;
- T1& operator%(const T1&) const;
- void operator%=(int) const;
- T1& operator%=(const T1&) const;
-
- void operator&&(int) const;
- T1& operator&&(const T1&) const;
-
- void operator||(int) const;
- T1& operator||(const T1&) const;
-
- void operator&(int) const;
- T1& operator&(const T1&) const;
- void operator&=(int) const;
- T1& operator&=(const T1&) const;
-
- void operator|(int) const;
- T1& operator|(const T1&) const;
- void operator|=(int) const;
- T1& operator|=(const T1&) const;
-
- void operator^(int) const;
- T1& operator^(const T1&) const;
- void operator^=(int) const;
- T1& operator^=(const T1&) const;
-
- T1& operator!() const;
- T1& operator~() const;
-};
-
-void*
-T1::operator new(size_t) throw ()
-{ return 0; }
-
-void
-T1::operator delete(void *pointer)
-{ }
-
-class T2 {
-public:
- T2(int i): integer(i)
- { }
- int integer;
-};
-
-int operator==(const T2&, const T2&)
-{ return 0; }
-int operator==(const T2&, char)
-{ return 0; }
-int operator!=(const T2&, const T2&)
-{ return 0; }
-int operator!=(const T2&, char)
-{ return 0; }
-
-int operator<=(const T2&, const T2&)
-{ return 0; }
-int operator<=(const T2&, char)
-{ return 0; }
-int operator<(const T2&, const T2&)
-{ return 0; }
-int operator<(const T2&, char)
-{ return 0; }
-int operator>=(const T2&, const T2&)
-{ return 0; }
-int operator>=(const T2&, char)
-{ return 0; }
-int operator>(const T2&, const T2&)
-{ return 0; }
-int operator>(const T2&, char)
-{ return 0; }
-
-T2 operator+(const T2 t, int i)
-{ return t.integer + i; }
-T2 operator+(const T2 a, const T2& b)
-{ return a.integer + b.integer; }
-T2& operator+=(T2& t, int i)
-{ t.integer += i; return t; }
-T2& operator+=(T2& a, const T2& b)
-{ a.integer += b.integer; return a; }
-
-T2 operator-(const T2 t, int i)
-{ return t.integer - i; }
-T2 operator-(const T2 a, const T2& b)
-{ return a.integer - b.integer; }
-T2& operator-=(T2& t, int i)
-{ t.integer -= i; return t; }
-T2& operator-=(T2& a, const T2& b)
-{ a.integer -= b.integer; return a; }
-
-T2 operator*(const T2 t, int i)
-{ return t.integer * i; }
-T2 operator*(const T2 a, const T2& b)
-{ return a.integer * b.integer; }
-T2& operator*=(T2& t, int i)
-{ t.integer *= i; return t; }
-T2& operator*=(T2& a, const T2& b)
-{ a.integer *= b.integer; return a; }
-
-T2 operator/(const T2 t, int i)
-{ return t.integer / i; }
-T2 operator/(const T2 a, const T2& b)
-{ return a.integer / b.integer; }
-T2& operator/=(T2& t, int i)
-{ t.integer /= i; return t; }
-T2& operator/=(T2& a, const T2& b)
-{ a.integer /= b.integer; return a; }
-
-T2 operator%(const T2 t, int i)
-{ return t.integer % i; }
-T2 operator%(const T2 a, const T2& b)
-{ return a.integer % b.integer; }
-T2& operator%=(T2& t, int i)
-{ t.integer %= i; return t; }
-T2& operator%=(T2& a, const T2& b)
-{ a.integer %= b.integer; return a; }
-
-template<class T>
-class T5 {
-public:
- T5(int);
- T5(const T5<T>&);
- ~T5();
- static void* operator new(size_t) throw ();
- static void operator delete(void *pointer);
- int value();
-
- static T X;
- T x;
- int val;
-};
-
-template<class T>
-T5<T>::T5(int v)
-{ val = v; }
-
-template<class T>
-T5<T>::T5(const T5<T>&)
-{}
-
-template<class T>
-T5<T>::~T5()
-{}
-
-template<class T>
-void*
-T5<T>::operator new(size_t) throw ()
-{ return 0; }
-
-template<class T>
-void
-T5<T>::operator delete(void *pointer)
-{ }
-
-template<class T>
-int
-T5<T>::value()
-{ return val; }
-
-
-#if ! defined(__GNUC__) || defined(GCC_BUG)
-template<class T>
-T T5<T>::X;
-#endif
-
-
-
-
-T5<char> t5c(1);
-T5<int> t5i(2);
-T5<int (*)(char, void *)> t5fi1(3);
-T5<int (*)(int, double **, void *)> t5fi2(4);
-
-
-
-
-
-
-class x {
-public:
- int (*manage[5])(double,
- void *(*malloc)(unsigned size),
- void (*free)(void *pointer));
- int (*device[5])(int open(const char *, unsigned mode, unsigned perms, int extra),
- int *(*read)(int fd, void *place, unsigned size),
- int *(*write)(int fd, void *place, unsigned size),
- void (*close)(int fd));
-};
-T5<x> t5x(5);
-
-#if !defined(__GNUC__) || (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)
-template class T5<char>;
-template class T5<int>;
-template class T5<int (*)(char, void *)>;
-template class T5<int (*)(int, double **, void *)>;
-template class T5<x>;
-#endif
-
-class T7 {
-public:
- static int get();
- static void put(int);
-};
-
-int
-T7::get()
-{ return 1; }
-
-void
-T7::put(int i)
-{
- // nothing
-}
-
-// More template kinds. GDB 4.16 didn't handle these, but
-// Wildebeest does. Note: Assuming HP aCC is used to compile
-// this file; with g++ or HP cfront or other compilers the
-// demangling may not get done correctly.
-
-// Ordinary template, to be instantiated with different types
-template<class T>
-class Foo {
-public:
- int x;
- T t;
- T foo (int, T);
-};
-
-
-template<class T> T Foo<T>::foo (int i, T tt)
-{
- return tt;
-}
-
-// Template with int parameter
-
-template<class T, int sz>
-class Bar {
-public:
- int x;
- T t;
- T bar (int, T);
-};
-
-
-template<class T, int sz> T Bar<T, sz>::bar (int i, T tt)
-{
- if (i < sz)
- return tt;
- else
- return 0;
-}
-
-// function template with int parameter
-template<class T> int dummy (T tt, int i)
-{
- return tt;
-}
-
-// Template with partial specializations
-template<class T1, class T2>
-class Spec {
-public:
- int x;
- T1 spec (T2);
-};
-
-template<class T1, class T2>
-T1 Spec<T1, T2>::spec (T2 t2)
-{
- return 0;
-}
-
-template<class T>
-class Spec<T, T*> {
-public:
- int x;
- T spec (T*);
-};
-
-template<class T>
-T Spec<T, T*>::spec (T * tp)
-{
- return *tp;
-}
-
-// Template with char parameter
-template<class T, char sz>
-class Baz {
-public:
- int x;
- T t;
- T baz (int, T);
-};
-
-template<class T, char sz> T Baz<T, sz>::baz (int i, T tt)
-{
- if (i < sz)
- return tt;
- else
- return 0;
-}
-
-// Template with char * parameter
-template<class T, char * sz>
-class Qux {
-public:
- int x;
- T t;
- T qux (int, T);
-};
-
-template<class T, char * sz> T Qux<T, sz>::qux (int i, T tt)
-{
- if (sz[0] == 'q')
- return tt;
- else
- return 0;
-}
-
-// Template with a function pointer parameter
-template<class T, int (*f)(int) >
-class Qux1 {
-public:
- int x;
- T t;
- T qux (int, T);
-};
-
-template<class T, int (*f)(int)> T Qux1<T, f>::qux (int i, T tt)
-{
- if (f != 0)
- return tt;
- else
- return 0;
-}
-
-// Some functions to provide as arguments to template
-int gf1 (int a) {
- return a * 2 + 13;
-}
-int gf2 (int a) {
- return a * 2 + 26;
-}
-
-char string[3];
-
-
-// Template for nested instantiations
-
-template<class T>
-class Garply {
-public:
- int x;
- T t;
- T garply (int, T);
-};
-
-template<class T> T Garply<T>::garply (int i, T tt)
-{
- if (i > x)
- return tt;
- else
- {
- x += i;
- return tt;
- }
-}
-
-
-int main()
-{
- int i;
-#ifdef usestubs
- set_debug_traps();
- breakpoint();
-#endif
- i = i + 1;
-
- // New tests added here
-
- Foo<int> fint={0,0};
- Foo<char> fchar={0,0};
- Foo<volatile char *> fvpchar = {0, 0};
-
- Bar<int, 33> bint;
- Bar<int, (4 > 3)> bint2;
-
- Baz<int, 's'> bazint;
- Baz<char, 'a'> bazint2;
-
- Qux<char, string> quxint2;
- Qux<int, string> quxint;
-
- Qux1<int, gf1> qux11;
-
- int x = fint.foo(33, 47);
- char c = fchar.foo(33, 'x');
- volatile char * cp = fvpchar.foo(33, 0);
-
- int y = dummy<int> (400, 600);
-
- int z = bint.bar(55, 66);
- z += bint2.bar(55, 66);
-
- c = bazint2.baz(4, 'y');
- c = quxint2.qux(4, 'z');
-
- y = bazint.baz(4,3);
- y = quxint.qux(4, 22);
- y += qux11.qux(4, 22);
-
- y *= gf1(y) - gf2(y);
-
- Spec<int, char> sic;
- Spec<int, int *> siip;
-
- sic.spec ('c');
- siip.spec (&x);
-
- Garply<int> f;
- Garply<char> fc;
- f.x = 13;
-
- Garply<Garply<char> > nf;
- nf.x = 31;
-
- x = f.garply (3, 4);
-
- fc = nf.garply (3, fc);
-
- y = x + fc.x;
-
-
- return 0;
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gdb/testsuite/gdb.c++/templates.exp b/gdb/testsuite/gdb.c++/templates.exp
deleted file mode 100644
index 00f5ada7bea..00000000000
--- a/gdb/testsuite/gdb.c++/templates.exp
+++ /dev/null
@@ -1,516 +0,0 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2002, 2003
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-set ws "\[\r\n\t \]+"
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "templates"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-source ${binfile}.ci
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-#
-# Test printing of the types of templates.
-#
-
-proc test_ptype_of_templates {} {
- global gdb_prompt
- global ws
-
- send_gdb "ptype T5<int>\n"
- gdb_expect {
- -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}T5<int> & operator=\\(T5<int> const ?&\\);${ws}T5\\(int\\);${ws}T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\((void|)\\);${ws}static void \\* operator new\\(unsigned( int| long)?\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
- pass "ptype T5<int>"
- }
- -re "type = class T5<int> \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}${ws}T5 \\(int\\);${ws}T5 \\(const class T5<int> &\\);${ws}void ~T5 \\(int\\);${ws}static void \\* new \\(unsigned int\\);${ws}static void delete \\(void ?\\*\\);${ws}int value \\((void|)\\);${ws}\\}${ws}$gdb_prompt $" { pass "ptype T5<int> -- new with unsigned int" }
- -re "type = class T5<int> \\{.*public:.*static int X;.*int x;.*int val;.*T5 \\(int\\);.*T5 \\(const class T5<int> &\\);.*void ~T5 \\(int\\);.*static void \\* new \\(unsigned long\\);.*static void delete \\(void ?\\*\\);.*int value \\((void|)\\);.*\\}\r\n$gdb_prompt $" { pass "ptype T5<int> -- new with unsigned long" }
- -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\((T5<int> const|const T5<int>) ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
- pass "ptype T5<int> (obsolescent gcc or gdb)"
- }
- -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
- # This also triggers gdb/1113...
- kfail "gdb/1111" "ptype T5<int>"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype T5<int>"
- }
- timeout {
- fail "ptype T5<int> (timeout)"
- }
- }
-
- send_gdb "ptype t5i\n"
- gdb_expect {
- -re "type = class T5<int> \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5\\(int\\);${ws}T5\\(T5<int> const ?&\\);${ws}~T5\\((void|)\\);${ws}static void \\* operator new\\(unsigned( int| long)?\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\\}\r\n$gdb_prompt $" { pass "ptype T5<int> -- with several fixes from 4.17" }
- -re "type = class T5<int> \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5 \\(int\\);${ws}T5 \\(const class T5<int> &\\);${ws}void ~T5 \\(int\\);${ws}static void \\* new \\(unsigned int\\);${ws}static void delete \\(void ?\\*\\);${ws}int value \\((void|)\\);${ws}\\}\r\n$gdb_prompt $" { pass "ptype t5i<int> -- new with unsigned int" }
- -re "type = class T5<int> \\{${ws}public:${ws}static int X;${ws}int x;${ws}int val;\r\n${ws}T5 \\(int\\);${ws}T5 \\(const class T5<int> &\\);${ws}void ~T5 \\(int\\);${ws}static void \\* new \\(unsigned long\\);${ws}static void delete \\(void ?\\*\\);${ws}int value \\((void|)\\);${ws}\\}\r\n$gdb_prompt $" { pass "ptype t5i<int> -- new with unsigned long" }
- -re "type = class T5<int> \{.*public:.*static int X;.*int x;.*int val;.*.*T5 \\(int\\);.*.*void ~T5 \\(int\\).*.*.*int value \\((void|)\\);.*\}.*$gdb_prompt $" {
- pass "ptype t5i"
- }
- -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}T5<int> & operator=\\(T5<int> const ?&\\);${ws}T5\\(int\\);${ws}T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\((void|)\\);${ws}static void \\* operator new\\(unsigned( int| long)?\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
- pass "ptype t5i"
- }
- -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\(T5<int> const ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
- pass "ptype t5i (obsolescent gcc or gdb)"
- }
- -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
- # This also triggers gdb/1113...
- kfail "gdb/1111" "ptype T5<int>"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype t5i"
- }
- timeout {
- fail "ptype t5i (timeout)"
- }
- }
-}
-
-#
-# Test breakpoint setting on template methods.
-#
-
-proc test_template_breakpoints {} {
- global gdb_prompt
- global testfile
- global srcdir
- global hp_aCC_compiler
-
- send_gdb "break T5<int>::T5\n"
- gdb_expect {
- -re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2. T5<int>::T5\\(int\\) at .*\[\r\n\]*.3. T5<int>::T5\\((T5<int> const|const T5<int>) ?&\\) at .*\[\r\n\]*> $" {
- gdb_test "0" \
- "canceled" \
- "constructor breakpoint (obsolete format!)"
- }
- -re ".0. cancel\[\r\n\]*.1. all\[\r\n\]*.2. T5<int>::T5\\((T5<int> const|const T5<int>) ?&\\) at .*templates.cc:.*\[\r\n\]*.3. T5<int>::T5\\(int\\) at .*templates.cc:.*\[\r\n\]*> $" {
- gdb_test "0" \
- "canceled" \
- "constructor breakpoint"
- }
- -re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2. T5 at .*\[\r\n\]*.3. T5 at .*\[\r\n\]*> $" {
- setup_kfail "gdb/1062" "*-*-*"
- gdb_test "0" \
- "nonsense intended to insure that this test fails" \
- "constructor breakpoint"
- }
- -re ".*\n> $" {
- gdb_test "0" \
- "nonsense intended to insure that this test fails" \
- "constructor breakpoint (bad menu choices)"
- }
- -re ".*$gdb_prompt $" { fail "constructor breakpoint" }
- default { fail "constructor breakpoint (timeout)" }
- }
-
-# See CLLbs14792
- if {$hp_aCC_compiler} {setup_xfail hppa*-*-* CLLbs14792}
-
- gdb_test_multiple "break T5<int>::~T5" "destructor_breakpoint" {
- -re "Breakpoint.*at.* file .*${testfile}.cc, line.*$gdb_prompt $"
- {
- pass "destructor breakpoint"
- }
- -re "the class `T5<int>' does not have destructor defined\r\nHint: try 'T5<int>::~T5<TAB> or 'T5<int>::~T5<ESC-\\?>\r\n\\(Note leading single quote.\\)\r\n$gdb_prompt $"
- {
- kfail "gdb/1112" "destructor breakpoint"
- }
- }
-
- gdb_test "break T5<int>::value" \
- "Breakpoint.*at.* file .*${testfile}.cc, line.*" \
- "value method breakpoint"
-
- delete_breakpoints
-}
-
-#
-# Test calling of template methods.
-#
-
-proc test_template_calls {} {
- global gdb_prompt
- global hp_aCC_compiler
-
- if [target_info exists gdb,cannot_call_functions] {
- setup_xfail "*-*-*" 2416
- fail "This target can not call functions"
- return
- }
-
- if {!$hp_aCC_compiler} {setup_xfail hppa*-*-*}
- send_gdb "print t5i.value()\n"
- gdb_expect {
- -re ".* = 2\[\r\n\]*$gdb_prompt $" { pass "print t5i.value()" }
- -re "Cannot invoke functions on this machine.*$gdb_prompt $" {
- fail "print t5i.value()"
- }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- xfail "print t5i.value"
- }
- -re ".*$gdb_prompt $" { fail "print t5i.value()" }
- timeout { fail "print t5i.value() (timeout)" }
- }
-}
-
-
-proc do_tests {} {
- global prms_id
- global bug_id
- global subdir
- global objdir
- global srcdir
- global binfile
- global gdb_prompt
- global supports_template_debugging
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- if { !$supports_template_debugging } {
- warning "compiler lacks debugging info for templates; tests suppressed." 0
- return
- }
-
- runto_main
-
- test_ptype_of_templates
- test_template_breakpoints
-
- if [ runto_main] {
- test_template_calls
- }
-}
-
-do_tests
-
-
-# More tests for different kinds of template parameters,
-# templates with partial specializations, nested templates, etc.
-# These have been tested only with HP aCC. They probably won't
-# work with other compilers because of differences in mangling
-# schemes.
-# Added by Satish Pai <pai@apollo.hp.com> 1997-09-25
-# As of 2000-06-03, C++ support has been improved to the point that g++ can
-# pass all of theses, excluding what appears to be one that exposes a stabs bug. - djb
-
-# I don't know how HP could be passing these tests without this. They
-# weren't breakpointing past a point where the below expressions were
-# initialized in the actual source. - djb
-
-send_gdb "b 770\n"
-gdb_expect {
- -re ".*$gdb_prompt $"
-}
-send_gdb "c\n"
-gdb_expect {
- -re ".*$gdb_prompt $"
-}
-send_gdb "print fint\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\{x = 0, t = 0\\}\r\n$gdb_prompt $" { pass "print fint" }
- -re "$gdb_prompt $" { fail "print fint" }
- timeout { fail "(timeout) print fint" }
-}
-
-send_gdb "print fvpchar\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\{x = 0, t = 0x0\\}\r\n$gdb_prompt $" { pass "print fvpchar" }
- -re "$gdb_prompt $" { fail "print fvpchar" }
- timeout { fail "(timeout) print fvpchar" }
-}
-
-# Template Foo<T>
-
-# Neither stabs nor DWARF-2 contains type information about templates
-# (as opposed to instantiations of templates), so in those
-# circumstances we expect GDB to not find a symbol. HP has a debug
-# format that contains more info, though, so it's also correct to
-# print out template info. (This affects several subsequent tests as
-# well.)
-
-# NOTE: carlton/2003-02-26: However, because of a bug in the way GDB
-# handles nested types, we don't get this right in the DWARF-2 case.
-
-send_gdb "ptype Foo\n"
-gdb_expect {
- -re "type = template <(class |)T> (class |)Foo \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Foo<volatile char \\*>\r\n\[ \t\]*(class |)Foo<char>\r\n\[ \t\]*(class |)Foo<int>\r\n$gdb_prompt $" { pass "ptype Foo" }
- -re "type = template <(class |)T> (class |)Foo \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Foo" }
- -re "type = class Foo<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int foo\\(int, int\\);\r\n\\}\r\n$gdb_prompt $"
- { # GCC 3.1, DWARF-2 output.
- kfail "gdb/57" "ptype Foo" }
- -re "No symbol \"Foo\" in current context.\r\n$gdb_prompt $"
- { # GCC 2.95.3, stabs+ output.
- pass "ptype Foo" }
- -re "$gdb_prompt $" { fail "ptype Foo" }
- timeout { fail "(timeout) ptype Foo" }
-}
-# -re "type = class Foo<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int foo(int, int);\r\n\\}\r\n$gdb_prompt $"
-
-# ptype Foo<int>
-
-send_gdb "ptype fint\n"
-gdb_expect {
- -re "type = (class |)Foo<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int foo\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fint" }
- -re "$gdb_prompt $" { fail "ptype fint" }
- timeout { fail "(timeout) ptype fint" }
-}
-
-# ptype Foo<char>
-
-send_gdb "ptype fchar\n"
-gdb_expect {
- -re "type = (class |)Foo<char> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*.*char foo\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fchar" }
- -re "$gdb_prompt $" { fail "ptype fchar" }
- timeout { fail "(timeout) ptype fchar" }
-}
-
-# ptype Foo<volatile char *>
-
-send_gdb "ptype fvpchar\n"
-gdb_expect {
- -re "type = (class |)Foo<volatile char ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" }
- -re "$gdb_prompt $" { fail "ptype fvpchar" }
- timeout { fail "(timeout) ptype fvpchar" }
-}
-
-# print a function from Foo<volatile char *>
-
-# This test is sensitive to whitespace matching, so we'll do it twice,
-# varying the spacing, because of PR gdb/33.
-
-send_gdb "print Foo<volatile char *>::foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }
- -re "No symbol \"Foo<volatile char \\*>\" in current context.\r\n$gdb_prompt $"
- {
- # This used to be a kfail gdb/33, but it shouldn't occur any more now.
- fail "print Foo<volatile char *>::foo"
- }
- -re "$gdb_prompt $" { fail "print Foo<volatile char *>::foo" }
- timeout { fail "(timeout) print Foo<volatile char *>::foo" }
-}
-
-send_gdb "print Foo<volatile char*>::foo\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char*>::foo" }
- -re "No symbol \"Foo<volatile char\\*>\" in current context.\r\n$gdb_prompt $"
- {
- # This used to be a kfail gdb/33, but it shouldn't occur any more now.
- fail "print Foo<volatile char *>::foo"
- }
- -re "$gdb_prompt $" { fail "print Foo<volatile char*>::foo" }
- timeout { fail "(timeout) print Foo<volatile char*>::foo" }
-}
-
-# Template Bar<T, int>
-
-# same as Foo for g++
-send_gdb "ptype Bar\n"
-gdb_expect {
- -re "type = template <(class |)T, (class |)sz> (class |)Bar \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Bar<int,(\\(int\\)|)1>\r\n\[ \t\]*(class |)Bar<int,(\\(int\\)|)33>\r\n$gdb_prompt $" { pass "ptype Bar" }
- -re "type = <(class |)T, (class |)sz> (class |)Bar \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Bar" }
- -re "ptype Bar\r\ntype = class Bar<int,33> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int bar\\(int, int\\);\r\n}\r\n$gdb_prompt $"
- { # GCC 3.1, DWARF-2 output.
- kfail "gdb/57" "ptype Bar" }
- -re "No symbol \"Bar\" in current context.\r\n$gdb_prompt $"
- { # GCC 2.95.3, stabs+ output.
- pass "ptype Bar" }
- -re "$gdb_prompt $" { fail "ptype Bar" }
- timeout { fail "(timeout) ptype Bar" }
-}
-
-
-# ptype Bar<int,33>
-
-send_gdb "ptype bint\n"
-gdb_expect {
- -re "type = (class |)Bar<int,(\\(int\\)|)33> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int bar\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint" }
- -re "$gdb_prompt $" { fail "ptype bint" }
- timeout { fail "(timeout) ptype bint" }
-}
-
-# ptype Bar<int, (4>3)>
-
-send_gdb "ptype bint2\n"
-gdb_expect {
- -re "type = (class |)Bar<int,(\\(int\\)|)1> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int bar\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint2" }
- -re "$gdb_prompt $" { fail "ptype bint2" }
- timeout { fail "(timeout) ptype bint2" }
-}
-
-# Template Baz<T, char>
-
-# Same as Foo, for g++
-send_gdb "ptype Baz\n"
-gdb_expect {
- -re "type = template <(class |)T, (class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Baz<char,(\\(char\\)|)97>\r\n\[ \t\]*(class |)Baz<int,(\\(char\\)|)115>\r\n$gdb_prompt $" { pass "ptype Baz" }
- -re "type = <(class |)T, (class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Baz" }
- -re "type = class Baz<int,'s'> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\);\r\n}\r\n$gdb_prompt $"
- { # GCC 3.1, DWARF-2 output.
- kfail "gdb/57" "ptype Baz" }
- -re "No symbol \"Baz\" in current context.\r\n$gdb_prompt $"
- { # GCC 2.95.3, stabs+ output.
- pass "ptype Baz" }
- -re "$gdb_prompt $" { fail "ptype Baz" }
- timeout { fail "(timeout) ptype Baz" }
-}
-
-
-# ptype Baz<int, 's'>
-
-send_gdb "ptype bazint\n"
-gdb_expect {
- -re "type = (class |)Baz<int,(\\(char\\)|)(115|\\'s\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int baz\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint" }
- -re "$gdb_prompt $" { fail "ptype bazint" }
- timeout { fail "(timeout) ptype bazint" }
-}
-
-# ptype Baz<char, 'a'>
-
-send_gdb "ptype bazint2\n"
-gdb_expect {
- -re "type = (class |)Baz<char,(\\(char\\)|)(97|\\'a\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*.*char baz\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint2" }
- -re "$gdb_prompt $" { fail "ptype bazint2" }
- timeout { fail "(timeout) ptype bazint2" }
-}
-
-# Template Qux<T, int (*f)(int) >
-# Same as Foo for g++
-send_gdb "ptype Qux\n"
-gdb_expect {
- -re "type = template <(class |)T, (class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Qux<int,&string>\r\n\[ \t\]*(class |)Qux<char,&string>\r\n$gdb_prompt $" { pass "ptype Qux" }
- -re ".*type = template <(class |)T.*, (class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}.*$gdb_prompt $" { pass "ptype Qux" }
- -re "type = class Qux<char,&string> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char qux\\(int, char\\);\r\n}\r\n$gdb_prompt $"
- { # GCC 3.1, DWARF-2 output.
- kfail "gdb/57" "ptype Qux" }
- -re "No symbol \"Qux\" in current context.\r\n$gdb_prompt $"
- { # GCC 2.95.3, stabs+ output.
- pass "ptype Qux" }
- -re "$gdb_prompt $" { fail "ptype Qux" }
- timeout { fail "(timeout) ptype Qux" }
-}
-
-# pt Qux<int,&string>
-
-send_gdb "ptype quxint\n"
-gdb_expect {
- -re "type = class Qux<int,&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
- -re "$gdb_prompt $" { fail "ptype quxint" }
- timeout { fail "(timeout) ptype quxint" }
-}
-
-# pt Qux<char,0>
-
-# commented out this as quxint2 declaration was commented out in
-# templates.exp -- ovidiu
-# send_gdb "ptype quxint2\n"
-# gdb_expect {
-# -re "type = class Qux<char,&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char qux\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint2" }
-# -re "$gdb_prompt $" { fail "ptype quxint2" }
-# timeout { fail "(timeout) ptype quxint2" }
-# }
-
-# Template Spec<T1, T2>
-
-# Same as Foo for g++
-send_gdb "ptype Spec\n"
-gdb_expect {
- -re "type = template <(class |)T1, (class |)T2> (class |)Spec \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Spec<int,int \\*>\r\n\[ \t\]*(class |)Spec<int,char>\r\n$gdb_prompt $" { pass "ptype Spec" }
- -re "type = <(class |)T1, (class |)T2> (class |)Spec \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Spec" }
- -re "type = class Spec<int,char> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*int spec\\(char\\);\r\n}\r\n$gdb_prompt $"
- { # GCC 3.1, DWARF-2 output.
- kfail "gdb/57" "ptype Spec" }
- -re "No symbol \"Spec\" in current context.\r\n$gdb_prompt $"
- { # GCC 2.95.3, stabs+ output.
- pass "ptype Spec" }
- -re "$gdb_prompt $" { fail "ptype Spec" }
- timeout { fail "(timeout) ptype Spec" }
-}
-
-# pt Spec<char,0>
-
-send_gdb "ptype siip\n"
-gdb_expect {
- -re "type = class Spec<int,int ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*.*int spec\\(int ?\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype siip" }
- -re "$gdb_prompt $" { fail "ptype siip" }
- timeout { fail "(timeout) ptype siip" }
-}
-
-# pt Garply<int>
-
-send_gdb "ptype Garply<int>\n"
-gdb_expect {
- -re "type = class Garply<int> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int garply\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype Garply<int>" }
- -re "$gdb_prompt $" { fail "ptype Garply<int>" }
- timeout { fail "(timeout) ptype Garply<int>" }
-}
-
-# ptype of nested template name
-
-send_gdb "ptype Garply<Garply<char> >\n"
-gdb_expect {
- -re "type = (class |)Garply<Garply<char> > \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*(class |)Garply<char> t;\r\n\r\n\[ \t\]*.*(class |)Garply<char> garply\\(int, (class |)Garply<char>\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype Garply<Garply<char> >" }
- -re "$gdb_prompt $" { fail "ptype Garply<Garply<char> >" }
- timeout { fail "(timeout) ptype Garply<Garply<char> >" }
-}
-
-# print out a function from a nested template name
-
-send_gdb "print Garply<Garply<char> >::garply\n"
-gdb_expect {
- -re "\\$\[0-9\]* = \\{(class |)Garply<char> \\((class |)Garply<Garply<char> > \\*(| const), int, (class |)Garply<char>\\)\\} $hex <Garply<Garply<char>\[ \t\]*>::garply\\(int, (class |)Garply<char>\\)>\r\n$gdb_prompt $" { pass "print Garply<Garply<char> >::garply" }
- -re ".*$gdb_prompt $" { fail "print Garply<Garply<char> >::garply" }
- timeout { fail "print Garply<Garply<char> >::garply (timeout)" }
-}
-
-# djb - 06-03-2000
-# Now should work fine
-send_gdb "break Garply<Garply<char> >::garply\n"
-gdb_expect {
- -re "Breakpoint \[0-9\]* at $hex: file .*templates.cc, line.*\r\n$gdb_prompt $" { pass "break Garply<Garply<char> >::garply" }
- -re ".*$gdb_prompt $" { fail "break Garply<Garply<char> >::garply" }
- timeout { fail "break Garply<Garply<char> >::garply (timeout)" }
-}
diff --git a/gdb/testsuite/gdb.c++/try_catch.cc b/gdb/testsuite/gdb.c++/try_catch.cc
deleted file mode 100644
index e13dd641b49..00000000000
--- a/gdb/testsuite/gdb.c++/try_catch.cc
+++ /dev/null
@@ -1,121 +0,0 @@
-// 2002-05-27
-
-#include <exception>
-#include <stdexcept>
-#include <string>
-
-enum region { oriental, egyptian, greek, etruscan, roman };
-
-// Test one.
-class gnu_obj_1
-{
-public:
- typedef region antiquities;
- const bool test;
- const int key1;
- long key2;
-
- antiquities value;
-
- gnu_obj_1(antiquities a, long l): test(true), key1(5), key2(l), value(a) {}
-};
-
-// Test two.
-template<typename T>
-class gnu_obj_2: public virtual gnu_obj_1
-{
-public:
- antiquities value_derived;
-
- gnu_obj_2(antiquities b): gnu_obj_1(oriental, 7), value_derived(b) { }
-};
-
-// Test three.
-template<typename T>
-class gnu_obj_3
-{
-public:
- typedef region antiquities;
- gnu_obj_2<int> data;
-
- gnu_obj_3(antiquities b): data(etruscan) { }
-};
-
-int main()
-{
- bool test = true;
- const int i = 5;
- int j = i;
- gnu_obj_2<long> test2(roman);
- gnu_obj_3<long> test3(greek);
-
- // 1
- try
- {
- ++j;
- throw gnu_obj_1(egyptian, 4589); // marker 1-throw
- }
- catch (gnu_obj_1& obj)
- {
- ++j;
- if (obj.value != egyptian) // marker 1-catch
- test &= false;
- if (obj.key2 != 4589)
- test &= false;
- }
- catch (...)
- {
- j = 0;
- test &= false;
- }
-
- // 2
- try
- {
- ++j; // marker 2-start
- try
- {
- ++j; // marker 2-next
- try
- {
- ++j;
- throw gnu_obj_1(egyptian, 4589); // marker 2-throw
- }
- catch (gnu_obj_1& obj)
- {
- ++j;
- if (obj.value != egyptian) // marker 2-catch
- test &= false;
- if (obj.key2 != 4589)
- test &= false;
- }
- }
- catch (gnu_obj_1& obj)
- {
- ++j;
- if (obj.value != egyptian)
- test &= false;
- if (obj.key2 != 4589)
- test &= false;
- }
- }
- catch (...)
- {
- j = 0;
- test &= false;
- }
-
- // 3 use standard library
- using namespace std;
- try
- {
- if (j < 100)
- throw invalid_argument("gdb.1"); // marker 3-throw
- }
- catch (exception& obj)
- {
- if (obj.what() != "gdb.1") // marker 3-catch
- test &= false;
- }
- return 0;
-}
diff --git a/gdb/testsuite/gdb.c++/try_catch.exp b/gdb/testsuite/gdb.c++/try_catch.exp
deleted file mode 100644
index 1473e20c5f1..00000000000
--- a/gdb/testsuite/gdb.c++/try_catch.exp
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Tests for member data
-# 2002-05-27 Benjamin Kosnik <bkoz@redhat.com>
-
-# This file is part of the gdb testsuite
-
-if $tracelevel then {
- strace $tracelevel
- }
-
-if { [skip_cplus_tests] } { continue }
-
-#
-# test running programs
-#
-set prms_id 0
-set bug_id 0
-
-set testfile "try_catch"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-gdb_breakpoint [gdb_get_line_number "marker 1-throw"]
-gdb_continue_to_breakpoint "marker 1-throw"
-
-gdb_breakpoint [gdb_get_line_number "marker 1-catch"]
-gdb_continue_to_breakpoint "marker 1-catch"
-
-gdb_breakpoint [gdb_get_line_number "marker 2-start"]
-gdb_continue_to_breakpoint "marker 2-start"
-
-gdb_breakpoint [gdb_get_line_number "marker 2-next"]
-gdb_continue_to_breakpoint "marker 2-next"
-
-gdb_breakpoint [gdb_get_line_number "marker 2-throw"]
-gdb_continue_to_breakpoint "marker 2-throw"
-
-gdb_breakpoint [gdb_get_line_number "marker 2-catch"]
-gdb_continue_to_breakpoint "marker 2-catch"
-
-gdb_breakpoint [gdb_get_line_number "marker 3-throw"]
-gdb_continue_to_breakpoint "marker 3-throw"
-
-gdb_breakpoint [gdb_get_line_number "marker 3-catch"]
-gdb_continue_to_breakpoint "marker 3-catch"
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.c++/userdef.cc b/gdb/testsuite/gdb.c++/userdef.cc
deleted file mode 100644
index 0bb88a2d166..00000000000
--- a/gdb/testsuite/gdb.c++/userdef.cc
+++ /dev/null
@@ -1,341 +0,0 @@
-#include <iostream>
-
-using namespace std;
-
-void marker1()
-{
- return;
-}
-
-class A1 {
- int x;
- int y;
-
-friend ostream& operator<<(ostream& outs, A1 one);
-
-public:
-
- A1(int a, int b)
- {
- x=a;
- y=b;
- }
-
-A1 operator+=(int value);
-A1 operator+(const A1&);
-A1 operator-(const A1&);
-A1 operator%(const A1&);
-int operator==(const A1&);
-int operator!=(const A1&);
-int operator&&(const A1&);
-int operator||(const A1&);
-A1 operator<<(int);
-A1 operator>>(int);
-A1 operator|(const A1&);
-A1 operator^(const A1&);
-A1 operator&(const A1&);
-int operator<(const A1&);
-int operator<=(const A1&);
-int operator>=(const A1&);
-int operator>(const A1&);
-A1 operator*(const A1&);
-A1 operator/(const A1&);
-A1 operator=(const A1&);
-
-A1 operator~();
-A1 operator-();
-int operator!();
-A1 operator++();
-A1 operator++(int);
-A1 operator--();
-A1 operator--(int);
-
-};
-
-
-A1 A1::operator+(const A1& second)
-{
- A1 sum(0,0);
- sum.x = x + second.x;
- sum.y = y + second.y;
-
- return (sum);
-}
-
-A1 A1::operator*(const A1& second)
-{
- A1 product(0,0);
- product.x = this->x * second.x;
- product.y = this->y * second.y;
-
- return product;
-}
-
-A1 A1::operator-(const A1& second)
-{
- A1 diff(0,0);
- diff.x = x - second.x;
- diff.y = y - second.y;
-
- return diff;
-}
-
-A1 A1::operator/(const A1& second)
-{
- A1 div(0,0);
- div.x = x / second.x;
- div.y = y / second.y;
-
- return div;
-}
-
-A1 A1::operator%(const A1& second)
-{
- A1 rem(0,0);
- rem.x = x % second.x;
- rem.y = y % second.y;
-
- return rem;
-}
-
-int A1::operator==(const A1& second)
-{
- int a = (x == second.x);
- int b = (y == second.y);
-
- return (a && b);
-}
-
-int A1::operator!=(const A1& second)
-{
- int a = (x != second.x);
- int b = (y != second.y);
-
- return (a || b);
-}
-
-int A1::operator&&(const A1& second)
-{
- return ( x && second.x);
-}
-
-int A1::operator||(const A1& second)
-{
- return ( x || second.x);
-}
-
-A1 A1::operator<<(int value)
-{
- A1 lshft(0,0);
- lshft.x = x << value;
- lshft.y = y << value;
-
- return lshft;
-}
-
-A1 A1::operator>>(int value)
-{
- A1 rshft(0,0);
- rshft.x = x >> value;
- rshft.y = y >> value;
-
- return rshft;
-}
-
-A1 A1::operator|(const A1& second)
-{
- A1 abitor(0,0);
- abitor.x = x | second.x;
- abitor.y = y | second.y;
-
- return abitor;
-}
-
-A1 A1::operator^(const A1& second)
-{
- A1 axor(0,0);
- axor.x = x ^ second.x;
- axor.y = y ^ second.y;
-
- return axor;
-}
-
-A1 A1::operator&(const A1& second)
-{
- A1 abitand(0,0);
- abitand.x = x & second.x;
- abitand.y = y & second.y;
-
- return abitand;
-}
-
-int A1::operator<(const A1& second)
-{
- A1 b(0,0);
- b.x = 3;
- return (x < second.x);
-}
-
-int A1::operator<=(const A1& second)
-{
- return (x <= second.x);
-}
-
-int A1::operator>=(const A1& second)
-{
- return (x >= second.x);
-}
-
-int A1::operator>(const A1& second)
-{
- return (x > second.x);
-}
-
-int A1::operator!(void)
-{
- return (!x);
-}
-
-A1 A1::operator-(void)
-{
- A1 neg(0,0);
- neg.x = -x;
- neg.y = -y;
-
- return (neg);
-}
-
-A1 A1::operator~(void)
-{
- A1 acompl(0,0);
- acompl.x = ~x;
- acompl.y = ~y;
-
- return (acompl);
-}
-
-A1 A1::operator++() // pre increment
-{
- x = x +1;
-
- return (*this);
-}
-
-A1 A1::operator++(int) // post increment
-{
- y = y +1;
-
- return (*this);
-}
-
-A1 A1::operator--() // pre decrement
-{
- x = x -1;
-
- return (*this);
-}
-
-A1 A1::operator--(int) // post decrement
-{
- y = y -1;
-
- return (*this);
-}
-
-
-A1 A1::operator=(const A1& second)
-{
-
- x = second.x;
- y = second.y;
-
- return (*this);
-}
-
-A1 A1::operator+=(int value)
-{
-
- x += value;
- y += value;
-
- return (*this);
-}
-
-ostream& operator<<(ostream& outs, A1 one)
-{
- return (outs << endl << "x = " << one.x << endl << "y = " << one.y << endl << "-------" << endl);
-}
-
-int main (void)
-{
- A1 one(2,3);
- A1 two(4,5);
- A1 three(0,0);
- int val;
-
- marker1(); // marker1-returns-here
- cout << one; // marker1-returns-here
- cout << two;
- three = one + two;
- cout << "+ " << three;
- three = one - two;
- cout << "- " << three;
- three = one * two;
- cout <<"* " << three;
- three = one / two;
- cout << "/ " << three;
- three = one % two;
- cout << "% " << three;
- three = one | two;
- cout << "| " <<three;
- three = one ^ two;
- cout << "^ " <<three;
- three = one & two;
- cout << "& "<< three;
-
- val = one && two;
- cout << "&& " << val << endl << "-----"<<endl;
- val = one || two;
- cout << "|| " << val << endl << "-----"<<endl;
- val = one == two;
- cout << " == " << val << endl << "-----"<<endl;
- val = one != two;
- cout << "!= " << val << endl << "-----"<<endl;
- val = one >= two;
- cout << ">= " << val << endl << "-----"<<endl;
- val = one <= two;
- cout << "<= " << val << endl << "-----"<<endl;
- val = one < two;
- cout << "< " << val << endl << "-----"<<endl;
- val = one > two;
- cout << "> " << val << endl << "-----"<<endl;
-
- three = one << 2;
- cout << "lsh " << three;
- three = one >> 2;
- cout << "rsh " << three;
-
- three = one;
- cout << " = "<< three;
- three += 5;
- cout << " += "<< three;
-
- val = (!one);
- cout << "! " << val << endl << "-----"<<endl;
- three = (-one);
- cout << "- " << three;
- three = (~one);
- cout << " ~" << three;
- three++;
- cout << "postinc " << three;
- three--;
- cout << "postdec " << three;
-
- --three;
- cout << "predec " << three;
- ++three;
- cout << "preinc " << three;
-
- return 0;
-
-}
diff --git a/gdb/testsuite/gdb.c++/userdef.exp b/gdb/testsuite/gdb.c++/userdef.exp
deleted file mode 100644
index 4575249ce5a..00000000000
--- a/gdb/testsuite/gdb.c++/userdef.exp
+++ /dev/null
@@ -1,148 +0,0 @@
-# Tests of overloaded operators resolution.
-# Copyright 1998, 1999, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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
-
-# written by Elena Zannoni (ezannoni@cygnus.com)
-#
-# source file "userdef.cc"
-#
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "userdef"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
-}
-
-send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
- send_gdb "cont\n"
- gdb_expect {
- -re "Break.* marker1(\\(\\)|) \\(\\) at .*:$decimal.*$gdb_prompt $" {
- send_gdb "up\n"
- gdb_expect {
- -re ".*$gdb_prompt $" { pass "up from marker1" }
- timeout { fail "up from marker1" }
- }
- }
- -re "$gdb_prompt $" { fail "continue to marker1" }
- timeout { fail "(timeout) continue to marker1" }
- }
-
-
-gdb_test "print one + two" "\\\$\[0-9\]* = {x = 6, y = 8}"
-
-# If GDB fails to restore the selected frame properly after the
-# inferior function call above (see GDB PR 1155 for an explanation of
-# why this might happen), all the subsequent tests will fail. We
-# should detect report that failure, but let the marker call finish so
-# that the rest of the tests can run undisturbed.
-gdb_test_multiple "frame" "re-selected 'main' frame after inferior call" {
- -re "#0 marker1.*$gdb_prompt $" {
- setup_kfail "gdb/1155" s390-*-linux-gnu
- fail "re-selected 'main' frame after inferior call"
- gdb_test "finish" ".*main.*at .*userdef.cc:.*// marker1-returns-here.*" \
- "finish call to marker1"
- }
- -re "#1 ($hex in )?main.*$gdb_prompt $" {
- pass "re-selected 'main' frame after inferior call"
- }
-}
-
-gdb_test "print one - two" "\\\$\[0-9\]* = {x = -2, y = -2}"
-
-gdb_test "print one * two" "\\\$\[0-9\]* = {x = 8, y = 15}"
-
-gdb_test "print one / two" "\\\$\[0-9\]* = {x = 0, y = 0}"
-
-gdb_test "print one % two" "\\\$\[0-9\]* = {x = 2, y = 3}"
-
-gdb_test "print one && two" "\\\$\[0-9\]* = 1\[\r\n\]"
-
-gdb_test "print one || two" "\\\$\[0-9\]* = 1\[\r\n\]"
-
-gdb_test "print one & two" "\\\$\[0-9\]* = {x = 0, y = 1}"
-
-gdb_test "print one | two" "\\\$\[0-9\]* = {x = 6, y = 7}"
-
-gdb_test "print one ^ two" "\\\$\[0-9\]* = {x = 6, y = 6}"
-
-gdb_test "print one < two" "\\\$\[0-9\]* = 1\[\r\n\]"
-
-gdb_test "print one <= two" "\\\$\[0-9\]* = 1\[\r\n\]"
-
-gdb_test "print one > two" "\\\$\[0-9\]* = 0\[\r\n\]"
-
-gdb_test "print one >= two" "\\\$\[0-9\]* = 0\[\r\n\]"
-
-gdb_test "print one == two" "\\\$\[0-9\]* = 0\[\r\n\]"
-
-gdb_test "print one != two" "\\\$\[0-9\]* = 1\[\r\n\]"
-
-# Can't really check the output of this one without knowing
-# target integer width. Make sure we don't try to call
-# the iostreams operator instead, though.
-gdb_test "print one << 31" "\\\$\[0-9\]* = {x = -?\[0-9\]*, y = -?\[0-9\]*}"
-
-# Should be fine even on < 32-bit targets.
-gdb_test "print one >> 31" "\\\$\[0-9\]* = {x = 0, y = 0}"
-
-gdb_test "print !one" "\\\$\[0-9\]* = 0\[\r\n\]"
-
-# Assumes 2's complement. So does everything...
-gdb_test "print ~one" "\\\$\[0-9\]* = {x = -3, y = -4}"
-
-gdb_test "print -one" "\\\$\[0-9\]* = {x = -2, y = -3}"
-
-gdb_test "print one++" "\\\$\[0-9\]* = {x = 2, y = 4}"
-
-gdb_test "print ++one" "\\\$\[0-9\]* = {x = 3, y = 4}"
-
-gdb_test "print one--" "\\\$\[0-9\]* = {x = 3, y = 3}"
-
-gdb_test "print --one" "\\\$\[0-9\]* = {x = 2, y = 3}"
-
-gdb_test "print one += 7" "\\\$\[0-9\]* = {x = 9, y = 10}"
-
-gdb_test "print two = one" "\\\$\[0-9\]* = {x = 9, y = 10}"
-
-# Check that GDB tolerates whitespace in operator names.
-gdb_test "break A1::'operator+'" ".*Breakpoint $decimal at.*"
-gdb_test "break A1::'operator +'" ".*Breakpoint $decimal at.*"
-
-gdb_exit
-return 0
diff --git a/gdb/testsuite/gdb.c++/virtfunc.cc b/gdb/testsuite/gdb.c++/virtfunc.cc
deleted file mode 100644
index 005de9d0ea6..00000000000
--- a/gdb/testsuite/gdb.c++/virtfunc.cc
+++ /dev/null
@@ -1,201 +0,0 @@
-// Pls try the following program on virtual functions and try to do print on
-// most of the code in main(). Almost none of them works !
-
-//
-// The inheritance structure is:
-//
-// V : VA VB
-// A : (V)
-// B : A
-// D : AD (V)
-// C : (V)
-// E : B (V) D C
-//
-
-class VA
-{
-public:
- int va;
-};
-
-class VB
-{
-public:
- int vb;
- int fvb();
- virtual int vvb();
-};
-
-class V : public VA, public VB
-{
-public:
- int f();
- virtual int vv();
- int w;
-};
-
-class A : virtual public V
-{
-public:
- virtual int f();
-private:
- int a;
-};
-
-class B : public A
-{
-public:
- int f();
-private:
- int b;
-};
-
-class C : public virtual V
-{
-public:
- int c;
-};
-
-class AD
-{
-public:
- virtual int vg() = 0;
-};
-
-class D : public AD, virtual public V
-{
-public:
- static void s();
- virtual int vg();
- virtual int vd();
- int fd();
- int d;
-};
-
-class E : public B, virtual public V, public D, public C
-{
-public:
- int f();
- int vg();
- int vv();
- int e;
-};
-
-D dd;
-D* ppd = &dd;
-AD* pAd = &dd;
-
-A a;
-B b;
-C c;
-D d;
-E e;
-V v;
-VB vb;
-
-
-A* pAa = &a;
-A* pAe = &e;
-
-B* pBe = &e;
-
-D* pDd = &d;
-D* pDe = &e;
-
-V* pVa = &a;
-V* pVv = &v;
-V* pVe = &e;
-V* pVd = &d;
-
-AD* pADe = &e;
-
-E* pEe = &e;
-
-VB* pVB = &vb;
-
-void init()
-{
- a.vb = 1;
- b.vb = 2;
- c.vb = 3;
- d.vb = 4;
- e.vb = 5;
- v.vb = 6;
- vb.vb = 7;
-
- d.d = 1;
- e.d = 2;
-}
-
-extern "C" int printf(const char *, ...);
-
-int all_count = 0;
-int failed_count = 0;
-
-#define TEST(EXPR, EXPECTED) \
- ret = EXPR; \
- if (ret != EXPECTED) {\
- printf("Failed %s is %d, should be %d!\n", #EXPR, ret, EXPECTED); \
- failed_count++; } \
- all_count++;
-
-int ret;
-
-void test_calls()
-{
- TEST(pAe->f(), 20);
- TEST(pAa->f(), 1);
-
- TEST(pDe->vg(), 202);
- TEST(pADe->vg(), 202);
- TEST(pDd->vg(), 101);
-
- TEST(pEe->vvb(), 411);
-
- TEST(pVB->vvb(), 407);
-
- TEST(pBe->vvb(), 411);
- TEST(pDe->vvb(), 411);
-
- TEST(pEe->vd(), 282);
- TEST(pEe->fvb(), 311);
-
- TEST(pEe->D::vg(), 102);
- printf("Did %d tests, of which %d failed.\n", all_count, failed_count);
-}
-#ifdef usestubs
-extern "C" {
- void set_debug_traps();
- void breakpoint();
-};
-#endif
-
-int main()
-{
-#ifdef usestubs
- set_debug_traps();
- breakpoint();
-#endif
- init();
-
- e.w = 7;
- e.vb = 11;
-
- test_calls();
- return 0;
-
-}
-
-int A::f() {return 1;}
-int B::f() {return 2;}
-void D::s() {}
-int E::f() {return 20;}
-int D::vg() {return 100+d;}
-int E::vg() {return 200+d;}
-int V::f() {return 600+w;}
-int V::vv() {return 400+w;}
-int E::vv() {return 450+w;}
-int D::fd() {return 250+d;}
-int D::vd() {return 280+d;}
-int VB::fvb() {return 300+vb;}
-int VB::vvb() {return 400+vb;}
diff --git a/gdb/testsuite/gdb.c++/virtfunc.exp b/gdb/testsuite/gdb.c++/virtfunc.exp
deleted file mode 100644
index dbd575cfb32..00000000000
--- a/gdb/testsuite/gdb.c++/virtfunc.exp
+++ /dev/null
@@ -1,948 +0,0 @@
-# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
-# This file was written by Fred Fish. (fnf@cygnus.com)
-
-set ws "\[\r\n\t \]+"
-set nl "\[\r\n\]+"
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-if { [skip_cplus_tests] } { continue }
-
-set testfile "virtfunc"
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}
-
-if [get_compiler_info ${binfile} "c++"] {
- return -1
-}
-
-source ${binfile}.ci
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++ debug}] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-proc gdb_virtfunc_init {} {
- global srcdir subdir binfile
- global gdb_prompt
-
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- send_gdb "set language c++\n"
- gdb_expect -re "$gdb_prompt $"
- send_gdb "set width 0\n"
- gdb_expect -re "$gdb_prompt $"
-}
-
-proc gdb_virtfunc_restart {} {
- gdb_exit;
- gdb_start;
- gdb_virtfunc_init;
- runto 'test_calls';
-}
-
-#
-# Test printing of the types of various classes.
-#
-
-proc test_ptype_of_classes {} {
- global gdb_prompt
- global ws
- global nl
-
- # This used to be a fail if it printed "struct" not "class". But
- # since this struct doesn't use any special C++ features, it is
- # considered right for GDB to print it as "struct".
- send_gdb "ptype VA\n"
- gdb_expect {
- -re "type = (struct|class) VA \{(${ws}public:|)${ws}int va;${ws}VA & operator=\\(VA const ?&\\);${ws}VA\\((VA const|const VA) ?&\\);${ws}VA\\((void|)\\);${ws}\}.*$gdb_prompt $" {
- pass "ptype VA"
- }
- -re "type = (struct|class) VA \{(${ws}public:|)${ws}int va;((${ws}VA & operator=\\(VA const ?&\\);)|(${ws}VA\\(VA const ?&\\);)|(${ws}VA\\((void|)\\);))*${ws}\}.*$gdb_prompt $" {
- pass "ptype VA (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype VA"
- }
- timeout {
- fail "ptype VA (timeout)"
- }
- }
-
- send_gdb "ptype VB\n"
- gdb_expect {
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const ?&\\);${ws}VB\\((VB const|const VB) ?&\\);${ws}VB\\((void|)\\);${ws}int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);${ws}\}.*$gdb_prompt $" {
- pass "ptype VB"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\((void|)\\);${ws}virtual int vvb \\((void|)\\);${ws}\}.*$gdb_prompt $" {
- pass "ptype VB (aCC)"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const ?&\\);)|(${ws}VB\\(VB const ?&\\);)|(${ws}VB\\((void|)\\);)|(${ws}int fvb\\((void|)\\);)|(${ws}virtual int vvb\\((void|)\\);))*${ws}\}.*$gdb_prompt $" {
- pass "ptype VB (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype VB"
- }
- timeout {
- fail "ptype VB (timeout)"
- }
- }
-
- send_gdb "ptype V\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype V"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype V (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype V (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype V"
- }
- timeout {
- fail "ptype V (timeout)"
- }
- }
-
- # The format of a g++ virtual base pointer.
- set vbptr "(_vb\[$.\]|__vb_)\[0-9\]?"
-
- send_gdb "ptype A\n"
- gdb_expect {
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype A"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\((A const|const A) ?&\\);${ws}A\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype A"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype A (aCC)"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype A (obsolescent gcc or gdb)"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}FOO;${ws}int a;${ws}public:${ws}virtual int f.void.;${ws}\}$nl$gdb_prompt $" {
- # This happens because the type is defined only after it is
- # too late.
- fail "ptype A (known failure with gcc cygnus-2.4.5-930417)"
- # Many of the rest of these tests have the same problem.
- return 0
- }
- -re ".*$gdb_prompt $" {
- fail "ptype A"
- }
- timeout {
- fail "ptype A (timeout)"
- }
- }
-
- send_gdb "ptype B\n"
- gdb_expect {
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype B"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\((B const|const B) ?&\\);${ws}B\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype B"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype B (aCC)"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(int, B const ?&\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype B (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype B"
- }
- timeout {
- fail "ptype B (timeout)"
- }
- }
-
- send_gdb "ptype C\n"
- gdb_expect {
- -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype C"
- }
- -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\((C const|const C) ?&\\);${ws}C\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype C"
- }
- -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
- pass "ptype C (aCC)"
- }
- -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const ?&\\);)|(${ws}C\\(int, C const ?&\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype C (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype C"
- }
- timeout {
- fail "ptype C (timeout)"
- }
- }
-
- send_gdb "ptype AD\n"
- gdb_expect {
- -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const ?&\\);${ws}AD\\((AD const|const AD) ?&\\);${ws}AD\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype AD"
- }
- -re "type = class AD \{${ws}public:${ws}virtual int vg \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype AD (aCC)"
- }
- -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const ?&\\);)|(${ws}AD\\(AD const ?&\\);)|(${ws}AD\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype AD (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype AD"
- }
- timeout {
- fail "ptype AD (timeout)"
- }
- }
-
- send_gdb "ptype D\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype D"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype D"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype D (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype D (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype D"
- }
- timeout {
- fail "ptype D (timeout)"
- }
- }
-
- send_gdb "ptype E\n"
- gdb_expect {
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype E"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\((E const|const E) ?&\\);${ws}E\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype E"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\((void|)\\);${ws}virtual int vg \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype E (aCC)"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\(int, E const ?&\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype E (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype E"
- }
- timeout {
- fail "ptype E (timeout)"
- }
- }
-
- send_gdb "ptype dd\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype dd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype dd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype dd (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype dd (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype dd"
- }
- timeout {
- fail "ptype dd (timeout)"
- }
- }
-
- send_gdb "ptype ppd\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype ppd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype ppd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype ppd (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype ppd (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype ppd"
- }
- timeout {
- fail "ptype ppd (timeout)"
- }
- }
-
- send_gdb "ptype pAd\n"
- gdb_expect {
- -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const ?&\\);${ws}AD\\((AD const|const AD) ?&\\);${ws}AD\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAd"
- }
- -re "type = class AD \{${ws}public:${ws}virtual int vg \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAd (aCC)"
- }
- -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const ?&\\);)|(${ws}AD\\(AD const ?&\\);)|(${ws}AD\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAd (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pAd"
- }
- timeout {
- fail "ptype pAd (timeout)"
- }
- }
-
- send_gdb "ptype a\n"
- gdb_expect {
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype a"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\((A const|const A) ?&\\);${ws}A\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype a"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype a (aCC)"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype a (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype a"
- }
- timeout {
- fail "ptype a (timeout)"
- }
- }
-
- send_gdb "ptype b\n"
- gdb_expect {
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype b"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\((B const|const B) ?&\\);${ws}B\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype b"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype b (aCC)"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(int, B const ?&\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype b (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype b"
- }
- timeout {
- fail "ptype b (timeout)"
- }
- }
-
- send_gdb "ptype c\n"
- gdb_expect {
- -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\(int, C const ?&\\);${ws}C\\(int\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype c"
- }
- -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}C & operator=\\(C const ?&\\);${ws}C\\((C const|const C) ?&\\);${ws}C\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype c"
- }
- -re "type = class C : public virtual V \{${ws}public:${ws}int c;${ws}\}$nl$gdb_prompt $" {
- pass "ptype c (aCC)"
- }
- -re "type = class C : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int c;((${ws}C & operator=\\(C const ?&\\);)|(${ws}C\\(int, C const ?&\\);)|(${ws}C\\(int\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype c (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype c"
- }
- timeout {
- fail "ptype c (timeout)"
- }
- }
-
- send_gdb "ptype d\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype d"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype d"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype d (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype d (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype d"
- }
- timeout {
- fail "ptype d (timeout)"
- }
- }
-
- send_gdb "ptype e\n"
- gdb_expect {
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype e"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\((E const|const E) ?&\\);${ws}E\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype e"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\((void|)\\);${ws}virtual int vg \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype e (aCC)"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\(int, E const ?&\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype e (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype e"
- }
- timeout {
- fail "ptype e (timeout)"
- }
- }
-
- send_gdb "ptype v\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype v"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype v (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype v (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype v"
- }
- timeout {
- fail "ptype v (timeout)"
- }
- }
-
- send_gdb "ptype vb\n"
- gdb_expect {
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const ?&\\);${ws}VB\\((VB const|const VB) ?&\\);${ws}VB\\((void|)\\);${ws}int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype vb"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\((void|)\\);${ws}virtual int vvb \\((void|)\\);${ws}\}$nl$gdb_prompt $" {
- pass "ptype vb (aCC)"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const ?&\\);)|(${ws}VB\\(VB const ?&\\);)|(${ws}VB\\((void|)\\);)|(${ws}int fvb\\((void|)\\);)|(${ws}virtual int vvb\\((void|)\\);))*${ws}\}$nl$gdb_prompt $" {
- pass "ptype vb (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype vb"
- }
- timeout {
- fail "ptype vb (timeout)"
- }
- }
-
- send_gdb "ptype pAa\n"
- gdb_expect {
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAa"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\((A const|const A) ?&\\);${ws}A\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAa"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAa (aCC)"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAa (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pAa"
- }
- timeout {
- fail "ptype pAa (timeout)"
- }
- }
-
- send_gdb "ptype pAe\n"
- gdb_expect {
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\(int, A const ?&\\);${ws}A\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAe"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}A & operator=\\(A const ?&\\);${ws}A\\((A const|const A) ?&\\);${ws}A\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAe"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}int a;${ws}public:${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAe (aCC)"
- }
- -re "type = class A : public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}int a;${ws}public:((${ws}A & operator=\\(A const ?&\\);)|(${ws}A\\(int, A const ?&\\);)|(${ws}A\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pAe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pAe"
- }
- timeout {
- fail "ptype pAe (timeout)"
- }
- }
-
- send_gdb "ptype pBe\n"
- gdb_expect {
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\(int, B const ?&\\);${ws}B\\(int\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pBe"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}B & operator=\\(B const ?&\\);${ws}B\\((B const|const B) ?&\\);${ws}B\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pBe"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:${ws}virtual int f \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pBe (aCC)"
- }
- -re "type = class B : public A \{${ws}private:${ws}int b;${ws}public:((${ws}B & operator=\\(B const ?&\\);)|(${ws}B\\(int, B const ?&\\);)|(${ws}B\\(int\\);)|(${ws}virtual int f\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pBe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pBe"
- }
- timeout {
- fail "ptype pBe (timeout)"
- }
- }
-
- send_gdb "ptype pDd\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDd"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDd (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDd (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pDd"
- }
- timeout {
- fail "ptype pDd (timeout)"
- }
- }
-
- send_gdb "ptype pDe\n"
- gdb_expect {
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\(int, D const ?&\\);${ws}D\\(int\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDe"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}D & operator=\\(D const ?&\\);${ws}D\\((D const|const D) ?&\\);${ws}D\\((void|)\\);${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDe"
- }
- -re "type = class D : public AD, public virtual V \{${ws}public:${ws}int d;${ws}static void s\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vd\\((void|)\\);${ws}int fd\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDe (aCC)"
- }
- -re "type = class D : public AD, public virtual V \{${ws}private:${ws}V \\*${vbptr}V;${ws}public:${ws}int d;((${ws}D & operator=\\(D const ?&\\);)|(${ws}D\\(int, D const ?&\\);)|(${ws}D\\(int\\);)|(${ws}static void s\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vd\\((void|)\\);)|(${ws}int fd\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pDe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pDe"
- }
- timeout {
- fail "ptype pDe (timeout)"
- }
- }
-
- send_gdb "ptype pVa\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVa"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVa (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVa (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pVa"
- }
- timeout {
- fail "ptype pVa (timeout)"
- }
- }
-
- send_gdb "ptype pVv\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVv"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVv (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVv (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pVv"
- }
- timeout {
- fail "ptype pVv (timeout)"
- }
- }
-
- send_gdb "ptype pVe\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVe"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVe (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pVe"
- }
- timeout {
- fail "ptype pVe (timeout)"
- }
- }
-
- send_gdb "ptype pVd\n"
- gdb_expect {
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}V & operator=\\(V const ?&\\);${ws}V\\((V const|const V) ?&\\);${ws}V\\((void|)\\);${ws}int f\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVd"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;${ws}int f \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVd (aCC)"
- }
- -re "type = class V : public VA, public VB \{${ws}public:${ws}int w;((${ws}V & operator=\\(V const ?&\\);)|(${ws}V\\(V const ?&\\);)|(${ws}V\\((void|)\\);)|(${ws}int f\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVd (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pVd"
- }
- timeout {
- fail "ptype pVd (timeout)"
- }
- }
-
- send_gdb "ptype pADe\n"
- gdb_expect {
- -re "type = class AD \{${ws}public:${ws}AD & operator=\\(AD const ?&\\);${ws}AD\\((AD const|const AD) ?&\\);${ws}AD\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pADe"
- }
- -re "type = class AD \{${ws}public:${ws}virtual int vg \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pADe (aCC)"
- }
- -re "type = class AD \{${ws}public:((${ws}AD & operator=\\(AD const ?&\\);)|(${ws}AD\\(AD const ?&\\);)|(${ws}AD\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pADe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pADe"
- }
- timeout {
- fail "ptype pADe (timeout)"
- }
- }
-
- send_gdb "ptype pEe\n"
- gdb_expect {
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\(int, E const ?&\\);${ws}E\\(int\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pEe"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}E & operator=\\(E const ?&\\);${ws}E\\((E const|const E) ?&\\);${ws}E\\((void|)\\);${ws}virtual int f\\((void|)\\);${ws}virtual int vg\\((void|)\\);${ws}virtual int vv\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pEe"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;${ws}virtual int f \\((void|)\\);${ws}virtual int vg \\((void|)\\);${ws}virtual int vv \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pEe (aCC)"
- }
- -re "type = class E : public B, public virtual V, public D, public C \{${ws}public:${ws}int e;((${ws}E & operator=\\(E const ?&\\);)|(${ws}E\\(int, E const ?&\\);)|(${ws}E\\(int\\);)|(${ws}virtual int f\\((void|)\\);)|(${ws}virtual int vg\\((void|)\\);)|(${ws}virtual int vv\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pEe (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pEe"
- }
- timeout {
- fail "ptype pEe (timeout)"
- }
- }
-
- send_gdb "ptype pVB\n"
- gdb_expect {
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}VB & operator=\\(VB const ?&\\);${ws}VB\\((VB const|const VB) ?&\\);${ws}VB\\((void|)\\);${ws}int fvb\\((void|)\\);${ws}virtual int vvb\\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVB"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;${ws}int fvb \\((void|)\\);${ws}virtual int vvb \\((void|)\\);${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVB (aCC)"
- }
- -re "type = class VB \{${ws}public:${ws}int vb;((${ws}VB & operator=\\(VB const ?&\\);)|(${ws}VB\\(VB const ?&\\);)|(${ws}VB\\((void|)\\);)|(${ws}int fvb\\((void|)\\);)|(${ws}virtual int vvb\\((void|)\\);))*${ws}\} \[*\]+$nl$gdb_prompt $" {
- pass "ptype pVB (obsolescent gcc or gdb)"
- }
- -re ".*$gdb_prompt $" {
- fail "ptype pVB"
- }
- timeout {
- fail "ptype pVB (timeout)"
- }
- }
-}
-
-#
-# Test calling of virtual functions.
-#
-
-proc test_virtual_calls {} {
- global gdb_prompt
- global GDB
- global nl
- global gcc_compiled
-
- if [target_info exists gdb,cannot_call_functions] {
- setup_xfail "*-*-*" 2416
- fail "This target can not call functions"
- return 0
- }
-
- send_gdb "print pAe->f()\n"
- gdb_expect {
- -re ".* = 20$nl$gdb_prompt $" { pass "print pAe->f()" }
- -re "Cannot invoke functions on this machine.*$gdb_prompt $" {
- fail "print pAe->f() (cannot invoke functions, skipping virtual calls)"
- return 0
- }
- -re ".*Cannot access memory at address 0x8.*$gdb_prompt $" {
- fail "print pAe->f() \
-(known failure with gcc cygnus-2.4.5-930417, skipping virtual calls)"
- return 0
- }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pAe->f()"
- }
- -re ".*$gdb_prompt $" { fail "print pAe->f()" }
- timeout { fail "print pAe->f() (timeout)" }
- eof { fail "print pAe->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pAa->f()\n"
- gdb_expect {
- -re ".* = 1$nl$gdb_prompt $" { pass "print pAa->f()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pAa->f()"
- }
- -re ".*$gdb_prompt $" { fail "print pAa->f()" }
- timeout { fail "print pAa->f() (timeout)" }
- eof { fail "print pAa->f() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pDe->vg()\n"
- gdb_expect {
- -re ".* = 202$nl$gdb_prompt $" { pass "print pDe->vg()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pDe->vg()"
- }
- -re ".*$gdb_prompt $" { fail "print pDe->vg()" }
- timeout { fail "print pDe->vg() (timeout)" }
- eof { fail "print pDe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pADe->vg()\n"
- gdb_expect {
- -re ".* = 202$nl$gdb_prompt $" { pass "print pADe->vg()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pADe->vg()"
- }
- -re ".*$gdb_prompt $" { fail "print pADe->vg()" }
- timeout { fail "print pADe->vg() (timeout)" }
- eof { fail "print pADe->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pDd->vg()\n"
- gdb_expect {
- -re ".* = 101$nl$gdb_prompt $" { pass "print pDd->vg()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pDd->vg()"
- }
- -re ".*$gdb_prompt $" { fail "print pDd->vg()" }
- timeout { fail "print pDd->vg() (timeout)" }
- eof { fail "print pDd->vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pEe->vvb()\n"
- gdb_expect {
- -re ".* = 411$nl$gdb_prompt $" { pass "print pEe->vvb()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pEe->vvb()"
- }
- -re ".*$gdb_prompt $" { fail "print pEe->vvb()" }
- timeout { fail "print pEe->vvb() (timeout)" }
- eof { fail "print pEe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pVB->vvb()\n"
- gdb_expect {
- -re ".* = 407$nl$gdb_prompt $" { pass "print pVB->vvb()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pVB->vvb()"
- }
- -re ".*$gdb_prompt $" { fail "print pVB->vvb()" }
- timeout { fail "print pVB->vvb() (timeout)" }
- eof { fail "print pVB->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pBe->vvb()\n"
- gdb_expect {
- -re ".* = 411$nl$gdb_prompt $" { pass "print pBe->vvb()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pBe->vvb()"
- }
- -re ".*$gdb_prompt $" { fail "print pBe->vvb()" }
- timeout { fail "print pBe->vvb() (timeout)" }
- eof { fail "print pBe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pDe->vvb()\n"
- gdb_expect {
- -re ".* = 411$nl$gdb_prompt $" { pass "print pDe->vvb()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pDe->vvb()"
- }
- -re ".*$gdb_prompt $" { fail "print pDe->vvb()" }
- timeout { fail "print pDe->vvb() (timeout)" }
- eof { fail "print pDe->vvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pEe->vd()\n"
- gdb_expect {
- -re ".* = 282$nl$gdb_prompt $" { pass "print pEe->vd()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pEe->vd()"
- }
- -re ".*$gdb_prompt $" { fail "print pEe->vd()" }
- timeout { fail "print pEe->vd() (timeout)" }
- eof { fail "print pEe->vd() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- send_gdb "print pEe->fvb()\n"
- gdb_expect {
- -re ".* = 311$nl$gdb_prompt $" { pass "print pEe->fvb()" }
- -re "Cannot resolve .* to any overloaded instance.*$gdb_prompt $" {
- setup_xfail hppa*-*-* CLLbs16899
- fail "print pEe->fvb()"
- }
- -re ".*$gdb_prompt $" { fail "print pEe->fvb()" }
- timeout { fail "print pEe->fvb() (timeout)" }
- eof { fail "print pEe->fvb() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=2.95.3, goption=-gdwarf-2.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=2.95.3, goption=-gstabs+.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=3.0.3, goption=-gdwarf-2.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=3.0.3, goption=-gstabs+.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=3.0.4-20020215, goption=-gdwarf-2.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=3.0.4-20020215, goption=-gstabs+.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=gcc-3_0-branch%2002-02-16, goption=-gdwarf-2.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=gcc-3_0-branch%2002-02-16, goption=-gstabs+.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=HEAD%2002-02-16, goption=-gdwarf-2.
- #
- # fails on target=native, host=i686-pc-linux-gnu%rh-7.2,
- # gdb=HEAD%2002-02-16, gcc=HEAD%2002-02-16, goption=-gstabs+.
- #
- # -- chastain 2002-02-20
-
- send_gdb "print pEe->D::vg()\n"
- gdb_expect {
- -re ".* = 102$nl$gdb_prompt $" { pass "print pEe->D::vg()" }
- -re "Attempt to take address of value not located in memory.\r\n$gdb_prompt $"
- { kfail "gdb/1064" "print pEe->D::vg()" }
- -re ".*$gdb_prompt $" { fail "print pEe->D::vg()" }
- timeout { fail "print pEe->D::vg() (timeout)" }
- eof { fail "print pEe->D::vg() ($GDB dumped core) (FIXME)" ; gdb_virtfunc_restart; return }
- }
-}
-
-proc do_tests {} {
- global prms_id
- global bug_id
-
- set prms_id 0
- set bug_id 0
-
- gdb_start;
- gdb_virtfunc_init;
-
- runto_main
-
- test_ptype_of_classes
-
- if [ runto 'test_calls' ] then {
- test_virtual_calls
- }
-}
-
-do_tests
diff --git a/gdb/testsuite/gdb.objc/Makefile.in b/gdb/testsuite/gdb.objc/Makefile.in
deleted file mode 100644
index 381e48a0789..00000000000
--- a/gdb/testsuite/gdb.objc/Makefile.in
+++ /dev/null
@@ -1,22 +0,0 @@
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-EXECUTABLES = basicclass
-
-all:
- @echo "Nothing to be done for all..."
-
-info:
-install-info:
-dvi:
-install:
-uninstall: force
-installcheck:
-check:
-
-clean mostlyclean:
- -rm -f *~ *.o *.ci
- -rm -f core ${EXECUTABLES}
-
-distclean maintainer-clean realclean: clean
- -rm -f Makefile config.status config.log
diff --git a/gdb/testsuite/gdb.objc/basicclass.exp b/gdb/testsuite/gdb.objc/basicclass.exp
deleted file mode 100644
index 44b709e3e27..00000000000
--- a/gdb/testsuite/gdb.objc/basicclass.exp
+++ /dev/null
@@ -1,199 +0,0 @@
-# Copyright 2003 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.
-
-# This file was written by Adam Fedor (fedor@gnu.org)
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-set testfile "basicclass"
-set srcfile ${testfile}.m
-set binfile ${objdir}/${subdir}/${testfile}
-
-#
-# Objective-C program compilation isn't standard. We need to figure out
-# which libraries to link in. Most of the time it uses pthread
-#
-if {[gdb_compile_objc "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
-
-#
-# Deduce language of main()
-#
-
-proc deduce_language_of_main {} {
- global gdb_prompt
-
- # See what language gdb thinks main() is, prior to reading full symbols.
- # I think this fails for COFF targets.
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"auto; currently objective-c\".*$gdb_prompt $" {
- pass "deduced language is Objective-C, before full symbols"
- }
- -re ".*$gdb_prompt $" {
- fail "source language not correct for Objective-C (psymtabs only)"
- return
- }
- timeout {
- fail "can't show language (timeout)"
- return
- }
- }
-
- runto_main
-
- # See if our idea of the language has changed.
-
- send_gdb "show language\n"
- gdb_expect {
- -re ".* source language is \"auto; currently objective-c\".*$gdb_prompt $" {
- pass "deduced language is Objective-C, after full symbols"
- }
- -re ".*$gdb_prompt $" {
- fail "source language not correct for Objective-C (full symbols)"
- return
- }
- timeout {
- fail "can't show language (timeout)"
- return
- }
- }
-}
-
-proc do_objc_tests {} {
- global prms_id
- global bug_id
- global subdir
- global objdir
- global srcdir
- global binfile
- global gdb_prompt
-
- set prms_id 0
- set bug_id 0
-
- # Start with a fresh gdb.
-
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $binfile
-
- deduce_language_of_main
-}
-
-do_objc_tests
-
-#
-# Breakpoint tests
-#
-gdb_test "break doIt" \
- "Breakpoint.*at.* file .*$srcfile, line.29.*" \
- "breakpoint method"
-
-gdb_test "break takeArg:" \
- "Breakpoint.*at.* file .*$srcfile, line.34.*" \
- "breakpoint method with colon"
-
-gdb_test "break newWithArg:" \
- "Breakpoint.*at.* file .*$srcfile, line.22.*" \
- "breakpoint class method with colon"
-
-#
-# Continue until breakpoint (test re-setting breakpoint)
-#
-gdb_test continue \
- "Continuing\\..*Breakpoint \[0-9\]+, -.BasicClass takeArg:. \\(self=.*, _cmd=.*, arg=.*\\) at .*$srcfile:34.*" \
- "continue until method breakpoint"
-
-#
-# Test resetting breakpoints when re-running program
-#
-send_gdb "run\n"
-gdb_expect {
- -re "The program .* has been started already.*y or n. $" {
- send_gdb "y\n"
- exp_continue
- }
- -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:.*$gdb_prompt $"\
- { pass "resetting breakpoints when rerunning" }
- -re ".*$gdb_prompt $" { fail "resetting breakpoints when rerunning" }
- timeout { fail "resetting breakpoints when rerunning" }
-}
-
-#
-# Continue until breakpoint (test re-setting breakpoint)
-#
-gdb_test continue \
- "Continuing\\..*Breakpoint \[0-9\]+, -.BasicClass takeArg:. \\(self=.*, _cmd=.*, arg=.*\\) at .*$srcfile:34.*" \
- "continue until method breakpoint"
-
-#
-# Test printing objects
-#
-gdb_test "print object" \
- "\\$\[0-9\] = .*0x0" \
- " print an ivar of self"
-
-gdb_test "print self" \
- "\\$\[0-9\] = \\(.*BasicClass \\*\\) 0x\[0-9a-f\]+" \
- " print self"
-
-gdb_test "print \*self" \
- "\\$\[0-9\] = \{isa = 0x\[0-9a-f\]+, object = 0x0\}" \
- " print contents of self"
-
-#
-# Break in a category
-#
-gdb_test "break hiddenMethod" \
- "Breakpoint.*at.* file .*$srcfile, line.61." \
- "breakpoint in category method"
-
-
-#
-# Continue until breakpoint (test re-setting category breakpoint)
-#
-gdb_test continue \
- "Continuing\\..*Breakpoint \[0-9\]+, -.BasicClass\\(Private\\) hiddenMethod. \\(self=.*, _cmd=.*\\) at .*$srcfile:61.*" \
- "continue until category method"
-
-#
-# Test calling Objective-C methods
-#
-gdb_test "print \[self printHi\]" \
- "Hi.*\\$\[0-9\] = \[0-9\]+" \
- "Call an Objective-C method with no arguments"
-
-gdb_test "print \[self printNumber: 42\]" \
- "42.*\\$\[0-9\] = 43" \
- "Call an Objective-C method with one argument"
-
-#
-# Test printing the object description
-#
-gdb_test "print-object object" \
- "BasicClass gdb test object" \
- "Use of the print-object command"
-
-gdb_test "po self" \
- "BasicClass gdb test object" \
- "Use of the po (print-object) command"
-
-
diff --git a/gdb/testsuite/gdb.objc/basicclass.m b/gdb/testsuite/gdb.objc/basicclass.m
deleted file mode 100644
index 0de12db25a1..00000000000
--- a/gdb/testsuite/gdb.objc/basicclass.m
+++ /dev/null
@@ -1,81 +0,0 @@
-#include <objc/Object.h>
-
-@interface BasicClass: Object
-{
- id object;
-}
-+ newWithArg: arg;
-- doIt;
-- takeArg: arg;
-- printHi;
-- (int) printNumber: (int)number;
-- (const char *) myDescription;
-@end
-
-@interface BasicClass (Private)
-- hiddenMethod;
-@end
-
-@implementation BasicClass
-+ newWithArg: arg
-{
- id obj = [self new];
- [obj takeArg: arg];
- return obj;
-}
-
-- doIt
-{
- return self;
-}
-
-- takeArg: arg
-{
- object = arg;
- [self hiddenMethod];
- return self;
-}
-
-- printHi
-{
- printf("Hi\n");
- return self;
-}
-
-- (int) printNumber: (int)number
-{
- printf("%d\n", number);
- return number+1;
-}
-
-- (const char *) myDescription
-{
- return "BasicClass gdb test object";
-}
-
-@end
-
-@implementation BasicClass (Private)
-- hiddenMethod
-{
- return self;
-}
-@end
-
-int main (int argc, const char *argv[])
-{
- id obj;
- obj = [BasicClass new];
- [obj takeArg: obj];
- return 0;
-}
-
-const char *_NSPrintForDebugger(id object)
-{
- /* This is not really what _NSPrintForDebugger should do, but it
- is a simple test if gdb can call this function */
- if (object && [object respondsTo: @selector(myDescription)])
- return [object myDescription];
-
- return NULL;
-}
diff --git a/gdb/thread-db.c b/gdb/thread-db.c
index 0a6138b3afa..a039ca28add 100644
--- a/gdb/thread-db.c
+++ b/gdb/thread-db.c
@@ -775,64 +775,73 @@ check_event (ptid_t ptid)
td_thrinfo_t ti;
td_err_e err;
CORE_ADDR stop_pc;
+ int loop = 0;
/* Bail out early if we're not at a thread event breakpoint. */
stop_pc = read_pc_pid (ptid) - DECR_PC_AFTER_BREAK;
if (stop_pc != td_create_bp_addr && stop_pc != td_death_bp_addr)
return;
- err = td_ta_event_getmsg_p (thread_agent, &msg);
- if (err != TD_OK)
+ /* If we are at a create breakpoint, we do not know what new lwp
+ was created and cannot specifically locate the event message for it.
+ We have to call td_ta_event_getmsg() to get
+ the latest message. Since we have no way of correlating whether
+ the event message we get back corresponds to our breakpoint, we must
+ loop and read all event messages, processing them appropriately.
+ This guarantees we will process the correct message before continuing
+ from the breakpoint.
+
+ Currently, death events are not enabled. If they are enabled,
+ the death event can use the td_thr_event_getmsg() interface to
+ get the message specifically for that lwp and avoid looping
+ below. */
+
+ loop = 1;
+
+ do
{
- if (err == TD_NOMSG)
- return;
+ err = td_ta_event_getmsg_p (thread_agent, &msg);
+ if (err != TD_OK)
+ {
+ if (err == TD_NOMSG)
+ return;
- error ("Cannot get thread event message: %s", thread_db_err_str (err));
- }
+ error ("Cannot get thread event message: %s",
+ thread_db_err_str (err));
+ }
- err = td_thr_get_info_p (msg.th_p, &ti);
- if (err != TD_OK)
- error ("check_event: cannot get thread info: %s",
- thread_db_err_str (err));
+ err = td_thr_get_info_p (msg.th_p, &ti);
+ if (err != TD_OK)
+ error ("Cannot get thread info: %s", thread_db_err_str (err));
- ptid = BUILD_THREAD (ti.ti_tid, GET_PID (ptid));
+ ptid = BUILD_THREAD (ti.ti_tid, GET_PID (ptid));
- switch (msg.event)
- {
- case TD_CREATE:
-#if 0
- /* FIXME: kettenis/2000-08-26: Since we use td_ta_event_getmsg,
- there is no guarantee that the breakpoint will match the
- event. Should we use td_thr_event_getmsg instead? */
+ switch (msg.event)
+ {
+ case TD_CREATE:
- if (stop_pc != td_create_bp_addr)
- error ("Thread creation event doesn't match breakpoint.");
-#endif
+ /* We may already know about this thread, for instance when the
+ user has issued the `info threads' command before the SIGTRAP
+ for hitting the thread creation breakpoint was reported. */
+ if (!in_thread_list (ptid))
+ attach_thread (ptid, msg.th_p, &ti, 1);
- /* We may already know about this thread, for instance when the
- user has issued the `info threads' command before the SIGTRAP
- for hitting the thread creation breakpoint was reported. */
- if (!in_thread_list (ptid))
- attach_thread (ptid, msg.th_p, &ti, 1);
- return;
+ break;
- case TD_DEATH:
-#if 0
- /* FIXME: See TD_CREATE. */
+ case TD_DEATH:
- if (stop_pc != td_death_bp_addr)
- error ("Thread death event doesn't match breakpoint.");
-#endif
+ if (!in_thread_list (ptid))
+ error ("Spurious thread death event.");
- if (!in_thread_list (ptid))
- error ("Spurious thread death event.");
+ detach_thread (ptid, 1);
- detach_thread (ptid, 1);
- return;
+ break;
- default:
- error ("Spurious thread event.");
+ default:
+ error ("Spurious thread event.");
+ }
}
+ while (loop);
}
static ptid_t
@@ -1011,6 +1020,18 @@ thread_db_mourn_inferior (void)
proc_handle.pid = 0;
target_beneath->to_mourn_inferior ();
+
+ /* Detach thread_db target ops if not dealing with a statically
+ linked threaded program. This allows a corefile to be debugged
+ after finishing debugging of a threaded program. At present,
+ debugging a statically-linked threaded program is broken, but
+ the check is added below in the event that it is fixed in the
+ future. */
+ if (!keep_thread_db)
+ {
+ unpush_target (&thread_db_ops);
+ using_thread_db = 0;
+ }
}
static int
diff --git a/gdb/top.c b/gdb/top.c
index fea71dfd87f..24410c4f53a 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -171,6 +171,11 @@ int target_executing = 0;
/* Level of control structure. */
static int control_level;
+/* Sbrk location on entry to main. Used for statistics only. */
+#ifdef HAVE_SBRK
+char *lim_at_start;
+#endif
+
/* Signal to catch ^Z typed while reading a command: SIGTSTP or SIGCONT. */
#ifndef STOP_SIGNAL
@@ -782,10 +787,8 @@ command_loop (void)
if (display_space)
{
#ifdef HAVE_SBRK
- extern char **environ;
char *lim = (char *) sbrk (0);
-
- space_at_cmd_start = (long) (lim - (char *) &environ);
+ space_at_cmd_start = lim - lim_at_start;
#endif
}
@@ -805,9 +808,8 @@ command_loop (void)
if (display_space)
{
#ifdef HAVE_SBRK
- extern char **environ;
char *lim = (char *) sbrk (0);
- long space_now = lim - (char *) &environ;
+ long space_now = lim - lim_at_start;
long space_diff = space_now - space_at_cmd_start;
printf_unfiltered ("Space used: %ld (%c%ld for this command)\n",
diff --git a/gdb/top.h b/gdb/top.h
index ca0b3d13dc6..b103040325e 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -70,5 +70,6 @@ extern char *source_error;
extern char *source_pre_error;
extern int history_expansion_p;
extern int server_command;
+extern char *lim_at_start;
#endif
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 0f896a49fb3..f415af12823 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -973,7 +973,7 @@ v850_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
CORE_ADDR regval;
- regval = extract_address (val, v850_register_raw_size (argreg));
+ regval = extract_unsigned_integer (val, v850_register_raw_size (argreg));
write_register (argreg, regval);
len -= v850_register_raw_size (argreg);
@@ -1068,8 +1068,8 @@ v850_extract_return_value (struct type *type, char *regbuf, char *valbuf)
/* Aggregates and return values > 8 bytes are returned in memory,
pointed to by R6. */
return_buffer =
- extract_address (regbuf + REGISTER_BYTE (E_V0_REGNUM),
- REGISTER_RAW_SIZE (E_V0_REGNUM));
+ extract_unsigned_integer (regbuf + REGISTER_BYTE (E_V0_REGNUM),
+ REGISTER_RAW_SIZE (E_V0_REGNUM));
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
}
@@ -1086,8 +1086,8 @@ v850_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
static CORE_ADDR
v850_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf + v850_register_byte (E_V0_REGNUM),
- v850_register_raw_size (E_V0_REGNUM));
+ return extract_unsigned_integer (regbuf + v850_register_byte (E_V0_REGNUM),
+ v850_register_raw_size (E_V0_REGNUM));
}
static void
diff --git a/gdb/valops.c b/gdb/valops.c
index 3e8589481f7..e6fb6c8dec4 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -605,10 +605,7 @@ value_assign (struct value *toval, struct value *fromval)
}
else
{
- for (frame = get_current_frame ();
- frame && get_frame_base (frame) != VALUE_FRAME (toval);
- frame = get_prev_frame (frame))
- ;
+ frame = frame_find_by_id (VALUE_FRAME_ID (toval));
value_reg = VALUE_FRAME_REGNUM (toval);
}
diff --git a/gdb/value.h b/gdb/value.h
index 254c82f1cb2..d50626edf17 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -25,6 +25,7 @@
#define VALUE_H 1
#include "doublest.h"
+#include "frame.h" /* For struct frame_id. */
struct block;
struct expression;
@@ -77,12 +78,12 @@ struct value
For BITS_BIG_ENDIAN=1 targets, it is the position of the MSB. */
int bitpos;
- /* Frame value is relative to. In practice, this address is only
- used if the value is stored in several registers in other than
- the current frame, and these registers have not all been saved
- at the same place in memory. This will be described in the
- lval enum above as "lval_reg_frame_relative". */
- CORE_ADDR frame_addr;
+ /* Frame value is relative to. In practice, this ID is only used if
+ the value is stored in several registers in other than the
+ current frame, and these registers have not all been saved at the
+ same place in memory. This will be described in the lval enum
+ above as "lval_reg_frame_relative". */
+ struct frame_id frame_id;
/* Type of the value. */
struct type *type;
@@ -216,7 +217,7 @@ extern int value_fetch_lazy (struct value *val);
#define VALUE_ADDRESS(val) (val)->location.address
#define VALUE_INTERNALVAR(val) (val)->location.internalvar
#define VALUE_FRAME_REGNUM(val) ((val)->location.regnum)
-#define VALUE_FRAME(val) ((val)->frame_addr)
+#define VALUE_FRAME_ID(val) ((val)->frame_id)
#define VALUE_OFFSET(val) (val)->offset
#define VALUE_BITSIZE(val) (val)->bitsize
#define VALUE_BITPOS(val) (val)->bitpos
diff --git a/gdb/values.c b/gdb/values.c
index db667669ff5..42395c886e2 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -90,7 +90,7 @@ allocate_value (struct type *type)
VALUE_ENCLOSING_TYPE (val) = type;
VALUE_LVAL (val) = not_lval;
VALUE_ADDRESS (val) = 0;
- VALUE_FRAME (val) = 0;
+ VALUE_FRAME_ID (val) = null_frame_id;
VALUE_OFFSET (val) = 0;
VALUE_BITPOS (val) = 0;
VALUE_BITSIZE (val) = 0;
@@ -222,7 +222,7 @@ value_copy (struct value *arg)
VALUE_OFFSET (val) = VALUE_OFFSET (arg);
VALUE_BITPOS (val) = VALUE_BITPOS (arg);
VALUE_BITSIZE (val) = VALUE_BITSIZE (arg);
- VALUE_FRAME (val) = VALUE_FRAME (arg);
+ VALUE_FRAME_ID (val) = VALUE_FRAME_ID (arg);
VALUE_REGNO (val) = VALUE_REGNO (arg);
VALUE_LAZY (val) = VALUE_LAZY (arg);
VALUE_OPTIMIZED_OUT (val) = VALUE_OPTIMIZED_OUT (arg);
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 814fedd8543..fe96e7f8488 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -300,7 +300,8 @@ vax_store_return_value (struct type *valtype, char *valbuf)
static CORE_ADDR
vax_extract_struct_value_address (char *regbuf)
{
- return (extract_address (regbuf + REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
+ return (extract_unsigned_integer (regbuf + REGISTER_BYTE (0),
+ REGISTER_RAW_SIZE (0)));
}
static const unsigned char *
diff --git a/gdb/version.in b/gdb/version.in
index 4c17a67d46c..0577be76cc3 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2003-05-28-cvs
+2003-06-06-cvs
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c
index 044236ce320..4a989ce07a7 100644
--- a/gdb/x86-64-linux-nat.c
+++ b/gdb/x86-64-linux-nat.c
@@ -25,20 +25,30 @@
#include "inferior.h"
#include "gdbcore.h"
#include "regcache.h"
+
#include "gdb_assert.h"
#include "gdb_string.h"
-#include "x86-64-tdep.h"
-
#include <sys/ptrace.h>
#include <sys/debugreg.h>
#include <sys/syscall.h>
#include <sys/procfs.h>
#include <sys/reg.h>
+/* Prototypes for supply_gregset etc. */
+#include "gregset.h"
+
+#include "x86-64-tdep.h"
+
+/* The register sets used in GNU/Linux ELF core-dumps are identical to
+ the register sets used by `ptrace'. The corresponding types are
+ `elf_gregset_t' for the general-purpose registers (with
+ `elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
+ for the floating-point registers. */
+
/* Mapping between the general-purpose registers in `struct user'
format and GDB's register array layout. */
-
-static int x86_64_regmap[] = {
+static int regmap[] =
+{
RAX, RBX, RCX, RDX,
RSI, RDI, RBP, RSP,
R8, R9, R10, R11,
@@ -47,85 +57,12 @@ static int x86_64_regmap[] = {
DS, ES, FS, GS
};
-static unsigned long
-x86_64_linux_dr_get (int regnum)
-{
- int tid;
- unsigned long value;
-
- /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
- multi-threaded processes here. For now, pretend there is just
- one thread. */
- tid = PIDGET (inferior_ptid);
-
- /* FIXME: kettenis/2001-03-27: Calling perror_with_name if the
- ptrace call fails breaks debugging remote targets. The correct
- way to fix this is to add the hardware breakpoint and watchpoint
- stuff to the target vectore. For now, just return zero if the
- ptrace call fails. */
- errno = 0;
- value = ptrace (PT_READ_U, tid,
- offsetof (struct user, u_debugreg[regnum]), 0);
- if (errno != 0)
-#if 0
- perror_with_name ("Couldn't read debug register");
-#else
- return 0;
-#endif
-
- return value;
-}
-
-static void
-x86_64_linux_dr_set (int regnum, unsigned long value)
-{
- int tid;
-
- /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
- multi-threaded processes here. For now, pretend there is just
- one thread. */
- tid = PIDGET (inferior_ptid);
-
- errno = 0;
- ptrace (PT_WRITE_U, tid, offsetof (struct user, u_debugreg[regnum]), value);
- if (errno != 0)
- perror_with_name ("Couldn't write debug register");
-}
-
-void
-x86_64_linux_dr_set_control (unsigned long control)
-{
- x86_64_linux_dr_set (DR_CONTROL, control);
-}
-
-void
-x86_64_linux_dr_set_addr (int regnum, CORE_ADDR addr)
-{
- gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
-
- x86_64_linux_dr_set (DR_FIRSTADDR + regnum, addr);
-}
-
-void
-x86_64_linux_dr_reset_addr (int regnum)
-{
- gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
-
- x86_64_linux_dr_set (DR_FIRSTADDR + regnum, 0L);
-}
-
-unsigned long
-x86_64_linux_dr_get_status (void)
-{
- return x86_64_linux_dr_get (DR_STATUS);
-}
-
-
-/* The register sets used in GNU/Linux ELF core-dumps are identical to
- the register sets used by `ptrace'. */
+/* Which ptrace request retrieves which registers?
+ These apply to the corresponding SET requests as well. */
#define GETREGS_SUPPLIES(regno) \
- (0 <= (regno) && (regno) < x86_64_num_gregs)
+ (0 <= (regno) && (regno) < X86_64_NUM_GREGS)
+
#define GETFPREGS_SUPPLIES(regno) \
(FP0_REGNUM <= (regno) && (regno) <= MXCSR_REGNUM)
@@ -137,13 +74,13 @@ x86_64_linux_dr_get_status (void)
in *GREGSETP. */
void
-supply_gregset (elf_gregset_t * gregsetp)
+supply_gregset (elf_gregset_t *gregsetp)
{
elf_greg_t *regp = (elf_greg_t *) gregsetp;
int i;
- for (i = 0; i < x86_64_num_gregs; i++)
- supply_register (i, (char *) (regp + x86_64_regmap[i]));
+ for (i = 0; i < X86_64_NUM_GREGS; i++)
+ supply_register (i, regp + regmap[i]);
}
/* Fill register REGNO (if it is a general-purpose register) in
@@ -151,14 +88,14 @@ supply_gregset (elf_gregset_t * gregsetp)
do this for all registers. */
void
-fill_gregset (elf_gregset_t * gregsetp, int regno)
+fill_gregset (elf_gregset_t *gregsetp, int regno)
{
elf_greg_t *regp = (elf_greg_t *) gregsetp;
int i;
- for (i = 0; i < x86_64_num_gregs; i++)
- if ((regno == -1 || regno == i))
- regcache_collect (i, (char *) (regp + x86_64_regmap[i]));
+ for (i = 0; i < X86_64_NUM_GREGS; i++)
+ if (regno == -1 || regno == i)
+ regcache_collect (i, regp + regmap[i]);
}
/* Fetch all general-purpose registers from process/thread TID and
@@ -195,73 +132,23 @@ store_regs (int tid, int regno)
/* Transfering floating-point registers between GDB, inferiors and cores. */
-static void *
-x86_64_fxsave_offset (elf_fpregset_t * fxsave, int regnum)
-{
- const char *reg_name;
- int reg_index;
-
- gdb_assert (x86_64_num_gregs - 1 < regnum && regnum < x86_64_num_regs);
-
- reg_name = x86_64_register_name (regnum);
-
- if (reg_name[0] == 's' && reg_name[1] == 't')
- {
- reg_index = reg_name[2] - '0';
- return &fxsave->st_space[reg_index * 2];
- }
-
- if (reg_name[0] == 'x' && reg_name[1] == 'm' && reg_name[2] == 'm')
- {
- reg_index = reg_name[3] - '0';
- return &fxsave->xmm_space[reg_index * 4];
- }
-
- if (strcmp (reg_name, "mxcsr") == 0)
- return &fxsave->mxcsr;
-
- return NULL;
-}
-
/* Fill GDB's register array with the floating-point and SSE register
- values in *FXSAVE. This function masks off any of the reserved
- bits in *FXSAVE. */
+ values in *FPREGSETP. */
void
-supply_fpregset (elf_fpregset_t * fxsave)
+supply_fpregset (elf_fpregset_t *fpregsetp)
{
- int i, reg_st0, reg_mxcsr;
-
- reg_st0 = x86_64_register_number ("st0");
- reg_mxcsr = x86_64_register_number ("mxcsr");
-
- gdb_assert (reg_st0 > 0 && reg_mxcsr > reg_st0);
-
- for (i = reg_st0; i <= reg_mxcsr; i++)
- supply_register (i, x86_64_fxsave_offset (fxsave, i));
+ x86_64_supply_fxsave ((char *) fpregsetp);
}
/* Fill register REGNUM (if it is a floating-point or SSE register) in
- *FXSAVE with the value in GDB's register array. If REGNUM is -1, do
- this for all registers. This function doesn't touch any of the
- reserved bits in *FXSAVE. */
+ *FPREGSETP with the value in GDB's register array. If REGNUM is
+ -1, do this for all registers. */
void
-fill_fpregset (elf_fpregset_t * fxsave, int regnum)
+fill_fpregset (elf_fpregset_t *fpregsetp, int regnum)
{
- int i, last_regnum = MXCSR_REGNUM;
- void *ptr;
-
- if (gdbarch_tdep (current_gdbarch)->num_xmm_regs == 0)
- last_regnum = FOP_REGNUM;
-
- for (i = FP0_REGNUM; i <= last_regnum; i++)
- if (regnum == -1 || regnum == i)
- {
- ptr = x86_64_fxsave_offset (fxsave, i);
- if (ptr)
- regcache_collect (i, ptr);
- }
+ x86_64_fill_fxsave ((char *) fpregsetp, regnum);
}
/* Fetch all floating-point registers from process/thread TID and store
@@ -308,8 +195,9 @@ fetch_inferior_registers (int regno)
int tid;
/* GNU/Linux LWP ID's are process ID's. */
- if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* Not a threaded program. */
+ tid = TIDGET (inferior_ptid);
+ if (tid == 0)
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
if (regno == -1)
{
@@ -335,16 +223,18 @@ fetch_inferior_registers (int regno)
}
/* Store register REGNO back into the child process. If REGNO is -1,
- do this for all registers (including the floating point and SSE
+ do this for all registers (including the floating-point and SSE
registers). */
+
void
store_inferior_registers (int regno)
{
int tid;
/* GNU/Linux LWP ID's are process ID's. */
- if ((tid = TIDGET (inferior_ptid)) == 0)
- tid = PIDGET (inferior_ptid); /* Not a threaded program. */
+ tid = TIDGET (inferior_ptid);
+ if (tid == 0)
+ tid = PIDGET (inferior_ptid); /* Not a threaded program. */
if (regno == -1)
{
@@ -370,123 +260,75 @@ store_inferior_registers (int regno)
}
-static const unsigned char linux_syscall[] = { 0x0f, 0x05 };
-
-#define LINUX_SYSCALL_LEN (sizeof linux_syscall)
-
-/* The system call number is stored in the %rax register. */
-#define LINUX_SYSCALL_REGNUM 0 /* %rax */
+static unsigned long
+x86_64_linux_dr_get (int regnum)
+{
+ int tid;
+ unsigned long value;
-/* We are specifically interested in the sigreturn and rt_sigreturn
- system calls. */
+ /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
+ multi-threaded processes here. For now, pretend there is just
+ one thread. */
+ tid = PIDGET (inferior_ptid);
-#ifndef SYS_sigreturn
-#define SYS_sigreturn __NR_sigreturn
-#endif
-#ifndef SYS_rt_sigreturn
-#define SYS_rt_sigreturn __NR_rt_sigreturn
+ /* FIXME: kettenis/2001-03-27: Calling perror_with_name if the
+ ptrace call fails breaks debugging remote targets. The correct
+ way to fix this is to add the hardware breakpoint and watchpoint
+ stuff to the target vectore. For now, just return zero if the
+ ptrace call fails. */
+ errno = 0;
+ value = ptrace (PT_READ_U, tid,
+ offsetof (struct user, u_debugreg[regnum]), 0);
+ if (errno != 0)
+#if 0
+ perror_with_name ("Couldn't read debug register");
+#else
+ return 0;
#endif
-/* Offset to saved processor flags, from <asm/sigcontext.h>. */
-#define LINUX_SIGCONTEXT_EFLAGS_OFFSET (152)
-/* Offset to saved processor registers from <asm/ucontext.h> */
-#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET (36)
-
-/* Interpreting register set info found in core files. */
-/* Provide registers to GDB from a core file.
-
- CORE_REG_SECT points to an array of bytes, which are the contents
- of a `note' from a core file which BFD thinks might contain
- register contents. CORE_REG_SIZE is its size.
-
- WHICH says which register set corelow suspects this is:
- 0 --- the general-purpose register set, in elf_gregset_t format
- 2 --- the floating-point register set, in elf_fpregset_t format
-
- REG_ADDR isn't used on GNU/Linux. */
+ return value;
+}
static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
- int which, CORE_ADDR reg_addr)
+x86_64_linux_dr_set (int regnum, unsigned long value)
{
- elf_gregset_t gregset;
- elf_fpregset_t fpregset;
- switch (which)
- {
- case 0:
- if (core_reg_size != sizeof (gregset))
- warning ("Wrong size gregset in core file.");
- else
- {
- memcpy (&gregset, core_reg_sect, sizeof (gregset));
- supply_gregset (&gregset);
- }
- break;
-
- case 2:
- if (core_reg_size != sizeof (fpregset))
- warning ("Wrong size fpregset in core file.");
- else
- {
- memcpy (&fpregset, core_reg_sect, sizeof (fpregset));
- supply_fpregset (&fpregset);
- }
- break;
-
- default:
- /* We've covered all the kinds of registers we know about here,
- so this must be something we wouldn't know what to do with
- anyway. Just ignore it. */
- break;
- }
-}
+ int tid;
-/* Register that we are able to handle GNU/Linux ELF core file formats. */
+ /* FIXME: kettenis/2001-01-29: It's not clear what we should do with
+ multi-threaded processes here. For now, pretend there is just
+ one thread. */
+ tid = PIDGET (inferior_ptid);
-static struct core_fns linux_elf_core_fns = {
- bfd_target_elf_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
+ errno = 0;
+ ptrace (PT_WRITE_U, tid, offsetof (struct user, u_debugreg[regnum]), value);
+ if (errno != 0)
+ perror_with_name ("Couldn't write debug register");
+}
-#if !defined (offsetof)
-#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-#endif
+void
+x86_64_linux_dr_set_control (unsigned long control)
+{
+ x86_64_linux_dr_set (DR_CONTROL, control);
+}
-/* Return the address of register REGNUM. BLOCKEND is the value of
- u.u_ar0, which should point to the registers. */
-CORE_ADDR
-x86_64_register_u_addr (CORE_ADDR blockend, int regnum)
+void
+x86_64_linux_dr_set_addr (int regnum, CORE_ADDR addr)
{
- struct user u;
- CORE_ADDR fpstate;
- CORE_ADDR ubase;
- ubase = blockend;
- if (IS_FP_REGNUM (regnum))
- {
- fpstate = ubase + ((char *) &u.i387.st_space - (char *) &u);
- return (fpstate + 16 * (regnum - FP0_REGNUM));
- }
- else if (IS_SSE_REGNUM (regnum))
- {
- fpstate = ubase + ((char *) &u.i387.xmm_space - (char *) &u);
- return (fpstate + 16 * (regnum - XMM0_REGNUM));
- }
- else
- return (ubase + 8 * x86_64_regmap[regnum]);
+ gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
+
+ x86_64_linux_dr_set (DR_FIRSTADDR + regnum, addr);
}
void
-_initialize_x86_64_linux_nat (void)
+x86_64_linux_dr_reset_addr (int regnum)
{
- add_core_fns (&linux_elf_core_fns);
+ gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
+
+ x86_64_linux_dr_set (DR_FIRSTADDR + regnum, 0L);
}
-int
-kernel_u_size (void)
+unsigned long
+x86_64_linux_dr_get_status (void)
{
- return (sizeof (struct user));
+ return x86_64_linux_dr_get (DR_STATUS);
}
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index 932e6d6f01b..8532685c896 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -24,19 +24,21 @@
#include "defs.h"
#include "inferior.h"
#include "gdbcore.h"
-#include "gdb_string.h"
#include "regcache.h"
-#include "x86-64-tdep.h"
-#include "dwarf2cfi.h"
#include "osabi.h"
-#define LINUX_SIGTRAMP_INSN0 (0x48) /* mov $NNNNNNNN,%rax */
-#define LINUX_SIGTRAMP_OFFSET0 (0)
-#define LINUX_SIGTRAMP_INSN1 (0x0f) /* syscall */
-#define LINUX_SIGTRAMP_OFFSET1 (7)
+#include "gdb_string.h"
+
+#include "x86-64-tdep.h"
+
+#define LINUX_SIGTRAMP_INSN0 0x48 /* mov $NNNNNNNN, %rax */
+#define LINUX_SIGTRAMP_OFFSET0 0
+#define LINUX_SIGTRAMP_INSN1 0x0f /* syscall */
+#define LINUX_SIGTRAMP_OFFSET1 7
-static const unsigned char linux_sigtramp_code[] = {
- /* mov $__NR_rt_sigreturn,%rax */
+static const unsigned char linux_sigtramp_code[] =
+{
+ /* mov $__NR_rt_sigreturn, %rax */
LINUX_SIGTRAMP_INSN0, 0xc7, 0xc0, 0x0f, 0x00, 0x00, 0x00,
/* syscall */
LINUX_SIGTRAMP_INSN1, 0x05
@@ -51,6 +53,14 @@ static CORE_ADDR
x86_64_linux_sigtramp_start (CORE_ADDR pc)
{
unsigned char buf[LINUX_SIGTRAMP_LEN];
+
+ /* We only recognize a signal trampoline if PC is at the start of
+ one of the two instructions. We optimize for finding the PC at
+ the start, as will be the case when the trampoline is not the
+ first frame on the stack. We assume that in the case where the
+ PC is not at the start of the instruction sequence, there will be
+ a few trailing readable bytes on the stack. */
+
if (read_memory_nobpt (pc, (char *) buf, LINUX_SIGTRAMP_LEN) != 0)
return 0;
@@ -71,133 +81,93 @@ x86_64_linux_sigtramp_start (CORE_ADDR pc)
return pc;
}
-#define LINUX_SIGINFO_SIZE 0
-
-/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
-#define LINUX_UCONTEXT_SIGCONTEXT_OFFSET 40
-
-/* Offset to saved PC in sigcontext, from <asm/sigcontext.h>. */
-#define LINUX_SIGCONTEXT_PC_OFFSET 128
-#define LINUX_SIGCONTEXT_FP_OFFSET 120
-
-/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
- address of the associated sigcontext structure. */
-static CORE_ADDR
-x86_64_linux_sigcontext_addr (struct frame_info *frame)
-{
- CORE_ADDR pc;
- ULONGEST rsp;
-
- pc = x86_64_linux_sigtramp_start (get_frame_pc (frame));
- if (pc)
- {
- if (get_next_frame (frame))
- /* If this isn't the top frame, the next frame must be for the
- signal handler itself. The sigcontext structure is part of
- the user context. */
- return get_frame_base (get_next_frame (frame)) + LINUX_SIGINFO_SIZE +
- LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
-
-
- /* This is the top frame. */
- rsp = read_register (SP_REGNUM);
- return rsp + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
-
- }
-
- error ("Couldn't recognize signal trampoline.");
- return 0;
-}
-
-/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
- saved program counter. */
-
-static CORE_ADDR
-x86_64_linux_sigtramp_saved_pc (struct frame_info *frame)
-{
- CORE_ADDR addr;
-
- addr = x86_64_linux_sigcontext_addr (frame);
- return read_memory_integer (addr + LINUX_SIGCONTEXT_PC_OFFSET, 8);
-}
-
-/* Immediately after a function call, return the saved pc. */
-
-CORE_ADDR
-x86_64_linux_saved_pc_after_call (struct frame_info *frame)
-{
- if ((get_frame_type (frame) == SIGTRAMP_FRAME))
- return x86_64_linux_sigtramp_saved_pc (frame);
-
- return read_memory_integer (read_register (SP_REGNUM), 8);
-}
-
-/* Saved Pc. Get it from sigcontext if within sigtramp. */
-CORE_ADDR
-x86_64_linux_frame_saved_pc (struct frame_info *frame)
-{
- if ((get_frame_type (frame) == SIGTRAMP_FRAME))
- return x86_64_linux_sigtramp_saved_pc (frame);
- return cfi_get_ra (frame);
-}
-
/* Return whether PC is in a GNU/Linux sigtramp routine. */
-int
-x86_64_linux_in_sigtramp (CORE_ADDR pc, char *name)
+static int
+x86_64_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
- if (name)
- return strcmp ("__restore_rt", name) == 0;
-
- return (x86_64_linux_sigtramp_start (pc) != 0);
+ /* If we have NAME, we can optimize the search. The trampoline is
+ named __restore_rt. However, it isn't dynamically exported from
+ the shared C library, so the trampoline may appear to be part of
+ the preceding function. This should always be sigaction,
+ __sigaction, or __libc_sigaction (all aliases to the same
+ function). */
+ if (name == NULL || strstr (name, "sigaction") != NULL)
+ return (x86_64_linux_sigtramp_start (pc) != 0);
+
+ return (strcmp ("__restore_rt", name) == 0);
}
-CORE_ADDR
-x86_64_linux_frame_chain (struct frame_info *fi)
-{
- ULONGEST addr;
- CORE_ADDR fp, pc;
-
- if (!(get_frame_type (fi) == SIGTRAMP_FRAME))
- {
- fp = cfi_frame_chain (fi);
- if (fp)
- return fp;
- else
- addr = get_frame_base (fi);
- }
- else
- addr = get_frame_base (get_next_frame (fi));
-
- addr += LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
-
- fp = read_memory_integer (addr + LINUX_SIGCONTEXT_FP_OFFSET, 8) + 8;
+/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
+#define X86_64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 40
- return fp;
-}
+/* Assuming NEXT_FRAME is a frame following a GNU/Linux sigtramp
+ routine, return the address of the associated sigcontext structure. */
-CORE_ADDR
-x86_64_init_frame_pc (int fromleaf, struct frame_info *fi)
+static CORE_ADDR
+x86_64_linux_sigcontext_addr (struct frame_info *next_frame)
{
- CORE_ADDR addr;
-
- if (get_next_frame (fi)
- && (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME))
- {
- addr = get_frame_base (get_next_frame (get_next_frame (fi)))
- + LINUX_SIGINFO_SIZE + LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
- return read_memory_integer (addr + LINUX_SIGCONTEXT_PC_OFFSET, 8);
- }
- else
- return cfi_init_frame_pc (fromleaf, fi);
+ CORE_ADDR sp;
+ char buf[8];
+
+ frame_unwind_register (next_frame, SP_REGNUM, buf);
+ sp = extract_unsigned_integer (buf, 8);
+
+ /* The sigcontext structure is part of the user context. A pointer
+ to the user context is passed as the third argument to the signal
+ handler, i.e. in %rdx. Unfortunately %rdx isn't preserved across
+ function calls so we can't use it. Fortunately the user context
+ is part of the signal frame and the unwound %rsp directly points
+ at it. */
+ return sp + X86_64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
+/* From <asm/sigcontext.h>. */
+static int x86_64_linux_sc_reg_offset[X86_64_NUM_GREGS] =
+{
+ 13 * 8, /* %rax */
+ 11 * 8, /* %rbx */
+ 14 * 8, /* %rcx */
+ 12 * 8, /* %rdx */
+ 9 * 8, /* %rsi */
+ 8 * 8, /* %rdi */
+ 10 * 8, /* %rbp */
+ 15 * 8, /* %rsp */
+ 0 * 8, /* %r8 */
+ 1 * 8, /* %r9 */
+ 2 * 8, /* %r10 */
+ 3 * 8, /* %r11 */
+ 4 * 8, /* %r12 */
+ 5 * 8, /* %r13 */
+ 6 * 8, /* %r14 */
+ 7 * 8, /* %r15 */
+ 16 * 8, /* %rip */
+ 17 * 8, /* %eflags */
+ -1, /* %ds */
+ -1, /* %es */
+
+ /* FIXME: kettenis/2002030531: The registers %fs and %gs are
+ available in `struct sigcontext'. However, they only occupy two
+ bytes instead of four, which makes using them here rather
+ difficult. Leave them out for now. */
+ -1, /* %fs */
+ -1 /* %gs */
+};
+
static void
x86_64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
x86_64_init_abi (info, gdbarch);
+
+ set_gdbarch_pc_in_sigtramp (gdbarch, x86_64_linux_pc_in_sigtramp);
+
+ tdep->sigcontext_addr = x86_64_linux_sigcontext_addr;
+ tdep->sc_reg_offset = x86_64_linux_sc_reg_offset;
+ tdep->sc_num_regs = X86_64_NUM_GREGS;
}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
extern void _initialize_x86_64_linux_tdep (void);
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 121c85eef39..0b2f6913dd6 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -21,249 +21,198 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "arch-utils.h"
+#include "block.h"
+#include "dummy-frame.h"
+#include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
#include "inferior.h"
-#include "gdbcore.h"
#include "gdbcmd.h"
-#include "arch-utils.h"
+#include "gdbcore.h"
+#include "objfiles.h"
#include "regcache.h"
#include "symfile.h"
-#include "objfiles.h"
-#include "x86-64-tdep.h"
-#include "dwarf2cfi.h"
+
#include "gdb_assert.h"
-#include "block.h"
+
+#include "x86-64-tdep.h"
+#include "i387-tdep.h"
/* Register numbers of various important registers. */
-#define RAX_REGNUM 0
-#define RDX_REGNUM 3
-#define RDI_REGNUM 5
-#define EFLAGS_REGNUM 17
-#define ST0_REGNUM 22
-#define XMM1_REGNUM 39
-
-struct register_info
+
+#define X86_64_RAX_REGNUM 0 /* %rax */
+#define X86_64_RDX_REGNUM 3 /* %rdx */
+#define X86_64_RDI_REGNUM 5 /* %rdi */
+#define X86_64_RBP_REGNUM 6 /* %rbp */
+#define X86_64_RSP_REGNUM 7 /* %rsp */
+#define X86_64_RIP_REGNUM 16 /* %rip */
+#define X86_64_EFLAGS_REGNUM 17 /* %eflags */
+#define X86_64_ST0_REGNUM 22 /* %st0 */
+#define X86_64_XMM0_REGNUM 38 /* %xmm0 */
+#define X86_64_XMM1_REGNUM 39 /* %xmm1 */
+
+struct x86_64_register_info
{
- int size;
char *name;
struct type **type;
};
-/* x86_64_register_raw_size_table[i] is the number of bytes of storage in
- GDB's register array occupied by register i. */
-static struct register_info x86_64_register_info_table[] = {
- /* 0 */ {8, "rax", &builtin_type_int64},
- /* 1 */ {8, "rbx", &builtin_type_int64},
- /* 2 */ {8, "rcx", &builtin_type_int64},
- /* 3 */ {8, "rdx", &builtin_type_int64},
- /* 4 */ {8, "rsi", &builtin_type_int64},
- /* 5 */ {8, "rdi", &builtin_type_int64},
- /* 6 */ {8, "rbp", &builtin_type_void_func_ptr},
- /* 7 */ {8, "rsp", &builtin_type_void_func_ptr},
- /* 8 */ {8, "r8", &builtin_type_int64},
- /* 9 */ {8, "r9", &builtin_type_int64},
- /* 10 */ {8, "r10", &builtin_type_int64},
- /* 11 */ {8, "r11", &builtin_type_int64},
- /* 12 */ {8, "r12", &builtin_type_int64},
- /* 13 */ {8, "r13", &builtin_type_int64},
- /* 14 */ {8, "r14", &builtin_type_int64},
- /* 15 */ {8, "r15", &builtin_type_int64},
- /* 16 */ {8, "rip", &builtin_type_void_func_ptr},
- /* 17 */ {4, "eflags", &builtin_type_int32},
- /* 18 */ {4, "ds", &builtin_type_int32},
- /* 19 */ {4, "es", &builtin_type_int32},
- /* 20 */ {4, "fs", &builtin_type_int32},
- /* 21 */ {4, "gs", &builtin_type_int32},
- /* 22 */ {10, "st0", &builtin_type_i387_ext},
- /* 23 */ {10, "st1", &builtin_type_i387_ext},
- /* 24 */ {10, "st2", &builtin_type_i387_ext},
- /* 25 */ {10, "st3", &builtin_type_i387_ext},
- /* 26 */ {10, "st4", &builtin_type_i387_ext},
- /* 27 */ {10, "st5", &builtin_type_i387_ext},
- /* 28 */ {10, "st6", &builtin_type_i387_ext},
- /* 29 */ {10, "st7", &builtin_type_i387_ext},
- /* 30 */ {4, "fctrl", &builtin_type_int32},
- /* 31 */ {4, "fstat", &builtin_type_int32},
- /* 32 */ {4, "ftag", &builtin_type_int32},
- /* 33 */ {4, "fiseg", &builtin_type_int32},
- /* 34 */ {4, "fioff", &builtin_type_int32},
- /* 35 */ {4, "foseg", &builtin_type_int32},
- /* 36 */ {4, "fooff", &builtin_type_int32},
- /* 37 */ {4, "fop", &builtin_type_int32},
- /* 38 */ {16, "xmm0", &builtin_type_v4sf},
- /* 39 */ {16, "xmm1", &builtin_type_v4sf},
- /* 40 */ {16, "xmm2", &builtin_type_v4sf},
- /* 41 */ {16, "xmm3", &builtin_type_v4sf},
- /* 42 */ {16, "xmm4", &builtin_type_v4sf},
- /* 43 */ {16, "xmm5", &builtin_type_v4sf},
- /* 44 */ {16, "xmm6", &builtin_type_v4sf},
- /* 45 */ {16, "xmm7", &builtin_type_v4sf},
- /* 46 */ {16, "xmm8", &builtin_type_v4sf},
- /* 47 */ {16, "xmm9", &builtin_type_v4sf},
- /* 48 */ {16, "xmm10", &builtin_type_v4sf},
- /* 49 */ {16, "xmm11", &builtin_type_v4sf},
- /* 50 */ {16, "xmm12", &builtin_type_v4sf},
- /* 51 */ {16, "xmm13", &builtin_type_v4sf},
- /* 52 */ {16, "xmm14", &builtin_type_v4sf},
- /* 53 */ {16, "xmm15", &builtin_type_v4sf},
- /* 54 */ {4, "mxcsr", &builtin_type_int32}
-};
-
-/* This array is a mapping from Dwarf-2 register
- numbering to GDB's one. Dwarf-2 numbering is
- defined in x86-64 ABI, section 3.6. */
-static int x86_64_dwarf2gdb_regno_map[] = {
- 0, 3, 2, 1, /* RAX, RDX, RCX, RBX */
- 4, 5, 6, 7, /* RSI, RDI, RBP, RSP */
- 8, 9, 10, 11, /* R8 - R11 */
- 12, 13, 14, 15, /* R12 - R15 */
- -1, /* RA - not mapped */
- XMM1_REGNUM - 1, XMM1_REGNUM, /* XMM0 ... */
- XMM1_REGNUM + 1, XMM1_REGNUM + 2,
- XMM1_REGNUM + 3, XMM1_REGNUM + 4,
- XMM1_REGNUM + 5, XMM1_REGNUM + 6,
- XMM1_REGNUM + 7, XMM1_REGNUM + 8,
- XMM1_REGNUM + 9, XMM1_REGNUM + 10,
- XMM1_REGNUM + 11, XMM1_REGNUM + 12,
- XMM1_REGNUM + 13, XMM1_REGNUM + 14, /* ... XMM15 */
- ST0_REGNUM + 0, ST0_REGNUM + 1, /* ST0 ... */
- ST0_REGNUM + 2, ST0_REGNUM + 3,
- ST0_REGNUM + 4, ST0_REGNUM + 5,
- ST0_REGNUM + 6, ST0_REGNUM + 7 /* ... ST7 */
+static struct x86_64_register_info x86_64_register_info[] =
+{
+ { "rax", &builtin_type_int64 },
+ { "rbx", &builtin_type_int64 },
+ { "rcx", &builtin_type_int64 },
+ { "rdx", &builtin_type_int64 },
+ { "rsi", &builtin_type_int64 },
+ { "rdi", &builtin_type_int64 },
+ { "rbp", &builtin_type_void_data_ptr },
+ { "rsp", &builtin_type_void_data_ptr },
+
+ /* %r8 is indeed register number 8. */
+ { "r8", &builtin_type_int64 },
+ { "r9", &builtin_type_int64 },
+ { "r10", &builtin_type_int64 },
+ { "r11", &builtin_type_int64 },
+ { "r12", &builtin_type_int64 },
+ { "r13", &builtin_type_int64 },
+ { "r14", &builtin_type_int64 },
+ { "r15", &builtin_type_int64 },
+ { "rip", &builtin_type_void_func_ptr },
+ { "eflags", &builtin_type_int32 },
+ { "ds", &builtin_type_int32 },
+ { "es", &builtin_type_int32 },
+ { "fs", &builtin_type_int32 },
+ { "gs", &builtin_type_int32 },
+
+ /* %st0 is register number 22. */
+ { "st0", &builtin_type_i387_ext },
+ { "st1", &builtin_type_i387_ext },
+ { "st2", &builtin_type_i387_ext },
+ { "st3", &builtin_type_i387_ext },
+ { "st4", &builtin_type_i387_ext },
+ { "st5", &builtin_type_i387_ext },
+ { "st6", &builtin_type_i387_ext },
+ { "st7", &builtin_type_i387_ext },
+ { "fctrl", &builtin_type_int32 },
+ { "fstat", &builtin_type_int32 },
+ { "ftag", &builtin_type_int32 },
+ { "fiseg", &builtin_type_int32 },
+ { "fioff", &builtin_type_int32 },
+ { "foseg", &builtin_type_int32 },
+ { "fooff", &builtin_type_int32 },
+ { "fop", &builtin_type_int32 },
+
+ /* %xmm0 is register number 38. */
+ { "xmm0", &builtin_type_v4sf },
+ { "xmm1", &builtin_type_v4sf },
+ { "xmm2", &builtin_type_v4sf },
+ { "xmm3", &builtin_type_v4sf },
+ { "xmm4", &builtin_type_v4sf },
+ { "xmm5", &builtin_type_v4sf },
+ { "xmm6", &builtin_type_v4sf },
+ { "xmm7", &builtin_type_v4sf },
+ { "xmm8", &builtin_type_v4sf },
+ { "xmm9", &builtin_type_v4sf },
+ { "xmm10", &builtin_type_v4sf },
+ { "xmm11", &builtin_type_v4sf },
+ { "xmm12", &builtin_type_v4sf },
+ { "xmm13", &builtin_type_v4sf },
+ { "xmm14", &builtin_type_v4sf },
+ { "xmm15", &builtin_type_v4sf },
+ { "mxcsr", &builtin_type_int32 }
};
-static int x86_64_dwarf2gdb_regno_map_length =
- sizeof (x86_64_dwarf2gdb_regno_map) /
- sizeof (x86_64_dwarf2gdb_regno_map[0]);
-
-/* Number of all registers */
-#define X86_64_NUM_REGS (sizeof (x86_64_register_info_table) / \
- sizeof (x86_64_register_info_table[0]))
-
-/* Number of general registers. */
-#define X86_64_NUM_GREGS (22)
-
-int x86_64_num_regs = X86_64_NUM_REGS;
-int x86_64_num_gregs = X86_64_NUM_GREGS;
+/* Total number of registers. */
+#define X86_64_NUM_REGS \
+ (sizeof (x86_64_register_info) / sizeof (x86_64_register_info[0]))
-/* Did we already print a note about frame pointer? */
-int omit_fp_note_printed = 0;
+/* Return the name of register REGNUM. */
-/* Number of bytes of storage in the actual machine representation for
- register REGNO. */
-int
-x86_64_register_raw_size (int regno)
+static const char *
+x86_64_register_name (int regnum)
{
- return x86_64_register_info_table[regno].size;
-}
-
-/* x86_64_register_byte_table[i] is the offset into the register file of the
- start of register number i. We initialize this from
- x86_64_register_info_table. */
-int x86_64_register_byte_table[X86_64_NUM_REGS];
+ if (regnum >= 0 && regnum < X86_64_NUM_REGS)
+ return x86_64_register_info[regnum].name;
-/* Index within `registers' of the first byte of the space for register REGNO. */
-int
-x86_64_register_byte (int regno)
-{
- return x86_64_register_byte_table[regno];
+ return NULL;
}
/* Return the GDB type object for the "standard" data type of data in
- register N. */
-static struct type *
-x86_64_register_virtual_type (int regno)
-{
- return *x86_64_register_info_table[regno].type;
-}
+ register REGNUM. */
-/* x86_64_register_convertible is true if register N's virtual format is
- different from its raw format. Note that this definition assumes
- that the host supports IEEE 32-bit floats, since it doesn't say
- that SSE registers need conversion. Even if we can't find a
- counterexample, this is still sloppy. */
-int
-x86_64_register_convertible (int regno)
-{
- return IS_FP_REGNUM (regno);
-}
-
-/* Convert data from raw format for register REGNUM in buffer FROM to
- virtual format with type TYPE in buffer TO. In principle both
- formats are identical except that the virtual format has two extra
- bytes appended that aren't used. We set these to zero. */
-void
-x86_64_register_convert_to_virtual (int regnum, struct type *type,
- char *from, char *to)
+static struct type *
+x86_64_register_type (struct gdbarch *gdbarch, int regnum)
{
- char buf[12];
+ gdb_assert (regnum >= 0 && regnum < X86_64_NUM_REGS);
- /* We only support floating-point values. */
- if (TYPE_CODE (type) != TYPE_CODE_FLT)
- {
- warning ("Cannot convert floating-point register value "
- "to non-floating-point type.");
- memset (to, 0, TYPE_LENGTH (type));
- return;
- }
- /* First add the necessary padding. */
- memcpy (buf, from, FPU_REG_RAW_SIZE);
- memset (buf + FPU_REG_RAW_SIZE, 0, sizeof buf - FPU_REG_RAW_SIZE);
- /* Convert to TYPE. This should be a no-op, if TYPE is equivalent
- to the extended floating-point format used by the FPU. */
- convert_typed_floating (to, type, buf,
- x86_64_register_virtual_type (regnum));
+ return *x86_64_register_info[regnum].type;
}
-/* Convert data from virtual format with type TYPE in buffer FROM to
- raw format for register REGNUM in buffer TO. Simply omit the two
- unused bytes. */
-
-void
-x86_64_register_convert_to_raw (struct type *type, int regnum,
- char *from, char *to)
-{
- gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT && TYPE_LENGTH (type) == 12);
- /* Simply omit the two unused bytes. */
- memcpy (to, from, FPU_REG_RAW_SIZE);
-}
+/* DWARF Register Number Mapping as defined in the System V psABI,
+ section 3.6. */
-/* Dwarf-2 <-> GDB register numbers mapping. */
-int
-x86_64_dwarf2_reg_to_regnum (int dw_reg)
+static int x86_64_dwarf_regmap[] =
{
- if (dw_reg < 0 || dw_reg > x86_64_dwarf2gdb_regno_map_length)
- {
- warning ("Dwarf-2 uses unmapped register #%d\n", dw_reg);
- return dw_reg;
- }
+ /* General Purpose Registers RAX, RDX, RCX, RBX, RSI, RDI. */
+ X86_64_RAX_REGNUM, X86_64_RDX_REGNUM, 3, 2,
+ 4, X86_64_RDI_REGNUM,
+
+ /* Frame Pointer Register RBP. */
+ X86_64_RBP_REGNUM,
+
+ /* Stack Pointer Register RSP. */
+ X86_64_RSP_REGNUM,
+
+ /* Extended Integer Registers 8 - 15. */
+ 8, 9, 10, 11, 12, 13, 14, 15,
+
+ /* Return Address RA. Not mapped. */
+ -1,
+
+ /* SSE Registers 0 - 7. */
+ X86_64_XMM0_REGNUM + 0, X86_64_XMM1_REGNUM,
+ X86_64_XMM0_REGNUM + 2, X86_64_XMM0_REGNUM + 3,
+ X86_64_XMM0_REGNUM + 4, X86_64_XMM0_REGNUM + 5,
+ X86_64_XMM0_REGNUM + 6, X86_64_XMM0_REGNUM + 7,
+
+ /* Extended SSE Registers 8 - 15. */
+ X86_64_XMM0_REGNUM + 8, X86_64_XMM0_REGNUM + 9,
+ X86_64_XMM0_REGNUM + 10, X86_64_XMM0_REGNUM + 11,
+ X86_64_XMM0_REGNUM + 12, X86_64_XMM0_REGNUM + 13,
+ X86_64_XMM0_REGNUM + 14, X86_64_XMM0_REGNUM + 15,
+
+ /* Floating Point Registers 0-7. */
+ X86_64_ST0_REGNUM + 0, X86_64_ST0_REGNUM + 1,
+ X86_64_ST0_REGNUM + 2, X86_64_ST0_REGNUM + 3,
+ X86_64_ST0_REGNUM + 4, X86_64_ST0_REGNUM + 5,
+ X86_64_ST0_REGNUM + 6, X86_64_ST0_REGNUM + 7
+};
- return x86_64_dwarf2gdb_regno_map[dw_reg];
-}
+static const int x86_64_dwarf_regmap_len =
+ (sizeof (x86_64_dwarf_regmap) / sizeof (x86_64_dwarf_regmap[0]));
-/* Push the return address (pointing to the call dummy) onto the stack
- and return the new value for the stack pointer. */
+/* Convert DWARF register number REG to the appropriate register
+ number used by GDB. */
-static CORE_ADDR
-x86_64_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
+static int
+x86_64_dwarf_reg_to_regnum (int reg)
{
- char buf[8];
+ int regnum = -1;
- store_unsigned_integer (buf, 8, CALL_DUMMY_ADDRESS ());
- write_memory (sp - 8, buf, 8);
- return sp - 8;
-}
+ if (reg >= 0 || reg < x86_64_dwarf_regmap_len)
+ regnum = x86_64_dwarf_regmap[reg];
-static void
-x86_64_pop_frame (void)
-{
- generic_pop_current_frame (cfi_pop_frame);
+ if (regnum == -1)
+ warning ("Unmapped DWARF Register #%d encountered\n", reg);
+
+ return regnum;
}
/* The returning of values is done according to the special algorithm.
- Some types are returned in registers an some (big structures) in memory.
- See ABI for details.
- */
+ Some types are returned in registers an some (big structures) in
+ memory. See the System V psABI for details. */
#define MAX_CLASSES 4
@@ -282,27 +231,27 @@ enum x86_64_reg_class
};
/* Return the union class of CLASS1 and CLASS2.
- See the x86-64 ABI for details. */
+ See the System V psABI for details. */
static enum x86_64_reg_class
merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
{
- /* Rule #1: If both classes are equal, this is the resulting class. */
+ /* Rule (a): If both classes are equal, this is the resulting class. */
if (class1 == class2)
return class1;
- /* Rule #2: If one of the classes is NO_CLASS, the resulting class
+ /* Rule (b): If one of the classes is NO_CLASS, the resulting class
is the other class. */
if (class1 == X86_64_NO_CLASS)
return class2;
if (class2 == X86_64_NO_CLASS)
return class1;
- /* Rule #3: If one of the classes is MEMORY, the result is MEMORY. */
+ /* Rule (c): If one of the classes is MEMORY, the result is MEMORY. */
if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
return X86_64_MEMORY_CLASS;
- /* Rule #4: If one of the classes is INTEGER, the result is INTEGER. */
+ /* Rule (d): If one of the classes is INTEGER, the result is INTEGER. */
if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
|| (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
return X86_64_INTEGERSI_CLASS;
@@ -310,12 +259,13 @@ merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
|| class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
return X86_64_INTEGER_CLASS;
- /* Rule #5: If one of the classes is X87 or X87UP class, MEMORY is used. */
+ /* Rule (e): If one of the classes is X87 or X87UP class, MEMORY is
+ used as class. */
if (class1 == X86_64_X87_CLASS || class1 == X86_64_X87UP_CLASS
|| class2 == X86_64_X87_CLASS || class2 == X86_64_X87UP_CLASS)
return X86_64_MEMORY_CLASS;
- /* Rule #6: Otherwise class SSE is used. */
+ /* Rule (f): Otherwise class SSE is used. */
return X86_64_SSE_CLASS;
}
@@ -325,7 +275,7 @@ merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
is returned. As a special case for zero sized containers,
classes[0] will be NO_CLASS and 1 is returned.
- See the x86-64 psABI for details. */
+ See the System V psABI for details. */
static int
classify_argument (struct type *type,
@@ -533,7 +483,8 @@ examine_argument (enum x86_64_reg_class classes[MAX_CLASSES],
memory. If this function returns 1, GDB will call
STORE_STRUCT_RETURN and EXTRACT_STRUCT_VALUE_ADDRESS else
STORE_RETURN_VALUE and EXTRACT_RETURN_VALUE will be used. */
-int
+
+static int
x86_64_use_struct_convention (int gcc_p, struct type *value_type)
{
enum x86_64_reg_class class[MAX_CLASSES];
@@ -550,7 +501,7 @@ x86_64_use_struct_convention (int gcc_p, struct type *value_type)
function return value of TYPE, and copy that, in virtual format,
into VALBUF. */
-void
+static void
x86_64_extract_return_value (struct type *type, struct regcache *regcache,
void *valbuf)
{
@@ -561,15 +512,15 @@ x86_64_extract_return_value (struct type *type, struct regcache *regcache,
int intreg = 0;
int ssereg = 0;
int offset = 0;
- int ret_int_r[RET_INT_REGS] = { RAX_REGNUM, RDX_REGNUM };
- int ret_sse_r[RET_SSE_REGS] = { XMM0_REGNUM, XMM1_REGNUM };
+ int ret_int_r[RET_INT_REGS] = { X86_64_RAX_REGNUM, X86_64_RDX_REGNUM };
+ int ret_sse_r[RET_SSE_REGS] = { X86_64_XMM0_REGNUM, X86_64_XMM1_REGNUM };
if (!n ||
!examine_argument (class, n, &needed_intregs, &needed_sseregs) ||
needed_intregs > RET_INT_REGS || needed_sseregs > RET_SSE_REGS)
{ /* memory class */
CORE_ADDR addr;
- regcache_cooked_read (regcache, RAX_REGNUM, &addr);
+ regcache_cooked_read (regcache, X86_64_RAX_REGNUM, &addr);
read_memory (addr, valbuf, TYPE_LENGTH (type));
return;
}
@@ -610,12 +561,12 @@ x86_64_extract_return_value (struct type *type, struct regcache *regcache,
ssereg++;
break;
case X86_64_X87_CLASS:
- regcache_cooked_read_part (regcache, FP0_REGNUM,
+ regcache_cooked_read_part (regcache, X86_64_ST0_REGNUM,
0, 8, (char *) valbuf + offset);
offset += 8;
break;
case X86_64_X87UP_CLASS:
- regcache_cooked_read_part (regcache, FP0_REGNUM,
+ regcache_cooked_read_part (regcache, X86_64_ST0_REGNUM,
8, 2, (char *) valbuf + offset);
offset += 8;
break;
@@ -628,33 +579,29 @@ x86_64_extract_return_value (struct type *type, struct regcache *regcache,
}
}
-static void
-x86_64_frame_init_saved_regs (struct frame_info *fi)
-{
- /* Do nothing. Everything is handled by the stack unwinding code. */
-}
-
#define INT_REGS 6
-#define SSE_REGS 16
+#define SSE_REGS 8
-CORE_ADDR
-x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+static CORE_ADDR
+x86_64_push_arguments (struct regcache *regcache, int nargs,
+ struct value **args, CORE_ADDR sp)
{
int intreg = 0;
int ssereg = 0;
int i;
- static int int_parameter_registers[INT_REGS] = {
- 5 /* RDI */ , 4 /* RSI */ ,
- 3 /* RDX */ , 2 /* RCX */ ,
- 8 /* R8 */ , 9 /* R9 */
+ static int int_parameter_registers[INT_REGS] =
+ {
+ X86_64_RDI_REGNUM, 4, /* %rdi, %rsi */
+ X86_64_RDX_REGNUM, 2, /* %rdx, %rcx */
+ 8, 9 /* %r8, %r9 */
};
- /* XMM0 - XMM15 */
- static int sse_parameter_registers[SSE_REGS] = {
- XMM1_REGNUM - 1, XMM1_REGNUM, XMM1_REGNUM + 1, XMM1_REGNUM + 2,
- XMM1_REGNUM + 3, XMM1_REGNUM + 4, XMM1_REGNUM + 5, XMM1_REGNUM + 6,
- XMM1_REGNUM + 7, XMM1_REGNUM + 8, XMM1_REGNUM + 9, XMM1_REGNUM + 10,
- XMM1_REGNUM + 11, XMM1_REGNUM + 12, XMM1_REGNUM + 13, XMM1_REGNUM + 14
+ /* %xmm0 - %xmm7 */
+ static int sse_parameter_registers[SSE_REGS] =
+ {
+ X86_64_XMM0_REGNUM + 0, X86_64_XMM1_REGNUM,
+ X86_64_XMM0_REGNUM + 2, X86_64_XMM0_REGNUM + 3,
+ X86_64_XMM0_REGNUM + 4, X86_64_XMM0_REGNUM + 5,
+ X86_64_XMM0_REGNUM + 6, X86_64_XMM0_REGNUM + 7,
};
int stack_values_count = 0;
int *stack_values;
@@ -676,27 +623,26 @@ x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
else
{
int j;
+ int offset = 0;
for (j = 0; j < n; j++)
{
- int offset = 0;
switch (class[j])
{
case X86_64_NO_CLASS:
break;
case X86_64_INTEGER_CLASS:
- deprecated_write_register_gen (int_parameter_registers
- [(intreg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ regcache_cooked_write
+ (regcache, int_parameter_registers[(intreg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
intreg += 2;
break;
case X86_64_INTEGERSI_CLASS:
{
- LONGEST num
- = extract_signed_integer (VALUE_CONTENTS_ALL (args[i])
- + offset, 4);
- regcache_raw_write_signed (current_regcache,
- int_parameter_registers[intreg / 2], num);
+ LONGEST val = extract_signed_integer
+ (VALUE_CONTENTS_ALL (args[i]) + offset, 4);
+ regcache_cooked_write_signed
+ (regcache, int_parameter_registers[intreg / 2], val);
offset += 8;
intreg++;
@@ -705,15 +651,16 @@ x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
case X86_64_SSEDF_CLASS:
case X86_64_SSESF_CLASS:
case X86_64_SSE_CLASS:
- deprecated_write_register_gen (sse_parameter_registers
- [(ssereg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ regcache_cooked_write
+ (regcache, sse_parameter_registers[(ssereg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
ssereg += 2;
break;
case X86_64_SSEUP_CLASS:
- deprecated_write_register_gen (sse_parameter_registers[ssereg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
+ regcache_cooked_write
+ (regcache, sse_parameter_registers[ssereg / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
offset += 8;
ssereg++;
break;
@@ -732,21 +679,25 @@ x86_64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
}
}
}
+
+ /* Push any remaining arguments onto the stack. */
while (--stack_values_count >= 0)
{
struct value *arg = args[stack_values[stack_values_count]];
int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
- len += 7;
- len -= len % 8;
- sp -= len;
+
+ /* Make sure the stack stays eightbyte-aligned. */
+ sp -= (len + 7) & ~7;
write_memory (sp, VALUE_CONTENTS_ALL (arg), len);
}
+
return sp;
}
/* Write into the appropriate registers a function return value stored
in VALBUF of type TYPE, given in virtual format. */
-void
+
+static void
x86_64_store_return_value (struct type *type, struct regcache *regcache,
const void *valbuf)
{
@@ -754,27 +705,32 @@ x86_64_store_return_value (struct type *type, struct regcache *regcache,
if (TYPE_CODE_FLT == TYPE_CODE (type))
{
- /* Floating-point return values can be found in %st(0). */
- if (len == TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT
- && TARGET_LONG_DOUBLE_FORMAT == &floatformat_i387_ext)
- {
- /* Copy straight over. */
- regcache_cooked_write (regcache, FP0_REGNUM, valbuf);
- }
- else
- {
- char buf[FPU_REG_RAW_SIZE];
- DOUBLEST val;
-
- /* Convert the value found in VALBUF to the extended
- floating point format used by the FPU. This is probably
- not exactly how it would happen on the target itself, but
- it is the best we can do. */
- val = deprecated_extract_floating (valbuf, TYPE_LENGTH (type));
- floatformat_from_doublest (&floatformat_i387_ext, &val, buf);
- regcache_cooked_write_part (regcache, FP0_REGNUM,
- 0, FPU_REG_RAW_SIZE, buf);
- }
+ ULONGEST fstat;
+ char buf[FPU_REG_RAW_SIZE];
+
+ /* Returning floating-point values is a bit tricky. Apart from
+ storing the return value in %st(0), we have to simulate the
+ state of the FPU at function return point. */
+
+ /* Convert the value found in VALBUF to the extended
+ floating-point format used by the FPU. This is probably
+ not exactly how it would happen on the target itself, but
+ it is the best we can do. */
+ convert_typed_floating (valbuf, type, buf, builtin_type_i387_ext);
+ regcache_raw_write (regcache, X86_64_ST0_REGNUM, buf);
+
+ /* Set the top of the floating-point register stack to 7. The
+ actual value doesn't really matter, but 7 is what a normal
+ function return would end up with if the program started out
+ with a freshly initialized FPU. */
+ regcache_raw_read_unsigned (regcache, FSTAT_REGNUM, &fstat);
+ fstat |= (7 << 11);
+ regcache_raw_write_unsigned (regcache, FSTAT_REGNUM, fstat);
+
+ /* Mark %st(1) through %st(7) as empty. Since we set the top of
+ the floating-point register stack to 7, the appropriate value
+ for the tag word is 0x3fff. */
+ regcache_raw_write_unsigned (regcache, FTAG_REGNUM, 0x3fff);
}
else
{
@@ -797,126 +753,397 @@ x86_64_store_return_value (struct type *type, struct regcache *regcache,
}
-const char *
-x86_64_register_name (int reg_nr)
+static CORE_ADDR
+x86_64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
+ struct regcache *regcache, CORE_ADDR bp_addr,
+ int nargs, struct value **args, CORE_ADDR sp,
+ int struct_return, CORE_ADDR struct_addr)
{
- if (reg_nr < 0 || reg_nr >= X86_64_NUM_REGS)
- return NULL;
- return x86_64_register_info_table[reg_nr].name;
+ char buf[8];
+
+ /* Pass arguments. */
+ sp = x86_64_push_arguments (regcache, nargs, args, sp);
+
+ /* Pass "hidden" argument". */
+ if (struct_return)
+ {
+ store_unsigned_integer (buf, 8, struct_addr);
+ regcache_cooked_write (regcache, X86_64_RDI_REGNUM, buf);
+ }
+
+ /* Store return address. */
+ sp -= 8;
+ store_unsigned_integer (buf, 8, bp_addr);
+ write_memory (sp, buf, 8);
+
+ /* Finally, update the stack pointer... */
+ store_unsigned_integer (buf, 8, sp);
+ regcache_cooked_write (regcache, X86_64_RSP_REGNUM, buf);
+
+ /* ...and fake a frame pointer. */
+ regcache_cooked_write (regcache, X86_64_RBP_REGNUM, buf);
+
+ return sp;
}
+
+
+/* The maximum number of saved registers. This should include %rip. */
+#define X86_64_NUM_SAVED_REGS X86_64_NUM_GREGS
-int
-x86_64_register_number (const char *name)
+struct x86_64_frame_cache
{
- int reg_nr;
+ /* Base address. */
+ CORE_ADDR base;
+ CORE_ADDR sp_offset;
+ CORE_ADDR pc;
+
+ /* Saved registers. */
+ CORE_ADDR saved_regs[X86_64_NUM_SAVED_REGS];
+ CORE_ADDR saved_sp;
- for (reg_nr = 0; reg_nr < X86_64_NUM_REGS; reg_nr++)
- if (strcmp (name, x86_64_register_info_table[reg_nr].name) == 0)
- return reg_nr;
- return -1;
+ /* Do we have a frame? */
+ int frameless_p;
+};
+
+/* Allocate and initialize a frame cache. */
+
+static struct x86_64_frame_cache *
+x86_64_alloc_frame_cache (void)
+{
+ struct x86_64_frame_cache *cache;
+ int i;
+
+ cache = FRAME_OBSTACK_ZALLOC (struct x86_64_frame_cache);
+
+ /* Base address. */
+ cache->base = 0;
+ cache->sp_offset = -8;
+ cache->pc = 0;
+
+ /* Saved registers. We initialize these to -1 since zero is a valid
+ offset (that's where %rbp is supposed to be stored). */
+ for (i = 0; i < X86_64_NUM_SAVED_REGS; i++)
+ cache->saved_regs[i] = -1;
+ cache->saved_sp = 0;
+
+ /* Frameless until proven otherwise. */
+ cache->frameless_p = 1;
+
+ return cache;
}
-
-/* Store the address of the place in which to copy the structure the
- subroutine will return. This is called from call_function. */
-void
-x86_64_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
+/* Do a limited analysis of the prologue at PC and update CACHE
+ accordingly. Bail out early if CURRENT_PC is reached. Return the
+ address where the analysis stopped.
+
+ We will handle only functions beginning with:
+
+ pushq %rbp 0x55
+ movq %rsp, %rbp 0x48 0x89 0xe5
+
+ Any function that doesn't start with this sequence will be assumed
+ to have no prologue and thus no valid frame pointer in %rbp. */
+
+static CORE_ADDR
+x86_64_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct x86_64_frame_cache *cache)
{
- write_register (RDI_REGNUM, addr);
+ static unsigned char proto[3] = { 0x48, 0x89, 0xe5 };
+ unsigned char buf[3];
+ unsigned char op;
+
+ if (current_pc <= pc)
+ return current_pc;
+
+ op = read_memory_unsigned_integer (pc, 1);
+
+ if (op == 0x55) /* pushq %rbp */
+ {
+ /* Take into account that we've executed the `pushq %rbp' that
+ starts this instruction sequence. */
+ cache->saved_regs[X86_64_RBP_REGNUM] = 0;
+ cache->sp_offset += 8;
+
+ /* If that's all, return now. */
+ if (current_pc <= pc + 1)
+ return current_pc;
+
+ /* Check for `movq %rsp, %rbp'. */
+ read_memory (pc + 1, buf, 3);
+ if (memcmp (buf, proto, 3) != 0)
+ return pc + 1;
+
+ /* OK, we actually have a frame. */
+ cache->frameless_p = 0;
+ return pc + 4;
+ }
+
+ return pc;
}
-int
-x86_64_frameless_function_invocation (struct frame_info *frame)
+/* Return PC of first real instruction. */
+
+static CORE_ADDR
+x86_64_skip_prologue (CORE_ADDR start_pc)
{
- return 0;
+ struct x86_64_frame_cache cache;
+ CORE_ADDR pc;
+
+ pc = x86_64_analyze_prologue (start_pc, 0xffffffffffffffff, &cache);
+ if (cache.frameless_p)
+ return start_pc;
+
+ return pc;
}
+
+
+/* Normal frames. */
-/* We will handle only functions beginning with:
- 55 pushq %rbp
- 48 89 e5 movq %rsp,%rbp
- Any function that doesn't start with this sequence
- will be assumed to have no prologue and thus no valid
- frame pointer in %rbp. */
-#define PROLOG_BUFSIZE 4
-int
-x86_64_function_has_prologue (CORE_ADDR pc)
+static struct x86_64_frame_cache *
+x86_64_frame_cache (struct frame_info *next_frame, void **this_cache)
{
+ struct x86_64_frame_cache *cache;
+ char buf[8];
int i;
- unsigned char prolog_expect[PROLOG_BUFSIZE] = { 0x55, 0x48, 0x89, 0xe5 },
- prolog_buf[PROLOG_BUFSIZE];
- read_memory (pc, (char *) prolog_buf, PROLOG_BUFSIZE);
+ if (*this_cache)
+ return *this_cache;
- /* First check, whether pc points to pushq %rbp, movq %rsp,%rbp. */
- for (i = 0; i < PROLOG_BUFSIZE; i++)
- if (prolog_expect[i] != prolog_buf[i])
- return 0; /* ... no, it doesn't. Nothing to skip. */
-
- return 1;
+ cache = x86_64_alloc_frame_cache ();
+ *this_cache = cache;
+
+ frame_unwind_register (next_frame, X86_64_RBP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 8);
+ if (cache->base == 0)
+ return cache;
+
+ /* For normal frames, %rip is stored at 8(%rbp). */
+ cache->saved_regs[X86_64_RIP_REGNUM] = 8;
+
+ cache->pc = frame_func_unwind (next_frame);
+ if (cache->pc != 0)
+ x86_64_analyze_prologue (cache->pc, frame_pc_unwind (next_frame), cache);
+
+ if (cache->frameless_p)
+ {
+ /* We didn't find a valid frame, which means that CACHE->base
+ currently holds the frame pointer for our calling frame. If
+ we're at the start of a function, or somewhere half-way its
+ prologue, the function's frame probably hasn't been fully
+ setup yet. Try to reconstruct the base address for the stack
+ frame by looking at the stack pointer. For truly "frameless"
+ functions this might work too. */
+
+ frame_unwind_register (next_frame, X86_64_RSP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 8) + cache->sp_offset;
+ }
+
+ /* Now that we have the base address for the stack frame we can
+ calculate the value of %rsp in the calling frame. */
+ cache->saved_sp = cache->base + 16;
+
+ /* Adjust all the saved registers such that they contain addresses
+ instead of offsets. */
+ for (i = 0; i < X86_64_NUM_SAVED_REGS; i++)
+ if (cache->saved_regs[i] != -1)
+ cache->saved_regs[i] += cache->base;
+
+ return cache;
}
-/* If a function with debugging information and known beginning
- is detected, we will return pc of the next line in the source
- code. With this approach we effectively skip the prolog. */
+static void
+x86_64_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct x86_64_frame_cache *cache =
+ x86_64_frame_cache (next_frame, this_cache);
-CORE_ADDR
-x86_64_skip_prologue (CORE_ADDR pc)
+ /* This marks the outermost frame. */
+ if (cache->base == 0)
+ return;
+
+ (*this_id) = frame_id_build (cache->base + 16, cache->pc);
+}
+
+static void
+x86_64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
{
+ struct x86_64_frame_cache *cache =
+ x86_64_frame_cache (next_frame, this_cache);
+
+ gdb_assert (regnum >= 0);
+
+ if (regnum == SP_REGNUM && cache->saved_sp)
+ {
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Store the value. */
+ store_unsigned_integer (valuep, 8, cache->saved_sp);
+ }
+ return;
+ }
+
+ if (regnum < X86_64_NUM_SAVED_REGS && cache->saved_regs[regnum] != -1)
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = cache->saved_regs[regnum];
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Read the value in from memory. */
+ read_memory (*addrp, valuep,
+ register_size (current_gdbarch, regnum));
+ }
+ return;
+ }
+
+ frame_register_unwind (next_frame, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static const struct frame_unwind x86_64_frame_unwind =
+{
+ NORMAL_FRAME,
+ x86_64_frame_this_id,
+ x86_64_frame_prev_register
+};
+
+static const struct frame_unwind *
+x86_64_frame_p (CORE_ADDR pc)
+{
+ return &x86_64_frame_unwind;
+}
+
+
+/* Signal trampolines. */
+
+/* FIXME: kettenis/20030419: Perhaps, we can unify the 32-bit and
+ 64-bit variants. This would require using identical frame caches
+ on both platforms. */
+
+static struct x86_64_frame_cache *
+x86_64_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ struct x86_64_frame_cache *cache;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ CORE_ADDR addr;
+ char buf[8];
int i;
- struct symtab_and_line v_sal;
- struct symbol *v_function;
- CORE_ADDR endaddr;
- if (! x86_64_function_has_prologue (pc))
- return pc;
+ if (*this_cache)
+ return *this_cache;
- /* OK, we have found the prologue and want PC of the first
- non-prologue instruction. */
- pc += PROLOG_BUFSIZE;
+ cache = x86_64_alloc_frame_cache ();
- v_function = find_pc_function (pc);
- v_sal = find_pc_line (pc, 0);
+ frame_unwind_register (next_frame, X86_64_RSP_REGNUM, buf);
+ cache->base = extract_unsigned_integer (buf, 8) - 8;
- /* If pc doesn't point to a function with debuginfo, some of the
- following may be NULL. */
- if (!v_function || !v_function->ginfo.value.block || !v_sal.symtab)
- return pc;
+ addr = tdep->sigcontext_addr (next_frame);
+ gdb_assert (tdep->sc_reg_offset);
+ gdb_assert (tdep->sc_num_regs <= X86_64_NUM_SAVED_REGS);
+ for (i = 0; i < tdep->sc_num_regs; i++)
+ if (tdep->sc_reg_offset[i] != -1)
+ cache->saved_regs[i] = addr + tdep->sc_reg_offset[i];
- endaddr = BLOCK_END (SYMBOL_BLOCK_VALUE (v_function));
+ *this_cache = cache;
+ return cache;
+}
- for (i = 0; i < v_sal.symtab->linetable->nitems; i++)
- if (v_sal.symtab->linetable->item[i].pc >= pc
- && v_sal.symtab->linetable->item[i].pc < endaddr)
- {
- pc = v_sal.symtab->linetable->item[i].pc;
- break;
- }
+static void
+x86_64_sigtramp_frame_this_id (struct frame_info *next_frame,
+ void **this_cache, struct frame_id *this_id)
+{
+ struct x86_64_frame_cache *cache =
+ x86_64_sigtramp_frame_cache (next_frame, this_cache);
- return pc;
+ (*this_id) = frame_id_build (cache->base + 16, frame_pc_unwind (next_frame));
+}
+
+static void
+x86_64_sigtramp_frame_prev_register (struct frame_info *next_frame,
+ void **this_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realnump, void *valuep)
+{
+ /* Make sure we've initialized the cache. */
+ x86_64_sigtramp_frame_cache (next_frame, this_cache);
+
+ x86_64_frame_prev_register (next_frame, this_cache, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
}
+static const struct frame_unwind x86_64_sigtramp_frame_unwind =
+{
+ SIGTRAMP_FRAME,
+ x86_64_sigtramp_frame_this_id,
+ x86_64_sigtramp_frame_prev_register
+};
+
+static const struct frame_unwind *
+x86_64_sigtramp_frame_p (CORE_ADDR pc)
+{
+ char *name;
+
+ find_pc_partial_function (pc, &name, NULL, NULL);
+ if (PC_IN_SIGTRAMP (pc, name))
+ {
+ gdb_assert (gdbarch_tdep (current_gdbarch)->sigcontext_addr);
+
+ return &x86_64_sigtramp_frame_unwind;
+ }
+
+ return NULL;
+}
+
+
+static CORE_ADDR
+x86_64_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct x86_64_frame_cache *cache =
+ x86_64_frame_cache (next_frame, this_cache);
+
+ return cache->base;
+}
+
+static const struct frame_base x86_64_frame_base =
+{
+ &x86_64_frame_unwind,
+ x86_64_frame_base_address,
+ x86_64_frame_base_address,
+ x86_64_frame_base_address
+};
+
static void
x86_64_save_dummy_frame_tos (CORE_ADDR sp)
{
- /* We must add the size of the return address that is already
- put on the stack. */
- generic_save_dummy_frame_tos (sp +
- TYPE_LENGTH (builtin_type_void_func_ptr));
+ generic_save_dummy_frame_tos (sp + 16);
}
static struct frame_id
-x86_64_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *frame)
+x86_64_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
- CORE_ADDR base;
- frame_unwind_unsigned_register (frame, SP_REGNUM, &base);
- return frame_id_build (base, frame_pc_unwind (frame));
+ char buf[8];
+ CORE_ADDR fp;
+
+ frame_unwind_register (next_frame, X86_64_RBP_REGNUM, buf);
+ fp = extract_unsigned_integer (buf, 8);
+
+ return frame_id_build (fp + 16, frame_pc_unwind (next_frame));
}
void
x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- int i, sum;
/* The x86-64 has 16 SSE registers. */
tdep->num_xmm_regs = 16;
@@ -932,115 +1159,94 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_long_double_bit (gdbarch, 128);
set_gdbarch_num_regs (gdbarch, X86_64_NUM_REGS);
+ set_gdbarch_register_name (gdbarch, x86_64_register_name);
+ set_gdbarch_register_type (gdbarch, x86_64_register_type);
/* Register numbers of various important registers. */
- set_gdbarch_sp_regnum (gdbarch, 7); /* %rsp */
- set_gdbarch_deprecated_fp_regnum (gdbarch, 6); /* %rbp */
- set_gdbarch_pc_regnum (gdbarch, 16); /* %rip */
- set_gdbarch_ps_regnum (gdbarch, 17); /* %eflags */
- set_gdbarch_fp0_regnum (gdbarch, X86_64_NUM_GREGS); /* %st(0) */
+ set_gdbarch_sp_regnum (gdbarch, X86_64_RSP_REGNUM); /* %rsp */
+ set_gdbarch_pc_regnum (gdbarch, X86_64_RIP_REGNUM); /* %rip */
+ set_gdbarch_ps_regnum (gdbarch, X86_64_EFLAGS_REGNUM); /* %eflags */
+ set_gdbarch_fp0_regnum (gdbarch, X86_64_ST0_REGNUM); /* %st(0) */
/* The "default" register numbering scheme for the x86-64 is
- referred to as the "DWARF register number mapping" in the psABI.
- The preferred debugging format for all known x86-64 targets is
- actually DWARF2, and GCC doesn't seem to support DWARF (that is
- DWARF-1), but we provide the same mapping just in case. This
- mapping is also used for stabs, which GCC does support. */
- set_gdbarch_stab_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
- set_gdbarch_dwarf_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
- set_gdbarch_dwarf2_reg_to_regnum (gdbarch, x86_64_dwarf2_reg_to_regnum);
-
- /* We don't override SDB_REG_RO_REGNUM, sice COFF doesn't seem to be
- in use on any of the supported x86-64 targets. */
-
- set_gdbarch_register_name (gdbarch, x86_64_register_name);
- set_gdbarch_deprecated_register_size (gdbarch, 8);
+ referred to as the "DWARF Register Number Mapping" in the System
+ V psABI. The preferred debugging format for all known x86-64
+ targets is actually DWARF2, and GCC doesn't seem to support DWARF
+ (that is DWARF-1), but we provide the same mapping just in case.
+ This mapping is also used for stabs, which GCC does support. */
+ set_gdbarch_stab_reg_to_regnum (gdbarch, x86_64_dwarf_reg_to_regnum);
+ set_gdbarch_dwarf_reg_to_regnum (gdbarch, x86_64_dwarf_reg_to_regnum);
+ set_gdbarch_dwarf2_reg_to_regnum (gdbarch, x86_64_dwarf_reg_to_regnum);
- /* Total amount of space needed to store our copies of the machine's
- register (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS +
- SIZEOF_SSE_REGS) */
- for (i = 0, sum = 0; i < X86_64_NUM_REGS; i++)
- sum += x86_64_register_info_table[i].size;
- set_gdbarch_deprecated_register_bytes (gdbarch, sum);
+ /* We don't override SDB_REG_RO_REGNUM, since COFF doesn't seem to
+ be in use on any of the supported x86-64 targets. */
- set_gdbarch_register_raw_size (gdbarch, x86_64_register_raw_size);
- set_gdbarch_register_byte (gdbarch, x86_64_register_byte);
- set_gdbarch_register_virtual_type (gdbarch, x86_64_register_virtual_type);
-
- set_gdbarch_register_convertible (gdbarch, x86_64_register_convertible);
- set_gdbarch_register_convert_to_virtual (gdbarch,
- x86_64_register_convert_to_virtual);
- set_gdbarch_register_convert_to_raw (gdbarch,
- x86_64_register_convert_to_raw);
-
- /* Getting saved registers is handled by unwind information. */
- set_gdbarch_deprecated_get_saved_register (gdbarch, cfi_get_saved_register);
-
- /* FIXME: kettenis/20021026: Should we set parm_boundary to 64 here? */
- set_gdbarch_deprecated_target_read_fp (gdbarch, cfi_read_fp);
+ /* Call dummy code. */
+ set_gdbarch_push_dummy_call (gdbarch, x86_64_push_dummy_call);
set_gdbarch_extract_return_value (gdbarch, x86_64_extract_return_value);
-
- set_gdbarch_deprecated_push_arguments (gdbarch, x86_64_push_arguments);
- set_gdbarch_deprecated_push_return_address (gdbarch, x86_64_push_return_address);
- set_gdbarch_deprecated_pop_frame (gdbarch, x86_64_pop_frame);
- set_gdbarch_deprecated_store_struct_return (gdbarch, x86_64_store_struct_return);
set_gdbarch_store_return_value (gdbarch, x86_64_store_return_value);
/* Override, since this is handled by x86_64_extract_return_value. */
set_gdbarch_extract_struct_value_address (gdbarch, NULL);
set_gdbarch_use_struct_convention (gdbarch, x86_64_use_struct_convention);
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, x86_64_frame_init_saved_regs);
set_gdbarch_skip_prologue (gdbarch, x86_64_skip_prologue);
- set_gdbarch_deprecated_frame_chain (gdbarch, x86_64_linux_frame_chain);
- set_gdbarch_frameless_function_invocation (gdbarch,
- x86_64_frameless_function_invocation);
- /* FIXME: kettenis/20021026: These two are GNU/Linux-specific and
- should be moved elsewhere. */
- set_gdbarch_deprecated_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call);
- set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
- /* FIXME: kettenis/20021026: This one is GNU/Linux-specific too. */
- set_gdbarch_pc_in_sigtramp (gdbarch, x86_64_linux_in_sigtramp);
-
+ /* Avoid wiring in the MMX registers for now. */
set_gdbarch_num_pseudo_regs (gdbarch, 0);
- /* Build call frame information (CFI) from DWARF2 frame debug info. */
- set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
-
- /* Initialization of per-frame CFI. */
- set_gdbarch_deprecated_init_extra_frame_info (gdbarch, cfi_init_extra_frame_info);
-
- /* Frame PC initialization is handled by using CFI. */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, x86_64_init_frame_pc);
-
- /* Cons up virtual frame pointer for trace. */
- set_gdbarch_virtual_frame_pointer (gdbarch, cfi_virtual_frame_pointer);
+ set_gdbarch_unwind_dummy_id (gdbarch, x86_64_unwind_dummy_id);
+ set_gdbarch_save_dummy_frame_tos (gdbarch, x86_64_save_dummy_frame_tos);
/* FIXME: kettenis/20021026: This is ELF-specific. Fine for now,
since all supported x86-64 targets are ELF, but that might change
in the future. */
set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
-
- /* Dummy frame helper functions. */
- set_gdbarch_save_dummy_frame_tos (gdbarch, x86_64_save_dummy_frame_tos);
- set_gdbarch_unwind_dummy_id (gdbarch, x86_64_unwind_dummy_id);
+
+ frame_unwind_append_predicate (gdbarch, x86_64_sigtramp_frame_p);
+ frame_unwind_append_predicate (gdbarch, x86_64_frame_p);
+ frame_base_set_default (gdbarch, &x86_64_frame_base);
+}
+
+
+#define I387_FISEG_REGNUM FISEG_REGNUM
+#define I387_FOSEG_REGNUM FOSEG_REGNUM
+
+/* The 64-bit FXSAVE format differs from the 32-bit format in the
+ sense that the instruction pointer and data pointer are simply
+ 64-bit offsets into the code segment and the data segment instead
+ of a selector offset pair. The functions below store the upper 32
+ bits of these pointers (instead of just the 16-bits of the segment
+ selector). */
+
+/* Fill GDB's register array with the floating-point and SSE register
+ values in *FXSAVE. This function masks off any of the reserved
+ bits in *FXSAVE. */
+
+void
+x86_64_supply_fxsave (char *fxsave)
+{
+ i387_supply_fxsave (fxsave);
+
+ if (fxsave)
+ {
+ supply_register (I387_FISEG_REGNUM, fxsave + 12);
+ supply_register (I387_FOSEG_REGNUM, fxsave + 20);
+ }
}
+/* Fill register REGNUM (if it is a floating-point or SSE register) in
+ *FXSAVE with the value in GDB's register array. If REGNUM is -1, do
+ this for all registers. This function doesn't touch any of the
+ reserved bits in *FXSAVE. */
+
void
-_initialize_x86_64_tdep (void)
+x86_64_fill_fxsave (char *fxsave, int regnum)
{
- /* Initialize the table saying where each register starts in the
- register file. */
- {
- int i, offset;
+ i387_fill_fxsave (fxsave, regnum);
- offset = 0;
- for (i = 0; i < X86_64_NUM_REGS; i++)
- {
- x86_64_register_byte_table[i] = offset;
- offset += x86_64_register_info_table[i].size;
- }
- }
+ if (regnum == -1 || regnum == I387_FISEG_REGNUM)
+ regcache_collect (I387_FISEG_REGNUM, fxsave + 12);
+ if (regnum == -1 || regnum == I387_FOSEG_REGNUM)
+ regcache_collect (I387_FOSEG_REGNUM, fxsave + 20);
}
diff --git a/gdb/x86-64-tdep.h b/gdb/x86-64-tdep.h
index 6885a7cb856..70ceffbbda2 100644
--- a/gdb/x86-64-tdep.h
+++ b/gdb/x86-64-tdep.h
@@ -1,6 +1,8 @@
-/* Target-dependent code for GDB, the GNU debugger.
- Copyright 2001
+/* Target-dependent code for the x86-64.
+
+ Copyright 2001, 2003
Free Software Foundation, Inc.
+
Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
@@ -28,19 +30,22 @@ struct frame_info;
#include "i386-tdep.h"
-extern int x86_64_num_regs;
-extern int x86_64_num_gregs;
+/* Number of general purpose registers. */
+#define X86_64_NUM_GREGS 22
+
+void x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch);
-int x86_64_register_number (const char *name);
-const char *x86_64_register_name (int reg_nr);
+/* Fill GDB's register array with the floating-point and SSE register
+ values in *FXSAVE. This function masks off any of the reserved
+ bits in *FXSAVE. */
-gdbarch_deprecated_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
-gdbarch_deprecated_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
-gdbarch_pc_in_sigtramp_ftype x86_64_linux_in_sigtramp;
-CORE_ADDR x86_64_linux_frame_chain (struct frame_info *fi);
-CORE_ADDR x86_64_init_frame_pc (int fromleaf, struct frame_info *fi);
-int x86_64_function_has_prologue (CORE_ADDR pc);
+void x86_64_supply_fxsave (char *fxsave);
-void x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch);
+/* Fill register REGNUM (if it is a floating-point or SSE register) in
+ *FXSAVE with the value in GDB's register array. If REGNUM is -1, do
+ this for all registers. This function doesn't touch any of the
+ reserved bits in *FXSAVE. */
+
+void x86_64_fill_fxsave (char *fxsave, int regnum);
-#endif
+#endif /* x86-64-tdep.h */
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index f792423a544..97cdd0af047 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -228,8 +228,8 @@ xstormy16_extract_return_value (struct type *type, char *regbuf, char *valbuf)
/* Aggregates and return values > 12 bytes are returned in memory,
pointed to by R2. */
return_buffer =
- extract_address (regbuf + REGISTER_BYTE (E_PTR_RET_REGNUM),
- REGISTER_RAW_SIZE (E_PTR_RET_REGNUM));
+ extract_unsigned_integer (regbuf + REGISTER_BYTE (E_PTR_RET_REGNUM),
+ REGISTER_RAW_SIZE (E_PTR_RET_REGNUM));
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
}
@@ -410,9 +410,8 @@ xstormy16_store_return_value (struct type *type, char *valbuf)
static CORE_ADDR
xstormy16_extract_struct_value_address (char *regbuf)
{
- return extract_address (regbuf +
- xstormy16_register_byte (E_PTR_RET_REGNUM),
- xstormy16_reg_size);
+ return extract_unsigned_integer (regbuf + xstormy16_register_byte (E_PTR_RET_REGNUM),
+ xstormy16_reg_size);
}
/* Function: xstormy16_use_struct_convention
@@ -962,7 +961,7 @@ static CORE_ADDR
xstormy16_pointer_to_address (struct type *type, const void *buf)
{
enum type_code target = TYPE_CODE (TYPE_TARGET_TYPE (type));
- CORE_ADDR addr = extract_address (buf, TYPE_LENGTH (type));
+ CORE_ADDR addr = extract_unsigned_integer (buf, TYPE_LENGTH (type));
if (target == TYPE_CODE_FUNC || target == TYPE_CODE_METHOD)
{
diff --git a/include/ChangeLog b/include/ChangeLog
index 8dfa46f77c9..18d0b3509e7 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,18 @@
+2003-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add execstack and noexecstack.
+ * elf/common.h (PT_GNU_STACK): Define.
+
+2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bfdlink.h (LD_DEFINITION_IN_DISCARDED_SECTION): New.
+
+2003-05-30 Ulrich Drepper <drepper@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add pie and executable
+ bits.
+
2003-05-21 Nick Clifton <nickc@redhat.com>
* bfdlink.h (struct bfd_link_hash_table): Fix typo in comment.
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 89d916ee83b..4636025b8b9 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -291,6 +291,20 @@ struct bfd_link_info
/* TRUE if relaxation is being finalized. */
unsigned int relax_finalizing: 1;
+ /* TRUE if generating a position independent executable. */
+ unsigned int pie: 1;
+
+ /* TRUE if generating an executable, position independent or not. */
+ unsigned int executable : 1;
+
+ /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X
+ flags. */
+ unsigned int execstack: 1;
+
+ /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W
+ flags. */
+ unsigned int noexecstack: 1;
+
/* Which symbols to strip. */
enum bfd_link_strip strip;
@@ -489,6 +503,9 @@ struct bfd_link_callbacks
ld. */
bfd_boolean (*error_handler)
PARAMS ((int id, const char * fmt, ...));
+
+/* Identifiers of linker error messages used by error_handler. */
+#define LD_DEFINITION_IN_DISCARDED_SECTION 1
};
/* The linker builds link_order structures which tell the code how to
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 59e05e318ad..db652e29868 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * v850.h (R_V850_32): Rename to R_V850_ABS32.
+ Add R_V850_REL32.
+
2003-05-15 Roland McGrath <roland@redhat.com>
* common.h (NT_AUXV, AT_*): New macros.
diff --git a/include/elf/common.h b/include/elf/common.h
index f342d573710..3635bbb6419 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -288,6 +288,7 @@
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
+#define PT_GNU_STACK (PT_LOOS + 0x474e551)
/* Program segment permissions, in program header p_flags field. */
diff --git a/include/elf/v850.h b/include/elf/v850.h
index a15c9ee0864..c949ab01f8c 100644
--- a/include/elf/v850.h
+++ b/include/elf/v850.h
@@ -53,7 +53,7 @@ START_RELOC_NUMBERS (v850_reloc_type)
RELOC_NUMBER (R_V850_HI16_S, 3)
RELOC_NUMBER (R_V850_HI16, 4)
RELOC_NUMBER (R_V850_LO16, 5)
- RELOC_NUMBER (R_V850_32, 6)
+ RELOC_NUMBER (R_V850_ABS32, 6)
RELOC_NUMBER (R_V850_16, 7)
RELOC_NUMBER (R_V850_8, 8)
RELOC_NUMBER( R_V850_SDA_16_16_OFFSET, 9) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
@@ -75,6 +75,7 @@ START_RELOC_NUMBERS (v850_reloc_type)
RELOC_NUMBER (R_V850_LONGCALL, 25)
RELOC_NUMBER (R_V850_LONGJUMP, 26)
RELOC_NUMBER (R_V850_ALIGN, 27)
+ RELOC_NUMBER (R_V850_REL32, 28)
END_RELOC_NUMBERS (R_V850_max)
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 9514813354b..25a6ffe84f7 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,17 @@
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+
+ * h8sx.h (enum h8_model): Add AV_H8S to distinguish from H8H.
+ (ldc): Split ccr ops from exr ops (which are only available
+ on H8S or H8SX).
+ (stc): Ditto.
+ (andc, orc, xorc): Ditto.
+ (ldmac, stmac, clrmac, mac): Change access to AV_H8S.
+
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+ and Bernd Schmidt <bernds@redhat.com>
+ and Alexandre Oliva <aoliva@redhat.com>
+ * h8300.h: Add support for h8300sx instruction set.
+
2003-05-23 Jason Eckhardt <jle@rice.edu>
* i860.h (expand_type): Add XP_ONLY.
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
index 02f415be846..45357efbc26 100644
--- a/include/opcode/h8300.h
+++ b/include/opcode/h8300.h
@@ -26,119 +26,217 @@
typedef int op_type;
-#define Hex0 0
-#define Hex1 1
-#define Hex2 2
-#define Hex3 3
-#define Hex4 4
-#define Hex5 5
-#define Hex6 6
-#define Hex7 7
-#define Hex8 8
-#define Hex9 9
-#define HexA 10
-#define HexB 11
-#define HexC 12
-#define HexD 13
-#define HexE 14
-#define HexF 15
-
-#define L_8 0x01
-#define L_16 0x02
-#define L_32 0x04
-#define L_P 0x08
-#define L_24 0x10
-#define MEMRELAX 0x20 /* Move insn which may relax. */
-#define SRC 0x40
-#define DST 0x80
-
-#define REG 0x100
-#define EXR 0x200
-#define MACREG 0x800
-#define SRC_IN_DST 0x400
-#define IMM 0x1000
-#define DISP 0x2000
-#define IND 0x4000
-#define INC 0x8000
-#define DEC 0x10000
-#define L_3 0x20000
-#define KBIT 0x40000
-#define DBIT 0x80000
-#define DISPREG 0x100000
-#define IGNORE 0x200000
-#define E 0x400000 /* FIXME: end of nibble sequence? */
-#define L_2 0x800000
-#define B30 0x1000000 /* Bit 3 must be low. */
-#define B31 0x2000000 /* Bit 3 must be high. */
-#define CCR 0x4000000
-#define ABS 0x8000000
-#define ABSJMP 0x10000000
-#define ABS8MEM 0x20000000
-#define PCREL 0x40000000
-#define MEMIND 0x80000000
-
-#define IMM3 IMM | L_3
-#define IMM2 IMM | L_2
-
-#define SIZE (L_2 | L_3 | L_8 | L_16 | L_32 | L_P | L_24)
-#define MODE (REG | IMM | DISP | IND | INC | DEC | CCR | ABS | MEMIND | EXR)
-
-#define RD8 (DST | L_8 | REG)
-#define RD16 (DST | L_16 | REG)
-#define RD32 (DST | L_32 | REG)
-#define RS8 (SRC | L_8 | REG)
-#define RS16 (SRC | L_16 | REG)
-#define RS32 (SRC | L_32 | REG)
-
-#define RSP (SRC | L_P | REG)
-#define RDP (DST | L_P | REG)
-
-#define IMM8 (IMM | SRC | L_8)
-#define IMM16 (IMM | SRC | L_16)
-#define IMM32 (IMM | SRC | L_32)
-
-#define ABS8SRC (SRC | ABS | L_8 | ABS8MEM)
-#define ABS8DST (DST | ABS | L_8 | ABS8MEM)
-
-#define DISP8 (PCREL | L_8)
-#define DISP16 (PCREL | L_16)
-
-#define DISP8SRC (DISP | L_8 | SRC)
-#define DISP16SRC (DISP | L_16 | SRC)
-
-#define DISP8DST (DISP | L_8 | DST)
-#define DISP16DST (DISP | L_16 | DST)
-
-#define ABS16SRC (SRC | ABS | L_16)
-#define ABS16DST (DST | ABS | L_16)
-#define ABS24SRC (SRC | ABS | L_24)
-#define ABS24DST (DST | ABS | L_24)
-#define ABS32SRC (SRC | ABS | L_32)
-#define ABS32DST (DST | ABS | L_32)
-
-#define RDDEC (DST | DEC)
-#define RSINC (SRC | INC)
-#define RDINC (DST | INC)
-
-#define RDIND (DST | IND)
-#define RSIND (SRC | IND)
-
-#define MS32 (SRC | L_32 | MACREG)
-#define MD32 (DST | L_32 | MACREG)
+enum h8_flags {
+ L_2 = 0x10,
+ L_3 = 0x20,
+ /* 3 bit constant, zero not accepted. */
+ L_3NZ = 0x30,
+ L_4 = 0x40,
+ L_5 = 0x50,
+ L_8 = 0x60,
+ L_8U = 0x70,
+ L_16 = 0x80,
+ L_16U = 0x90,
+ L_24 = 0xA0,
+ L_32 = 0xB0,
+ L_P = 0xC0,
+
+ /* Mask to isolate the L_x size bits. */
+ SIZE = 0xF0,
+
+ REG = 0x0100,
+ ABS = 0x0200,
+ MEMIND = 0x0300,
+ IMM = 0x0400,
+ DISP = 0x0500,
+ IND = 0x0600,
+ POSTINC = 0x0700,
+ POSTDEC = 0x0800,
+ PREINC = 0x0900,
+ PREDEC = 0x0A00,
+ PCREL = 0x0B00,
+ KBIT = 0x0C00,
+ DBIT = 0x0D00,
+ CONST_2 = 0x0E00,
+ CONST_4 = 0x0F00,
+ CONST_8 = 0x1000,
+ CONST_16 = 0x1100,
+ INDEXB = 0x1200,
+ INDEXW = 0x1300,
+ INDEXL = 0x1400,
+ PCIDXB = 0x1500,
+ PCIDXW = 0x1600,
+ PCIDXL = 0x1700,
+ VECIND = 0x1800,
+ LOWREG = 0x1900,
+ DATA = 0x2000,
+
+ /* Synonyms. */
+ INC = POSTINC,
+ DEC = PREDEC,
+ /* Control Registers. */
+ CCR = 0x4000,
+ EXR = 0x4100,
+ MACH = 0x4200,
+ MACL = 0x4300,
+ RESERV1 = 0x4400,
+ RESERV2 = 0x4500,
+ VBR = 0x4600,
+ SBR = 0x4700,
+ MACREG = 0x4800,
+ CCR_EXR = 0x4900,
+ VBR_SBR = 0x4A00,
+ CC_EX_VB_SB = 0x4B00,
+ RESERV3 = 0x4C00,
+ RESERV4 = 0x4D00,
+ RESERV5 = 0x4E00,
+ RESERV6 = 0x4F00,
+
+ /* Mask to isolate the addressing mode bits (REG .. PREDEC). */
+ MODE = 0x7F00,
+
+ CTRL = 0x4000,
+
+ NO_SYMBOLS = 0x8000,
+ SRC = 0x10000,
+ DST = 0x20000,
+ OP3 = 0x40000,
+ MEMRELAX = 0x80000, /* Move insn which may relax. */
+
+ DISPREG = 0x100000,
+ IGNORE = 0x200000,
+ ABSJMP = 0x400000,
+
+ B00 = 0x800000, /* Bit 0 must be low. */
+ B01 = 0x1000000, /* Bit 0 must be high. */
+ B10 = 0x2000000, /* Bit 1 must be low. */
+ B11 = 0x4000000, /* Bit 1 must be high. */
+ B20 = 0x8000000, /* Bit 2 must be low. */
+ B21 = 0x10000000, /* Bit 2 must be high. */
+ B30 = 0x20000000, /* Bit 3 must be low. */
+ B31 = 0x40000000, /* Bit 3 must be high. */
+ E = 0x80000000, /* End of nibble sequence. */
+
+ IMM3 = IMM | L_3,
+ IMM4 = IMM | L_4,
+ IMM5 = IMM | L_5,
+ IMM3NZ = IMM | L_3NZ,
+ IMM2 = IMM | L_2,
+
+ IMM8 = IMM | SRC | L_8,
+ IMM16 = IMM | SRC | L_16,
+ IMM16U = IMM | SRC | L_16U,
+ IMM32 = IMM | SRC | L_32,
+
+ IMM3NZ_NS = IMM3NZ | NO_SYMBOLS,
+ IMM2_NS = IMM2 | NO_SYMBOLS,
+ IMM16_NS = IMM16 | NO_SYMBOLS,
+ IMM16U_NS = IMM16U | NO_SYMBOLS,
+
+ RD8 = DST | L_8 | REG,
+ RD16 = DST | L_16 | REG,
+ RD32 = DST | L_32 | REG,
+ R3_8 = OP3 | L_8 | REG,
+ R3_16 = OP3 | L_16 | REG,
+ R3_32 = OP3 | L_32 | REG,
+ RS8 = SRC | L_8 | REG,
+ RS16 = SRC | L_16 | REG,
+ RS32 = SRC | L_32 | REG,
+
+ RSP = SRC | L_P | REG,
+ RDP = DST | L_P | REG,
+
+ PCREL8 = PCREL | L_8,
+ PCREL16 = PCREL | L_16,
+
+ OP3PCREL8 = OP3 | PCREL | L_8,
+ OP3PCREL16 = OP3 | PCREL | L_16,
+
+ INDEXB16 = INDEXB | L_16,
+ INDEXW16 = INDEXW | L_16,
+ INDEXL16 = INDEXL | L_16,
+ INDEXB16D = INDEXB | L_16 | DST,
+ INDEXW16D = INDEXW | L_16 | DST,
+ INDEXL16D = INDEXL | L_16 | DST,
+
+ INDEXB32 = INDEXB | L_32,
+ INDEXW32 = INDEXW | L_32,
+ INDEXL32 = INDEXL | L_32,
+ INDEXB32D = INDEXB | L_32 | DST,
+ INDEXW32D = INDEXW | L_32 | DST,
+ INDEXL32D = INDEXL | L_32 | DST,
+
+ DISP2SRC = DISP | L_2 | SRC,
+ DISP16SRC = DISP | L_16 | SRC,
+ DISP32SRC = DISP | L_32 | SRC,
+
+ DISP2DST = DISP | L_2 | DST,
+ DISP16DST = DISP | L_16 | DST,
+ DISP32DST = DISP | L_32 | DST,
+
+ DSTDISPREG = DST | DISPREG,
+ SRCDISPREG = SRC | DISPREG,
+
+ ABS8SRC = SRC | ABS | L_8,
+ ABS16SRC = SRC | ABS | L_16U,
+ ABS24SRC = SRC | ABS | L_24,
+ ABS32SRC = SRC | ABS | L_32,
+
+ ABS8DST = DST | ABS | L_8,
+ ABS16DST = DST | ABS | L_16U,
+ ABS24DST = DST | ABS | L_24,
+ ABS32DST = DST | ABS | L_32,
+
+ ABS8OP3 = OP3 | ABS | L_8,
+ ABS16OP3 = OP3 | ABS | L_16U,
+ ABS24OP3 = OP3 | ABS | L_24,
+ ABS32OP3 = OP3 | ABS | L_32,
+
+ RDDEC = DST | DEC,
+ RSINC = SRC | INC,
+ RDINC = DST | INC,
+
+ RSPOSTINC = SRC | POSTINC,
+ RDPOSTINC = DST | POSTINC,
+ RSPREINC = SRC | PREINC,
+ RDPREINC = DST | PREINC,
+ RSPOSTDEC = SRC | POSTDEC,
+ RDPOSTDEC = DST | POSTDEC,
+ RSPREDEC = SRC | PREDEC,
+ RDPREDEC = DST | PREDEC,
+
+ RSIND = SRC | IND,
+ RDIND = DST | IND,
+ R3_IND = OP3 | IND,
+
+#define MS32 (SRC | L_32 | MACREG)
+#define MD32 (DST | L_32 | MACREG)
#if 1
-#define OR8 RS8 /* ??? OR as in One Register? */
-#define OR16 RS16
-#define OR32 RS32
+ OR8 = RS8, /* ??? OR as in One Register. */
+ OR16 = RS16,
+ OR32 = RS32,
#else
-#define OR8 RD8
-#define OR16 RD16
-#define OR32 RD32
+ OR8 = RD8,
+ OR16 = RD16,
+ OR32 = RD32
#endif
+};
+
+enum ctrlreg {
+ C_CCR = 0,
+ C_EXR = 1,
+ C_MACH = 2,
+ C_MACL = 3,
+ C_VBR = 6,
+ C_SBR = 7
+};
+
+enum {MAX_CODE_NIBBLES = 33};
struct code
{
- op_type nib[30];
+ op_type nib[MAX_CODE_NIBBLES];
};
struct arg
@@ -146,10 +244,18 @@ struct arg
op_type nib[3];
};
+/* Availability of instructions on processor models. */
+enum h8_model {
+ AV_H8,
+ AV_H8H,
+ AV_H8S,
+ AV_H8SX
+};
+
struct h8_opcode
{
int how;
- int inbase;
+ enum h8_model available;
int time;
char *name;
struct arg args;
@@ -158,454 +264,1627 @@ struct h8_opcode
#ifdef DEFINE_TABLE
-#define BITOP(code, imm, name, op00, op01,op10,op11, op20,op21,op30)\
-{ code, 1, 2, name, {{imm,RD8,E}}, {{op00, op01, imm, RD8, E, 0, 0, 0, 0}}},\
-{ code, 1, 6, name, {{imm,RDIND,E}},{{op10, op11, B30|RDIND, 0, op00,op01, imm, 0, E}}},\
-{ code, 1, 6, name, {{imm,ABS8DST,E}},{{op20, op21, ABS8DST, IGNORE, op00,op01, imm, 0,E}}}\
-,{ code, 0, 6, name, {{imm,ABS16DST,E}},{{0x6,0xa,0x1,op30,ABS16DST,IGNORE,IGNORE,IGNORE, op00,op01, imm, 0,E}}},\
-{ code, 0, 6, name, {{imm,ABS32DST,E}},{{0x6,0xa,0x3,op30,ABS32DST,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE, op00,op01, imm, 0,E}}}
-
-
-#define EBITOP(code, imm, name, op00, op01,op10,op11, op20,op21,op30)\
- BITOP(code,imm, name, op00+1, op01, op10,op11, op20,op21,op30),\
- BITOP(code,RS8, name, op00, op01, op10,op11, op20,op21,op30)
-
-#define WTWOP(code,name, op1, op2) \
-{ code, 1, 2, name, {{RS16, RD16, E}}, {{ op1, op2, RS16, RD16, E, 0, 0, 0, 0}}}
+#define DATA2 DATA, DATA
+#define DATA3 DATA, DATA, DATA
+#define DATA5 DATA, DATA, DATA, DATA, DATA
+#define DATA7 DATA, DATA, DATA, DATA, DATA, DATA, DATA
+
+#define IMM8LIST IMM8, DATA
+#define IMM16LIST IMM16, DATA3
+#define IMM16ULIST IMM16U, DATA3
+#define IMM24LIST IMM24, DATA5
+#define IMM32LIST IMM32, DATA7
+
+#define DISP16LIST DISP | L_16, DATA3
+#define DISP24LIST DISP | L_24, DATA5
+#define DISP32LIST DISP | L_32, DATA7
+
+#define ABS8LIST ABS | L_8, DATA
+#define ABS16LIST ABS | L_16U, DATA3
+#define ABS24LIST ABS | L_24, DATA5
+#define ABS32LIST ABS | L_32, DATA7
+
+#define DSTABS8LIST DST | ABS | L_8, DATA
+#define DSTABS16LIST DST | ABS | L_16U, DATA3
+#define DSTABS24LIST DST | ABS | L_24, DATA5
+#define DSTABS32LIST DST | ABS | L_32, DATA7
+
+#define OP3ABS8LIST OP3 | ABS | L_8, DATA
+#define OP3ABS16LIST OP3 | ABS | L_16, DATA3
+#define OP3ABS24LIST OP3 | ABS | L_24, DATA5
+#define OP3ABS32LIST OP3 | ABS | L_32, DATA7
+
+#define DSTDISP16LIST DST | DISP | L_16, DATA3
+#define DSTDISP24LIST DST | DISP | L_24, DATA5
+#define DSTDISP32LIST DST | DISP | L_32, DATA7
+
+#define A16LIST L_16, DATA3
+#define A24LIST L_24, DATA5
+#define A32LIST L_32, DATA7
+
+/* Extended Operand Prefixes: */
+
+#define PREFIX_010 0x0, 0x1, 0x0
+#define PREFIX_015 0x0, 0x1, 0x5
+#define PREFIX_017 0x0, 0x1, 0x7
+
+#define PREFIX_0100 0x0, 0x1, 0x0, 0x0
+#define PREFIX_010_D2 0x0, 0x1, 0x0, B30 | B21 | DISP2SRC
+#define PREFIX_0101 0x0, 0x1, 0x0, 0x1
+#define PREFIX_0102 0x0, 0x1, 0x0, 0x2
+#define PREFIX_0103 0x0, 0x1, 0x0, 0x3
+#define PREFIX_0104 0x0, 0x1, 0x0, 0x4
+#define PREFIX_0105 0x0, 0x1, 0x0, 0x5
+#define PREFIX_0106 0x0, 0x1, 0x0, 0x6
+#define PREFIX_0107 0x0, 0x1, 0x0, 0x7
+#define PREFIX_0108 0x0, 0x1, 0x0, 0x8
+#define PREFIX_0109 0x0, 0x1, 0x0, 0x9
+#define PREFIX_010A 0x0, 0x1, 0x0, 0xa
+#define PREFIX_010D 0x0, 0x1, 0x0, 0xd
+#define PREFIX_010E 0x0, 0x1, 0x0, 0xe
+
+#define PREFIX_0150 0x0, 0x1, 0x5, 0x0
+#define PREFIX_015_D2 0x0, 0x1, 0x5, B30 | B21 | DISP2SRC
+#define PREFIX_0151 0x0, 0x1, 0x5, 0x1
+#define PREFIX_0152 0x0, 0x1, 0x5, 0x2
+#define PREFIX_0153 0x0, 0x1, 0x5, 0x3
+#define PREFIX_0154 0x0, 0x1, 0x5, 0x4
+#define PREFIX_0155 0x0, 0x1, 0x5, 0x5
+#define PREFIX_0156 0x0, 0x1, 0x5, 0x6
+#define PREFIX_0157 0x0, 0x1, 0x5, 0x7
+#define PREFIX_0158 0x0, 0x1, 0x5, 0x8
+#define PREFIX_0159 0x0, 0x1, 0x5, 0x9
+#define PREFIX_015A 0x0, 0x1, 0x5, 0xa
+#define PREFIX_015D 0x0, 0x1, 0x5, 0xd
+#define PREFIX_015E 0x0, 0x1, 0x5, 0xe
+#define PREFIX_015F 0x0, 0x1, 0x5, 0xf
+
+#define PREFIX_0170 0x0, 0x1, 0x7, 0x0
+#define PREFIX_017_D2S 0x0, 0x1, 0x7, B30 | B21 | DISP2SRC
+#define PREFIX_017_D2D 0x0, 0x1, 0x7, B30 | B21 | DISP2DST
+#define PREFIX_0171 0x0, 0x1, 0x7, 0x1
+#define PREFIX_0172 0x0, 0x1, 0x7, 0x2
+#define PREFIX_0173 0x0, 0x1, 0x7, 0x3
+#define PREFIX_0174 0x0, 0x1, 0x7, 0x4
+#define PREFIX_0175 0x0, 0x1, 0x7, 0x5
+#define PREFIX_0176 0x0, 0x1, 0x7, 0x6
+#define PREFIX_0177 0x0, 0x1, 0x7, 0x7
+#define PREFIX_0178 0x0, 0x1, 0x7, 0x8
+#define PREFIX_0179 0x0, 0x1, 0x7, 0x9
+#define PREFIX_017A 0x0, 0x1, 0x7, 0xa
+#define PREFIX_017D 0x0, 0x1, 0x7, 0xd
+#define PREFIX_017E 0x0, 0x1, 0x7, 0xe
+#define PREFIX_017F 0x0, 0x1, 0x7, 0xf
+
+#define PREFIX_6A15 0x6, 0xa, 0x1, 0x5
+#define PREFIX_6A35 0x6, 0xa, 0x3, 0x5
+#define PREFIX_6B15 0x6, 0xb, 0x1, 0x5
+#define PREFIX_6B35 0x6, 0xb, 0x3, 0x5
+
+#define PREFIX_78R4 0x7, 0x8, B31 | DISPREG, 0x4
+#define PREFIX_78R5 0x7, 0x8, B31 | DISPREG, 0x5
+#define PREFIX_78R6 0x7, 0x8, B31 | DISPREG, 0x6
+#define PREFIX_78R7 0x7, 0x8, B31 | DISPREG, 0x7
+
+#define PREFIX_78R4W 0x7, 0x8, B30 | DISPREG, 0x4
+#define PREFIX_78R5W 0x7, 0x8, B30 | DISPREG, 0x5
+#define PREFIX_78R6W 0x7, 0x8, B30 | DISPREG, 0x6
+#define PREFIX_78R7W 0x7, 0x8, B30 | DISPREG, 0x7
+
+#define PREFIX_78R4WD 0x7, 0x8, B30 | DSTDISPREG, 0x4
+#define PREFIX_78R5WD 0x7, 0x8, B30 | DSTDISPREG, 0x5
+#define PREFIX_78R6WD 0x7, 0x8, B30 | DSTDISPREG, 0x6
+#define PREFIX_78R7WD 0x7, 0x8, B30 | DSTDISPREG, 0x7
+
+#define PREFIX_7974 0x7, 0x9, 0x7, 0x4
+#define PREFIX_7A74 0x7, 0xa, 0x7, 0x4
+#define PREFIX_7A7C 0x7, 0xa, 0x7, 0xc
+
+
+/* Source standard fragment: */
+#define FROM_IND 0, RSIND
+#define FROM_POSTINC 8, RSPOSTINC
+#define FROM_POSTDEC 10, RSPOSTDEC
+#define FROM_PREINC 9, RSPREINC
+#define FROM_PREDEC 11, RSPREDEC
+#define FROM_DISP2 B30 | B20 | DISP2SRC, DISPREG
+#define FROM_DISP16 12, B30 | DISPREG
+#define FROM_DISP32 12, B31 | DISPREG
+#define FROM_DISP16B 13, B30 | DISPREG
+#define FROM_DISP16W 14, B30 | DISPREG
+#define FROM_DISP16L 15, B30 | DISPREG
+#define FROM_DISP32B 13, B31 | DISPREG
+#define FROM_DISP32W 14, B31 | DISPREG
+#define FROM_DISP32L 15, B31 | DISPREG
+#define FROM_ABS16 4, B30 | IGNORE
+#define FROM_ABS32 4, B31 | IGNORE
+
+/* Destination standard fragment: */
+#define TO_IND 0, RDIND
+#define TO_IND_MOV 0, RDIND | B30
+#define TO_POSTINC 8, RDPOSTINC
+#define TO_POSTINC_MOV 8, RDPOSTINC | B30
+#define TO_POSTDEC 10, RDPOSTDEC
+#define TO_POSTDEC_MOV 10, RDPOSTDEC | B30
+#define TO_PREINC 9, RDPREINC
+#define TO_PREINC_MOV 9, RDPREINC | B30
+#define TO_PREDEC 11, RDPREDEC
+#define TO_PREDEC_MOV 11, RDPREDEC | B30
+#define TO_DISP2 B30 | B20 | DISP2DST, DSTDISPREG
+#define TO_DISP2_MOV B30 | B20 | DISP2DST, DSTDISPREG | B30
+#define TO_DISP16 12, B30 | DSTDISPREG
+#define TO_DISP32 12, B31 | DSTDISPREG
+#define TO_DISP16B 13, B30 | DSTDISPREG
+#define TO_DISP16W 14, B30 | DSTDISPREG
+#define TO_DISP16L 15, B30 | DSTDISPREG
+#define TO_DISP32B 13, B31 | DSTDISPREG
+#define TO_DISP32W 14, B31 | DSTDISPREG
+#define TO_DISP32L 15, B31 | DSTDISPREG
+#define TO_ABS16 4, B30 | IGNORE
+#define TO_ABS32 4, B31 | IGNORE
+
+/* Source fragment for three-word instruction: */
+#define TFROM_IND 6, 9, B30 | RSIND, 12
+#define TFROM_DISP2 6, 9, B30 | DISPREG, 12
+#define TFROM_ABS16 6, 11, B30 | B20 | B10 | IGNORE, 12, ABS16LIST
+#define TFROM_ABS32 6, 11, B30 | B20 | B11 | IGNORE, 12, ABS32LIST
+#define TFROM_POSTINC 6, 13, B30 | RSPOSTINC, 12
+#define TFROM_PREINC 6, 13, B30 | RSPREINC, 12
+#define TFROM_POSTDEC 6, 13, B30 | RSPOSTDEC, 12
+#define TFROM_PREDEC 6, 13, B30 | RSPREDEC, 12
+#define TFROM_DISP16 6, 15, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP32 6, 11, 2, 12, DISP32LIST
+#define TFROM_DISP16B 6, 15, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP16W 6, 15, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP16L 6, 15, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP32B 6, 11, 2, 12, DISP32LIST
+#define TFROM_DISP32W 6, 11, 2, 12, DISP32LIST
+#define TFROM_DISP32L 6, 11, 2, 12, DISP32LIST
+#define TFROM_ABS16W 6, 11, 1, 12, ABS16LIST
+#define TFROM_ABS32W 6, 11, 3, 12, ABS32LIST
+
+/* Source fragment for three-word instruction: */
+#define TFROM_IND_B 6, 8, B30 | RSIND, 12
+#define TFROM_ABS16_B 6, 10, B30 | B20 | B10 | IGNORE, 12, ABS16LIST
+#define TFROM_ABS32_B 6, 10, B30 | B20 | B11 | IGNORE, 12, ABS32LIST
+
+#define TFROM_DISP2_B 6, 8, B30 | DISPREG, 12
+#define TFROM_POSTINC_B 6, 12, B30 | RSPOSTINC, 12
+#define TFROM_PREINC_B 6, 12, B30 | RSPREINC, 12
+#define TFROM_POSTDEC_B 6, 12, B30 | RSPOSTDEC, 12
+#define TFROM_PREDEC_B 6, 12, B30 | RSPREDEC, 12
+#define TFROM_DISP16_B 6, 14, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP32_B 6, 10, 2, 12, DISP32LIST
+#define TFROM_DISP16B_B 6, 14, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP16W_B 6, 14, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP16L_B 6, 14, B30 | DISPREG, 12, DISP16LIST
+#define TFROM_DISP32B_B 6, 10, 2, 12, DISP32LIST
+#define TFROM_DISP32W_B 6, 10, 2, 12, DISP32LIST
+#define TFROM_DISP32L_B 6, 10, 2, 12, DISP32LIST
+
+#define TFROM_ABS16W_B 6, 10, 1, 12, ABS16LIST
+#define TFROM_ABS32W_B 6, 10, 3, 12, ABS32LIST
+
+/* Extended Operand Class Expanders: */
+
+#define MOVFROM_STD(CODE, PREFIX, NAME, SRC, SRC_INFIX) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, SRC_INFIX, TO_IND_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, SRC_INFIX, TO_POSTINC_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, SRC_INFIX, TO_POSTDEC_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, SRC_INFIX, TO_PREINC_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, SRC_INFIX, TO_PREDEC_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP2_MOV, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP16, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP32, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16B, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16W, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16L, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32B, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32W, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32L, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS16, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS32, DSTABS32LIST, E}}}
+
+#define MOVFROM_AD(CODE, PREFIX, NAME, SRC, SRC_INFIX, SRC_SUFFIX) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, SRC_INFIX, TO_IND_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, SRC_INFIX, TO_POSTINC_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, SRC_INFIX, TO_POSTDEC_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, SRC_INFIX, TO_PREINC_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, SRC_INFIX, TO_PREDEC_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP2_MOV, SRC_SUFFIX, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP16, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP32, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16B, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16W, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16L, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32B, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32W, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32L, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS16, SRC_SUFFIX, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS32, SRC_SUFFIX, DSTABS32LIST, E}}}
+
+#define MOVFROM_IMM8(CODE, PREFIX, NAME, SRC) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, 0, RDIND, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, 8, RDPOSTINC, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, 10, RDPOSTDEC, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, 9, RDPREINC, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, 11, RDPREDEC, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, B30 | B20 | DISP2DST, DSTDISPREG, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, 12, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, 12, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, 13, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, 14, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, 15, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, 13, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, 14, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, 15, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, 4, B30 | IGNORE, IMM8LIST, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, 4, B31 | IGNORE, IMM8LIST, DSTABS32LIST, E}}}
+
+#define MOVFROM_IMM(CODE, PREFIX, NAME, SRC, LIST) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, LIST, 0, RDIND, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, LIST, 8, RDPOSTINC, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, LIST, 10, RDPOSTDEC, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, LIST, 9, RDPREINC, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, LIST, 11, RDPREDEC, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, LIST, B30 | B20 | DISP2DST, DSTDISPREG, DATA2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, LIST, 12, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, LIST, 12, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, LIST, 13, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, LIST, 14, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, LIST, 15, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, LIST, 13, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, LIST, 14, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, LIST, 15, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, LIST, 4, B30 | IGNORE, DATA2, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, LIST, 4, B31 | IGNORE, DATA2, DSTABS32LIST, E}}}
+
+#define MOVFROM_REG_BW(CODE, NAME, SRC, PREFIX, OP1, OP2, OP3, OP4, RELAX16) \
+ {CODE, AV_H8, 4, NAME, {{SRC, RDIND, E}}, {{ 6, OP1, B31 | RDIND, SRC, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, 3, 6, OP3, B31 | RDPOSTINC, SRC, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, 1, 6, OP3, B31 | RDPOSTDEC, SRC, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, 2, 6, OP3, B31 | RDPREINC, SRC, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{SRC, RDPREDEC, E}}, {{ 6, OP3, B31 | RDPREDEC, SRC, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, B30 | B20 | DISP2DST, 6, OP1, B31 | DSTDISPREG, SRC, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{SRC, DISP16DST, E}}, {{ 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{SRC, DISP32DST, E}}, {{7, 8, B30 | DSTDISPREG, 0, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, 1, 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, 2, 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, 3, 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{7, 8, B30 | DSTDISPREG, 1, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{7, 8, B30 | DSTDISPREG, 2, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{7, 8, B30 | DSTDISPREG, 3, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8, 4, NAME, {{SRC, ABS16DST, E}}, {{ 6, OP2, 8, SRC, RELAX16 | DSTABS16LIST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{SRC, ABS32DST, E}}, {{ 6, OP2, 10, SRC, MEMRELAX | DSTABS32LIST, E}}}
+
+#define MOVTO_REG_BW(CODE, NAME, DST, PREFIX, OP1, OP2, OP3, OP4, RELAX16) \
+ {CODE, AV_H8, 4, NAME, {{RSIND, DST, E}}, {{ 6, OP1, B30 | RSIND, DST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{RSPOSTINC, DST, E}}, {{ 6, OP3, B30 | RSPOSTINC, DST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, DST, E}}, {{PREFIX, 2, 6, OP3, B30 | RSPOSTDEC, DST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREINC, DST, E}}, {{PREFIX, 1, 6, OP3, B30 | RSPREINC, DST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, DST, E}}, {{PREFIX, 3, 6, OP3, B30 | RSPREDEC, DST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, DST, E}}, {{PREFIX, B30 | B20 | DISP2SRC, 6, OP1, B30 | DISPREG, DST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{DISP16SRC, DST, E}}, {{ 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{DISP32SRC, DST, E}}, {{7, 8, B30 | DISPREG, 0, 6, OP2, 2, DST, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB16, DST, E}}, {{PREFIX, 1, 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW16, DST, E}}, {{PREFIX, 2, 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL16, DST, E}}, {{PREFIX, 3, 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB32, DST, E}}, {{7, 8, B30 | DISPREG, 1, 6, OP2, 2, DST, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW32, DST, E}}, {{7, 8, B30 | DISPREG, 2, 6, OP2, 2, DST, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL32, DST, E}}, {{7, 8, B30 | DISPREG, 3, 6, OP2, 2, DST, DISP32LIST, E}}}, \
+ {CODE, AV_H8, 4, NAME, {{ABS16SRC, DST, E}}, {{ 6, OP2, 0, DST, RELAX16 | ABS16LIST, E}}}, \
+ {CODE, AV_H8, 6, NAME, {{ABS32SRC, DST, E}}, {{ 6, OP2, 2, DST, MEMRELAX | ABS32LIST, E}}}
+
+/*
+ * Expansion macros for two-word (plus data) instructions.
+ */
+
+/* Expansion from one source to "standard" destinations. */
+#define EXPAND2_STD_SRC(CODE, WEIGHT, NAME, SRC, PREFIX, NIB1, NIB2) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, TO_POSTINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, TO_POSTDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, TO_PREINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, TO_PREDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, TO_DISP2, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, TO_DISP16, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, TO_DISP32, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, TO_DISP16B, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, TO_DISP16W, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, TO_DISP16L, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, TO_DISP32B, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, TO_DISP32W, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, TO_DISP32L, NIB1, NIB2, DSTDISP32LIST, E}}}
+
+/* Expansion from one destination to "standard" sources. */
+#define EXPAND2_STD_DST(CODE, WEIGHT, NAME, DST, PREFIX, NIB1, NIB2) \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, DST, E}}, {{PREFIX, FROM_POSTINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, DST, E}}, {{PREFIX, FROM_POSTDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREINC, DST, E}}, {{PREFIX, FROM_PREINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, DST, E}}, {{PREFIX, FROM_PREDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, DST, E}}, {{PREFIX, FROM_DISP2, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, DST, E}}, {{PREFIX, FROM_DISP16, NIB1, NIB2, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, DST, E}}, {{PREFIX, FROM_DISP32, NIB1, NIB2, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB16, DST, E}}, {{PREFIX, FROM_DISP16B, NIB1, NIB2, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW16, DST, E}}, {{PREFIX, FROM_DISP16W, NIB1, NIB2, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL16, DST, E}}, {{PREFIX, FROM_DISP16L, NIB1, NIB2, DISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB32, DST, E}}, {{PREFIX, FROM_DISP32B, NIB1, NIB2, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW32, DST, E}}, {{PREFIX, FROM_DISP32W, NIB1, NIB2, DISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL32, DST, E}}, {{PREFIX, FROM_DISP32L, NIB1, NIB2, DISP32LIST, E}}}
+
+/* Expansion from immediate source to "standard" destinations. */
+#define EXPAND2_STD_IMM(CODE, WEIGHT, NAME, SRC, PREFIX, OPCODE, IGN, IMMLIST) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, TO_POSTINC, OPCODE, IGN, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, TO_POSTDEC, OPCODE, IGN, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, TO_PREINC, OPCODE, IGN, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, TO_PREDEC, OPCODE, IGN, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, TO_DISP2, OPCODE, IGN, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, TO_DISP16, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, TO_DISP32, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, TO_DISP16B, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, TO_DISP16W, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, TO_DISP16L, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, TO_DISP32B, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, TO_DISP32W, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, TO_DISP32L, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}
+
+/* Expansion from abs/disp source to "standard" destinations. */
+#define EXPAND2_STD_ABSDISP(CODE, WEIGHT, NAME, SRC, PREFIX, DSTLIST, NIB1, NIB2) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, DSTLIST, TO_POSTINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, DSTLIST, TO_POSTDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, DSTLIST, TO_PREINC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, DSTLIST, TO_PREDEC, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, DSTLIST, TO_DISP2, NIB1, NIB2, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, DSTLIST, TO_DISP16, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, DSTLIST, TO_DISP32, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, DSTLIST, TO_DISP16B, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, DSTLIST, TO_DISP16W, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, DSTLIST, TO_DISP16L, NIB1, NIB2, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, DSTLIST, TO_DISP32B, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, DSTLIST, TO_DISP32W, NIB1, NIB2, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, DSTLIST, TO_DISP32L, NIB1, NIB2, DSTDISP32LIST, E}}}
+
+/* Expansion from ind source to "standard" destinations. */
+#define EXPAND2_STD_IND(CODE, WEIGHT, NAME, OPCODE, BIT) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPOSTINC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_POSTINC, OPCODE, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPOSTDEC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_POSTDEC, OPCODE, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPREINC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_PREINC, OPCODE, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPREDEC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_PREDEC, OPCODE, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, DISP2DST, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP2, OPCODE, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, DISP16DST, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, DISP32DST, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32, OPCODE, IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXB16D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16B, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXW16D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16W, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXL16D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16L, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXB32D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32B, OPCODE, IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXW32D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32W, OPCODE, IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXL32D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32L, OPCODE, IGNORE, DSTDISP32LIST, E}}}
+
+/*
+ * Expansion macros for three word (plus data) instructions.
+ */
+
+#define EXPAND3_STD_SRC(CODE, WEIGHT, NAME, SRC, PREFIX, INFIX, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, INFIX, 8, RDPOSTINC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, INFIX, 10, RDPOSTDEC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, INFIX, 9, RDPREINC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, INFIX, 11, RDPREDEC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, INFIX, B30 | B20 | DISP2DST, DSTDISPREG, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, INFIX, 12, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, INFIX, 12, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, INFIX, 13, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, INFIX, 14, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, INFIX, 15, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, INFIX, 13, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, INFIX, 14, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, INFIX, 15, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}
+
+#define EXPAND3_L_SRC(CODE, WEIGHT, NAME, SRC, PREFIX, INFIX, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, INFIX, 0, RDIND, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, INFIX, 8, RDPOSTINC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, INFIX, 10, RDPOSTDEC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, INFIX, 9, RDPREINC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, INFIX, 11, RDPREDEC, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, INFIX, B30 | B20 | DISP2DST, DSTDISPREG, OPCODE, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, INFIX, 12, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, INFIX, 12, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, INFIX, 13, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, INFIX, 14, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, INFIX, 15, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, INFIX, 13, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, INFIX, 14, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, INFIX, 15, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, INFIX, 4, B30 | IGNORE, OPCODE, B30 | IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, INFIX, 4, B31 | IGNORE, OPCODE, B30 | IGNORE, DSTABS32LIST, E}}}
+
+
+#define EXPAND_STD_MATRIX_L(CODE, NAME, OPCODE) \
+ EXPAND3_L_SRC (CODE, 6, NAME, RSIND, PREFIX_0104, TFROM_IND, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, RSPOSTINC, PREFIX_0104, TFROM_POSTINC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, RSPOSTDEC, PREFIX_0106, TFROM_POSTDEC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, RSPREINC, PREFIX_0105, TFROM_PREINC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, RSPREDEC, PREFIX_0107, TFROM_PREDEC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, DISP2SRC, PREFIX_010_D2, TFROM_DISP2, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, DISP16SRC, PREFIX_0104, TFROM_DISP16, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, DISP32SRC, PREFIX_78R4, TFROM_DISP32, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXB16, PREFIX_0105, TFROM_DISP16B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXW16, PREFIX_0106, TFROM_DISP16W, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXL16, PREFIX_0107, TFROM_DISP16L, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXB32, PREFIX_78R5, TFROM_DISP32B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXW32, PREFIX_78R6, TFROM_DISP32W, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, INDEXL32, PREFIX_78R7, TFROM_DISP32L, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, ABS16SRC, PREFIX_0104, TFROM_ABS16, OPCODE), \
+ EXPAND3_L_SRC (CODE, 6, NAME, ABS32SRC, PREFIX_0104, TFROM_ABS32, OPCODE)
+
+
+#define EXPAND_STD_MATRIX_W(CODE, NAME, OPCODE) \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTINC, PREFIX_0154, TFROM_POSTINC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTDEC, PREFIX_0156, TFROM_POSTDEC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPREINC, PREFIX_0155, TFROM_PREINC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPREDEC, PREFIX_0157, TFROM_PREDEC, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP2SRC, PREFIX_015_D2, TFROM_DISP2, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP16SRC, PREFIX_0154, TFROM_DISP16, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP32SRC, PREFIX_78R4W, TFROM_DISP32, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXB16, PREFIX_0155, TFROM_DISP16B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXW16, PREFIX_0156, TFROM_DISP16W, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXL16, PREFIX_0157, TFROM_DISP16L, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXB32, PREFIX_78R5W, TFROM_DISP32B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXW32, PREFIX_78R6W, TFROM_DISP32W, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXL32, PREFIX_78R7W, TFROM_DISP32L, OPCODE)
+
+#define EXPAND_STD_MATRIX_B(CODE, NAME, OPCODE) \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTINC, PREFIX_0174, TFROM_POSTINC_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTDEC, PREFIX_0176, TFROM_POSTDEC_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPREINC, PREFIX_0175, TFROM_PREINC_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, RSPREDEC, PREFIX_0177, TFROM_PREDEC_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP2SRC, PREFIX_017_D2S, TFROM_DISP2_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP16SRC, PREFIX_0174, TFROM_DISP16_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, DISP32SRC, PREFIX_78R4W, TFROM_DISP32_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXB16, PREFIX_0175, TFROM_DISP16B_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXW16, PREFIX_0176, TFROM_DISP16W_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXL16, PREFIX_0177, TFROM_DISP16L_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXB32, PREFIX_78R5W, TFROM_DISP32B_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXW32, PREFIX_78R6W, TFROM_DISP32W_B, OPCODE), \
+ EXPAND3_L_SRC (CODE, 4, NAME, INDEXL32, PREFIX_78R7W, TFROM_DISP32L_B, OPCODE)
+
+
+/*
+ * Use the expansion macros to fill out the opcode table.
+ */
+
+#define EXPAND_FROM_REG8(CODE, NAME, OP1, OP2, OP3) \
+ {CODE, AV_H8SX, 0, NAME, {{RS8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, OP1, OP2, RS8, IGNORE, E}}}, \
+ EXPAND2_STD_SRC (CODE, 2, NAME, RS8, PREFIX_0179, OP3, RS8), \
+ {CODE, AV_H8SX, 0, NAME, {{RS8, ABS8DST, E}}, {{0x7, 0xf, DSTABS8LIST, OP1, OP2, RS8, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RS8, ABS16DST, E}}, {{0x6, 0xa, 0x1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, RS8, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RS8, ABS32DST, E}}, {{0x6, 0xa, 0x3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, RS8, IGNORE, E}}}
+
+#define EXPAND_TO_REG8(CODE, NAME, OP1, OP2, OP3) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RD8, E}}, {{0x7, 0xc, B30 | RSIND, IGNORE, OP1, OP2, IGNORE, RD8, E}}}, \
+ EXPAND2_STD_DST (CODE, 2, NAME, RD8, PREFIX_017A, OP3, RD8), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS8SRC, RD8, E}}, {{0x7, 0xe, ABS8LIST, OP1, OP2, IGNORE, RD8, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RD8, E}}, {{0x6, 0xa, 0x1, B30 | IGNORE, ABS16LIST, OP1, OP2, IGNORE, RD8, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RD8, E}}, {{0x6, 0xa, 0x3, B30 | IGNORE, ABS32LIST, OP1, OP2, IGNORE, RD8, E}}}
+
+#define EXPAND_FROM_IND8(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDIND, E}}, {{0x7, 0xc, B30 | RSIND, 0x5, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_IND (CODE, 2, NAME, OPCODE, B30), \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS16DST, E}}, {{0x7, 0xc, B30 | RSIND, 0x5, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS32DST, E}}, {{0x7, 0xc, B30 | RSIND, 0x5, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_ABS16_B(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RDIND, E}}, {{PREFIX_6A15, ABS16LIST, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS16SRC, PREFIX_6A15, ABS16LIST, OPCODE, IGNORE), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS16DST, E}}, {{PREFIX_6A15, ABS16LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS32DST, E}}, {{PREFIX_6A15, ABS16LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_ABS32_B(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RDIND, E}}, {{PREFIX_6A35, ABS32LIST, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS32SRC, PREFIX_6A35, ABS32LIST, OPCODE, IGNORE), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS16DST, E}}, {{PREFIX_6A35, ABS32LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS32DST, E}}, {{PREFIX_6A35, ABS32LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_IMM16_W(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16, RDIND, E}}, {{PREFIX_015E, TO_IND, OPCODE, IGNORE, IMM16LIST, E}}}, \
+ EXPAND2_STD_IMM (CODE, 2, NAME, IMM16, PREFIX_015E, OPCODE, IGNORE, IMM16LIST), \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16, ABS16DST, E}}, {{PREFIX_015E, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, IMM16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16, ABS32DST, E}}, {{PREFIX_015E, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, IMM16LIST, E}}}
+
+#define EXPAND_FROM_REG16(CODE, NAME, OP1, OP2, OP3) \
+ {CODE, AV_H8, 2, NAME, {{RS16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, OP1, OP2, RS16, IGNORE, E}}}, \
+ EXPAND2_STD_SRC (CODE, 2, NAME, RS16, PREFIX_0159, OP3, RS16), \
+ {CODE, AV_H8SX, 0, NAME, {{RS16, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, RS16, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RS16, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, RS16, IGNORE, E}}}
+
+#define EXPAND_TO_REG16(CODE, NAME, OP1, OP2, OP3) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RD16, E}}, {{0x7, 0xc, B31 | RSIND, IGNORE, OP1, OP2, IGNORE, RD16, E}}}, \
+ EXPAND2_STD_DST (CODE, 2, NAME, RD16, PREFIX_015A, OP3, RD16), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RD16, E}}, {{0x6, 0xb, 0x1, B30 | IGNORE, ABS16LIST, OP1, OP2, IGNORE, RD16, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RD16, E}}, {{0x6, 0xb, 0x3, B30 | IGNORE, ABS32LIST, OP1, OP2, IGNORE, RD16, E}}}
+
+#define EXPAND_FROM_IND16(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RDIND, E}}, {{0x7, 0xc, B31 | RSIND, 0x5, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_IND (CODE, 2, NAME, OPCODE, B31), \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS16DST, E}}, {{0x7, 0xc, B31 | RSIND, 0x5, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS32DST, E}}, {{0x7, 0xc, B31 | RSIND, 0x5, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_ABS16_W(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RDIND, E}}, {{PREFIX_6B15, ABS16LIST, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS16SRC, PREFIX_6B15, ABS16LIST, OPCODE, IGNORE), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS16DST, E}}, {{PREFIX_6B15, ABS16LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS32DST, E}}, {{PREFIX_6B15, ABS16LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_ABS32_W(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RDIND, E}}, {{PREFIX_6B35, ABS32LIST, TO_IND, OPCODE, IGNORE, E}}}, \
+ EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS32SRC, PREFIX_6B35, ABS32LIST, OPCODE, IGNORE), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS16DST, E}}, {{PREFIX_6B35, ABS32LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS32DST, E}}, {{PREFIX_6B35, ABS32LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
+
+#define EXPAND_FROM_IMM16_L(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, RDIND, E}}, {{PREFIX_010E, TO_IND, OPCODE, B30 | IGNORE, IMM16ULIST, E}}}, \
+ EXPAND2_STD_IMM (CODE, 2, NAME, IMM16U_NS, PREFIX_010E, OPCODE, B30 | IGNORE, IMM16ULIST), \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, ABS16DST, E}}, {{PREFIX_010E, TO_ABS16, OPCODE, B30 | IGNORE, DSTABS16LIST, IMM16ULIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, ABS32DST, E}}, {{PREFIX_010E, TO_ABS32, OPCODE, B30 | IGNORE, DSTABS32LIST, IMM16ULIST, E}}}
+
+#define EXPAND_FROM_IMM32_L(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{IMM32, RDIND, E}}, {{PREFIX_010E, TO_IND, OPCODE, B31 | IGNORE, IMM32LIST, E}}}, \
+ EXPAND2_STD_IMM (CODE, 2, NAME, IMM32, PREFIX_010E, OPCODE, B31 | IGNORE, IMM32LIST), \
+ {CODE, AV_H8SX, 0, NAME, {{IMM32, ABS16DST, E}}, {{PREFIX_010E, TO_ABS16, OPCODE, B31 | IGNORE, DSTABS16LIST, IMM32LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM32, ABS32DST, E}}, {{PREFIX_010E, TO_ABS32, OPCODE, B31 | IGNORE, DSTABS32LIST, IMM32LIST, E}}}
+
+#define EXPAND_FROM_REG32(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{RS32, RDIND, E}}, {{PREFIX_0109, TO_IND, OPCODE, B30 | RS32, E}}}, \
+ EXPAND2_STD_SRC (CODE, 2, NAME, RS32, PREFIX_0109, OPCODE, B30 | RS32), \
+ {CODE, AV_H8SX, 0, NAME, {{RS32, ABS16DST, E}}, {{PREFIX_0109, TO_ABS16, OPCODE, B30 | RS32, DSTABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RS32, ABS32DST, E}}, {{PREFIX_0109, TO_ABS32, OPCODE, B30 | RS32, DSTABS32LIST, E}}}
+
+#define EXPAND_TO_REG32(CODE, NAME, OPCODE) \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, RD32, E}}, {{PREFIX_010A, FROM_IND, OPCODE, B30 | RD32, E}}}, \
+ EXPAND2_STD_DST (CODE, 2, NAME, RD32, PREFIX_010A, OPCODE, B30 | RD32), \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RD32, E}}, {{PREFIX_010A, FROM_ABS16, OPCODE, B30 | RD32, ABS16LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RD32, E}}, {{PREFIX_010A, FROM_ABS32, OPCODE, B30 | RD32, ABS32LIST, E}}}
+
+
+#define EXPAND_TWOOP_B(CODE, NAME, OP1, OP2, OP3, OP4, BIT) \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPOSTINC, E}}, {{PREFIX_0174, 0x6, 0xc, B30 | RDPOSTINC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPREINC, E}}, {{PREFIX_0175, 0x6, 0xc, B30 | RDPREINC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPREDEC, E}}, {{PREFIX_0177, 0x6, 0xc, B30 | RDPREDEC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, DISP2DST, E}}, {{PREFIX_017_D2D, 0x6, 0x8, B30 | DSTDISPREG, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, DISP16DST, E}}, {{PREFIX_0174, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, DISP32DST, E}}, {{PREFIX_78R4WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXB16D, E}}, {{PREFIX_0175, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXW16D, E}}, {{PREFIX_0176, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXL16D, E}}, {{PREFIX_0177, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXB32D, E}}, {{PREFIX_78R5WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXW32D, E}}, {{PREFIX_78R6WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXL32D, E}}, {{PREFIX_78R7WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, ABS8DST, E}}, {{0x7, 0xf, DSTABS8LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, ABS16DST, E}}, {{0x6, 0xa, 0x1, B31 | B20 | IGNORE, DSTABS16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{IMM8, ABS32DST, E}}, {{0x6, 0xa, 0x3, B31 | B20 | IGNORE, DSTABS32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
+ {CODE, AV_H8, 2, NAME, {{RS8, RD8, E}}, {{OP2, OP3, RS8, RD8, E}}}, \
+ EXPAND_FROM_REG8 (CODE, NAME, OP2, OP3, OP4), \
+ EXPAND_TO_REG8 (CODE, NAME, OP2, OP3, OP4), \
+ EXPAND_FROM_IND8 (CODE, NAME, OP4), \
+ EXPAND_STD_MATRIX_B (CODE, NAME, OP4), \
+ EXPAND_FROM_ABS16_B (CODE, NAME, OP4), \
+ EXPAND_FROM_ABS32_B (CODE, NAME, OP4)
+
+#define EXPAND_TWOOP_W(CODE, NAME, OP1, OP2, OP3) \
+ {CODE, AV_H8H, 6, NAME, {{IMM16, RD16, E}}, {{0x7, 0x9, OP3, RD16, IMM16LIST, E}}}, \
+ EXPAND_FROM_IMM16_W (CODE, NAME, OP3), \
+ EXPAND_FROM_REG16 (CODE, NAME, OP1, OP2, OP3), \
+ EXPAND_TO_REG16 (CODE, NAME, OP1, OP2, OP3), \
+ EXPAND_FROM_IND16 (CODE, NAME, OP3), \
+ EXPAND_STD_MATRIX_W (CODE, NAME, OP3), \
+ EXPAND_FROM_ABS16_W (CODE, NAME, OP3), \
+ EXPAND_FROM_ABS32_W (CODE, NAME, OP3)
+
+#define EXPAND_TWOOP_L(CODE, NAME, OP1) \
+ {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, RD32, E}}, {{0x7, 0xa, OP1, B31 | RD32, IMM16ULIST, E}}}, \
+ {CODE, AV_H8H, 6, NAME, {{IMM32, RD32, E}}, {{0x7, 0xa, OP1, B30 | RD32, IMM32LIST, E}}}, \
+ EXPAND_FROM_IMM16_L (CODE, NAME, OP1), \
+ EXPAND_FROM_IMM32_L (CODE, NAME, OP1), \
+ EXPAND_FROM_REG32 (CODE, NAME, OP1), \
+ EXPAND_TO_REG32 (CODE, NAME, OP1), \
+ EXPAND_STD_MATRIX_L (CODE, NAME, OP1)
+
+
+/*
+ * Old expanders:
+ */
+
+#define BITOP(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
+ {code, AV_H8, 2, name, {{imm, RD8, E}}, {{op00, op01, imm, RD8, E}}}, \
+ {code, AV_H8, 6, name, {{imm, RDIND, E}}, {{op10, op11, B30 | RDIND, 0, op00, op01, imm, 0, E}}}, \
+ {code, AV_H8, 6, name, {{imm, ABS8DST, E}}, {{op20, op21, DSTABS8LIST, op00, op01, imm, 0, E}}}, \
+ {code, AV_H8H, 6, name, {{imm, ABS16DST, E}}, {{0x6, 0xa, 0x1, op30, DST | ABS16LIST, op00, op01, imm, op4, E}}}, \
+ {code, AV_H8H, 6, name, {{imm, ABS32DST, E}}, {{0x6, 0xa, 0x3, op30, DST | ABS32LIST, op00, op01, imm, op4, E}}}
+
+#define BITOP_B(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
+ {code, AV_H8SX, 0, name, {{imm, RDIND, E}}, {{op10, op11, B30 | RDIND, 0, op00, op01, imm, op4, E}}}, \
+ {code, AV_H8SX, 0, name, {{imm, ABS8DST, E}}, {{op20, op21, DSTABS8LIST, op00, op01, imm, op4, E}}}, \
+ {code, AV_H8SX, 0, name, {{imm, ABS16DST, E}}, {{0x6, 0xa, 0x1, op30, DST | ABS16LIST, op00, op01, imm, op4, E}}}, \
+ {code, AV_H8SX, 0, name, {{imm, ABS32DST, E}}, {{0x6, 0xa, 0x3, op30, DST | ABS32LIST, op00, op01, imm, op4, E}}}
+
+#define EBITOP(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
+ BITOP(code, imm, name, op00+1, op01, op10, op11, op20, op21, op30, op4), \
+ BITOP(code, RS8, name, op00, op01, op10, op11, op20, op21, op30, op4)
+
+#define EBITOP_B(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
+ BITOP_B(code, imm, name, op00+1, op01, op10, op11, op20, op21, op30, op4), \
+ BITOP_B(code, RS8, name, op00, op01, op10, op11, op20, op21, op30, op4)
+
+#define WTWOP(code, name, op1, op2) \
+ {code, AV_H8, 2, name, {{RS16, RD16, E}}, {{op1, op2, RS16, RD16, E}}}
#define BRANCH(code, name, op) \
-{ code, 1, 4,name,{{DISP8,E,0}}, {{ 0x4, op, DISP8, IGNORE, E, 0, 0, 0, 0}}}, \
-{ code, 0, 6,name,{{DISP16,E,0}}, {{ 0x5, 0x8, op, 0x0, DISP16, IGNORE, IGNORE, IGNORE, E,0}}}
-
-#define SOP(code, x,name) \
-{code, 1, x, name
-
-#define NEW_SOP(code, in,x,name) \
-{code, in, x, name
-#define EOP }
-
-#define TWOOP(code, name, op1, op2,op3) \
-{ code,1, 2,name, {{IMM8, RD8, E}}, {{ op1, RD8, IMM8, IGNORE, E, 0, 0, 0, 0}}},\
-{ code, 1, 2,name, {{RS8, RD8, E}}, {{ op2, op3, RS8, RD8, E, 0, 0, 0, 0}}}
-
-#define UNOP(code,name, op1, op2) \
-{ code, 1, 2, name, {{OR8, E, 0}}, {{ op1, op2, 0, OR8, E, 0, 0, 0, 0}}}
-
-#define UNOP3(code, name, op1, op2, op3) \
-{ O(code,SB), 1, 2, name, {{OR8, E, 0}}, {{op1, op2, op3+0, OR8, E, 0, 0, 0, 0}}}, \
-{ O(code,SW), 0, 2, name, {{OR16, E, 0}}, {{op1, op2, op3+1, OR16, E, 0, 0, 0, 0}}}, \
-{ O(code,SL), 0, 2, name, {{OR32, E, 0}}, {{op1, op2, op3+3, OR32|B30, E, 0, 0, 0, 0}}} \
-,{ O(code,SB), 1, 2, name, {{IMM, OR8 | SRC_IN_DST, E}}, {{op1, op2, op3+4, OR8 | SRC_IN_DST, E, 0, 0, 0, 0}}}, \
-{ O(code,SW), 0, 2, name, {{IMM, OR16 | SRC_IN_DST, E}}, {{op1, op2, op3+5, OR16 | SRC_IN_DST, E, 0, 0, 0, 0}}}, \
-{ O(code,SL), 0, 2, name, {{IMM, OR32 | SRC_IN_DST, E}}, {{op1, op2, op3+7, OR32 | SRC_IN_DST|B30 , E, 0, 0, 0, 0}}}
-
-
-#define IMM32LIST IMM32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define IMM24LIST IMM24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define IMM16LIST IMM16,IGNORE,IGNORE,IGNORE
-#define A16LIST L_16,IGNORE,IGNORE,IGNORE
-#define DISP24LIST DISP|L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define DISP32LIST DISP|L_32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define ABS24LIST ABS|L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define ABS32LIST ABS|L_32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define A24LIST L_24,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define A32LIST L_32,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE
-#define PREFIX32 0x0,0x1,0x0,0x0
-#define PREFIXLDC 0x0,0x1,0x4,0x0
-
-
-#define O(op, size) (op * 4 + size)
-
-#define O_RECOMPILE 0
-#define O_ADD 1
-#define O_ADDX 2
-#define O_AND 3
-#define O_BAND 4
-#define O_BRA 5
-#define O_BRN 6
-#define O_BHI 7
-#define O_BLS 8
-#define O_BCC 9
-#define O_BCS 10
-#define O_BNE 11
-#define O_BVC 12
-#define O_BVS 13
-#define O_BPL 14
-#define O_BMI 15
-#define O_BGE 16
-#define O_BLT 17
-#define O_BGT 18
-#define O_BLE 19
-#define O_ANDC 20
-#define O_BEQ 21
-#define O_BCLR 22
-#define O_BIAND 23
-#define O_BILD 24
-#define O_BIOR 25
-#define O_BIXOR 26
-#define O_BIST 27
-#define O_BLD 28
-#define O_BNOT 29
-#define O_BSET 30
-#define O_BSR 31
-#define O_BXOR 32
-#define O_CMP 33
-#define O_DAA 34
-#define O_DAS 35
-#define O_DEC 36
-#define O_DIVU 37
-#define O_DIVS 38
-#define O_INC 39
-#define O_LDC 40
-#define O_MOV_TO_MEM 41
-#define O_OR 42
-#define O_ROTL 43
-#define O_ROTR 44
-#define O_ROTXL 45
-#define O_ROTXR 46
-#define O_BPT 47
-#define O_SHAL 48
-#define O_SHAR 49
-#define O_SHLL 50
-#define O_SHLR 51
-#define O_SUB 52
-#define O_SUBS 53
-#define O_TRAPA 54
-#define O_XOR 55
-#define O_XORC 56
-#define O_BOR 57
-#define O_BST 58
-#define O_BTST 59
-#define O_EEPMOV 60
-#define O_EXTS 61
-#define O_EXTU 62
-#define O_JMP 63
-#define O_JSR 64
-#define O_MULU 65
-#define O_MULS 66
-#define O_NOP 67
-#define O_NOT 68
-#define O_ORC 69
-#define O_RTE 70
-#define O_STC 71
-#define O_SUBX 72
-#define O_NEG 73
-#define O_RTS 74
-#define O_SLEEP 75
-#define O_ILL 76
-#define O_ADDS 77
-#define O_SYSCALL 78
-#define O_MOV_TO_REG 79
-#define O_TAS 80
-#define O_CLRMAC 82
-#define O_LDMAC 83
-#define O_MAC 84
-#define O_LDM 85
-#define O_STM 86
-#define O_STMAC 87
-#define O_LAST 88
-/* Change made for System Call processing. */
-#define O_SYS_CREAT 100
-#define O_SYS_OPEN 101
-#define O_SYS_READ 102
-#define O_SYS_WRITE 103
-#define O_SYS_LSEEK 104
-#define O_SYS_CLOSE 105
-#define O_SYS_STAT 106
-#define O_SYS_FSTAT 107
+ {code, AV_H8H, 6, name, {{PCREL16, E}}, {{0x5, 0x8, op, 0x0, PCREL16, DATA3 | B00, E}}}, \
+ {code, AV_H8, 4, name, {{PCREL8, E}}, {{0x4, op, PCREL8, DATA | B00, E}}}
+
+
+#define UNOP(code, name, op1, op2) \
+ {code, AV_H8, 2, name, {{OR8, E}}, {{op1, op2, 0, OR8, E}}}
+
+#define EXPAND_UNOP_STD_B(CODE, NAME, PREFIX, OP1, OP2, OP3) \
+ {CODE, AV_H8, 2, NAME, {{OR8, E}}, {{ OP1, OP2, OP3, OR8, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, E}}, {{ 7, 13, B30 | RSIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, E}}, {{PREFIX, 4, 6, 12, B30 | RSPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, E}}, {{PREFIX, 6, 6, 12, B30 | RSPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREINC, E}}, {{PREFIX, 5, 6, 12, B30 | RSPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, E}}, {{PREFIX, 7, 6, 12, B30 | RSPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, E}}, {{PREFIX, B30 | B21 | DISP2SRC, 6, 8, B30 | DISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, E}}, {{PREFIX, 4, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, E}}, {{7, 8, B30 | DISPREG, 4, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB16, E}}, {{PREFIX, 5, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW16, E}}, {{PREFIX, 6, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL16, E}}, {{PREFIX, 7, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB32, E}}, {{7, 8, B30 | DISPREG, 5, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW32, E}}, {{7, 8, B30 | DISPREG, 6, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL32, E}}, {{7, 8, B30 | DISPREG, 7, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS8SRC, E}}, {{ 7, 15, ABS8LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, E}}, {{ 6, 10, 1, B31 | IGNORE, ABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, E}}, {{ 6, 10, 3, B31 | IGNORE, ABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
+
+#define EXPAND_UNOP_STD_W(CODE, NAME, PREFIX, OP1, OP2, OP3) \
+ {CODE, AV_H8H, 2, NAME, {{OR16, E}}, {{ OP1, OP2, OP3, OR16, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, E}}, {{ 7, 13, B31 | RSIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RSPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RSPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RSPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RSPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, E}}, {{PREFIX, B30 | B21 | DISP2SRC, 6, 9, B30 | DISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, E}}, {{PREFIX, 4, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, E}}, {{7, 8, B30 | DISPREG, 4, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB16, E}}, {{PREFIX, 5, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW16, E}}, {{PREFIX, 6, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL16, E}}, {{PREFIX, 7, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB32, E}}, {{7, 8, B30 | DISPREG, 5, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW32, E}}, {{7, 8, B30 | DISPREG, 6, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL32, E}}, {{7, 8, B30 | DISPREG, 7, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, E}}, {{ 6, 11, 1, B31 | IGNORE, ABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, E}}, {{ 6, 11, 3, B31 | IGNORE, ABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
+
+#define EXPAND_UNOP_STD_L(CODE, NAME, PREFIX, OP1, OP2, OP3) \
+ {CODE, AV_H8H, 2, NAME, {{OR32, E}}, {{ OP1, OP2, OP3, B30 | OR32, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSIND, E}}, {{PREFIX, 4, 6, 9, B30 | RSIND, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RSPOSTINC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RSPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RSPREINC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RSPREDEC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, E}}, {{PREFIX, B30 | B21 | DISP2SRC, 6, 9, B30 | DISPREG, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, E}}, {{PREFIX, 4, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, E}}, {{7, 8, B31 | DISPREG, 4, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB16, E}}, {{PREFIX, 5, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW16, E}}, {{PREFIX, 6, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL16, E}}, {{PREFIX, 7, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXB32, E}}, {{7, 8, B31 | DISPREG, 5, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXW32, E}}, {{7, 8, B31 | DISPREG, 6, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{INDEXL32, E}}, {{7, 8, B31 | DISPREG, 7, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, E}}, {{PREFIX, 4, 6, 11, 0, B31 | IGNORE, ABS16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, E}}, {{PREFIX, 4, 6, 11, 2, B31 | IGNORE, ABS32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}
+
+#define EXPAND_UNOP_EXTENDED_B(CODE, NAME, CONST, PREFIX, OP1, OP2, OP3) \
+ {CODE, AV_H8, 2, NAME, {{CONST, RD8, E}}, {{ OP1, OP2, OP3, RD8, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDIND, E}}, {{ 7, 13, B30 | RDIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTINC, E}}, {{PREFIX, 4, 6, 12, B30 | RDPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTDEC, E}}, {{PREFIX, 6, 6, 12, B30 | RDPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREINC, E}}, {{PREFIX, 5, 6, 12, B30 | RDPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREDEC, E}}, {{PREFIX, 7, 6, 12, B30 | RDPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP2DST, E}}, {{PREFIX, B30 | B21 | DISP2DST, 6, 8, B30 | DSTDISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP16DST, E}}, {{PREFIX, 4, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP32DST, E}}, {{7, 8, B30 | DSTDISPREG, 4, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB16D, E}}, {{PREFIX, 5, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW16D, E}}, {{PREFIX, 6, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL16D, E}}, {{PREFIX, 7, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB32D, E}}, {{7, 8, B30 | DSTDISPREG, 5, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW32D, E}}, {{7, 8, B30 | DSTDISPREG, 6, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL32D, E}}, {{7, 8, B30 | DSTDISPREG, 7, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS8DST, E}}, {{ 7, 15, DSTABS8LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS16DST, E}}, {{ 6, 10, 1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS32DST, E}}, {{ 6, 10, 3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
+
+#define EXPAND_UNOP_EXTENDED_W(CODE, NAME, CONST, PREFIX, OP1, OP2, OP3) \
+ {CODE, AV_H8, 2, NAME, {{CONST, RD16, E}}, {{ OP1, OP2, OP3, RD16, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDIND, E}}, {{ 7, 13, B31 | RDIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RDPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RDPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RDPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RDPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP2DST, E}}, {{PREFIX, B30 | B21 | DISP2DST, 6, 9, B30 | DSTDISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP16DST, E}}, {{PREFIX, 4, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP32DST, E}}, {{7, 8, B30 | DSTDISPREG, 4, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB16D, E}}, {{PREFIX, 5, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW16D, E}}, {{PREFIX, 6, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL16D, E}}, {{PREFIX, 7, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB32D, E}}, {{7, 8, B30 | DSTDISPREG, 5, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW32D, E}}, {{7, 8, B30 | DSTDISPREG, 6, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL32D, E}}, {{7, 8, B30 | DSTDISPREG, 7, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS16DST, E}}, {{ 6, 11, 1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS32DST, E}}, {{ 6, 11, 3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
+
+#define EXPAND_UNOP_EXTENDED_L(CODE, NAME, CONST, PREFIX, OP1, OP2, OP3, BIT) \
+ {CODE, AV_H8, 2, NAME, {{CONST, RD32, E}}, {{ OP1, OP2, OP3, BIT | RD32, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDIND, E}}, {{PREFIX, 4, 6, 9, B30 | RDIND, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RDPOSTINC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RDPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RDPREINC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RDPREDEC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP2DST, E}}, {{PREFIX, B30 | B21 | DISP2DST, 6, 9, B30 | DSTDISPREG, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP16DST, E}}, {{PREFIX, 4, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, DISP32DST, E}}, {{7, 8, B31 | DSTDISPREG, 4, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB16D, E}}, {{PREFIX, 5, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW16D, E}}, {{PREFIX, 6, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL16D, E}}, {{PREFIX, 7, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB32D, E}}, {{7, 8, B31 | DSTDISPREG, 5, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW32D, E}}, {{7, 8, B31 | DSTDISPREG, 6, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL32D, E}}, {{7, 8, B31 | DSTDISPREG, 7, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS16DST, E}}, {{PREFIX, 4, 6, 11, 0, B31 | IGNORE, DSTABS16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
+ {CODE, AV_H8SX, 0, NAME, {{CONST, ABS32DST, E}}, {{PREFIX, 4, 6, 11, 2, B31 | IGNORE, DSTABS32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}
+
+#define PREFIXLDC 0x0, 0x1, 0x4, B30 | CCR_EXR | DST
+#define PREFIXSTC 0x0, 0x1, 0x4, B30 | CCR_EXR | SRC
+
+#define O(op, size) (op*4+size)
+#define OP_SIZE(HOW) (HOW % 4)
+#define OP_KIND(HOW) (HOW / 4)
+
+enum h8_asm_codes {
+ O_RECOMPILE = 0,
+ O_ADD,
+ O_ADDX,
+ O_AND,
+ O_BAND,
+ O_BRA,
+ O_BRAB,
+ O_BRAW,
+ O_BRAL,
+ O_BRAS,
+ O_BRABC,
+ O_BRABS,
+ O_BSRBC,
+ O_BSRBS,
+ O_BRN,
+ O_BHI,
+ O_BLS,
+ O_BCC,
+ O_BCS,
+ O_BNE,
+ O_BVC,
+ O_BVS,
+ O_BPL,
+ O_BMI,
+ O_BGE,
+ O_BLT,
+ O_BGT,
+ O_BLE,
+ O_ANDC,
+ O_BEQ,
+ O_BCLR,
+ O_BCLREQ,
+ O_BCLRNE,
+ O_BSETEQ,
+ O_BSETNE,
+ O_BFLD,
+ O_BFST,
+ O_BIAND,
+ O_BILD,
+ O_BIOR,
+ O_BIXOR,
+ O_BIST,
+ O_BISTZ,
+ O_BLD,
+ O_BNOT,
+ O_BOR,
+ O_BSET,
+ O_BSR,
+ O_BXOR,
+ O_CMP,
+ O_DAA,
+ O_DAS,
+ O_DEC,
+ O_DIVU,
+ O_DIVS,
+ O_DIVXU,
+ O_DIVXS,
+ O_INC,
+ O_LDC,
+ O_MOV,
+ O_MOVAB,
+ O_MOVAW,
+ O_MOVAL,
+ O_MOVMD,
+ O_MOVSD,
+ O_OR,
+ O_ROTL,
+ O_ROTR,
+ O_ROTXL,
+ O_ROTXR,
+ O_BPT,
+ O_SHAL,
+ O_SHAR,
+ O_SHLL,
+ O_SHLR,
+ O_SUB,
+ O_SUBS,
+ O_TRAPA,
+ O_XOR,
+ O_XORC,
+ O_BST,
+ O_BSTZ,
+ O_BTST,
+ O_EEPMOV,
+ O_EXTS,
+ O_EXTU,
+ O_JMP,
+ O_JSR,
+ O_MULU,
+ O_MULUU,
+ O_MULS,
+ O_MULSU,
+ O_MULXU,
+ O_MULXS,
+ O_NOP,
+ O_NOT,
+ O_ORC,
+ O_RTE,
+ O_RTEL,
+ O_STC,
+ O_SUBX,
+ O_NEG,
+ O_RTS,
+ O_RTSL,
+ O_SLEEP,
+ O_ILL,
+ O_ADDS,
+ O_SYSCALL,
+ O_TAS,
+ O_CLRMAC,
+ O_LDMAC,
+ O_MAC,
+ O_LDM,
+ O_STM,
+ O_STMAC,
+ O_LAST,
+ /* Change made for System Call processing. */
+ O_SYS_CREAT,
+ O_SYS_OPEN,
+ O_SYS_READ,
+ O_SYS_WRITE,
+ O_SYS_LSEEK,
+ O_SYS_CLOSE,
+ O_SYS_STAT,
+ O_SYS_FSTAT,
/* Space reserved for future file I/O system calls. */
-#define O_SYS_CMDLINE 120
-/* End of System Call specific Changes. */
-#define SB 0
-#define SW 1
-#define SL 2
-#define SN 3
+ O_SYS_CMDLINE
+ /* End of System Call specific Changes. */
+};
+
+enum h8_size {
+ SB = 0,
+ SW = 1,
+ SL = 2,
+ SN = 3
+};
+
/* FIXME: Lots of insns have "E, 0, 0, 0, 0" in the nibble code sequences.
Methinks the zeroes aren't necessary. Once confirmed, nuke 'em. */
-const struct h8_opcode h8_opcodes[] =
+struct h8_opcode h8_opcodes[] =
{
- TWOOP(O(O_ADD,SB),"add.b", 0x8, 0x0,0x8),
-
- NEW_SOP(O(O_ADD,SW),1,2,"add.w"),{{RS16,RD16,E}},{{0x0,0x9,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_ADD,SW),0,4,"add.w"),{{IMM16,RD16,E}},{{0x7,0x9,0x1,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_ADD,SL),0,2,"add.l"),{{RS32,RD32,E }}, {{0x0,0xA,B31|RS32,B30|RD32,E}} EOP,
- NEW_SOP(O(O_ADD,SL),0,6,"add.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x1,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_ADDS,SL),1,2,"adds"), {{KBIT,RDP,E}}, {{0x0,0xB,KBIT,RDP,E,0,0,0,0}} EOP,
-
- TWOOP(O(O_ADDX,SB),"addx",0x9,0x0,0xE),
- TWOOP(O(O_AND,SB), "and.b",0xE,0x1,0x6),
-
- NEW_SOP(O(O_AND,SW),0,2,"and.w"),{{RS16,RD16,E }},{{0x6,0x6,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_AND,SW),0,4,"and.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x6,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
+ {O (O_ADD, SB), AV_H8, 2, "add.b", {{IMM8, RD8, E}}, {{0x8, RD8, IMM8LIST, E}}},
+ EXPAND_TWOOP_B (O (O_ADD, SB), "add.b", 0x8, 0x0, 0x8, 0x1, 0),
+
+ {O (O_ADD, SW), AV_H8, 6, "add.w", {{RS16, RD16, E}}, {{0x0, 0x9, RS16, RD16, E}}},
+ {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, RD16, E}}, {{0x0, 0xa, B30 | IMM3NZ, RD16, E}}},
+ {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, 0x0, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, 0x0, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, 0x0, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ EXPAND_TWOOP_W (O (O_ADD, SW), "add.w", 0x0, 0x9, 0x1),
+
+ {O (O_ADD, SL), AV_H8H, 6, "add.l", {{RS32, RD32, E}}, {{0x0, 0xa, B31 | RS32, B30 | RD32, E}}},
+ {O (O_ADD, SL), AV_H8SX, 0, "add.l", {{IMM3NZ_NS, RD32, E}}, {{0x0, 0xa, B31 | IMM3NZ, B31 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_ADD, SL), "add.l", 0x1),
+
+ {O (O_ADDS, SL), AV_H8, 2, "adds", {{KBIT, RDP, E}}, {{0x0, 0xB,KBIT, RDP, E}}},
+
+ {O (O_ADDX, SB), AV_H8, 2, "addx", {{IMM8, RD8, E}}, {{0x9, RD8, IMM8LIST, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x9, IGNORE, IMM8LIST, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{IMM8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0x9, IGNORE, IMM8LIST, E}}},
+ {O (O_ADDX, SB), AV_H8, 2, "addx", {{RS8, RD8, E}}, {{0x0, 0xe, RS8, RD8, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RS8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x0, 0xe, RS8, IGNORE, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RS8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0x0, 0xe, RS8, IGNORE, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSIND, RD8, E}}, {{0x7, 0xc, B30 | RSIND, IGNORE, 0x0, 0xe, IGNORE, RD8, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSPOSTDEC, RD8, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, B30 | B20 | IGNORE, 0x0, 0xe, IGNORE, RD8, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSIND, RDIND, E}}, {{PREFIX_0174, 0x6, 0x8, B30 | RSIND, 0xd, 0x0, RDIND, 0x1, IGNORE, E}}},
+ {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x1, IGNORE, E}}},
+
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{IMM16, RD16, E}}, {{PREFIX_0151, 0x7, 0x9, 0x1, RD16, IMM16LIST, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{IMM16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x7, 0x9, 0x1, IGNORE, IMM16LIST, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{IMM16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0x9, 0x1, IGNORE, IMM16LIST, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RS16, RD16, E}}, {{PREFIX_0151, 0x0, 0x9, RS16, RD16, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RS16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x0, 0x9, RS16, IGNORE, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RS16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x0, 0x9, RS16, IGNORE, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSIND, RD16, E}}, {{0x7, 0xc, B31 | RSIND, B01 | IGNORE, 0x0, 0x9, IGNORE, RD16, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSPOSTDEC, RD16, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x0, 0x9, IGNORE, RD16, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSIND, RDIND, E}}, {{PREFIX_0154, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x1, IGNORE, E}}},
+ {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x1, IGNORE, E}}},
+
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{IMM32, RD32, E}}, {{PREFIX_0101, 0x7, 0xa, 0x1, RD32, IMM32LIST, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{IMM32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x1, IGNORE, IMM32LIST, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{IMM32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x1, IGNORE, IMM32LIST, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RS32, RD32, E}}, {{PREFIX_0101, 0x0, 0xa, B31 | RS32, B30 | RD32, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RS32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | RS32, B30 | IGNORE, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RS32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | RS32, B30 | IGNORE, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSIND, RD32, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, B30 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | IGNORE, B30 | RD32, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSPOSTDEC, RD32, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | IGNORE, B30 | RD32, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSIND, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x1, IGNORE, E}}},
+ {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x1, IGNORE, E}}},
+
+ {O (O_AND, SB), AV_H8, 2, "and.b", {{IMM8, RD8, E}}, {{0xe, RD8, IMM8LIST, E}}},
+ EXPAND_TWOOP_B (O (O_AND, SB), "and.b", 0xe, 0x1, 0x6, 0x6, 0),
+
+ {O (O_AND, SW), AV_H8, 2, "and.w", {{RS16, RD16, E}}, {{0x6, 0x6, RS16, RD16, E}}},
+ EXPAND_TWOOP_W (O (O_AND, SW), "and.w", 0x6, 0x6, 0x6),
+
+ {O (O_AND, SL), AV_H8H, 2, "and.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xF, 0x0, 0x6, 0x6, B30 | RS32, B30 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_AND, SL), "and.l", 0x6),
+
+ {O (O_ANDC, SB), AV_H8, 2, "andc", {{IMM8, CCR | DST, E}}, {{0x0, 0x6, IMM8LIST, E}}},
+ {O (O_ANDC, SB), AV_H8S, 2, "andc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x6, IMM8LIST, E}}},
+
+ BRANCH (O (O_BRA, SB), "bra", 0x0),
+
+ {O (O_BRAB, SB), AV_H8SX, 0, "bra", {{LOWREG | L_8, E}}, {{0x5, 0x9, LOWREG | L_8 | B30, 0x5, E}}},
+ {O (O_BRAW, SW), AV_H8SX, 0, "bra", {{LOWREG | L_16, E}}, {{0x5, 0x9, LOWREG | L_16 | B30, 0x6, E}}},
+ {O (O_BRAL, SL), AV_H8SX, 0, "bra", {{RS32, E}}, {{0x5, 0x9, RS32 | B30, 0x7, E}}},
+
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, RDIND, OP3PCREL8}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS8DST, OP3PCREL8}}, {{0x7, 0xE, DSTABS8LIST, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS16DST, OP3PCREL8}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS32DST, OP3PCREL8}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, RDIND, OP3PCREL8}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS8DST, OP3PCREL8}}, {{0x7, 0xE, DSTABS8LIST, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS16DST, OP3PCREL8}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS32DST, OP3PCREL8}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- NEW_SOP(O(O_AND,SL),0,6,"and.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x6,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_AND,SL),0,2,"and.l") ,{{RS32,RD32,E }},{{0x0,0x1,0xF,0x0,0x6,0x6,B30|RS32,B30|RD32,E}} EOP,
-
- NEW_SOP(O(O_ANDC,SB),1,2,"andc"), {{IMM8,CCR|DST,E}},{{ 0x0,0x6,IMM8,IGNORE,E,0,0,0,0}} EOP,
- NEW_SOP(O(O_ANDC,SB),1,2,"andc"), {{IMM8,EXR|DST,E}},{{ 0x0,0x1,0x4,0x1,0x0,0x6,IMM8,IGNORE,E,0,0,0,0}} EOP,
-
- BITOP(O(O_BAND,SB), IMM3|B30,"band",0x7,0x6,0x7,0xC,0x7,0xE,0x0),
- BRANCH(O(O_BRA,SB),"bra",0x0),
- BRANCH(O(O_BRA,SB),"bt",0x0),
- BRANCH(O(O_BRN,SB),"brn",0x1),
- BRANCH(O(O_BRN,SB),"bf",0x1),
- BRANCH(O(O_BHI,SB),"bhi",0x2),
- BRANCH(O(O_BLS,SB),"bls",0x3),
- BRANCH(O(O_BCC,SB),"bcc",0x4),
- BRANCH(O(O_BCC,SB),"bhs",0x4),
- BRANCH(O(O_BCS,SB),"bcs",0x5),
- BRANCH(O(O_BCS,SB),"blo",0x5),
- BRANCH(O(O_BNE,SB),"bne",0x6),
- BRANCH(O(O_BEQ,SB),"beq",0x7),
- BRANCH(O(O_BVC,SB),"bvc",0x8),
- BRANCH(O(O_BVS,SB),"bvs",0x9),
- BRANCH(O(O_BPL,SB),"bpl",0xA),
- BRANCH(O(O_BMI,SB),"bmi",0xB),
- BRANCH(O(O_BGE,SB),"bge",0xC),
- BRANCH(O(O_BLT,SB),"blt",0xD),
- BRANCH(O(O_BGT,SB),"bgt",0xE),
- BRANCH(O(O_BLE,SB),"ble",0xF),
-
- EBITOP(O(O_BCLR,SB),IMM3|B30,"bclr", 0x6,0x2,0x7,0xD,0x7,0xF,0x8),
- BITOP(O(O_BIAND,SB),IMM3|B31,"biand",0x7,0x6,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BILD,SB), IMM3|B31,"bild", 0x7,0x7,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BIOR,SB), IMM3|B31,"bior", 0x7,0x4,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BIST,SB), IMM3|B31,"bist", 0x6,0x7,0x7,0xD,0x7,0xF,0x8),
- BITOP(O(O_BIXOR,SB),IMM3|B31,"bixor",0x7,0x5,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BLD,SB), IMM3|B30,"bld", 0x7,0x7,0x7,0xC,0x7,0xE,0x0),
- EBITOP(O(O_BNOT,SB),IMM3|B30,"bnot", 0x6,0x1,0x7,0xD,0x7,0xF,0x8),
- BITOP(O(O_BOR,SB), IMM3|B30,"bor", 0x7,0x4,0x7,0xC,0x7,0xE,0x0),
- EBITOP(O(O_BSET,SB),IMM3|B30,"bset", 0x6,0x0,0x7,0xD,0x7,0xF,0x8),
-
- SOP(O(O_BSR,SB),6,"bsr"),{{DISP8,E,0}},{{ 0x5,0x5,DISP8,IGNORE,E,0,0,0,0}} EOP,
- SOP(O(O_BSR,SB),6,"bsr"),{{DISP16,E,0}},{{ 0x5,0xC,0x0,0x0,DISP16,IGNORE,IGNORE,IGNORE,E,0,0,0,0}} EOP,
- BITOP(O(O_BST,SB), IMM3|B30,"bst",0x6,0x7,0x7,0xD,0x7,0xF,0x8),
- EBITOP(O(O_BTST,SB), IMM3|B30,"btst",0x6,0x3,0x7,0xC,0x7,0xE,0x0),
- BITOP(O(O_BXOR,SB), IMM3|B30,"bxor",0x7,0x5,0x7,0xC,0x7,0xE,0x0),
-
- TWOOP(O(O_CMP,SB), "cmp.b",0xA,0x1,0xC),
- WTWOP(O(O_CMP,SW), "cmp.w",0x1,0xD),
-
- NEW_SOP(O(O_CMP,SW),1,2,"cmp.w"),{{RS16,RD16,E }},{{0x1,0xD,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_CMP,SW),0,4,"cmp.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x2,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
-
- NEW_SOP(O(O_CMP,SL),0,6,"cmp.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x2,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_CMP,SL),0,2,"cmp.l") ,{{RS32,RD32,E }},{{0x1,0xF,B31|RS32,B30|RD32,E}} EOP,
-
- UNOP(O(O_DAA,SB), "daa",0x0,0xF),
- UNOP(O(O_DAS,SB), "das",0x1,0xF),
- UNOP(O(O_DEC,SB), "dec.b",0x1,0xA),
-
- NEW_SOP(O(O_DEC, SW),0,2,"dec.w") ,{{DBIT,RD16,E }},{{0x1,0xB,0x5|DBIT,RD16,E}} EOP,
- NEW_SOP(O(O_DEC, SL),0,2,"dec.l") ,{{DBIT,RD32,E }},{{0x1,0xB,0x7|DBIT,RD32|B30,E}} EOP,
-
- NEW_SOP(O(O_DIVU,SB),1,13,"divxu.b"), {{RS8,RD16,E}}, {{0x5,0x1,RS8,RD16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_DIVU,SW),0,21,"divxu.w"),{{RS16,RD32,E}},{{0x5,0x3,RS16,B30|RD32,E}}EOP,
-
- NEW_SOP(O(O_DIVS,SB),0,13,"divxs.b") ,{{RS8,RD16,E }},{{0x0,0x1,0xD,0x0,0x5,0x1,RS8,RD16,E}} EOP,
- NEW_SOP(O(O_DIVS,SW),0,21,"divxs.w") ,{{RS16,RD32,E }},{{0x0,0x1,0xD,0x0,0x5,0x3,RS16,B30|RD32,E}} EOP,
-
- NEW_SOP(O(O_EEPMOV,SB),1,4,"eepmov.b"),{{E,0,0}},{{0x7,0xB,0x5,0xC,0x5,0x9,0x8,0xF,E}}EOP,
- NEW_SOP(O(O_EEPMOV,SW),0,4,"eepmov.w"),{{E,0,0}},{{0x7,0xB,0xD,0x4,0x5,0x9,0x8,0xF,E}} EOP,
-
- NEW_SOP(O(O_EXTS,SW),0,2,"exts.w"),{{OR16,E,0}},{{0x1,0x7,0xD,OR16,E }}EOP,
- NEW_SOP(O(O_EXTS,SL),0,2,"exts.l"),{{OR32,E,0}},{{0x1,0x7,0xF,OR32|B30,E }}EOP,
-
- NEW_SOP(O(O_EXTU,SW),0,2,"extu.w"),{{OR16,E,0}},{{0x1,0x7,0x5,OR16,E }}EOP,
- NEW_SOP(O(O_EXTU,SL),0,2,"extu.l"),{{OR32,E,0}},{{0x1,0x7,0x7,OR32|B30,E }}EOP,
-
- UNOP(O(O_INC,SB), "inc",0x0,0xA),
-
- NEW_SOP(O(O_INC,SW),0,2,"inc.w") ,{{DBIT,RD16,E }},{{0x0,0xB,0x5|DBIT,RD16,E}} EOP,
- NEW_SOP(O(O_INC,SL),0,2,"inc.l") ,{{DBIT,RD32,E }},{{0x0,0xB,0x7|DBIT,RD32|B30,E}} EOP,
-
- SOP(O(O_JMP,SB),4,"jmp"),{{RSIND,E,0}},{{0x5,0x9,B30|RSIND,0x0,E,0,0,0,0}}EOP,
- SOP(O(O_JMP,SB),6,"jmp"),{{SRC|ABSJMP,E,0}},{{0x5,0xA,SRC|ABSJMP,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_JMP,SB),8,"jmp"),{{SRC|MEMIND,E,0}},{{0x5,0xB,SRC|MEMIND,IGNORE,E,0,0,0,0}}EOP,
-
- SOP(O(O_JSR,SB),6,"jsr"),{{SRC|RSIND,E,0}}, {{0x5,0xD,B30|RSIND,0x0,E,0,0,0,0}}EOP,
- SOP(O(O_JSR,SB),8,"jsr"),{{SRC|ABSJMP,E,0}},{{0x5,0xE,SRC|ABSJMP,IGNORE,IGNORE,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_JSR,SB),8,"jsr"),{{SRC|MEMIND,E,0}},{{0x5,0xF,SRC|MEMIND,IGNORE,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{IMM8,CCR|DST,E}}, {{ 0x0,0x7,IMM8,IGNORE,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{OR8,CCR|DST,E}}, {{ 0x0,0x3,0x0,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS16SRC,CCR|DST,E}}, {{PREFIXLDC,0x6,0xB,0x0,0x0,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS32SRC,CCR|DST,E}}, {{PREFIXLDC,0x6,0xB,0x2,0x0,SRC|ABS32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_16,CCR|DST,E}},{{PREFIXLDC,0x6,0xF,B30|DISPREG,0,DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_32,CCR|DST,E}},{{PREFIXLDC,0x7,0x8,B30|DISPREG,0,0x6,0xB,0x2,0x0,SRC|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSINC,CCR|DST,E}}, {{PREFIXLDC,0x6,0xD,B30|RSINC,0x0,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSIND,CCR|DST,E}}, {{PREFIXLDC,0x6,0x9,B30|RSIND,0x0,E}} EOP,
-
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{IMM8,EXR|DST,E}}, {{ 0x0,0x1,0x4,0x1,0x0,0x7,IMM8,IGNORE,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),1,2,"ldc"),{{OR8,EXR|DST,E}}, {{ 0x0,0x3,0x1,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS16SRC,EXR|DST,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0xb,0x0,0x0,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{ABS32SRC,EXR|DST,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0xb,0x2,0x0,SRC|ABS32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_16,EXR|DST,E}},{{ 0x0,0x1,0x4,0x1,0x6,0xf,B30|DISPREG,0,DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{DISP|SRC|L_32,EXR|DST,E}},{{ 0x0,0x1,0x4,0x1,0x7,0x8,B30|DISPREG,0,0x6,0xB,0x2,0x0,SRC|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSINC,EXR|DST,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0xd,B30|RSINC,0x0,E}}EOP,
- NEW_SOP(O(O_LDC,SB),0,2,"ldc"),{{RSIND,EXR|DST,E}}, {{ 0x0,0x1,0x4,0x1,0x6,0x9,B30|RSIND,0x0,E}} EOP,
-
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{{ABS|SRC|L_16|MEMRELAX,RD8,E}}, {{ 0x6,0xA,0x0,RD8,SRC|ABS|MEMRELAX|A16LIST,E}}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{ABS|SRC|L_32|MEMRELAX,RD8,E }}, {{ 0x6,0xA,0x2,RD8,SRC|ABS|MEMRELAX|A32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{{RS8,ABS|L_16|MEMRELAX|DST,E}}, {{ 0x6,0xA,0x8,RS8,DST|ABS|MEMRELAX|A16LIST,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,ABS|DST|L_32|MEMRELAX,E }}, {{ 0x6,0xA,0xA,RS8,DST|ABS|MEMRELAX|A32LIST,E }}EOP,
-
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{DISP|L_32|SRC,RD8,E}}, {{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xA,0x2,RD8,SRC|DISP32LIST,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,DISP|L_32|DST,E}}, {{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xA,0xA,RS8,DST|DISP32LIST,E}}EOP,
-
-
-
- SOP(O(O_MOV_TO_REG,SB),2,"mov.b"),{{RS8,RD8,E}}, {{ 0x0,0xC,RS8,RD8,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SB),2,"mov.b"),{{IMM8,RD8,E}}, {{ 0xF,RD8,IMM8,IGNORE,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{{RSIND,RD8,E}}, {{ 0x6,0x8,B30|RSIND,RD8,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{DISP16SRC,RD8,E}}, {{ 0x6,0xE,B30|DISPREG,RD8,DISP16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_REG,SB),6,"mov.b"),{{RSINC,RD8,E}}, {{ 0x6,0xC,B30|RSINC,RD8,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_REG,SB),4,"mov.b"),{{ABS8SRC,RD8,E}}, {{ 0x2,RD8,ABS8SRC,IGNORE,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{{RS8,RDIND,E}}, {{ 0x6,0x8,RDIND|B31,RS8,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,DISP16DST,E}}, {{ 0x6,0xE,DISPREG|B31,RS8,DISP16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),6,"mov.b"),{{RS8,RDDEC|B31,E}}, {{ 0x6,0xC,RDDEC|B31,RS8,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_MEM,SB),4,"mov.b"),{{RS8,ABS8DST,E}}, {{ 0x3,RS8,ABS8DST,IGNORE,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,RDIND,E}}, {{ 0x6,0x9,RDIND|B31,RS16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{DISP|L_32|SRC,RD16,E}},{{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0x2,RD16,SRC|DISP32LIST,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,DISP|L_32|DST,E}},{{ 0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0xA,RS16,DST|DISP32LIST,E}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{ABS|L_32|MEMRELAX|SRC,RD16,E }},{{ 0x6,0xB,0x2,RD16,SRC|MEMRELAX|ABS32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,ABS|L_32|MEMRELAX|DST,E }},{{ 0x6,0xB,0xA,RS16,DST|MEMRELAX|ABS32LIST,E }}EOP,
- SOP(O(O_MOV_TO_REG,SW),2,"mov.w"),{{RS16,RD16,E}}, {{ 0x0,0xD,RS16, RD16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),4,"mov.w"),{{IMM16,RD16,E}}, {{ 0x7,0x9,0x0,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_REG,SW),4,"mov.w"),{{RSIND,RD16,E}}, {{ 0x6,0x9,B30|RSIND,RD16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{DISP16SRC,RD16,E}}, {{ 0x6,0xF,B30|DISPREG,RD16,DISP16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{RSINC,RD16,E}}, {{ 0x6,0xD,B30|RSINC,RD16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_REG,SW),6,"mov.w"),{{ABS16SRC,RD16,E}}, {{ 0x6,0xB,0x0,RD16,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
-
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,DISP16DST,E}}, {{ 0x6,0xF,DISPREG|B31,RS16,DISP16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,RDDEC,E}}, {{ 0x6,0xD,RDDEC|B31,RS16,E,0,0,0,0}}EOP,
- SOP(O(O_MOV_TO_MEM,SW),6,"mov.w"),{{RS16,ABS16DST,E}}, {{ 0x6,0xB,0x8,RS16,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
-
- SOP(O(O_MOV_TO_REG,SL),4,"mov.l"),{{IMM32,RD32,E}}, {{ 0x7,0xA,0x0,B30|RD32,IMM32LIST,E}}EOP,
- SOP(O(O_MOV_TO_REG,SL),2,"mov.l"),{{RS32,RD32,E}}, {{ 0x0,0xF,B31|RS32,B30|RD32,E,0,0,0,0}}EOP,
-
- SOP(O(O_MOV_TO_REG,SL),4,"mov.l"),{{RSIND,RD32,E}}, {{ PREFIX32,0x6,0x9,RSIND|B30,B30|RD32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{DISP16SRC,RD32,E}}, {{ PREFIX32,0x6,0xF,DISPREG|B30,B30|RD32,DISP16SRC,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{DISP|L_32|SRC,RD32,E}},{{ PREFIX32,0x7,0x8,B30|DISPREG,0x0,0x6,0xB,0x2,B30|RD32,SRC|DISP32LIST,E }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{RSINC,RD32,E}}, {{ PREFIX32,0x6,0xD,B30|RSINC,B30|RD32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{ABS16SRC,RD32,E}}, {{ PREFIX32,0x6,0xB,0x0,B30|RD32,ABS16SRC,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_REG,SL),6,"mov.l"),{{ABS32SRC|MEMRELAX,RD32,E }}, {{ PREFIX32,0x6,0xB,0x2,B30|RD32,SRC|MEMRELAX|ABS32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,RDIND,E}}, {{ PREFIX32,0x6,0x9,RDIND|B31,B30|RS32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,DISP16DST,E}}, {{ PREFIX32,0x6,0xF,DISPREG|B31,B30|RS32,DISP16DST,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,DISP|L_32|DST,E}},{{ PREFIX32,0x7,0x8,B31|DISPREG,0x0,0x6,0xB,0xA,B30|RS32,DST|DISP32LIST,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,RDDEC,E}}, {{ PREFIX32,0x6,0xD,RDDEC|B31,B30|RS32,E,0,0,0,0 }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,ABS16DST,E}}, {{ PREFIX32,0x6,0xB,0x8,B30|RS32,ABS16DST,IGNORE,IGNORE,IGNORE,E }}EOP,
- SOP(O(O_MOV_TO_MEM,SL),6,"mov.l"),{{RS32,ABS32DST|MEMRELAX,E }}, {{ PREFIX32,0x6,0xB,0xA,B30|RS32,DST|MEMRELAX|ABS32LIST,E }}EOP,
-
- SOP(O(O_MOV_TO_REG,SB),10,"movfpe"),{{ABS16SRC,RD8,E}},{{ 0x6,0xA,0x4,RD8,ABS16SRC,IGNORE,IGNORE,IGNORE,E}}EOP,
- SOP(O(O_MOV_TO_MEM,SB),10,"movtpe"),{{RS8,ABS16DST,E}},{{ 0x6,0xA,0xC,RS8,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
-
- NEW_SOP(O(O_MULU,SB),1,14,"mulxu.b"),{{RS8,RD16,E}}, {{ 0x5,0x0,RS8,RD16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MULU,SW),0,14,"mulxu.w"),{{RS16,RD32,E}},{{ 0x5,0x2,RS16,B30|RD32,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_MULS,SB),0,20,"mulxs.b"),{{RS8,RD16,E}}, {{ 0x0,0x1,0xc,0x0,0x5,0x0,RS8,RD16,E}}EOP,
- NEW_SOP(O(O_MULS,SW),0,20,"mulxs.w"),{{RS16,RD32,E}},{{ 0x0,0x1,0xc,0x0,0x5,0x2,RS16,B30|RD32,E}}EOP,
-
- /* ??? This can use UNOP3. */
- NEW_SOP(O(O_NEG,SB),1,2,"neg.b"),{{ OR8,E, 0}},{{ 0x1,0x7,0x8,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_NEG,SW),0,2,"neg.w"),{{ OR16,E,0}},{{ 0x1,0x7,0x9,OR16,E}}EOP,
- NEW_SOP(O(O_NEG,SL),0,2,"neg.l"),{{ OR32,E,0}},{{ 0x1,0x7,0xB,B30|OR32,E}}EOP,
-
- NEW_SOP(O(O_NOP,SN),1,2,"nop"),{{E,0,0}},{{ 0x0,0x0,0x0,0x0,E,0,0,0,0}}EOP,
-
- /* ??? This can use UNOP3. */
- NEW_SOP(O(O_NOT,SB),1,2,"not.b"),{{ OR8,E, 0}},{{ 0x1,0x7,0x0,OR8,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_NOT,SW),0,2,"not.w"),{{ OR16,E,0}},{{ 0x1,0x7,0x1,OR16,E}}EOP,
- NEW_SOP(O(O_NOT,SL),0,2,"not.l"),{{ OR32,E,0}},{{ 0x1,0x7,0x3,B30|OR32,E}}EOP,
-
- TWOOP(O(O_OR, SB),"or.b",0xC,0x1,0x4),
- NEW_SOP(O(O_OR,SW),0,4,"or.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x4,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_OR,SW),0,2,"or.w"),{{RS16,RD16,E }},{{0x6,0x4,RS16,RD16,E}} EOP,
-
- NEW_SOP(O(O_OR,SL),0,6,"or.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x4,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_OR,SL),0,2,"or.l"),{{RS32,RD32,E }},{{0x0,0x1,0xF,0x0,0x6,0x4,B30|RS32,B30|RD32,E}} EOP,
-
- NEW_SOP(O(O_ORC,SB),1,2,"orc"),{{IMM8,CCR|DST,E}},{{ 0x0,0x4,IMM8,IGNORE,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_ORC,SB),1,2,"orc"),{{IMM8,EXR|DST,E}},{{ 0x0,0x1,0x4,0x1,0x0,0x4,IMM8,IGNORE,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_MOV_TO_REG,SW),1,6,"pop.w"),{{OR16,E,0}},{{ 0x6,0xD,0x7,OR16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MOV_TO_REG,SL),0,6,"pop.l"),{{OR32,E,0}},{{ PREFIX32,0x6,0xD,0x7,OR32|B30,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MOV_TO_MEM,SW),1,6,"push.w"),{{OR16,E,0}},{{ 0x6,0xD,0xF,OR16,E,0,0,0,0}}EOP,
- NEW_SOP(O(O_MOV_TO_MEM,SL),0,6,"push.l"),{{OR32,E,0}},{{ PREFIX32,0x6,0xD,0xF,OR32|B30,E,0,0,0,0}}EOP,
-
- UNOP3(O_ROTL, "rotl", 0x1,0x2,0x8),
- UNOP3(O_ROTR, "rotr", 0x1,0x3,0x8),
- UNOP3(O_ROTXL, "rotxl",0x1,0x2,0x0),
- UNOP3(O_ROTXR, "rotxr",0x1,0x3,0x0),
-
- SOP(O(O_BPT,SN), 10,"bpt"),{{E,0,0}},{{ 0x7,0xA,0xF,0xF,E,0,0,0,0}}EOP,
- SOP(O(O_RTE,SN), 10,"rte"),{{E,0,0}},{{ 0x5,0x6,0x7,0x0,E,0,0,0,0}}EOP,
- SOP(O(O_RTS,SN), 8,"rts"),{{E,0,0}},{{ 0x5,0x4,0x7,0x0,E,0,0,0,0}}EOP,
-
- UNOP3(O_SHAL, "shal",0x1,0x0,0x8),
- UNOP3(O_SHAR, "shar",0x1,0x1,0x8),
- UNOP3(O_SHLL, "shll",0x1,0x0,0x0),
- UNOP3(O_SHLR, "shlr",0x1,0x1,0x0),
-
- SOP(O(O_SLEEP,SN),2,"sleep"),{{E,0,0}},{{ 0x0,0x1,0x8,0x0,E,0,0,0,0}} EOP,
-
- NEW_SOP(O(O_STC,SB), 1,2,"stc"),{{CCR|SRC,RD8,E}},{{ 0x0,0x2,0x0,RD8,E,0,0,0,0}} EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,RDIND,E}}, {{PREFIXLDC,0x6,0x9,B31|RDIND,0x0,E}} EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,DISP|DST|L_16,E}},{{PREFIXLDC,0x6,0xF,B31|DISPREG,0,DST|DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,DISP|DST|L_32,E}},{{PREFIXLDC,0x7,0x8,B30|DISPREG,0,0x6,0xB,0xA,0x0,DST|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,RDDEC,E}}, {{PREFIXLDC,0x6,0xD,B31|RDDEC,0x0,E}}EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,ABS16DST,E}}, {{PREFIXLDC,0x6,0xB,0x8,0x0,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{CCR|SRC,ABS32DST,E}}, {{PREFIXLDC,0x6,0xB,0xA,0x0,DST|ABS32LIST,E}}EOP,
-
- NEW_SOP(O(O_STC,SB), 1,2,"stc"),{{EXR|SRC,RD8,E}},{{ 0x0,0x2,0x1,RD8,E,0,0,0,0}} EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,RDIND,E}}, {{0x0,0x1,0x4,0x1,0x6,0x9,B31|RDIND,0x0,E}} EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,DISP|DST|L_16,E}},{{0x0,0x1,0x4,0x1,0x6,0xF,B31|DISPREG,0,DST|DISP|L_16,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,DISP|DST|L_32,E}},{{0x0,0x1,0x4,0x1,0x7,0x8,B30|DISPREG,0,0x6,0xB,0xA,0x0,DST|DISP32LIST,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,RDDEC,E}}, {{0x0,0x1,0x4,0x1,0x6,0xD,B31|RDDEC,0x0,E}}EOP,
-
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,ABS16DST,E}}, {{0x0,0x1,0x4,0x1,0x6,0xB,0x8,0x0,ABS16DST,IGNORE,IGNORE,IGNORE,E}}EOP,
- NEW_SOP(O(O_STC,SB),0,2,"stc"),{{EXR|SRC,ABS32DST,E}}, {{0x0,0x1,0x4,0x1,0x6,0xB,0xA,0x0,DST|ABS32LIST,E}}EOP,
-
- SOP(O(O_SUB,SB),2,"sub.b"),{{RS8,RD8,E}},{{ 0x1,0x8,RS8,RD8,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_SUB,SW),1,2,"sub.w"),{{RS16,RD16,E }}, {{0x1,0x9,RS16,RD16,E}} EOP,
- NEW_SOP(O(O_SUB,SW),0,4,"sub.w"),{{IMM16,RD16,E }}, {{0x7,0x9,0x3,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_SUB,SL),0,2,"sub.l") ,{{RS32,RD32,E }}, {{0x1,0xA,B31|RS32,B30|RD32,E}} EOP,
- NEW_SOP(O(O_SUB,SL),0,6,"sub.l"), {{IMM32,RD32,E }},{{0x7,0xA,0x3,B30|RD32,IMM32LIST,E}} EOP,
-
- SOP(O(O_SUBS,SL),2,"subs"),{{KBIT,RDP,E}},{{ 0x1,0xB,KBIT,RDP,E,0,0,0,0}}EOP,
- TWOOP(O(O_SUBX,SB),"subx",0xB,0x1,0xE),
-
- NEW_SOP(O(O_TRAPA,SB),0,2,"trapa"),{{ IMM2,E}}, {{0x5,0x7,IMM2,IGNORE,E }}EOP,
- NEW_SOP(O(O_TAS,SB),0,2,"tas"),{{RSIND,E}}, {{0x0,0x1,0xe,0x0,0x7,0xb,B30|RSIND,0xc,E }}EOP,
-
- TWOOP(O(O_XOR, SB),"xor",0xD,0x1,0x5),
-
- NEW_SOP(O(O_XOR,SW),0,4,"xor.w"),{{IMM16,RD16,E }},{{0x7,0x9,0x5,RD16,IMM16,IGNORE,IGNORE,IGNORE,E}} EOP,
- NEW_SOP(O(O_XOR,SW),0,2,"xor.w"),{{RS16,RD16,E }},{{0x6,0x5,RS16,RD16,E}} EOP,
-
- NEW_SOP(O(O_XOR,SL),0,6,"xor.l"),{{IMM32,RD32,E }},{{0x7,0xA,0x5,B30|RD32,IMM32LIST,E}} EOP,
- NEW_SOP(O(O_XOR,SL),0,2,"xor.l") ,{{RS32,RD32,E }},{{0x0,0x1,0xF,0x0,0x6,0x5,B30|RS32,B30|RD32,E}} EOP,
-
- SOP(O(O_XORC,SB),2,"xorc"),{{IMM8,CCR|DST,E}},{{ 0x0,0x5,IMM8,IGNORE,E,0,0,0,0}}EOP,
- SOP(O(O_XORC,SB),2,"xorc"),{{IMM8,EXR|DST,E}},{{ 0x0,0x1,0x4,0x1,0x0,0x5,IMM8,IGNORE,E,0,0,0,0}}EOP,
-
- NEW_SOP(O(O_CLRMAC,SN),1,2,"clrmac"),{{E, 0, 0}},{{0x0,0x1,0xa,0x0,E}} EOP,
- NEW_SOP(O(O_MAC,SL),1,2,"mac"),{{RSINC,RDINC,E}},{{0x0,0x1,0x6,0x0,0x6,0xd,B30|RSINC,B30|RDINC,E}} EOP,
- NEW_SOP(O(O_LDMAC,SL),1,2,"ldmac"),{{RS32,MD32,E}},{{0x0,0x3,MD32,RS32,E}} EOP,
- NEW_SOP(O(O_STMAC,SL),1,2,"stmac"),{{MS32,RD32,E}},{{0x0,0x2,MS32,RD32,E}} EOP,
- NEW_SOP(O(O_LDM,SL),0,6,"ldm.l"),{{RSINC, RS32, E}},{{ 0x0,0x1,IGNORE,0x0,0x6,0xD,0x7,IGNORE,E}}EOP,
- NEW_SOP(O(O_STM,SL),0,6,"stm.l"),{{RS32, RDDEC, E}},{{0x0,0x1,IGNORE,0x0,0x6,0xD,0xF,IGNORE,E}}EOP,
- {0, 0, 0, NULL, {{0,0,0}}, {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}
+ {O (O_BRAS, SB), AV_H8SX, 0, "bra/s", {{PCREL8, E}}, {{0x4, 0x0, PCREL8, DATA | B01, E}}},
+
+ {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+ {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
+
+ BRANCH (O (O_BRA, SB), "bt", 0x0),
+ BRANCH (O (O_BRN, SB), "brn", 0x1),
+ BRANCH (O (O_BRN, SB), "bf", 0x1),
+ BRANCH (O (O_BHI, SB), "bhi", 0x2),
+ BRANCH (O (O_BLS, SB), "bls", 0x3),
+ BRANCH (O (O_BCC, SB), "bcc", 0x4),
+ BRANCH (O (O_BCC, SB), "bhs", 0x4),
+ BRANCH (O (O_BCS, SB), "bcs", 0x5),
+ BRANCH (O (O_BCS, SB), "blo", 0x5),
+ BRANCH (O (O_BNE, SB), "bne", 0x6),
+ BRANCH (O (O_BEQ, SB), "beq", 0x7),
+ BRANCH (O (O_BVC, SB), "bvc", 0x8),
+ BRANCH (O (O_BVS, SB), "bvs", 0x9),
+ BRANCH (O (O_BPL, SB), "bpl", 0xA),
+ BRANCH (O (O_BMI, SB), "bmi", 0xB),
+ BRANCH (O (O_BGE, SB), "bge", 0xC),
+ BRANCH (O (O_BLT, SB), "blt", 0xD),
+ BRANCH (O (O_BGT, SB), "bgt", 0xE),
+ BRANCH (O (O_BLE, SB), "ble", 0xF),
+
+ EBITOP (O (O_BCLR, SB), IMM3 | B30, "bclr", 0x6, 0x2, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
+ BITOP (O (O_BAND, SB), IMM3 | B30, "band", 0x7, 0x6, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BIAND, SB), IMM3 | B31, "biand", 0x7, 0x6, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BILD, SB), IMM3 | B31, "bild", 0x7, 0x7, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BIOR, SB), IMM3 | B31, "bior", 0x7, 0x4, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BIST, SB), IMM3 | B31, "bist", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
+ BITOP (O (O_BIXOR, SB), IMM3 | B31, "bixor", 0x7, 0x5, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BLD, SB), IMM3 | B30, "bld", 0x7, 0x7, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ EBITOP (O (O_BNOT, SB), IMM3 | B30, "bnot", 0x6, 0x1, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
+ BITOP (O (O_BOR, SB), IMM3 | B30, "bor", 0x7, 0x4, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ EBITOP (O (O_BSET, SB), IMM3 | B30, "bset", 0x6, 0x0, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
+ BITOP (O (O_BST, SB), IMM3 | B30, "bst", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
+ EBITOP (O (O_BTST, SB), IMM3 | B30, "btst", 0x6, 0x3, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+ BITOP (O (O_BXOR, SB), IMM3 | B30, "bxor", 0x7, 0x5, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
+
+ EBITOP_B (O (O_BCLREQ, SB), IMM3 | B30, "bclr/eq", 0x6, 0x2, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
+ EBITOP_B (O (O_BCLRNE, SB), IMM3 | B30, "bclr/ne", 0x6, 0x2, 0x7, 0xD, 0x7, 0xF, 0x8, 0x6),
+ EBITOP_B (O (O_BSETEQ, SB), IMM3 | B30, "bset/eq", 0x6, 0x0, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
+ EBITOP_B (O (O_BSETNE, SB), IMM3 | B30, "bset/ne", 0x6, 0x0, 0x7, 0xD, 0x7, 0xF, 0x8, 0x6),
+ BITOP_B (O (O_BISTZ, SB), IMM3 | B31, "bistz", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
+ BITOP_B (O (O_BSTZ, SB), IMM3 | B30, "bstz", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
+
+ {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, RDIND, R3_8}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0xF, R3_8, IMM8LIST, E}}},
+ {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, ABS8DST, R3_8}}, {{0x7, 0xE, DSTABS8LIST, 0xF, R3_8, IMM8LIST, E}}},
+ {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, ABS16DST, R3_8}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0xF, R3_8, IMM8LIST, E}}},
+ {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, ABS32DST, R3_8}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0xF, R3_8, IMM8LIST, E}}},
+
+ /* Because the assembler treats SRC, DST and OP3 as ordinals,
+ I must designate the second argument, an immediate value, as DST.
+ May God have mercy on my soul. */
+ {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, R3_IND}}, {{0x7, 0xD, B30 | R3_IND, 0x0, 0xF, RS8, DST | IMM8LIST, E}}},
+ {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, ABS8OP3}}, {{0x7, 0xF, OP3ABS8LIST, 0xF, RS8, DST | IMM8LIST, E}}},
+ {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, ABS16OP3}}, {{0x6, 0xA, 0x1, 0x8, OP3ABS16LIST, 0xF, RS8, DST | IMM8LIST, E}}},
+ {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, ABS32OP3}}, {{0x6, 0xA, 0x3, 0x8, OP3ABS32LIST, 0xF, RS8, DST | IMM8LIST, E}}},
+
+ {O (O_BSR, SB), AV_H8, 6, "bsr", {{PCREL8, E}}, {{0x5, 0x5, PCREL8, DATA, E}}},
+ {O (O_BSR, SB), AV_H8, 6, "bsr", {{PCREL16, E}}, {{0x5, 0xC, 0x0, 0x0, PCREL16, DATA3, E}}},
+ {O (O_BSR, SB), AV_H8SX, 0, "bsr", {{LOWREG | L_8, E}}, {{0x5, 0xd, B30 | LOWREG | L_8, 0x5, E}}},
+ {O (O_BSR, SW), AV_H8SX, 0, "bsr", {{LOWREG | L_16, E}}, {{0x5, 0xd, B30 | LOWREG | L_16, 0x6, E}}},
+ {O (O_BSR, SL), AV_H8SX, 0, "bsr", {{OR32, E}}, {{0x5, 0xd, B30 | OR32, 0x7, E}}},
+
+ {O (O_CMP, SB), AV_H8, 2, "cmp.b", {{IMM8, RD8, E}}, {{0xa, RD8, IMM8LIST, E}}},
+ EXPAND_TWOOP_B (O (O_CMP, SB), "cmp.b", 0xa, 0x1, 0xc, 0x2, B00),
+
+ {O (O_CMP, SW), AV_H8, 2, "cmp.w", {{RS16, RD16, E}}, {{0x1, 0xd, RS16, RD16, E}}},
+ {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, RD16, E}}, {{0x1, 0xf, B30 | IMM3NZ, RD16, E}}},
+ {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, 0x1, 0xf, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, 0x1, 0xf, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, 0x1, 0xf, B30 | IMM3NZ, IGNORE, E}}},
+ EXPAND_TWOOP_W (O (O_CMP, SW), "cmp.w", 0x1, 0xd, 0x2),
+
+ {O (O_CMP, SL), AV_H8H, 6, "cmp.l", {{RS32, RD32, E}}, {{0x1, 0xf, B31 | RS32, B30 | RD32, E}}},
+ {O (O_CMP, SL), AV_H8SX, 0, "cmp.l", {{IMM3NZ_NS, RD32, E}}, {{0x1, 0xf, B31 | IMM3NZ, B31 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_CMP, SL), "cmp.l", 0x2),
+
+ UNOP (O (O_DAA, SB), "daa", 0x0, 0xF),
+ UNOP (O (O_DAS, SB), "das", 0x1, 0xF),
+ UNOP (O (O_DEC, SB), "dec.b", 0x1, 0xA),
+
+ {O (O_DEC, SW), AV_H8H, 2, "dec.w", {{DBIT, RD16, E}}, {{0x1, 0xB, 0x5 | DBIT, RD16, E}}},
+ {O (O_DEC, SL), AV_H8H, 2, "dec.l", {{DBIT, RD32, E}}, {{0x1, 0xB, 0x7 | DBIT, RD32 | B30, E}}},
+
+ {O (O_DIVS, SW), AV_H8SX, 0, "divs.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xd, 0x6, 0x5, 0x1, IMM4, RD16, E}}},
+ {O (O_DIVS, SW), AV_H8SX, 0, "divs.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xd, 0x2, 0x5, 0x1, RS16, RD16, E}}},
+ {O (O_DIVS, SL), AV_H8SX, 0, "divs.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xd, 0x6, 0x5, 0x3, IMM4, B30 | RD32, E}}},
+ {O (O_DIVS, SL), AV_H8SX, 0, "divs.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xd, 0x2, 0x5, 0x3, B30 | RS32, B30 | RD32, E}}},
+
+ {O (O_DIVU, SW), AV_H8SX, 0, "divu.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xd, 0xe, 0x5, 0x1, IMM4, RD16, E}}},
+ {O (O_DIVU, SW), AV_H8SX, 0, "divu.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xd, 0xa, 0x5, 0x1, RS16, RD16, E}}},
+ {O (O_DIVU, SL), AV_H8SX, 0, "divu.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xd, 0xe, 0x5, 0x3, IMM4, B30 | RD32, E}}},
+ {O (O_DIVU, SL), AV_H8SX, 0, "divu.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xd, 0xa, 0x5, 0x3, B30 | RS32, B30 | RD32, E}}},
+
+ {O (O_DIVXS, SB), AV_H8SX, 0, "divxs.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xD, 0x4, 0x5, 0x1, IMM4, RD16, E}}},
+ {O (O_DIVXS, SB), AV_H8H, 13, "divxs.b", {{RS8, RD16, E}}, {{0x0, 0x1, 0xD, 0x0, 0x5, 0x1, RS8, RD16, E}}},
+ {O (O_DIVXS, SW), AV_H8SX, 0, "divxs.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xD, 0x4, 0x5, 0x3, IMM4, B30 | RD32, E}}},
+ {O (O_DIVXS, SW), AV_H8H, 21, "divxs.w", {{RS16, RD32, E}}, {{0x0, 0x1, 0xD, 0x0, 0x5, 0x3, RS16, B30 | RD32, E}}},
+
+ {O (O_DIVXU, SB), AV_H8SX, 0, "divxu.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xD, 0xC, 0x5, 0x1, IMM4, RD16, E}}},
+ {O (O_DIVXU, SB), AV_H8, 13, "divxu.b", {{RS8, RD16, E}}, {{0x5, 0x1, RS8, RD16, E}}},
+ {O (O_DIVXU, SW), AV_H8SX, 0, "divxu.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xD, 0xC, 0x5, 0x3, IMM4, B30 | RD32, E}}},
+ {O (O_DIVXU, SW), AV_H8H, 21, "divxu.w", {{RS16, RD32, E}}, {{0x5, 0x3, RS16, B30 | RD32, E}}},
+
+ {O (O_EEPMOV, SB), AV_H8, 4, "eepmov.b", {{E}}, {{0x7, 0xB, 0x5, 0xC, 0x5, 0x9, 0x8, 0xF, E}}},
+ {O (O_EEPMOV, SW), AV_H8H, 4, "eepmov.w", {{E}}, {{0x7, 0xB, 0xD, 0x4, 0x5, 0x9, 0x8, 0xF, E}}},
+
+ EXPAND_UNOP_STD_W (O (O_EXTS, SW), "exts.w", PREFIX_015, 0x1, 0x7, 0xd),
+ EXPAND_UNOP_STD_L (O (O_EXTS, SL), "exts.l", PREFIX_010, 0x1, 0x7, 0xf),
+ EXPAND_UNOP_EXTENDED_L (O (O_EXTS, SL), "exts.l", CONST_2, PREFIX_010, 0x1, 0x7, 0xe, 0),
+ EXPAND_UNOP_STD_W (O (O_EXTU, SW), "extu.w", PREFIX_015, 0x1, 0x7, 0x5),
+ EXPAND_UNOP_STD_L (O (O_EXTU, SL), "extu.l", PREFIX_010, 0x1, 0x7, 0x7),
+ EXPAND_UNOP_EXTENDED_L (O (O_EXTU, SL), "extu.l", CONST_2, PREFIX_010, 0x1, 0x7, 0x6, 0),
+
+ UNOP (O (O_INC, SB), "inc", 0x0, 0xA),
+
+ {O (O_INC, SW), AV_H8H, 2, "inc.w", {{DBIT, RD16, E}}, {{0x0, 0xB, 0x5 | DBIT, RD16, E}}},
+ {O (O_INC, SL), AV_H8H, 2, "inc.l", {{DBIT, RD32, E}}, {{0x0, 0xB, 0x7 | DBIT, RD32 | B30, E}}},
+
+ {O (O_JMP, SN), AV_H8, 4, "jmp", {{RSIND, E}}, {{0x5, 0x9, B30 | RSIND, 0x0, E}}},
+ {O (O_JMP, SN), AV_H8, 6, "jmp", {{ABSJMP | L_24, E}}, {{0x5, 0xA, SRC | ABSJMP | L_24, DATA5, E}}},
+
+ {O (O_JMP, SN), AV_H8SX, 0, "jmp", {{ABSJMP | L_32, E}}, {{0x5, 0x9, 0x0, 0x8, ABSJMP | L_32, DATA7, E}}},
+
+ {O (O_JMP, SN), AV_H8, 8, "jmp", {{MEMIND, E}}, {{0x5, 0xB, SRC | MEMIND, DATA, E}}},
+ {O (O_JMP, SN), AV_H8SX, 0, "jmp", {{VECIND, E}}, {{0x5, 0x9, B31 | SRC | VECIND, DATA, E}}},
+
+ {O (O_JSR, SN), AV_H8, 6, "jsr", {{RSIND, E}}, {{0x5, 0xD, B30 | RSIND, 0x0, E}}},
+ {O (O_JSR, SN), AV_H8, 8, "jsr", {{ABSJMP | L_24, E}}, {{0x5, 0xE, SRC | ABSJMP | L_24, DATA5, E}}},
+
+ {O (O_JSR, SN), AV_H8SX, 0, "jsr", {{ABSJMP | L_32, E}}, {{0x5, 0xD, 0x0, 0x8, ABSJMP | L_32, DATA7, E}}},
+
+ {O (O_JSR, SN), AV_H8, 8, "jsr", {{MEMIND, E}}, {{0x5, 0xF, SRC | MEMIND, DATA, E}}},
+ {O (O_JSR, SN), AV_H8, 8, "jsr", {{VECIND, E}}, {{0x5, 0xD, SRC | VECIND, DATA, E}}},
+
+ {O (O_LDC, SB), AV_H8, 2, "ldc", {{IMM8, CCR | DST, E}}, {{ 0x0, 0x7, IMM8LIST, E}}},
+ {O (O_LDC, SB), AV_H8S, 2, "ldc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x7, IMM8LIST, E}}},
+ {O (O_LDC, SB), AV_H8, 2, "ldc", {{RS8, CCR | DST, E}}, {{0x0, 0x3, B30 | CCR | DST, RS8, E}}},
+ {O (O_LDC, SB), AV_H8S, 2, "ldc", {{RS8, EXR | DST, E}}, {{0x0, 0x3, B30 | EXR | DST, RS8, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{RSIND, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0x9, B30 | RSIND, IGNORE, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{RSIND, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0x9, B30 | RSIND, IGNORE, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{RSPOSTINC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xD, B30 | RSPOSTINC, IGNORE, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{RSPOSTINC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xD, B30 | RSPOSTINC, IGNORE, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{DISP16SRC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xF, B30 | DISPREG, IGNORE, SRC | DISP16LIST, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{DISP16SRC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xF, B30 | DISPREG, IGNORE, SRC | DISP16LIST, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{DISP32SRC, CCR | DST, E}}, {{PREFIXLDC, 0x7, 0x8, B30 | DISPREG, 0x0, 0x6, 0xB, 0x2, IGNORE, SRC | DISP32LIST, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{DISP32SRC, EXR | DST, E}}, {{PREFIXLDC, 0x7, 0x8, B30 | DISPREG, 0x0, 0x6, 0xB, 0x2, IGNORE, SRC | DISP32LIST, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{ABS16SRC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x0, IGNORE, SRC | ABS16LIST, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{ABS16SRC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x0, IGNORE, SRC | ABS16LIST, E}}},
+ {O (O_LDC, SW), AV_H8H, 2, "ldc", {{ABS32SRC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x2, IGNORE, SRC | ABS32LIST, E}}},
+ {O (O_LDC, SW), AV_H8S, 2, "ldc", {{ABS32SRC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x2, IGNORE, SRC | ABS32LIST, E}}},
+ {O (O_LDC, SL), AV_H8SX, 0, "ldc", {{RS32, B30 | VBR_SBR | DST, E}}, {{0x0, 0x3, B30 | VBR_SBR | DST, RS32, E}}},
+
+
+ {O (O_MOV, SB), AV_H8, 2, "mov.b", {{IMM8, RD8, E}}, {{0xF, RD8, IMM8LIST, E}}},
+ {O (O_MOV, SB), AV_H8SX, 0, "mov.b", {{IMM4, ABS16DST, E}}, {{0x6, 0xa, 0xd, IMM4, DSTABS16LIST, E}}},
+ {O (O_MOV, SB), AV_H8SX, 0, "mov.b", {{IMM4, ABS32DST, E}}, {{0x6, 0xa, 0xf, IMM4, DSTABS32LIST, E}}},
+ MOVFROM_IMM8 (O (O_MOV, SB), PREFIX_017D, "mov.b", IMM8),
+
+ {O (O_MOV, SB), AV_H8, 2, "mov.b", {{RS8, RD8, E}}, {{0x0, 0xC, RS8, RD8, E}}},
+ MOVFROM_REG_BW (O (O_MOV, SB), "mov.b", RS8, PREFIX_017, 8, 10, 12, 14, MEMRELAX),
+ {O (O_MOV, SB), AV_H8, 4, "mov.b", {{RS8, ABS8DST, E}}, {{0x3, RS8, DSTABS8LIST, E}}},
+ MOVTO_REG_BW (O (O_MOV, SB), "mov.b", RD8, PREFIX_017, 8, 10, 12, 14, MEMRELAX),
+ {O (O_MOV, SB), AV_H8, 4, "mov.b", {{ABS8SRC, RD8, E}}, {{0x2, RD8, ABS8LIST, E}}},
+
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSIND, FROM_IND),
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPOSTINC, FROM_POSTINC),
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPOSTDEC, FROM_POSTDEC),
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPREINC, FROM_PREINC),
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPREDEC, FROM_PREDEC),
+ MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", DISP2SRC, FROM_DISP2),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", DISP16SRC, FROM_DISP16, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", DISP32SRC, FROM_DISP32, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXB16, FROM_DISP16B, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXW16, FROM_DISP16W, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXL16, FROM_DISP16L, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXB32, FROM_DISP32B, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXW32, FROM_DISP32W, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXL32, FROM_DISP32L, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", ABS16SRC, FROM_ABS16, ABS16LIST),
+ MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", ABS32SRC, FROM_ABS32, ABS32LIST),
+
+ {O (O_MOV, SW), AV_H8SX, 0, "mov.w", {{IMM3NZ_NS, RD16, E}}, {{0x0, 0xf, B30 | IMM3NZ, RD16, E}}},
+ {O (O_MOV, SW), AV_H8, 4, "mov.w", {{IMM16, RD16, E}}, {{0x7, 0x9, 0x0, RD16, IMM16LIST, E}}},
+ {O (O_MOV, SW), AV_H8SX, 0, "mov.w", {{IMM4, ABS16DST, E}}, {{0x6, 0xb, 0xd, IMM4, DSTABS16LIST, E}}},
+ {O (O_MOV, SW), AV_H8SX, 0, "mov.w", {{IMM4, ABS32DST, E}}, {{0x6, 0xb, 0xf, IMM4, DSTABS32LIST, E}}},
+
+ MOVFROM_IMM8 (O (O_MOV, SW), PREFIX_015D, "mov.w", IMM8),
+ MOVFROM_IMM (O (O_MOV, SW), PREFIX_7974, "mov.w", IMM16, IMM16LIST),
+
+ {O (O_MOV, SW), AV_H8, 2, "mov.w", {{RS16, RD16, E}}, {{0x0, 0xD, RS16, RD16, E}}},
+ MOVFROM_REG_BW (O (O_MOV, SW), "mov.w", RS16, PREFIX_015, 9, 11, 13, 15, 0),
+ MOVTO_REG_BW (O (O_MOV, SW), "mov.w", RD16, PREFIX_015, 9, 11, 13, 15, 0),
+
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSIND, FROM_IND),
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPOSTINC, FROM_POSTINC),
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPOSTDEC, FROM_POSTDEC),
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPREINC, FROM_PREINC),
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPREDEC, FROM_PREDEC),
+ MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", DISP2SRC, FROM_DISP2),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", DISP16SRC, FROM_DISP16, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", DISP32SRC, FROM_DISP32, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXB16, FROM_DISP16B, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXW16, FROM_DISP16W, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXL16, FROM_DISP16L, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXB32, FROM_DISP32B, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXW32, FROM_DISP32W, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXL32, FROM_DISP32L, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", ABS16SRC, FROM_ABS16, ABS16LIST),
+ MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", ABS32SRC, FROM_ABS32, ABS32LIST),
+
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{IMM3NZ_NS, RD32, E}}, {{0x0, 0xf, B31 | IMM3NZ, B31 | RD32, E}}},
+
+ MOVFROM_IMM8 (O (O_MOV, SL), PREFIX_010D, "mov.l", IMM8),
+ MOVFROM_IMM (O (O_MOV, SL), PREFIX_7A7C, "mov.l", IMM16U, IMM16ULIST),
+
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{IMM16U_NS, RD32, E}}, {{0x7, 0xa, 0x0, B31 | RD32, IMM16ULIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 4, "mov.l", {{IMM32, RD32, E}}, {{0x7, 0xa, 0x0, B30 | RD32, IMM32LIST, E}}},
+
+ MOVFROM_IMM (O (O_MOV, SL), PREFIX_7A74, "mov.l", IMM32, IMM32LIST),
+
+ {O (O_MOV, SL), AV_H8H, 2, "mov.l", {{RS32, RD32, E}}, {{0x0, 0xf, B31 | RS32, B30 | RD32, E}}},
+
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, RDIND, E}}, {{PREFIX_0100, 0x6, 0x9, B31 | RDIND, B30 | RS32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, RDPOSTINC, E}}, {{PREFIX_0103, 0x6, 0xd, B31 | RDPOSTINC, RS32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, RDPOSTDEC, E}}, {{PREFIX_0101, 0x6, 0xd, B31 | RDPOSTDEC, RS32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, RDPREINC, E}}, {{PREFIX_0102, 0x6, 0xd, B31 | RDPREINC, RS32, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, RDPREDEC, E}}, {{PREFIX_0100, 0x6, 0xd, B31 | RDPREDEC, RS32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, DISP2DST, E}}, {{PREFIX_010, B30 | B20 | DISP2DST, 0x6, 0x9, B31 | DSTDISPREG, RS32, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, DISP16DST, E}}, {{PREFIX_0100, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, DISP32DST, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x0, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXB16D, E}}, {{PREFIX_0101, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXW16D, E}}, {{PREFIX_0102, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXL16D, E}}, {{PREFIX_0103, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXB32D, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x1, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXW32D, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x2, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXL32D, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x3, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, ABS16DST, E}}, {{PREFIX_0100, 0x6, 0xb, 0x8, RS32, DSTABS16LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, ABS32DST, E}}, {{PREFIX_0100, 0x6, 0xb, 0xa, RS32, MEMRELAX | DSTABS32LIST, E}}},
+
+ {O (O_MOV, SL), AV_H8H, 4, "mov.l", {{RSIND, RD32, E}}, {{PREFIX_0100, 0x6, 0x9, B30 | RSIND, RD32, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RSPOSTINC, RD32, E}}, {{PREFIX_0100, 0x6, 0xd, B30 | RSPOSTINC, RD32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RSPOSTDEC, RD32, E}}, {{PREFIX_0102, 0x6, 0xd, B30 | RSPOSTDEC, RD32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RSPREINC, RD32, E}}, {{PREFIX_0101, 0x6, 0xd, B30 | RSPREINC, RD32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RSPREDEC, RD32, E}}, {{PREFIX_0103, 0x6, 0xd, B30 | RSPREDEC, RD32, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{DISP2SRC, RD32, E}}, {{PREFIX_010, B30 | B20 | DISP2SRC, 0x6, 0x9, B30 | DISPREG, RD32, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{DISP16SRC, RD32, E}}, {{PREFIX_0100, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{DISP32SRC, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x0, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXB16, RD32, E}}, {{PREFIX_0101, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXW16, RD32, E}}, {{PREFIX_0102, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXL16, RD32, E}}, {{PREFIX_0103, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXB32, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x1, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXW32, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x2, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXL32, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x3, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{ABS16SRC, RD32, E}}, {{PREFIX_0100, 0x6, 0xb, 0x0, RD32, SRC | ABS16LIST, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{ABS32SRC, RD32, E}}, {{PREFIX_0100, 0x6, 0xb, 0x2, RD32, SRC | MEMRELAX | ABS32LIST, E}}},
+
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSIND, FROM_IND),
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPOSTINC, FROM_POSTINC),
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPOSTDEC, FROM_POSTDEC),
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPREINC, FROM_PREINC),
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPREDEC, FROM_PREDEC),
+ MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", DISP2SRC, FROM_DISP2),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", DISP16SRC, FROM_DISP16, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", DISP32SRC, FROM_DISP32, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXB16, FROM_DISP16B, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXW16, FROM_DISP16W, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXL16, FROM_DISP16L, DISP16LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXB32, FROM_DISP32B, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXW32, FROM_DISP32W, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXL32, FROM_DISP32L, DISP32LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", ABS16SRC, FROM_ABS16, ABS16LIST),
+ MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", ABS32SRC, FROM_ABS32, ABS32LIST),
+
+#define DO_MOVA1(TYPE, OP0, OP1) \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B30 | R3_32, DISP16LIST, E}}}, \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B30 | R3_32, DISP16LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B30 | R3_32, DISP16LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B30 | R3_32, DISP16LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B30 | R3_32, DISP16LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B30 | R3_32, DISP16LIST, E}}}, \
+\
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B31 | R3_32, DISP32LIST, E}}}, \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B31 | R3_32, DISP32LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B31 | R3_32, DISP32LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B31 | R3_32, DISP32LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B31 | R3_32, DISP32LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B31 | R3_32, DISP32LIST, E}}}
+
+#define DO_MOVA2(TYPE, OP0, OP1, OP2) \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B30 | R3_32, OP2, DISP16LIST, E}}}, \
+\
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B31 | R3_32, OP2, DISP32LIST, E}}}, \
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B31 | R3_32, OP2, DISP32LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B31 | R3_32, OP2, DISP32LIST, E}}}, \
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B31 | R3_32, OP2, DISP32LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B31 | R3_32, OP2, DISP32LIST, E}}}, \
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B31 | R3_32, OP2, DISP32LIST, E}}}
+
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, E}}, {{0x7, 0xA, 0x8, B31 | DISPREG, DISP16LIST, E}}},
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, E}}, {{0x7, 0xA, 0x9, B31 | DISPREG, DISP16LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, E}}, {{0x7, 0xA, 0xA, B31 | DISPREG, DISP16LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, E}}, {{0x7, 0xA, 0xB, B31 | DISPREG, DISP16LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, E}}, {{0x7, 0xA, 0xC, B31 | DISPREG, DISP16LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, E}}, {{0x7, 0xA, 0xD, B31 | DISPREG, DISP16LIST, E}}},
+
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, E}}, {{0x7, 0xA, 0x8, B30 | DISPREG, DISP32LIST, E}}},
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, E}}, {{0x7, 0xA, 0x9, B30 | DISPREG, DISP32LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, E}}, {{0x7, 0xA, 0xA, B30 | DISPREG, DISP32LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, E}}, {{0x7, 0xA, 0xB, B30 | DISPREG, DISP32LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, E}}, {{0x7, 0xA, 0xC, B30 | DISPREG, DISP32LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, E}}, {{0x7, 0xA, 0xD, B30 | DISPREG, DISP32LIST, E}}},
+
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0x8, B31 | R3_32, DISP16LIST, E}}},
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0x9, B31 | R3_32, DISP16LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xA, B31 | R3_32, DISP16LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xB, B31 | R3_32, DISP16LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xC, B31 | R3_32, DISP16LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xD, B31 | R3_32, DISP16LIST, E}}},
+
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0x8, B30 | R3_32, DISP32LIST, E}}},
+ {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0x9, B30 | R3_32, DISP32LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xA, B30 | R3_32, DISP32LIST, E}}},
+ {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xB, B30 | R3_32, DISP32LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xC, B30 | R3_32, DISP32LIST, E}}},
+ {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xD, B30 | R3_32, DISP32LIST, E}}},
+
+ DO_MOVA1 (RDIND, 0x0, B30 | RDIND),
+ DO_MOVA1 (RDPOSTINC, 0x8, B30 | RDPOSTINC),
+ DO_MOVA1 (RDPOSTDEC, 0xA, B30 | RDPOSTDEC),
+ DO_MOVA1 (RDPREINC, 0x9, B30 | RDPREINC),
+ DO_MOVA1 (RDPREDEC, 0xB, B30 | RDPREDEC),
+ DO_MOVA1 (DISP2DST, B30 | B20 | DISP2DST, B30 | DSTDISPREG),
+ DO_MOVA2 (DISP16DST, 0xC, B30 | DSTDISPREG, DSTDISP16LIST),
+ DO_MOVA2 (DISP32DST, 0xC, B31 | DSTDISPREG, DSTDISP32LIST),
+ DO_MOVA2 (INDEXB16 | DST, 0xD, B30 | DSTDISPREG, DSTDISP16LIST),
+ DO_MOVA2 (INDEXW16 | DST, 0xE, B30 | DSTDISPREG, DSTDISP16LIST),
+ DO_MOVA2 (INDEXL16 | DST, 0xF, B30 | DSTDISPREG, DSTDISP16LIST),
+ DO_MOVA2 (INDEXB32 | DST, 0xD, B31 | DSTDISPREG, DSTDISP32LIST),
+ DO_MOVA2 (INDEXW32 | DST, 0xE, B31 | DSTDISPREG, DSTDISP32LIST),
+ DO_MOVA2 (INDEXL32 | DST, 0xF, B31 | DSTDISPREG, DSTDISP32LIST),
+ DO_MOVA2 (ABS16DST | DST, 0x4, 0x0, DSTABS16LIST),
+ DO_MOVA2 (ABS32DST | DST, 0x4, 0x8, DSTABS32LIST),
+
+ {O (O_MOV, SB), AV_H8, 10, "movfpe", {{ABS16SRC, RD8, E}}, {{0x6, 0xA, 0x4, RD8, ABS16SRC, DATA3, E}}},
+ {O (O_MOV, SB), AV_H8, 10, "movtpe", {{RS8, ABS16DST, E}}, {{0x6, 0xA, 0xC, RS8, ABS16DST, DATA3, E}}},
+
+ {O (O_MOVMD, SB), AV_H8SX, 0, "movmd.b", {{E}}, {{0x7, 0xb, 0x9, 0x4, E}}},
+ {O (O_MOVMD, SW), AV_H8SX, 0, "movmd.w", {{E}}, {{0x7, 0xb, 0xa, 0x4, E}}},
+ {O (O_MOVMD, SL), AV_H8SX, 0, "movmd.l", {{E}}, {{0x7, 0xb, 0xb, 0x4, E}}},
+ {O (O_MOVSD, SB), AV_H8SX, 0, "movsd.b", {{PCREL16, E}}, {{0x7, 0xb, 0x8, 0x4, PCREL16, DATA3, E}}},
+
+ {O (O_MULS, SW), AV_H8SX, 0, "muls.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0x6, 0x5, 0x0, IMM4, RD16, E}}},
+ {O (O_MULS, SW), AV_H8SX, 0, "muls.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xc, 0x2, 0x5, 0x0, RS16, RD16, E}}},
+ {O (O_MULS, SL), AV_H8SX, 0, "muls.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0x6, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULS, SL), AV_H8SX, 0, "muls.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0x2, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
+
+ {O (O_MULU, SW), AV_H8SX, 0, "mulu.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0xe, 0x5, 0x0, IMM4, RD16, E}}},
+ {O (O_MULU, SW), AV_H8SX, 0, "mulu.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xc, 0xa, 0x5, 0x0, RS16, RD16, E}}},
+ {O (O_MULU, SL), AV_H8SX, 0, "mulu.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0xe, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULU, SL), AV_H8SX, 0, "mulu.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0xa, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
+
+ {O (O_MULSU, SL), AV_H8SX, 0, "muls/u.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0x7, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULSU, SL), AV_H8SX, 0, "muls/u.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0x3, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
+ {O (O_MULUU, SL), AV_H8SX, 0, "mulu/u.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0xf, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULUU, SL), AV_H8SX, 0, "mulu/u.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0xb, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
+
+ {O (O_MULXS, SB), AV_H8SX, 0, "mulxs.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0x4, 0x5, 0x0, IMM4, RD16, E}}},
+ {O (O_MULXS, SB), AV_H8H, 20, "mulxs.b", {{RS8, RD16, E}}, {{0x0, 0x1, 0xc, 0x0, 0x5, 0x0, RS8, RD16, E}}},
+ {O (O_MULXS, SW), AV_H8SX, 0, "mulxs.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0x4, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULXS, SW), AV_H8H, 20, "mulxs.w", {{RS16, RD32, E}}, {{0x0, 0x1, 0xc, 0x0, 0x5, 0x2, RS16, B30 | RD32, E}}},
+
+ {O (O_MULXU, SB), AV_H8SX, 0, "mulxu.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0xc, 0x5, 0x0, IMM4, RD16, E}}},
+ {O (O_MULXU, SB), AV_H8, 14, "mulxu.b", {{RS8, RD16, E}}, {{0x5, 0x0, RS8, RD16, E}}},
+ {O (O_MULXU, SW), AV_H8SX, 0, "mulxu.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0xc, 0x5, 0x2, IMM4, B30 | RD32, E}}},
+ {O (O_MULXU, SW), AV_H8H, 14, "mulxu.w", {{RS16, RD32, E}}, {{0x5, 0x2, RS16, B30 | RD32, E}}},
+
+ EXPAND_UNOP_STD_B (O (O_NEG, SB), "neg.b", PREFIX_017, 0x1, 0x7, 0x8),
+ EXPAND_UNOP_STD_W (O (O_NEG, SW), "neg.w", PREFIX_015, 0x1, 0x7, 0x9),
+ EXPAND_UNOP_STD_L (O (O_NEG, SL), "neg.l", PREFIX_010, 0x1, 0x7, 0xb),
+
+ {O (O_NOP, SN), AV_H8, 2, "nop", {{E}}, {{0x0, 0x0, 0x0, 0x0, E}}},
+
+ EXPAND_UNOP_STD_B (O (O_NOT, SB), "not.b", PREFIX_017, 0x1, 0x7, 0x0),
+ EXPAND_UNOP_STD_W (O (O_NOT, SW), "not.w", PREFIX_015, 0x1, 0x7, 0x1),
+ EXPAND_UNOP_STD_L (O (O_NOT, SL), "not.l", PREFIX_010, 0x1, 0x7, 0x3),
+
+ {O (O_OR, SB), AV_H8, 2, "or.b", {{IMM8, RD8, E}}, {{0xc, RD8, IMM8LIST, E}}},
+ EXPAND_TWOOP_B (O (O_OR, SB), "or.b", 0xc, 0x1, 0x4, 0x4, 0),
+
+ {O (O_OR, SW), AV_H8, 2, "or.w", {{RS16, RD16, E}}, {{0x6, 0x4, RS16, RD16, E}}},
+ EXPAND_TWOOP_W (O (O_OR, SW), "or.w", 0x6, 0x4, 0x4),
+
+ {O (O_OR, SL), AV_H8H, 2, "or.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xF, 0x0, 0x6, 0x4, B30 | RS32, B30 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_OR, SL), "or.l", 0x4),
+
+ {O (O_ORC, SB), AV_H8, 2, "orc", {{IMM8, CCR | DST, E}}, {{0x0, 0x4, IMM8LIST, E}}},
+ {O (O_ORC, SB), AV_H8S, 2, "orc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x4, IMM8LIST, E}}},
+
+ {O (O_MOV, SW), AV_H8, 6, "pop.w", {{OR16, E}}, {{0x6, 0xD, 0x7, OR16, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "pop.l", {{OR32, E}}, {{PREFIX_0100, 0x6, 0xD, 0x7, OR32 | B30, E}}},
+ {O (O_MOV, SW), AV_H8, 6, "push.w", {{OR16, E}}, {{0x6, 0xD, 0xF, OR16, E}}},
+ {O (O_MOV, SL), AV_H8H, 6, "push.l", {{OR32, E}}, {{PREFIX_0100, 0x6, 0xD, 0xF, OR32 | B30, E}}},
+
+ EXPAND_UNOP_STD_B (O (O_ROTL, SB), "rotl.b", PREFIX_017, 0x1, 0x2, 0x8),
+ EXPAND_UNOP_EXTENDED_B (O (O_ROTL, SB), "rotl.b", CONST_2, PREFIX_017, 0x1, 0x2, 0xc),
+ EXPAND_UNOP_STD_W (O (O_ROTL, SW), "rotl.w", PREFIX_015, 0x1, 0x2, 0x9),
+ EXPAND_UNOP_EXTENDED_W (O (O_ROTL, SW), "rotl.w", CONST_2, PREFIX_015, 0x1, 0x2, 0xd),
+ EXPAND_UNOP_STD_L (O (O_ROTL, SL), "rotl.l", PREFIX_010, 0x1, 0x2, 0xb),
+ EXPAND_UNOP_EXTENDED_L (O (O_ROTL, SL), "rotl.l", CONST_2, PREFIX_010, 0x1, 0x2, 0xf, B30),
+ EXPAND_UNOP_STD_B (O (O_ROTR, SB), "rotr.b", PREFIX_017, 0x1, 0x3, 0x8),
+ EXPAND_UNOP_EXTENDED_B (O (O_ROTR, SB), "rotr.b", CONST_2, PREFIX_017, 0x1, 0x3, 0xc),
+ EXPAND_UNOP_STD_W (O (O_ROTR, SW), "rotr.w", PREFIX_015, 0x1, 0x3, 0x9),
+ EXPAND_UNOP_EXTENDED_W (O (O_ROTR, SW), "rotr.w", CONST_2, PREFIX_015, 0x1, 0x3, 0xd),
+ EXPAND_UNOP_STD_L (O (O_ROTR, SL), "rotr.l", PREFIX_010, 0x1, 0x3, 0xb),
+ EXPAND_UNOP_EXTENDED_L (O (O_ROTR, SL), "rotr.l", CONST_2, PREFIX_010, 0x1, 0x3, 0xf, B30),
+ EXPAND_UNOP_STD_B (O (O_ROTXL, SB), "rotxl.b", PREFIX_017, 0x1, 0x2, 0x0),
+ EXPAND_UNOP_EXTENDED_B (O (O_ROTXL, SB), "rotxl.b", CONST_2, PREFIX_017, 0x1, 0x2, 0x4),
+ EXPAND_UNOP_STD_W (O (O_ROTXL, SW), "rotxl.w", PREFIX_015, 0x1, 0x2, 0x1),
+ EXPAND_UNOP_EXTENDED_W (O (O_ROTXL, SW), "rotxl.w", CONST_2, PREFIX_015, 0x1, 0x2, 0x5),
+ EXPAND_UNOP_STD_L (O (O_ROTXL, SL), "rotxl.l", PREFIX_010, 0x1, 0x2, 0x3),
+ EXPAND_UNOP_EXTENDED_L (O (O_ROTXL, SL), "rotxl.l", CONST_2, PREFIX_010, 0x1, 0x2, 0x7, B30),
+ EXPAND_UNOP_STD_B (O (O_ROTXR, SB), "rotxr.b", PREFIX_017, 0x1, 0x3, 0x0),
+ EXPAND_UNOP_EXTENDED_B (O (O_ROTXR, SB), "rotxr.b", CONST_2, PREFIX_017, 0x1, 0x3, 0x4),
+ EXPAND_UNOP_STD_W (O (O_ROTXR, SW), "rotxr.w", PREFIX_015, 0x1, 0x3, 0x1),
+ EXPAND_UNOP_EXTENDED_W (O (O_ROTXR, SW), "rotxr.w", CONST_2, PREFIX_015, 0x1, 0x3, 0x5),
+ EXPAND_UNOP_STD_L (O (O_ROTXR, SL), "rotxr.l", PREFIX_010, 0x1, 0x3, 0x3),
+ EXPAND_UNOP_EXTENDED_L (O (O_ROTXR, SL), "rotxr.l", CONST_2, PREFIX_010, 0x1, 0x3, 0x7, B30),
+
+
+ {O (O_BPT, SN), AV_H8, 10, "bpt", {{E}}, {{0x7, 0xA, 0xF, 0xF, E}}},
+ {O (O_RTE, SN), AV_H8, 10, "rte", {{E}}, {{0x5, 0x6, 0x7, 0x0, E}}},
+ {O (O_RTS, SN), AV_H8, 8, "rts", {{E}}, {{0x5, 0x4, 0x7, 0x0, E}}},
+ {O (O_RTEL, SN), AV_H8SX, 0, "rte/l", {{RS32, RD32, E}}, {{0x5, 0x6, RS32 | B30, RD32 | B30, E}}},
+ {O (O_RTSL, SN), AV_H8SX, 0, "rts/l", {{RS32, RD32, E}}, {{0x5, 0x4, RS32 | B30, RD32 | B30, E}}},
+
+ EXPAND_UNOP_STD_B (O (O_SHAL, SB), "shal.b", PREFIX_017, 0x1, 0x0, 0x8),
+ EXPAND_UNOP_EXTENDED_B (O (O_SHAL, SB), "shal.b", CONST_2, PREFIX_017, 0x1, 0x0, 0xc),
+ EXPAND_UNOP_STD_W (O (O_SHAL, SW), "shal.w", PREFIX_015, 0x1, 0x0, 0x9),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHAL, SW), "shal.w", CONST_2, PREFIX_015, 0x1, 0x0, 0xd),
+ EXPAND_UNOP_STD_L (O (O_SHAL, SL), "shal.l", PREFIX_010, 0x1, 0x0, 0xb),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHAL, SL), "shal.l", CONST_2, PREFIX_010, 0x1, 0x0, 0xf, B30),
+ EXPAND_UNOP_STD_B (O (O_SHAR, SB), "shar.b", PREFIX_017, 0x1, 0x1, 0x8),
+ EXPAND_UNOP_EXTENDED_B (O (O_SHAR, SB), "shar.b", CONST_2, PREFIX_017, 0x1, 0x1, 0xc),
+ EXPAND_UNOP_STD_W (O (O_SHAR, SW), "shar.w", PREFIX_015, 0x1, 0x1, 0x9),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHAR, SW), "shar.w", CONST_2, PREFIX_015, 0x1, 0x1, 0xd),
+ EXPAND_UNOP_STD_L (O (O_SHAR, SL), "shar.l", PREFIX_010, 0x1, 0x1, 0xb),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHAR, SL), "shar.l", CONST_2, PREFIX_010, 0x1, 0x1, 0xf, B30),
+
+ EXPAND_UNOP_STD_B (O (O_SHLL, SB), "shll.b", PREFIX_017, 0x1, 0x0, 0x0),
+
+ {O (O_SHLL, SB), AV_H8SX, 0, "shll.b", {{RS8, RD8, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x0, 0x0, RD8, E}}},
+
+ EXPAND_UNOP_EXTENDED_B (O (O_SHLL, SB), "shll.b", CONST_2, PREFIX_017, 0x1, 0x0, 0x4),
+ EXPAND_UNOP_EXTENDED_B (O (O_SHLL, SB), "shll.b", CONST_4, PREFIX_017, 0x1, 0x0, 0xa),
+ {O (O_SHLL, SB), AV_H8SX, 0, "shll.b", {{IMM5, RD8, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x0, 0x0, RD8, E}}},
+
+ EXPAND_UNOP_STD_W (O (O_SHLL, SW), "shll.w", PREFIX_015, 0x1, 0x0, 0x1),
+
+ {O (O_SHLL, SW), AV_H8SX, 0, "shll.w", {{RS8, RD16, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x0, 0x1, RD16, E}}},
+
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLL, SW), "shll.w", CONST_2, PREFIX_015, 0x1, 0x0, 0x5),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLL, SW), "shll.w", CONST_4, PREFIX_015, 0x1, 0x0, 0x2),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLL, SW), "shll.w", CONST_8, PREFIX_015, 0x1, 0x0, 0x6),
+ {O (O_SHLL, SW), AV_H8SX, 0, "shll.w", {{IMM5, RD16, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x0, 0x1, RD16, E}}},
+
+ EXPAND_UNOP_STD_L (O (O_SHLL, SL), "shll.l", PREFIX_010, 0x1, 0x0, 0x3),
+
+ {O (O_SHLL, SL), AV_H8SX, 0, "shll.l", {{RS8, RD32, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x0, 0x3, B30 | RD32, E}}},
+
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_2, PREFIX_010, 0x1, 0x0, 0x7, B30),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_4, PREFIX_010, 0x1, 0x0, 0x3, B31),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_8, PREFIX_010, 0x1, 0x0, 0x7, B31),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_16, PREFIX_010, 0x1, 0x0, 0xf, B31),
+ {O (O_SHLL, SL), AV_H8SX, 0, "shll.l", {{IMM5, RD32, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x0, 0x3, B30 | RD32, E}}},
+
+ EXPAND_UNOP_STD_B (O (O_SHLR, SB), "shlr.b", PREFIX_017, 0x1, 0x1, 0x0),
+
+ {O (O_SHLR, SB), AV_H8SX, 0, "shlr.b", {{RS8, RD8, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x1, 0x0, RD8, E}}},
+
+ EXPAND_UNOP_EXTENDED_B (O (O_SHLR, SB), "shlr.b", CONST_2, PREFIX_017, 0x1, 0x1, 0x4),
+ EXPAND_UNOP_EXTENDED_B (O (O_SHLR, SB), "shlr.b", CONST_4, PREFIX_017, 0x1, 0x1, 0xa),
+ {O (O_SHLR, SB), AV_H8SX, 0, "shlr.b", {{IMM5, RD8, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x1, 0x0, RD8, E}}},
+
+ EXPAND_UNOP_STD_W (O (O_SHLR, SW), "shlr.w", PREFIX_015, 0x1, 0x1, 0x1),
+
+ {O (O_SHLR, SW), AV_H8SX, 0, "shlr.w", {{RS8, RD16, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x1, 0x1, RD16, E}}},
+
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLR, SW), "shlr.w", CONST_2, PREFIX_015, 0x1, 0x1, 0x5),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLR, SW), "shlr.w", CONST_4, PREFIX_015, 0x1, 0x1, 0x2),
+ EXPAND_UNOP_EXTENDED_W (O (O_SHLR, SW), "shlr.w", CONST_8, PREFIX_015, 0x1, 0x1, 0x6),
+ {O (O_SHLR, SW), AV_H8SX, 0, "shlr.w", {{IMM5, RD16, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x1, 0x1, RD16, E}}},
+
+ EXPAND_UNOP_STD_L (O (O_SHLR, SL), "shlr.l", PREFIX_010, 0x1, 0x1, 0x3),
+
+ {O (O_SHLR, SL), AV_H8SX, 0, "shlr.l", {{RS8, RD32, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x1, 0x3, B30 | RD32, E}}},
+
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_2, PREFIX_010, 0x1, 0x1, 0x7, B30),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_4, PREFIX_010, 0x1, 0x1, 0x3, B31),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_8, PREFIX_010, 0x1, 0x1, 0x7, B31),
+ EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_16, PREFIX_010, 0x1, 0x1, 0xf, B31),
+ {O (O_SHLR, SL), AV_H8SX, 0, "shlr.l", {{IMM5, RD32, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x1, 0x3, B30 | RD32, E}}},
+
+ {O (O_SLEEP, SN), AV_H8, 2, "sleep", {{E}}, {{0x0, 0x1, 0x8, 0x0, E}}},
+
+ {O (O_STC, SB), AV_H8, 2, "stc", {{CCR | SRC, RD8, E}}, {{0x0, 0x2, B30 | CCR | SRC, RD8, E}}},
+ {O (O_STC, SB), AV_H8S, 2, "stc", {{EXR | SRC, RD8, E}}, {{0x0, 0x2, B30 | EXR | SRC, RD8, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, RDIND, E}}, {{PREFIXSTC, 0x6, 0x9, B31 | RDIND, IGNORE, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, RDIND, E}}, {{PREFIXSTC, 0x6, 0x9, B31 | RDIND, IGNORE, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, RDPREDEC, E}}, {{PREFIXSTC, 0x6, 0xD, B31 | RDPREDEC, IGNORE, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, RDPREDEC, E}}, {{PREFIXSTC, 0x6, 0xD, B31 | RDPREDEC, IGNORE, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, DISP16DST, E}}, {{PREFIXSTC, 0x6, 0xF, B31 | DSTDISPREG, IGNORE, DSTDISP16LIST, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, DISP16DST, E}}, {{PREFIXSTC, 0x6, 0xF, B31 | DSTDISPREG, IGNORE, DSTDISP16LIST, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, DISP32DST, E}}, {{PREFIXSTC, 0x7, 0x8, B30 | DSTDISPREG, 0, 0x6, 0xB, 0xA, IGNORE, DSTDISP32LIST, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, DISP32DST, E}}, {{PREFIXSTC, 0x7, 0x8, B30 | DSTDISPREG, 0, 0x6, 0xB, 0xA, IGNORE, DSTDISP32LIST, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, ABS16DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0x8, IGNORE, DST | ABS16LIST, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, ABS16DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0x8, IGNORE, DST | ABS16LIST, E}}},
+ {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, ABS32DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0xA, IGNORE, DST | ABS32LIST, E}}},
+ {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, ABS32DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0xA, IGNORE, DST | ABS32LIST, E}}},
+ {O (O_STC, SL), AV_H8SX, 0, "stc", {{B30 | VBR_SBR | SRC, RD32, E}}, {{0x0, 0x2, B30 | VBR_SBR | SRC, RD32, E}}},
+
+
+ EXPAND_TWOOP_B (O (O_SUB, SB), "sub.b", 0xa, 0x1, 0x8, 0x3, B01),
+
+ {O (O_SUB, SW), AV_H8, 2, "sub.w", {{RS16, RD16, E}}, {{0x1, 0x9, RS16, RD16, E}}},
+ {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, RD16, E}}, {{0x1, 0xa, B30 | IMM3NZ, RD16, E}}},
+ {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, 0x1, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, 0x1, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, 0x1, 0xa, B30 | IMM3NZ, IGNORE, E}}},
+ EXPAND_TWOOP_W (O (O_SUB, SW), "sub.w", 0x1, 0x9, 0x3),
+
+ {O (O_SUB, SL), AV_H8H, 6, "sub.l", {{RS32, RD32, E}}, {{0x1, 0xa, B31 | RS32, B30 | RD32, E}}},
+ {O (O_SUB, SL), AV_H8SX, 0, "sub.l", {{IMM3NZ_NS, RD32, E}}, {{0x1, 0xa, B31 | IMM3NZ, B31 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_SUB, SL), "sub.l", 0x3),
+
+ {O (O_SUBS, SL), AV_H8, 2, "subs", {{KBIT, RDP, E}}, {{0x1, 0xB,KBIT, RDP, E}}},
+
+ {O (O_SUBX, SB), AV_H8, 2, "subx", {{IMM8, RD8, E}}, {{0xb, RD8, IMM8LIST, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0xb, IGNORE, IMM8LIST, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{IMM8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0xb, IGNORE, IMM8LIST, E}}},
+ {O (O_SUBX, SB), AV_H8, 2, "subx", {{RS8, RD8, E}}, {{0x1, 0xe, RS8, RD8, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RS8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x1, 0xe, RS8, IGNORE, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RS8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0x1, 0xe, RS8, IGNORE, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSIND, RD8, E}}, {{0x7, 0xc, B30 | RSIND, IGNORE, 0x1, 0xe, IGNORE, RD8, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSPOSTDEC, RD8, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, B30 | B20 | IGNORE, 0x1, 0xe, IGNORE, RD8, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSIND, RDIND, E}}, {{PREFIX_0174, 0x6, 0x8, B30 | RSIND, 0xd, 0x0, RDIND, 0x3, IGNORE, E}}},
+ {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x3, IGNORE, E}}},
+
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{IMM16, RD16, E}}, {{PREFIX_0151, 0x7, 0x9, 0x3, RD16, IMM16LIST, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{IMM16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x7, 0x9, 0x3, IGNORE, IMM16LIST, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{IMM16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0x9, 0x3, IGNORE, IMM16LIST, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RS16, RD16, E}}, {{PREFIX_0151, 0x1, 0x9, RS16, RD16, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RS16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x1, 0x9, RS16, IGNORE, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RS16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x1, 0x9, RS16, IGNORE, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSIND, RD16, E}}, {{0x7, 0xc, B31 | RSIND, B01 | IGNORE, 0x1, 0x9, IGNORE, RD16, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSPOSTDEC, RD16, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x1, 0x9, IGNORE, RD16, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSIND, RDIND, E}}, {{PREFIX_0154, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x3, IGNORE, E}}},
+ {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x3, IGNORE, E}}},
+
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{IMM32, RD32, E}}, {{PREFIX_0101, 0x7, 0xa, 0x3, RD32, IMM32LIST, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{IMM32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x3, IGNORE, IMM32LIST, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{IMM32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x3, IGNORE, IMM32LIST, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RS32, RD32, E}}, {{PREFIX_0101, 0x1, 0xa, B31 | RS32, B30 | RD32, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RS32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | RS32, B30 | IGNORE, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RS32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | RS32, B30 | IGNORE, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSIND, RD32, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, B30 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | IGNORE, B30 | RD32, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSPOSTDEC, RD32, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | IGNORE, B30 | RD32, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSIND, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x3, IGNORE, E}}},
+ {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x3, IGNORE, E}}},
+
+ {O (O_TRAPA, SB), AV_H8H, 2, "trapa", {{IMM2, E}}, {{0x5, 0x7, IMM2, IGNORE, E}}},
+ {O (O_TAS, SB), AV_H8H, 2, "tas", {{RSIND, E}}, {{0x0, 0x1, 0xe, 0x0, 0x7, 0xb, B30 | RSIND, 0xc, E}}},
+
+ {O (O_XOR, SB), AV_H8, 2, "xor.b", {{IMM8, RD8, E}}, {{0xd, RD8, IMM8LIST, E}}},
+ EXPAND_TWOOP_B (O (O_XOR, SB), "xor.b", 0xd, 0x1, 0x5, 0x5, 0),
+
+ {O (O_XOR, SW), AV_H8, 2, "xor.w", {{RS16, RD16, E}}, {{0x6, 0x5, RS16, RD16, E}}},
+ EXPAND_TWOOP_W (O (O_XOR, SW), "xor.w", 0x6, 0x5, 0x5),
+
+ {O (O_XOR, SL), AV_H8H, 2, "xor.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xF, 0x0, 0x6, 0x5, B30 | RS32, B30 | RD32, E}}},
+ EXPAND_TWOOP_L (O (O_XOR, SL), "xor.l", 0x5),
+
+ {O (O_XORC, SB), AV_H8, 2, "xorc", {{IMM8, CCR | DST, E}}, {{0x0, 0x5, IMM8LIST, E}}},
+ {O (O_XORC, SB), AV_H8S, 2, "xorc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x5, IMM8LIST, E}}},
+
+ {O (O_CLRMAC, SN), AV_H8S, 2, "clrmac", {{E}}, {{0x0, 0x1, 0xa, 0x0, E}}},
+ {O (O_MAC, SW), AV_H8S, 2, "mac", {{RSPOSTINC, RDPOSTINC, E}}, {{0x0, 0x1, 0x6, 0x0, 0x6, 0xd, B30 | RSPOSTINC, B30 | RDPOSTINC, E}}},
+ {O (O_LDMAC, SL), AV_H8S, 2, "ldmac", {{RS32, MD32, E}}, {{0x0, 0x3, MD32, RS32, E}}},
+ {O (O_STMAC, SL), AV_H8S, 2, "stmac", {{MS32, RD32, E}}, {{0x0, 0x2, MS32, RD32, E}}},
+ {O (O_LDM, SL), AV_H8H, 6, "ldm.l", {{RSPOSTINC, RD32, E}}, {{0x0, 0x1, DATA, 0x0, 0x6, 0xD, 0x7, B30 | RD32, E}}},
+ {O (O_STM, SL), AV_H8H, 6, "stm.l", {{RS32, RDPREDEC, E}}, {{0x0, 0x1, DATA, 0x0, 0x6, 0xD, 0xF, B30 | RS32, E}}},
+ {0, 0, 0, NULL, {{0, 0, 0}}, {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}}
};
#else
extern const struct h8_opcode h8_opcodes[];
#endif
+
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index d26d5ef3e07..baa15cd6882 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,16 @@
+2003-06-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR other/10810
+ * test-demangle.c (getline): Fix fence-post error.
+
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * asprintf.c: Change comment to note that -1 is returned upon
+ error.
+ * vasprintf.c: Likewise.
+ (vasprintf): Return -1 upon error.
+ * functions.texi: Document changes to asprintf and vasprintf.
+
2003-05-19 Kelley Cook <kelleycook@wideopenwest.com>
* config.table: Accept i[345867]86 variant.
diff --git a/libiberty/asprintf.c b/libiberty/asprintf.c
index 5de775616d0..cd0543aa7ad 100644
--- a/libiberty/asprintf.c
+++ b/libiberty/asprintf.c
@@ -1,6 +1,6 @@
/* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of the libiberty library.
@@ -37,7 +37,7 @@ pass a pointer to a pointer. This function will compute the size of
the buffer needed, allocate memory with @code{malloc}, and store a
pointer to the allocated memory in @code{*@var{resptr}}. The value
returned is the same as @code{sprintf} would return. If memory could
-not be allocated, zero is returned and @code{NULL} is stored in
+not be allocated, minus one is returned and @code{NULL} is stored in
@code{*@var{resptr}}.
@end deftypefn
diff --git a/libiberty/functions.texi b/libiberty/functions.texi
index b34c20409e3..2d30c5da1f3 100644
--- a/libiberty/functions.texi
+++ b/libiberty/functions.texi
@@ -29,7 +29,7 @@ pass a pointer to a pointer. This function will compute the size of
the buffer needed, allocate memory with @code{malloc}, and store a
pointer to the allocated memory in @code{*@var{resptr}}. The value
returned is the same as @code{sprintf} would return. If memory could
-not be allocated, zero is returned and @code{NULL} is stored in
+not be allocated, minus one is returned and @code{NULL} is stored in
@code{*@var{resptr}}.
@end deftypefn
@@ -922,7 +922,7 @@ you pass a pointer to a pointer. This function will compute the size
of the buffer needed, allocate memory with @code{malloc}, and store a
pointer to the allocated memory in @code{*@var{resptr}}. The value
returned is the same as @code{vsprintf} would return. If memory could
-not be allocated, zero is returned and @code{NULL} is stored in
+not be allocated, minus one is returned and @code{NULL} is stored in
@code{*@var{resptr}}.
@end deftypefn
diff --git a/libiberty/testsuite/test-demangle.c b/libiberty/testsuite/test-demangle.c
index 82f263e88af..6e5d0b4b973 100644
--- a/libiberty/testsuite/test-demangle.c
+++ b/libiberty/testsuite/test-demangle.c
@@ -65,7 +65,7 @@ getline(buf)
line: copy this line into the buffer and return. */
while (c != EOF && c != '\n')
{
- if (count >= alloc)
+ if (count + 1 >= alloc)
{
alloc *= 2;
data = xrealloc (data, alloc);
diff --git a/libiberty/vasprintf.c b/libiberty/vasprintf.c
index aa20e5bff00..775260475cb 100644
--- a/libiberty/vasprintf.c
+++ b/libiberty/vasprintf.c
@@ -1,6 +1,6 @@
/* Like vsprintf but provides a pointer to malloc'd storage, which must
be freed by the caller.
- Copyright (C) 1994 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2003 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@ -52,7 +52,7 @@ you pass a pointer to a pointer. This function will compute the size
of the buffer needed, allocate memory with @code{malloc}, and store a
pointer to the allocated memory in @code{*@var{resptr}}. The value
returned is the same as @code{vsprintf} would return. If memory could
-not be allocated, zero is returned and @code{NULL} is stored in
+not be allocated, minus one is returned and @code{NULL} is stored in
@code{*@var{resptr}}.
@end deftypefn
@@ -142,7 +142,7 @@ int_vasprintf (result, format, args)
if (*result != NULL)
return vsprintf (*result, format, *args);
else
- return 0;
+ return -1;
}
int
diff --git a/ltconfig b/ltconfig
index 7a4d63579f1..f49a2cfea3b 100755
--- a/ltconfig
+++ b/ltconfig
@@ -1111,6 +1111,18 @@ darwin* | rhapsody*)
shlibpath_var=DYLD_LIBRARY_PATH
;;
+freebsd*-gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
+ soname_spec='${libname}${release}.so${major}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU/FreeBSD ld.so'
+ ;;
+
freebsd1*)
dynamic_linker=no
;;
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index cbdcc3cfa68..820027807a3 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,39 @@
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * frv-desc.c: Regenerate.
+ * frv-opc.c: Regenerate.
+ * frv-asm.c: Regenerate.
+ * frv-desc.h: Regenerate.
+ * frv-dis.c: Regenerate.
+ * frv-ibld.c: Regenerate.
+ * frv-opc.h: Regenerate.
+ * po/opcodes.pot: Regenerate.
+
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+ and Bernd Schmidt <bernds@redhat.com>
+ and Alexandre Oliva <aoliva@redhat.com>
+
+ * disassemble.c (disassembler): Add support for h8300sx.
+ * h8300-dis.c: Ditto.
+
+2003-06-03 Nick Clifton <nickc@redhat.com>
+
+ * frv-desc.c: Regenerate.
+ * frv-opc.c: Regenerate.
+
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * iq2000-asm.c: Regenerate.
+ * iq2000-desc.c: Regenerate.
+ * iq2000-desc.h: Regenerate.
+ * iq2000-dis.c: Regenerate.
+ * iq2000-ibld.c: Regenerate.
+ * iq2000-opc.c: Regenerate.
+ * iq2000-opc.h: Regenerate.
+ * po/POTFILES.in: Regenerate.
+ * po/opcodes.pot: Regenerate.
+
2003-05-23 Jason Eckhardt <jle@rice.edu>
* i860-dis.c (crnames): Add bear, ccr, p0, p1, p2, p3.
diff --git a/opcodes/aclocal.m4 b/opcodes/aclocal.m4
index 184bf3665ad..92732d34f68 100644
--- a/opcodes/aclocal.m4
+++ b/opcodes/aclocal.m4
@@ -35,6 +35,24 @@ AC_SUBST(bfdlibdir)
AC_SUBST(bfdincludedir)
])
+#serial 1
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
diff --git a/opcodes/config.in b/opcodes/config.in
index 6355be08085..5caef5503ed 100644
--- a/opcodes/config.in
+++ b/opcodes/config.in
@@ -25,9 +25,6 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
-
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
@@ -109,12 +106,6 @@
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
diff --git a/opcodes/configure b/opcodes/configure
index bb079388aec..ae248d05111 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -732,249 +732,49 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:739: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:769: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:820: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
+echo "configure:738: checking for strerror in -lcposix" >&5
+ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 863 "configure"
+ ac_save_LIBS="$LIBS"
+LIBS="-lcposix $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 746 "configure"
#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror();
-main(){return(0);}
+int main() {
+strerror()
+; return 0; }
EOF
-if { (eval echo configure:868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
+if { (eval echo configure:757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:899: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:927: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+LIBS="$ac_save_LIBS"
fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:959: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ISC=yes # If later tests want to check for ISC.
- cat >> confdefs.h <<\EOF
-#define _POSIX_SOURCE 1
-EOF
-
- if test "$GCC" = yes; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
+ LIBS="$LIBS -lcposix"
else
echo "$ac_t""no" 1>&6
- ISC=
fi
+
+
# We currently only use the version number for the name of any shared
# library. For user convenience, we always use the same version
@@ -993,7 +793,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:997: checking for a BSD compatible install" >&5
+echo "configure:797: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1046,7 +846,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:1050: checking whether build environment is sane" >&5
+echo "configure:850: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1103,7 +903,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1107: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:907: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1149,7 +949,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1153: checking for working aclocal" >&5
+echo "configure:953: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1162,7 +962,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1166: checking for working autoconf" >&5
+echo "configure:966: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1175,7 +975,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1179: checking for working automake" >&5
+echo "configure:979: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1188,7 +988,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1192: checking for working autoheader" >&5
+echo "configure:992: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1201,7 +1001,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1205: checking for working makeinfo" >&5
+echo "configure:1005: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1224,7 +1024,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1228: checking for $ac_word" >&5
+echo "configure:1028: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1256,7 +1056,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1260: checking for $ac_word" >&5
+echo "configure:1060: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1288,7 +1088,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1292: checking for $ac_word" >&5
+echo "configure:1092: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1391,6 +1191,228 @@ else
enable_fast_install=yes
fi
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1198: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1228: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1279: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1311: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1322 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1353: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1358: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1386: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1403,7 +1425,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1407: checking for ld used by GCC" >&5
+echo "configure:1429: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1433,10 +1455,10 @@ echo "configure:1407: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1437: checking for GNU ld" >&5
+echo "configure:1459: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1440: checking for non-GNU ld" >&5
+echo "configure:1462: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1471,7 +1493,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1475: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1497: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1488,7 +1510,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1492: checking for $LD option to reload object files" >&5
+echo "configure:1514: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1500,7 +1522,7 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1504: checking for BSD-compatible nm" >&5
+echo "configure:1526: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1538,7 +1560,7 @@ NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1542: checking whether ln -s works" >&5
+echo "configure:1564: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1559,7 +1581,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1563: checking how to recognise dependant libraries" >&5
+echo "configure:1585: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1732,13 +1754,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1736: checking for object suffix" >&5
+echo "configure:1758: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1758,7 +1780,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1762: checking for executable suffix" >&5
+echo "configure:1784: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1768,7 +1790,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -1795,7 +1817,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1799: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1821: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1857,7 +1879,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1861: checking for file" >&5
+echo "configure:1883: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1928,7 +1950,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1932: checking for $ac_word" >&5
+echo "configure:1954: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1960,7 +1982,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1964: checking for $ac_word" >&5
+echo "configure:1986: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1995,7 +2017,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1999: checking for $ac_word" >&5
+echo "configure:2021: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2027,7 +2049,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2031: checking for $ac_word" >&5
+echo "configure:2053: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2094,8 +2116,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2098 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 2120 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
@@ -2128,7 +2150,7 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:2154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -2146,7 +2168,7 @@ ia64-*-hpux*)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2150: checking whether the C compiler needs -belf" >&5
+echo "configure:2172: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2159,14 +2181,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2163 "configure"
+#line 2185 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -2334,7 +2356,7 @@ if test -z "$target" ; then
fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2338: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2360: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -2357,7 +2379,7 @@ fi
echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
-echo "configure:2361: checking whether to install libbfd" >&5
+echo "configure:2383: checking whether to install libbfd" >&5
# Check whether --enable-install-libbfd or --disable-install-libbfd was given.
if test "${enable_install_libbfd+set}" = set; then
enableval="$enable_install_libbfd"
@@ -2394,7 +2416,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2398: checking for executable suffix" >&5
+echo "configure:2420: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2404,7 +2426,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -2430,7 +2452,7 @@ ac_exeext=$EXEEXT
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2434: checking for $ac_word" >&5
+echo "configure:2456: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2460,7 +2482,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2464: checking for $ac_word" >&5
+echo "configure:2486: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2511,7 +2533,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2515: checking for $ac_word" >&5
+echo "configure:2537: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2543,7 +2565,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2547: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2569: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2554,12 +2576,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2558 "configure"
+#line 2580 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2585,12 +2607,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2589: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2611: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2594: checking whether we are using GNU C" >&5
+echo "configure:2616: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2599,7 +2621,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2618,7 +2640,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2622: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2644: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2652,7 +2674,7 @@ fi
ALL_LINGUAS="fr sv tr es da de id pt_BR ro"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2656: checking how to run the C preprocessor" >&5
+echo "configure:2678: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2667,13 +2689,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2671 "configure"
+#line 2693 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2699: \"$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
:
@@ -2684,13 +2706,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2688 "configure"
+#line 2710 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2716: \"$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
:
@@ -2701,13 +2723,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2705 "configure"
+#line 2727 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2733: \"$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
:
@@ -2734,7 +2756,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2738: checking for $ac_word" >&5
+echo "configure:2760: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2762,12 +2784,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2766: checking for ANSI C header files" >&5
+echo "configure:2788: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2771 "configure"
+#line 2793 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2775,7 +2797,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2792,7 +2814,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2796 "configure"
+#line 2818 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2810,7 +2832,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2814 "configure"
+#line 2836 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2831,7 +2853,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2835 "configure"
+#line 2857 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2842,7 +2864,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2866,12 +2888,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2870: checking for working const" >&5
+echo "configure:2892: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2875 "configure"
+#line 2897 "configure"
#include "confdefs.h"
int main() {
@@ -2920,7 +2942,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2941,21 +2963,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2945: checking for inline" >&5
+echo "configure:2967: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 2952 "configure"
+#line 2974 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2981,12 +3003,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2985: checking for off_t" >&5
+echo "configure:3007: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2990 "configure"
+#line 3012 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3014,12 +3036,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3018: checking for size_t" >&5
+echo "configure:3040: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3023 "configure"
+#line 3045 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3049,19 +3071,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:3053: checking for working alloca.h" >&5
+echo "configure:3075: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3058 "configure"
+#line 3080 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -3082,12 +3104,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3086: checking for alloca" >&5
+echo "configure:3108: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3091 "configure"
+#line 3113 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3115,7 +3137,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -3147,12 +3169,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3151: checking whether alloca needs Cray hooks" >&5
+echo "configure:3173: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3156 "configure"
+#line 3178 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3177,12 +3199,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3181: checking for $ac_func" >&5
+echo "configure:3203: 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 3186 "configure"
+#line 3208 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3205,7 +3227,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3231: \"$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
@@ -3232,7 +3254,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3236: checking stack direction for C alloca" >&5
+echo "configure:3258: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3240,7 +3262,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3244 "configure"
+#line 3266 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3259,7 +3281,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -3284,17 +3306,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:3288: checking for $ac_hdr" >&5
+echo "configure:3310: 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 3293 "configure"
+#line 3315 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3320: \"$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*
@@ -3323,12 +3345,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3327: checking for $ac_func" >&5
+echo "configure:3349: 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 3332 "configure"
+#line 3354 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3351,7 +3373,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3377: \"$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
@@ -3376,7 +3398,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3380: checking for working mmap" >&5
+echo "configure:3402: 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
@@ -3384,7 +3406,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3388 "configure"
+#line 3410 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3524,7 +3546,7 @@ main()
}
EOF
-if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3550: \"$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
@@ -3552,17 +3574,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3556: checking for $ac_hdr" >&5
+echo "configure:3578: 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 3561 "configure"
+#line 3583 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3588: \"$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*
@@ -3592,12 +3614,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3596: checking for $ac_func" >&5
+echo "configure:3618: 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 3601 "configure"
+#line 3623 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3620,7 +3642,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3649,12 +3671,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3653: checking for $ac_func" >&5
+echo "configure:3675: 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 3658 "configure"
+#line 3680 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3677,7 +3699,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3703: \"$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
@@ -3711,19 +3733,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3715: checking for LC_MESSAGES" >&5
+echo "configure:3737: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3720 "configure"
+#line 3742 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -3744,7 +3766,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3748: checking whether NLS is requested" >&5
+echo "configure:3770: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -3764,7 +3786,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3768: checking whether included gettext is requested" >&5
+echo "configure:3790: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -3783,17 +3805,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3787: checking for libintl.h" >&5
+echo "configure:3809: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3792 "configure"
+#line 3814 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3819: \"$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*
@@ -3810,19 +3832,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3814: checking for gettext in libc" >&5
+echo "configure:3836: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3819 "configure"
+#line 3841 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -3838,7 +3860,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3842: checking for bindtextdomain in -lintl" >&5
+echo "configure:3864: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3846,7 +3868,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3850 "configure"
+#line 3872 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3857,7 +3879,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3873,19 +3895,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3877: checking for gettext in libintl" >&5
+echo "configure:3899: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3882 "configure"
+#line 3904 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libintl=yes
else
@@ -3913,7 +3935,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3917: checking for $ac_word" >&5
+echo "configure:3939: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3947,12 +3969,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3951: checking for $ac_func" >&5
+echo "configure:3973: 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 3956 "configure"
+#line 3978 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3975,7 +3997,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4001: \"$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
@@ -4002,7 +4024,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4006: checking for $ac_word" >&5
+echo "configure:4028: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4038,7 +4060,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4042: checking for $ac_word" >&5
+echo "configure:4064: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4070,7 +4092,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 4074 "configure"
+#line 4096 "configure"
#include "confdefs.h"
int main() {
@@ -4078,7 +4100,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -4110,7 +4132,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4114: checking for $ac_word" >&5
+echo "configure:4136: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4144,7 +4166,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4148: checking for $ac_word" >&5
+echo "configure:4170: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4180,7 +4202,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4184: checking for $ac_word" >&5
+echo "configure:4206: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4270,7 +4292,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4274: checking for catalogs to be installed" >&5
+echo "configure:4296: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4298,17 +4320,17 @@ echo "configure:4274: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4302: checking for linux/version.h" >&5
+echo "configure:4324: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4307 "configure"
+#line 4329 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4334: \"$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*
@@ -4386,7 +4408,7 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4390: checking for build system executable suffix" >&5
+echo "configure:4412: checking for build system executable suffix" >&5
if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4423,7 +4445,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4427: checking for a BSD compatible install" >&5
+echo "configure:4449: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4480,17 +4502,17 @@ for ac_hdr in string.h strings.h stdlib.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4484: checking for $ac_hdr" >&5
+echo "configure:4506: 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 4489 "configure"
+#line 4511 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4516: \"$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*
@@ -4869,7 +4891,6 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
-s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -4883,6 +4904,7 @@ s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
+s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
s%@OBJEXT@%$OBJEXT%g
s%@EXEEXT@%$EXEEXT%g
diff --git a/opcodes/frv-asm.c b/opcodes/frv-asm.c
index 538ed2dc8f1..b4647b1ed4d 100644
--- a/opcodes/frv-asm.c
+++ b/opcodes/frv-asm.c
@@ -64,6 +64,8 @@ static const char * parse_s12
PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
static const char * parse_u12
PARAMS ((CGEN_CPU_DESC, const char **, int, long *));
+static const char * parse_even_register
+ PARAMS ((CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *));
static const char *
parse_ulo16 (cd, strp, opindex, valuep)
@@ -346,6 +348,26 @@ parse_u12 (cd, strp, opindex, valuep)
}
}
+static const char *
+parse_even_register (cd, strP, tableP, valueP)
+ CGEN_CPU_DESC cd;
+ const char ** strP;
+ CGEN_KEYWORD * tableP;
+ long * valueP;
+{
+ const char * errmsg;
+ const char * saved_star_strP = * strP;
+
+ errmsg = cgen_parse_keyword (cd, strP, tableP, valueP);
+
+ if (errmsg == NULL && ((* valueP) & 1))
+ {
+ errmsg = _("register number must be even");
+ * strP = saved_star_strP;
+ }
+
+ return errmsg;
+}
/* -- */
const char * frv_cgen_parse_operand
@@ -455,12 +477,21 @@ frv_cgen_parse_operand (cd, opindex, strp, fields)
case FRV_OPERAND_FRINTI :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRi);
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRi);
+ break;
case FRV_OPERAND_FRINTJ :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
+ break;
case FRV_OPERAND_FRINTK :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRk);
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRk);
+ break;
case FRV_OPERAND_FRJ :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
break;
diff --git a/opcodes/frv-desc.c b/opcodes/frv-desc.c
index 5fac77a0dd7..ffb0b27e3b9 100644
--- a/opcodes/frv-desc.c
+++ b/opcodes/frv-desc.c
@@ -2173,6 +2173,18 @@ const CGEN_OPERAND frv_cgen_operand_table[] =
{ "label24", FRV_OPERAND_LABEL24, HW_H_IADDR, 17, 24,
{ 2, { (const PTR) &FRV_F_LABEL24_MULTI_IFIELD[0] } },
{ 0|A(PCREL_ADDR)|A(VIRTUAL), { (1<<MACH_BASE) } } },
+/* FRintieven: (even) source register 1 */
+ { "FRintieven", FRV_OPERAND_FRINTIEVEN, HW_H_FR_INT, 17, 6,
+ { 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_FRI] } },
+ { 0, { (1<<MACH_BASE) } } },
+/* FRintjeven: (even) source register 2 */
+ { "FRintjeven", FRV_OPERAND_FRINTJEVEN, HW_H_FR_INT, 5, 6,
+ { 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_FRJ] } },
+ { 0, { (1<<MACH_BASE) } } },
+/* FRintkeven: (even) target register */
+ { "FRintkeven", FRV_OPERAND_FRINTKEVEN, HW_H_FR_INT, 30, 6,
+ { 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_FRK] } },
+ { 0, { (1<<MACH_BASE) } } },
/* d12: 12 bit signed immediate */
{ "d12", FRV_OPERAND_D12, HW_H_SINT, 11, 12,
{ 0, { (const PTR) &frv_cgen_ifld_table[FRV_F_D12] } },
@@ -5472,7 +5484,7 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_MCUTSSI, "mcutssi", "mcutssi", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
},
-/* mdcutssi$pack $ACC40Si,$s6,$FRintk */
+/* mdcutssi$pack $ACC40Si,$s6,$FRintkeven */
{
FRV_INSN_MDCUTSSI, "mdcutssi", "mdcutssi", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
@@ -5497,7 +5509,7 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_MSRAHI, "msrahi", "msrahi", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
},
-/* mdrotli$pack $FRinti,$u6,$FRintk */
+/* mdrotli$pack $FRintieven,$s6,$FRintkeven */
{
FRV_INSN_MDROTLI, "mdrotli", "mdrotli", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
@@ -5517,7 +5529,7 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_MSATHS, "msaths", "msaths", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
-/* mqsaths$pack $FRinti,$FRintj,$FRintk */
+/* mqsaths$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSATHS, "mqsaths", "mqsaths", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
@@ -5582,42 +5594,42 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMSUBHUS, "cmsubhus", "cmsubhus", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
},
-/* mqaddhss$pack $FRinti,$FRintj,$FRintk */
+/* mqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQADDHSS, "mqaddhss", "mqaddhss", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* mqaddhus$pack $FRinti,$FRintj,$FRintk */
+/* mqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQADDHUS, "mqaddhus", "mqaddhus", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* mqsubhss$pack $FRinti,$FRintj,$FRintk */
+/* mqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSUBHSS, "mqsubhss", "mqsubhss", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* mqsubhus$pack $FRinti,$FRintj,$FRintk */
+/* mqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSUBHUS, "mqsubhus", "mqsubhus", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* cmqaddhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQADDHSS, "cmqaddhss", "cmqaddhss", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* cmqaddhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQADDHUS, "cmqaddhus", "cmqaddhus", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* cmqsubhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQSUBHSS, "cmqsubhss", "cmqsubhss", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
},
-/* cmqsubhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQSUBHUS, "cmqsubhus", "cmqsubhus", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
@@ -5682,32 +5694,32 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMMULHU, "cmmulhu", "cmmulhu", 32,
{ 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
-/* mqmulhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULHS, "mqmulhs", "mqmulhs", 32,
{ 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqmulhu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULHU, "mqmulhu", "mqmulhu", 32,
{ 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqmulxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULXHS, "mqmulxhs", "mqmulxhs", 32,
{ 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqmulxhu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulxhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULXHU, "mqmulxhu", "mqmulxhu", 32,
{ 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* cmqmulhs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMULHS, "cmqmulhs", "cmqmulhs", 32,
{ 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* cmqmulhu$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMULHU, "cmqmulhu", "cmqmulhu", 32,
{ 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
@@ -5742,37 +5754,37 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMMACHU, "cmmachu", "cmmachu", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
-/* mqmachs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMACHS, "mqmachs", "mqmachs", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqmachu$pack $FRinti,$FRintj,$ACC40Uk */
+/* mqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk */
{
FRV_INSN_MQMACHU, "mqmachu", "mqmachu", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* cmqmachs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMACHS, "cmqmachs", "cmqmachs", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* cmqmachu$pack $FRinti,$FRintj,$ACC40Uk,$CCi,$cond */
+/* cmqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk,$CCi,$cond */
{
FRV_INSN_CMQMACHU, "cmqmachu", "cmqmachu", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqxmachs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqxmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQXMACHS, "mqxmachs", "mqxmachs", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
-/* mqxmacxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqxmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQXMACXHS, "mqxmacxhs", "mqxmacxhs", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
},
-/* mqmacxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMACXHS, "mqmacxhs", "mqmacxhs", 32,
{ 0, { (1<<MACH_FR400), UNIT_FM0, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
@@ -5817,22 +5829,22 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMCPXIU, "cmcpxiu", "cmcpxiu", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
},
-/* mqcpxrs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxrs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXRS, "mqcpxrs", "mqcpxrs", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqcpxru$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxru$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXRU, "mqcpxru", "mqcpxru", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqcpxis$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxis$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXIS, "mqcpxis", "mqcpxis", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
},
-/* mqcpxiu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxiu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXIU, "mqcpxiu", "mqcpxiu", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
@@ -5847,12 +5859,12 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_CMEXPDHW, "cmexpdhw", "cmexpdhw", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
},
-/* mexpdhd$pack $FRinti,$u6,$FRintk */
+/* mexpdhd$pack $FRinti,$u6,$FRintkeven */
{
FRV_INSN_MEXPDHD, "mexpdhd", "mexpdhd", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
},
-/* cmexpdhd$pack $FRinti,$u6,$FRintk,$CCi,$cond */
+/* cmexpdhd$pack $FRinti,$u6,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMEXPDHD, "cmexpdhd", "cmexpdhd", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
@@ -5862,37 +5874,37 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
FRV_INSN_MPACKH, "mpackh", "mpackh", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
},
-/* mdpackh$pack $FRinti,$FRintj,$FRintk */
+/* mdpackh$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MDPACKH, "mdpackh", "mdpackh", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_5 } }
},
-/* munpackh$pack $FRinti,$FRintk */
+/* munpackh$pack $FRinti,$FRintkeven */
{
FRV_INSN_MUNPACKH, "munpackh", "munpackh", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
},
-/* mdunpackh$pack $FRinti,$FRintk */
+/* mdunpackh$pack $FRintieven,$FRintk */
{
FRV_INSN_MDUNPACKH, "mdunpackh", "mdunpackh", 32,
{ 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_7 } }
},
-/* mbtoh$pack $FRintj,$FRintk */
+/* mbtoh$pack $FRintj,$FRintkeven */
{
FRV_INSN_MBTOH, "mbtoh", "mbtoh", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
},
-/* cmbtoh$pack $FRintj,$FRintk,$CCi,$cond */
+/* cmbtoh$pack $FRintj,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMBTOH, "cmbtoh", "cmbtoh", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
},
-/* mhtob$pack $FRintj,$FRintk */
+/* mhtob$pack $FRintjeven,$FRintk */
{
FRV_INSN_MHTOB, "mhtob", "mhtob", 32,
{ 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
},
-/* cmhtob$pack $FRintj,$FRintk,$CCi,$cond */
+/* cmhtob$pack $FRintjeven,$FRintk,$CCi,$cond */
{
FRV_INSN_CMHTOB, "cmhtob", "cmhtob", 32,
{ 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
diff --git a/opcodes/frv-desc.h b/opcodes/frv-desc.h
index 53cad79079c..3ecf0913aa1 100644
--- a/opcodes/frv-desc.h
+++ b/opcodes/frv-desc.h
@@ -677,15 +677,16 @@ typedef enum cgen_operand_type {
, FRV_OPERAND_U6, FRV_OPERAND_S5, FRV_OPERAND_COND, FRV_OPERAND_CCOND
, FRV_OPERAND_HINT, FRV_OPERAND_HINT_TAKEN, FRV_OPERAND_HINT_NOT_TAKEN, FRV_OPERAND_LI
, FRV_OPERAND_LOCK, FRV_OPERAND_DEBUG, FRV_OPERAND_A, FRV_OPERAND_AE
- , FRV_OPERAND_LABEL16, FRV_OPERAND_LABEL24, FRV_OPERAND_D12, FRV_OPERAND_S12
- , FRV_OPERAND_U12, FRV_OPERAND_SPR, FRV_OPERAND_ULO16, FRV_OPERAND_SLO16
- , FRV_OPERAND_UHI16, FRV_OPERAND_PSR_ESR, FRV_OPERAND_PSR_S, FRV_OPERAND_PSR_PS
- , FRV_OPERAND_PSR_ET, FRV_OPERAND_BPSR_BS, FRV_OPERAND_BPSR_BET, FRV_OPERAND_TBR_TBA
- , FRV_OPERAND_TBR_TT, FRV_OPERAND_MAX
+ , FRV_OPERAND_LABEL16, FRV_OPERAND_LABEL24, FRV_OPERAND_FRINTIEVEN, FRV_OPERAND_FRINTJEVEN
+ , FRV_OPERAND_FRINTKEVEN, FRV_OPERAND_D12, FRV_OPERAND_S12, FRV_OPERAND_U12
+ , FRV_OPERAND_SPR, FRV_OPERAND_ULO16, FRV_OPERAND_SLO16, FRV_OPERAND_UHI16
+ , FRV_OPERAND_PSR_ESR, FRV_OPERAND_PSR_S, FRV_OPERAND_PSR_PS, FRV_OPERAND_PSR_ET
+ , FRV_OPERAND_BPSR_BS, FRV_OPERAND_BPSR_BET, FRV_OPERAND_TBR_TBA, FRV_OPERAND_TBR_TT
+ , FRV_OPERAND_MAX
} CGEN_OPERAND_TYPE;
/* Number of operands types. */
-#define MAX_OPERANDS 77
+#define MAX_OPERANDS 80
/* Maximum number of operands referenced by any insn. */
#define MAX_OPERAND_INSTANCES 8
diff --git a/opcodes/frv-dis.c b/opcodes/frv-dis.c
index f71e1c5c83f..dfe053d5c15 100644
--- a/opcodes/frv-dis.c
+++ b/opcodes/frv-dis.c
@@ -230,12 +230,21 @@ frv_cgen_print_operand (cd, opindex, xinfo, fields, attrs, pc, length)
case FRV_OPERAND_FRINTI :
print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRi, 0);
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRi, 0);
+ break;
case FRV_OPERAND_FRINTJ :
print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRj, 0);
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRj, 0);
+ break;
case FRV_OPERAND_FRINTK :
print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRk, 0);
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRk, 0);
+ break;
case FRV_OPERAND_FRJ :
print_keyword (cd, info, & frv_cgen_opval_fr_names, fields->f_FRj, 0);
break;
diff --git a/opcodes/frv-ibld.c b/opcodes/frv-ibld.c
index 316b2cc1bdb..bac1837e1be 100644
--- a/opcodes/frv-ibld.c
+++ b/opcodes/frv-ibld.c
@@ -651,12 +651,21 @@ frv_cgen_insert_operand (cd, opindex, fields, buffer, pc)
case FRV_OPERAND_FRINTI :
errmsg = insert_normal (cd, fields->f_FRi, 0, 0, 17, 6, 32, total_length, buffer);
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ errmsg = insert_normal (cd, fields->f_FRi, 0, 0, 17, 6, 32, total_length, buffer);
+ break;
case FRV_OPERAND_FRINTJ :
errmsg = insert_normal (cd, fields->f_FRj, 0, 0, 5, 6, 32, total_length, buffer);
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ errmsg = insert_normal (cd, fields->f_FRj, 0, 0, 5, 6, 32, total_length, buffer);
+ break;
case FRV_OPERAND_FRINTK :
errmsg = insert_normal (cd, fields->f_FRk, 0, 0, 30, 6, 32, total_length, buffer);
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ errmsg = insert_normal (cd, fields->f_FRk, 0, 0, 30, 6, 32, total_length, buffer);
+ break;
case FRV_OPERAND_FRJ :
errmsg = insert_normal (cd, fields->f_FRj, 0, 0, 5, 6, 32, total_length, buffer);
break;
@@ -942,12 +951,21 @@ frv_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc)
case FRV_OPERAND_FRINTI :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_FRi);
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 17, 6, 32, total_length, pc, & fields->f_FRi);
+ break;
case FRV_OPERAND_FRINTJ :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_FRj);
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_FRj);
+ break;
case FRV_OPERAND_FRINTK :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_FRk);
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 6, 32, total_length, pc, & fields->f_FRk);
+ break;
case FRV_OPERAND_FRJ :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 6, 32, total_length, pc, & fields->f_FRj);
break;
@@ -1216,12 +1234,21 @@ frv_cgen_get_int_operand (cd, opindex, fields)
case FRV_OPERAND_FRINTI :
value = fields->f_FRi;
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ value = fields->f_FRi;
+ break;
case FRV_OPERAND_FRINTJ :
value = fields->f_FRj;
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ value = fields->f_FRj;
+ break;
case FRV_OPERAND_FRINTK :
value = fields->f_FRk;
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ value = fields->f_FRk;
+ break;
case FRV_OPERAND_FRJ :
value = fields->f_FRj;
break;
@@ -1441,12 +1468,21 @@ frv_cgen_get_vma_operand (cd, opindex, fields)
case FRV_OPERAND_FRINTI :
value = fields->f_FRi;
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ value = fields->f_FRi;
+ break;
case FRV_OPERAND_FRINTJ :
value = fields->f_FRj;
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ value = fields->f_FRj;
+ break;
case FRV_OPERAND_FRINTK :
value = fields->f_FRk;
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ value = fields->f_FRk;
+ break;
case FRV_OPERAND_FRJ :
value = fields->f_FRj;
break;
@@ -1675,12 +1711,21 @@ frv_cgen_set_int_operand (cd, opindex, fields, value)
case FRV_OPERAND_FRINTI :
fields->f_FRi = value;
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ fields->f_FRi = value;
+ break;
case FRV_OPERAND_FRINTJ :
fields->f_FRj = value;
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ fields->f_FRj = value;
+ break;
case FRV_OPERAND_FRINTK :
fields->f_FRk = value;
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ fields->f_FRk = value;
+ break;
case FRV_OPERAND_FRJ :
fields->f_FRj = value;
break;
@@ -1897,12 +1942,21 @@ frv_cgen_set_vma_operand (cd, opindex, fields, value)
case FRV_OPERAND_FRINTI :
fields->f_FRi = value;
break;
+ case FRV_OPERAND_FRINTIEVEN :
+ fields->f_FRi = value;
+ break;
case FRV_OPERAND_FRINTJ :
fields->f_FRj = value;
break;
+ case FRV_OPERAND_FRINTJEVEN :
+ fields->f_FRj = value;
+ break;
case FRV_OPERAND_FRINTK :
fields->f_FRk = value;
break;
+ case FRV_OPERAND_FRINTKEVEN :
+ fields->f_FRk = value;
+ break;
case FRV_OPERAND_FRJ :
fields->f_FRj = value;
break;
diff --git a/opcodes/frv-opc.c b/opcodes/frv-opc.c
index 5e56e357645..de27a43f5a0 100644
--- a/opcodes/frv-opc.c
+++ b/opcodes/frv-opc.c
@@ -1033,6 +1033,18 @@ static const CGEN_IFMT ifmt_mcuti = {
32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_ACC40SI) }, { F (F_OPE1) }, { F (F_S6) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mdcutssi = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_ACC40SI) }, { F (F_OPE1) }, { F (F_S6) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mdrotli = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_S6) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mqsaths = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_mcmpsh = {
32, 32, 0x79fc0fc0, { { F (F_PACK) }, { F (F_COND_NULL) }, { F (F_FCCK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
};
@@ -1041,6 +1053,10 @@ static const CGEN_IFMT ifmt_mabshs = {
32, 32, 0x1ffffc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
};
+static const CGEN_IFMT ifmt_cmqaddhss = {
+ 32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_maddaccs = {
32, 32, 0x1fc0fff, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_ACC40SI) }, { F (F_OPE1) }, { F (F_ACCJ_NULL) }, { 0 } }
};
@@ -1053,6 +1069,14 @@ static const CGEN_IFMT ifmt_cmmulhs = {
32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mqmulhs = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmqmulhs = {
+ 32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_mmachu = {
32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_ACC40UK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
};
@@ -1061,18 +1085,54 @@ static const CGEN_IFMT ifmt_cmmachu = {
32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_ACC40UK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mqmachu = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_ACC40UK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmqmachu = {
+ 32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_ACC40UK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_cmexpdhw = {
32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_U6) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mexpdhd = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_U6) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmexpdhd = {
+ 32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_U6) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_munpackh = {
32, 32, 0x1fc0fff, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ_NULL) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mdunpackh = {
+ 32, 32, 0x1fc0fff, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI) }, { F (F_OPE1) }, { F (F_FRJ_NULL) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mbtoh = {
+ 32, 32, 0x1ffffc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_cmbtoh = {
32, 32, 0x1fff0c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
};
+static const CGEN_IFMT ifmt_mhtob = {
+ 32, 32, 0x1ffffc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_OPE1) }, { F (F_FRJ) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmhtob = {
+ 32, 32, 0x1fff0c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmbtohe = {
+ 32, 32, 0x1fff0c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_FRI_NULL) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_FRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_mclracc = {
32, 32, 0x1fdffff, { { F (F_PACK) }, { F (F_ACC40SK) }, { F (F_OP) }, { F (F_A) }, { F (F_MISC_NULL_10) }, { F (F_OPE1) }, { F (F_FRJ_NULL) }, { 0 } }
};
@@ -4978,11 +5038,11 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (ACC40SI), ',', OP (S6), ',', OP (FRINTK), 0 } },
& ifmt_mcuti, { 0x1ec0bc0 }
},
-/* mdcutssi$pack $ACC40Si,$s6,$FRintk */
+/* mdcutssi$pack $ACC40Si,$s6,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (ACC40SI), ',', OP (S6), ',', OP (FRINTK), 0 } },
- & ifmt_mcuti, { 0x1e00380 }
+ { { MNEM, OP (PACK), ' ', OP (ACC40SI), ',', OP (S6), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mdcutssi, { 0x1e00380 }
},
/* maveh$pack $FRinti,$FRintj,$FRintk */
{
@@ -5008,11 +5068,11 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTK), 0 } },
& ifmt_mrotli, { 0x1ec02c0 }
},
-/* mdrotli$pack $FRinti,$u6,$FRintk */
+/* mdrotli$pack $FRintieven,$s6,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTK), 0 } },
- & ifmt_mrotli, { 0x1e002c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (S6), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mdrotli, { 0x1e002c0 }
},
/* mcplhi$pack $FRinti,$u6,$FRintk */
{
@@ -5032,11 +5092,11 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
& ifmt_mand, { 0x1ec0300 }
},
-/* mqsaths$pack $FRinti,$FRintj,$FRintk */
+/* mqsaths$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1e003c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1e003c0 }
},
/* msathu$pack $FRinti,$FRintj,$FRintk */
{
@@ -5110,53 +5170,53 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmand, { 0x1c400c0 }
},
-/* mqaddhss$pack $FRinti,$FRintj,$FRintk */
+/* mqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1ec0600 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1ec0600 }
},
-/* mqaddhus$pack $FRinti,$FRintj,$FRintk */
+/* mqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1ec0640 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1ec0640 }
},
-/* mqsubhss$pack $FRinti,$FRintj,$FRintk */
+/* mqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1ec0680 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1ec0680 }
},
-/* mqsubhus$pack $FRinti,$FRintj,$FRintk */
+/* mqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1ec06c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1ec06c0 }
},
-/* cmqaddhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmand, { 0x1cc0000 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqaddhss, { 0x1cc0000 }
},
-/* cmqaddhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmand, { 0x1cc0040 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqaddhss, { 0x1cc0040 }
},
-/* cmqsubhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmand, { 0x1cc0080 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqaddhss, { 0x1cc0080 }
},
-/* cmqsubhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
+/* cmqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmand, { 0x1cc00c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqaddhss, { 0x1cc00c0 }
},
/* maddaccs$pack $ACC40Si,$ACC40Sk */
{
@@ -5230,41 +5290,41 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmmulhs, { 0x1c80040 }
},
-/* mqmulhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0700 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0700 }
},
-/* mqmulhu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0740 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0740 }
},
-/* mqmulxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0a80 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0a80 }
},
-/* mqmulxhu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmulxhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0ac0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0ac0 }
},
-/* cmqmulhs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmmulhs, { 0x1d00000 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqmulhs, { 0x1d00000 }
},
-/* cmqmulhu$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmmulhs, { 0x1d00040 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqmulhs, { 0x1d00040 }
},
/* mmachs$pack $FRinti,$FRintj,$ACC40Sk */
{
@@ -5302,47 +5362,47 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40UK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmmachu, { 0x1c800c0 }
},
-/* mqmachs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0780 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0780 }
},
-/* mqmachu$pack $FRinti,$FRintj,$ACC40Uk */
+/* mqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40UK), 0 } },
- & ifmt_mmachu, { 0x1ec07c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40UK), 0 } },
+ & ifmt_mqmachu, { 0x1ec07c0 }
},
-/* cmqmachs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
+/* cmqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmmulhs, { 0x1d00080 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqmulhs, { 0x1d00080 }
},
-/* cmqmachu$pack $FRinti,$FRintj,$ACC40Uk,$CCi,$cond */
+/* cmqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40UK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmmachu, { 0x1d000c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40UK), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmqmachu, { 0x1d000c0 }
},
-/* mqxmachs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqxmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1e00000 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1e00000 }
},
-/* mqxmacxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqxmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1e00040 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1e00040 }
},
-/* mqmacxhs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1e00080 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1e00080 }
},
/* mcpxrs$pack $FRinti,$FRintj,$ACC40Sk */
{
@@ -5392,29 +5452,29 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmmulhs, { 0x1d400c0 }
},
-/* mqcpxrs$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxrs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0900 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0900 }
},
-/* mqcpxru$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxru$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0940 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0940 }
},
-/* mqcpxis$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxis$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec0980 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec0980 }
},
-/* mqcpxiu$pack $FRinti,$FRintj,$ACC40Sk */
+/* mqcpxiu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (ACC40SK), 0 } },
- & ifmt_mmulhs, { 0x1ec09c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (ACC40SK), 0 } },
+ & ifmt_mqmulhs, { 0x1ec09c0 }
},
/* mexpdhw$pack $FRinti,$u6,$FRintk */
{
@@ -5428,17 +5488,17 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmexpdhw, { 0x1d80080 }
},
-/* mexpdhd$pack $FRinti,$u6,$FRintk */
+/* mexpdhd$pack $FRinti,$u6,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTK), 0 } },
- & ifmt_mrotli, { 0x1ec0cc0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mexpdhd, { 0x1ec0cc0 }
},
-/* cmexpdhd$pack $FRinti,$u6,$FRintk,$CCi,$cond */
+/* cmexpdhd$pack $FRinti,$u6,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmexpdhw, { 0x1d800c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (U6), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmexpdhd, { 0x1d800c0 }
},
/* mpackh$pack $FRinti,$FRintj,$FRintk */
{
@@ -5446,47 +5506,47 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
& ifmt_mand, { 0x1ec0d00 }
},
-/* mdpackh$pack $FRinti,$FRintj,$FRintk */
+/* mdpackh$pack $FRintieven,$FRintjeven,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mand, { 0x1ec0d80 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTJEVEN), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mqsaths, { 0x1ec0d80 }
},
-/* munpackh$pack $FRinti,$FRintk */
+/* munpackh$pack $FRinti,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTK), 0 } },
+ { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTKEVEN), 0 } },
& ifmt_munpackh, { 0x1ec0d40 }
},
-/* mdunpackh$pack $FRinti,$FRintk */
+/* mdunpackh$pack $FRintieven,$FRintk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTI), ',', OP (FRINTK), 0 } },
- & ifmt_munpackh, { 0x1ec0dc0 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTIEVEN), ',', OP (FRINTK), 0 } },
+ & ifmt_mdunpackh, { 0x1ec0dc0 }
},
-/* mbtoh$pack $FRintj,$FRintk */
+/* mbtoh$pack $FRintj,$FRintkeven */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mabshs, { 0x1ec0e00 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTKEVEN), 0 } },
+ & ifmt_mbtoh, { 0x1ec0e00 }
},
-/* cmbtoh$pack $FRintj,$FRintk,$CCi,$cond */
+/* cmbtoh$pack $FRintj,$FRintkeven,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
+ { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTKEVEN), ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cmbtoh, { 0x1dc0000 }
},
-/* mhtob$pack $FRintj,$FRintk */
+/* mhtob$pack $FRintjeven,$FRintk */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), 0 } },
- & ifmt_mabshs, { 0x1ec0e40 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTJEVEN), ',', OP (FRINTK), 0 } },
+ & ifmt_mhtob, { 0x1ec0e40 }
},
-/* cmhtob$pack $FRintj,$FRintk,$CCi,$cond */
+/* cmhtob$pack $FRintjeven,$FRintk,$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmbtoh, { 0x1dc0040 }
+ { { MNEM, OP (PACK), ' ', OP (FRINTJEVEN), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_cmhtob, { 0x1dc0040 }
},
/* mbtohe$pack $FRintj,$FRintk */
{
@@ -5498,7 +5558,7 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (FRINTJ), ',', OP (FRINTK), ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cmbtoh, { 0x1dc0080 }
+ & ifmt_cmbtohe, { 0x1dc0080 }
},
/* mclracc$pack $ACC40Sk,$A */
{
diff --git a/opcodes/frv-opc.h b/opcodes/frv-opc.h
index 018a64378d7..5d23cf91043 100644
--- a/opcodes/frv-opc.h
+++ b/opcodes/frv-opc.h
@@ -27,11 +27,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* -- opc.h */
-#undef CGEN_DIS_HASH_SIZE
+#undef CGEN_DIS_HASH_SIZE
#define CGEN_DIS_HASH_SIZE 128
-#undef CGEN_DIS_HASH
+#undef CGEN_DIS_HASH
#define CGEN_DIS_HASH(buffer, value) (((value) >> 18) & 127)
+/* Allows reason codes to be output when assembler errors occur. */
+#define CGEN_VERBOSE_ASSEMBLER_ERRORS
+
/* Vliw support. */
#define FRV_VLIW_SIZE 4 /* fr500 has largest vliw size of 4. */
typedef CGEN_ATTR_VALUE_TYPE VLIW_COMBO[FRV_VLIW_SIZE];
diff --git a/opcodes/h8300-dis.c b/opcodes/h8300-dis.c
index 2a3cd218f47..299267f4605 100644
--- a/opcodes/h8300-dis.c
+++ b/opcodes/h8300-dis.c
@@ -1,5 +1,5 @@
/* Disassemble h8300 instructions.
- Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002
+ Copyright 1993, 1994, 1996, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -34,11 +34,39 @@ struct h8_instruction
struct h8_instruction *h8_instructions;
static void bfd_h8_disassemble_init PARAMS ((void));
-static unsigned int bfd_h8_disassemble
- PARAMS ((bfd_vma, disassemble_info *, int));
+static void print_one_arg PARAMS ((disassemble_info *, bfd_vma, op_type,
+ int, int, int, int, const char **, int));
+static unsigned int bfd_h8_disassemble PARAMS ((bfd_vma,
+ disassemble_info *,
+ int));
+static void extract_immediate PARAMS ((FILE *,
+ op_type, int,
+ unsigned char *,
+ int *, int *,
+ const struct h8_opcode *));
+
+static void print_colon_thingie PARAMS ((op_type *));
+
+static void
+print_colon_thingie (op_type *nib)
+{
+ switch (*nib & SIZE) {
+ case L_2: fprintf (stdout, "2"); break;
+ case L_3:
+ case L_3NZ: fprintf (stdout, "3"); break;
+ case L_4: fprintf (stdout, "4"); break;
+ case L_5: fprintf (stdout, "5"); break;
+ case L_8: fprintf (stdout, "8"); break;
+ case L_16:
+ case L_16U: fprintf (stdout, "16"); break;
+ case L_24: fprintf (stdout, "24"); break;
+ case L_32: fprintf (stdout, "32"); break;
+ }
+}
/* Run through the opcodes and sort them into order to make them easy
to disassemble. */
+
static void
bfd_h8_disassemble_init ()
{
@@ -69,11 +97,14 @@ bfd_h8_disassemble_init ()
/* Just make sure there are an even number of nibbles in it, and
that the count is the same as the length. */
- for (i = 0; p->data.nib[i] != E; i++)
+ for (i = 0; p->data.nib[i] != (op_type) E; i++)
;
if (i & 1)
- abort ();
+ {
+ fprintf (stderr, "Internal error, h8_disassemble_init.\n");
+ abort ();
+ }
pi->length = i / 2;
pi->opcode = p;
@@ -84,42 +115,287 @@ bfd_h8_disassemble_init ()
pi->opcode = p;
}
-static unsigned int
-bfd_h8_disassemble (addr, info, mode)
- bfd_vma addr;
+static void
+extract_immediate (stream, looking_for, thisnib, data, cst, len, q)
+ FILE *stream;
+ op_type looking_for;
+ int thisnib;
+ unsigned char *data;
+ int *cst, *len;
+ const struct h8_opcode *q;
+{
+ switch (looking_for & SIZE)
+ {
+ case L_2:
+ *len = 2;
+ *cst = thisnib & 3;
+
+ /* DISP2 special treatment. */
+ if ((looking_for & MODE) == DISP)
+ {
+ if (OP_KIND (q->how) == O_MOVAB ||
+ OP_KIND (q->how) == O_MOVAW ||
+ OP_KIND (q->how) == O_MOVAL)
+ {
+ /* Handling for mova insn. */
+ switch (q->args.nib[0] & MODE) {
+ case INDEXB:
+ default:
+ break;
+ case INDEXW:
+ *cst *= 2;
+ break;
+ case INDEXL:
+ *cst *= 4;
+ break;
+ }
+ }
+ else
+ {
+ /* Handling for non-mova insn. */
+ switch (OP_SIZE (q->how)) {
+ default: break;
+ case SW:
+ *cst *= 2;
+ break;
+ case SL:
+ *cst *= 4;
+ break;
+ }
+ }
+ }
+ break;
+ case L_8:
+ *len = 8;
+ *cst = data[0];
+ break;
+ case L_16:
+ case L_16U:
+ *len = 16;
+ *cst = (data[0] << 8) + data [1];
+#if 0
+ if ((looking_for & SIZE) == L_16)
+ *cst = (short) *cst; /* sign extend */
+#endif
+ break;
+ case L_32:
+ *len = 32;
+ *cst = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3];
+ break;
+ default:
+ *len = 0;
+ *cst = 0;
+ fprintf (stream, "DISP bad size\n");
+ break;
+ }
+}
+
+static const char *regnames[] =
+{
+ "r0h", "r1h", "r2h", "r3h", "r4h", "r5h", "r6h", "r7h",
+ "r0l", "r1l", "r2l", "r3l", "r4l", "r5l", "r6l", "r7l"
+};
+static const char *wregnames[] =
+{
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7"
+};
+static const char *lregnames[] =
+{
+ "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7",
+ "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7"
+};
+static const char *cregnames[] =
+{
+ "ccr", "exr", "mach", "macl", "", "", "vbr", "sbr"
+};
+
+static void
+print_one_arg (info, addr, x, cst, cstlen, rdisp_n, rn, pregnames, len)
disassemble_info *info;
- int mode;
+ bfd_vma addr;
+ op_type x;
+ int cst, cstlen, rdisp_n, rn;
+ const char **pregnames;
+ int len;
{
- /* Find the first entry in the table for this opcode. */
- static const char *regnames[] =
+ void *stream = info->stream;
+ fprintf_ftype outfn = info->fprintf_func;
+
+ if ((x & SIZE) == L_3 ||
+ (x & SIZE) == L_3NZ)
+ {
+ outfn (stream, "#0x%x", (unsigned) cst);
+ }
+ else if ((x & MODE) == IMM)
+ {
+ outfn (stream, "#0x%x", (unsigned) cst);
+ }
+ else if ((x & MODE) == DBIT ||
+ (x & MODE) == KBIT)
+ {
+ outfn (stream, "#%d", (unsigned) cst);
+ }
+ else if ((x & MODE) == CONST_2)
+ outfn (stream, "#2");
+ else if ((x & MODE) == CONST_4)
+ outfn (stream, "#4");
+ else if ((x & MODE) == CONST_8)
+ outfn (stream, "#8");
+ else if ((x & MODE) == CONST_16)
+ outfn (stream, "#16");
+ else if ((x & MODE) == REG)
+ {
+ switch (x & SIZE)
+ {
+ case L_8:
+ outfn (stream, "%s", regnames[rn]);
+ break;
+ case L_16:
+ case L_16U:
+ outfn (stream, "%s", wregnames[rn]);
+ break;
+ case L_P:
+ case L_32:
+ outfn (stream, "%s", lregnames[rn]);
+ break;
+ }
+ }
+ else if ((x & MODE) == LOWREG)
+ {
+ switch (x & SIZE)
+ {
+ case L_8:
+ /* Always take low half of reg. */
+ outfn (stream, "%s.b", regnames[rn < 8 ? rn + 8 : rn]);
+ break;
+ case L_16:
+ case L_16U:
+ /* Always take low half of reg. */
+ outfn (stream, "%s.w", wregnames[rn < 8 ? rn : rn - 8]);
+ break;
+ case L_P:
+ case L_32:
+ outfn (stream, "%s.l", lregnames[rn]);
+ break;
+ }
+ }
+ else if ((x & MODE) == POSTINC)
+ {
+ outfn (stream, "@%s+", pregnames[rn]);
+ }
+ else if ((x & MODE) == POSTDEC)
+ {
+ outfn (stream, "@%s-", pregnames[rn]);
+ }
+ else if ((x & MODE) == PREINC)
+ {
+ outfn (stream, "@+%s", pregnames[rn]);
+ }
+ else if ((x & MODE) == PREDEC)
+ {
+ outfn (stream, "@-%s", pregnames[rn]);
+ }
+ else if ((x & MODE) == IND)
+ {
+ outfn (stream, "@%s", pregnames[rn]);
+ }
+ else if ((x & MODE) == ABS || (x & ABSJMP))
+ {
+ outfn (stream, "@0x%x:%d", (unsigned) cst, cstlen);
+ }
+ else if ((x & MODE) == MEMIND)
+ {
+ outfn (stream, "@@%d (0x%x)", cst, cst);
+ }
+ else if ((x & MODE) == VECIND)
+ {
+ /* FIXME Multiplier should be 2 or 4, depending on processor mode,
+ by which is meant "normal" vs. "middle", "advanced", "maximum". */
+
+ int offset = (cst + 0x80) * 4;
+ outfn (stream, "@@%d (0x%x)", offset, offset);
+ }
+ else if ((x & MODE) == PCREL)
+ {
+ if ((x & SIZE) == L_16 ||
+ (x & SIZE) == L_16U)
+ {
+ outfn (stream, ".%s%d (0x%x)",
+ (short) cst > 0 ? "+" : "",
+ (short) cst,
+ addr + (short) cst + len);
+ }
+ else
+ {
+ outfn (stream, ".%s%d (0x%x)",
+ (char) cst > 0 ? "+" : "",
+ (char) cst,
+ addr + (char) cst + len);
+ }
+ }
+ else if ((x & MODE) == DISP)
+ {
+ outfn (stream, "@(0x%x:%d,%s)", cst, cstlen,
+ pregnames[rdisp_n]);
+ }
+ else if ((x & MODE) == INDEXB)
+ {
+ /* Always take low half of reg. */
+ outfn (stream, "@(0x%x:%d,%s.b)", cst, cstlen,
+ regnames[rdisp_n < 8 ? rdisp_n + 8 : rdisp_n]);
+ }
+ else if ((x & MODE) == INDEXW)
{
- "r0h", "r1h", "r2h", "r3h", "r4h", "r5h", "r6h", "r7h",
- "r0l", "r1l", "r2l", "r3l", "r4l", "r5l", "r6l", "r7l"
- };
- static const char *wregnames[] =
+ /* Always take low half of reg. */
+ outfn (stream, "@(0x%x:%d,%s.w)", cst, cstlen,
+ wregnames[rdisp_n < 8 ? rdisp_n : rdisp_n - 8]);
+ }
+ else if ((x & MODE) == INDEXL)
{
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7"
- };
- static const char *lregnames[] =
+ outfn (stream, "@(0x%x:%d,%s.l)", cst, cstlen,
+ lregnames[rdisp_n]);
+ }
+ else if (x & CTRL)
{
- "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7",
- "er0", "er1", "er2", "er3", "er4", "er5", "er6", "er7"
- };
- int rs = 0;
- int rd = 0;
- int rdisp = 0;
- int abs = 0;
- int bit = 0;
- int plen = 0;
+ outfn (stream, cregnames[rn]);
+ }
+ else if ((x & MODE) == CCR)
+ {
+ outfn (stream, "ccr");
+ }
+ else if ((x & MODE) == EXR)
+ {
+ outfn (stream, "exr");
+ }
+ else if ((x & MODE) == MACREG)
+ {
+ outfn (stream, "mac%c", cst ? 'l' : 'h');
+ }
+ else
+ /* xgettext:c-format */
+ outfn (stream, _("Hmmmm 0x%x"), x);
+}
+
+static unsigned int
+bfd_h8_disassemble (addr, info, mach)
+ bfd_vma addr;
+ disassemble_info *info;
+ int mach;
+{
+ /* Find the first entry in the table for this opcode. */
+ int regno[3] = { 0, 0, 0 };
+ int dispregno[3] = { 0, 0, 0 };
+ int cst[3] = { 0, 0, 0 };
+ int cstlen[3] = { 0, 0, 0 };
static bfd_boolean init = 0;
const struct h8_instruction *qi;
- char const **pregnames = mode != 0 ? lregnames : wregnames;
+ char const **pregnames = mach != 0 ? lregnames : wregnames;
int status;
- int l;
- unsigned char data[20];
+ unsigned int l;
+ unsigned char data[MAX_CODE_NIBBLES];
void *stream = info->stream;
- fprintf_ftype fprintf = info->fprintf_func;
+ fprintf_ftype outfn = info->fprintf_func;
if (!init)
{
@@ -134,7 +410,7 @@ bfd_h8_disassemble (addr, info, mode)
return -1;
}
- for (l = 2; status == 0 && l < 10; l += 2)
+ for (l = 2; status == 0 && l < sizeof (data) / 2; l += 2)
status = info->read_memory_func (addr + l, data + l, 2, info);
/* Find the exact opcode/arg combo. */
@@ -147,9 +423,12 @@ bfd_h8_disassemble (addr, info, mode)
while (1)
{
op_type looking_for = *nib;
- int thisnib = data[len >> 1];
+ int thisnib = data[len / 2];
+ int opnr;
- thisnib = (len & 1) ? (thisnib & 0xf) : ((thisnib >> 4) & 0xf);
+ thisnib = (len & 1) ? (thisnib & 0xf) : ((thisnib / 16) & 0xf);
+ opnr = ((looking_for & OP3) == OP3 ? 2
+ : (looking_for & DST) == DST ? 1 : 0);
if (looking_for < 16 && looking_for >= 0)
{
@@ -160,21 +439,78 @@ bfd_h8_disassemble (addr, info, mode)
{
if ((int) looking_for & (int) B31)
{
- if (!(((int) thisnib & 0x8) != 0))
+ if (!((thisnib & 0x8) != 0))
goto fail;
looking_for = (op_type) ((int) looking_for & ~(int) B31);
+ thisnib &= 0x7;
}
-
- if ((int) looking_for & (int) B30)
+ else if ((int) looking_for & (int) B30)
{
- if (!(((int) thisnib & 0x8) == 0))
+ if (!((thisnib & 0x8) == 0))
goto fail;
looking_for = (op_type) ((int) looking_for & ~(int) B30);
}
- if (looking_for & DBIT)
+ if ((int) looking_for & (int) B21)
+ {
+ if (!((thisnib & 0x4) != 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B21);
+ thisnib &= 0xb;
+ }
+ else if ((int) looking_for & (int) B20)
+ {
+ if (!((thisnib & 0x4) == 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B20);
+ }
+ if ((int) looking_for & (int) B11)
+ {
+ if (!((thisnib & 0x2) != 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B11);
+ thisnib &= 0xd;
+ }
+ else if ((int) looking_for & (int) B10)
+ {
+ if (!((thisnib & 0x2) == 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B10);
+ }
+
+ if ((int) looking_for & (int) B01)
+ {
+ if (!((thisnib & 0x1) != 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B01);
+ thisnib &= 0xe;
+ }
+ else if ((int) looking_for & (int) B00)
+ {
+ if (!((thisnib & 0x1) == 0))
+ goto fail;
+
+ looking_for = (op_type) ((int) looking_for & ~(int) B00);
+ }
+
+ if (looking_for & IGNORE)
+ {
+ /* Hitachi has declared that IGNORE must be zero. */
+ if (thisnib != 0)
+ goto fail;
+ }
+ else if ((looking_for & MODE) == DATA)
+ {
+ ; /* Skip embedded data. */
+ }
+ else if ((looking_for & MODE) == DBIT)
{
/* Exclude adds/subs by looking at bit 0 and 2, and
make sure the operand size, either w or l,
@@ -182,45 +518,98 @@ bfd_h8_disassemble (addr, info, mode)
if ((looking_for & 7) != (thisnib & 7))
goto fail;
- abs = (thisnib & 0x8) ? 2 : 1;
+ cst[opnr] = (thisnib & 0x8) ? 2 : 1;
}
- else if (looking_for & (REG | IND | INC | DEC))
+ else if ((looking_for & MODE) == DISP ||
+ (looking_for & MODE) == ABS ||
+ (looking_for & MODE) == PCREL ||
+ (looking_for & MODE) == INDEXB ||
+ (looking_for & MODE) == INDEXW ||
+ (looking_for & MODE) == INDEXL)
{
- if (looking_for & SRC)
- rs = thisnib;
- else
- rd = thisnib;
+ extract_immediate (stream, looking_for, thisnib,
+ data + len / 2, cst + opnr,
+ cstlen + opnr, q);
+ /* Even address == bra, odd == bra/s. */
+ if (q->how == O (O_BRAS, SB))
+ cst[opnr] -= 1;
}
- else if (looking_for & L_16)
+ else if ((looking_for & MODE) == REG ||
+ (looking_for & MODE) == LOWREG ||
+ (looking_for & MODE) == IND ||
+ (looking_for & MODE) == PREINC ||
+ (looking_for & MODE) == POSTINC ||
+ (looking_for & MODE) == PREDEC ||
+ (looking_for & MODE) == POSTDEC)
{
- abs = (data[len >> 1]) * 256 + data[(len + 2) >> 1];
- plen = 16;
+ regno[opnr] = thisnib;
}
- else if (looking_for & ABSJMP)
+ else if (looking_for & CTRL) /* Control Register */
{
- abs = (data[1] << 16) | (data[2] << 8) | (data[3]);
+ thisnib &= 7;
+ if (((looking_for & MODE) == CCR && (thisnib != C_CCR)) ||
+ ((looking_for & MODE) == EXR && (thisnib != C_EXR)) ||
+ ((looking_for & MODE) == MACH && (thisnib != C_MACH)) ||
+ ((looking_for & MODE) == MACL && (thisnib != C_MACL)) ||
+ ((looking_for & MODE) == VBR && (thisnib != C_VBR)) ||
+ ((looking_for & MODE) == SBR && (thisnib != C_SBR)))
+ goto fail;
+ if (((looking_for & MODE) == CCR_EXR &&
+ (thisnib != C_CCR && thisnib != C_EXR)) ||
+ ((looking_for & MODE) == VBR_SBR &&
+ (thisnib != C_VBR && thisnib != C_SBR)) ||
+ ((looking_for & MODE) == MACREG &&
+ (thisnib != C_MACH && thisnib != C_MACL)))
+ goto fail;
+ if (((looking_for & MODE) == CC_EX_VB_SB &&
+ (thisnib != C_CCR && thisnib != C_EXR &&
+ thisnib != C_VBR && thisnib != C_SBR)))
+ goto fail;
+
+ regno[opnr] = thisnib;
+ }
+ else if ((looking_for & SIZE) == L_5)
+ {
+ cst[opnr] = data[len / 2] & 31;
+ cstlen[opnr] = 5;
+ }
+ else if ((looking_for & SIZE) == L_4)
+ {
+ cst[opnr] = thisnib;
+ cstlen[opnr] = 4;
+ }
+ else if ((looking_for & SIZE) == L_16 ||
+ (looking_for & SIZE) == L_16U)
+ {
+ cst[opnr] = (data[len / 2]) * 256 + data[(len + 2) / 2];
+ cstlen[opnr] = 16;
+ }
+ else if ((looking_for & MODE) == MEMIND)
+ {
+ cst[opnr] = data[1];
}
- else if (looking_for & MEMIND)
+ else if ((looking_for & MODE) == VECIND)
{
- abs = data[1];
+ cst[opnr] = data[1] & 0x7f;
}
- else if (looking_for & L_32)
+ else if ((looking_for & SIZE) == L_32)
{
- int i = len >> 1;
+ int i = len / 2;
- abs = (data[i] << 24)
- | (data[i + 1] << 16)
- | (data[i + 2] << 8)
- | (data[i + 3]);
+ cst[opnr] = ((data[i] << 24)
+ | (data[i + 1] << 16)
+ | (data[i + 2] << 8)
+ | (data[i + 3]));
- plen = 32;
+ cstlen[opnr] = 32;
}
- else if (looking_for & L_24)
+ else if ((looking_for & SIZE) == L_24)
{
- int i = len >> 1;
+ int i = len / 2;
- abs = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);
- plen = 24;
+ cst[opnr] =
+ (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);
+ cstlen[opnr] = 24;
}
else if (looking_for & IGNORE)
{
@@ -228,64 +617,67 @@ bfd_h8_disassemble (addr, info, mode)
}
else if (looking_for & DISPREG)
{
- rdisp = thisnib;
+ dispregno[opnr] = thisnib & 7;
}
- else if (looking_for & KBIT)
+ else if ((looking_for & MODE) == KBIT)
{
switch (thisnib)
{
case 9:
- abs = 4;
+ cst[opnr] = 4;
break;
case 8:
- abs = 2;
+ cst[opnr] = 2;
break;
case 0:
- abs = 1;
+ cst[opnr] = 1;
break;
default:
goto fail;
}
}
- else if (looking_for & L_8)
+ else if ((looking_for & SIZE) == L_8)
{
- plen = 8;
- abs = data[len >> 1];
+ cstlen[opnr] = 8;
+ cst[opnr] = data[len / 2];
}
- else if (looking_for & L_3)
+ else if ((looking_for & SIZE) == L_3 ||
+ (looking_for & SIZE) == L_3NZ)
{
- bit = thisnib & 0x7;
+ cst[opnr] = thisnib & 0x7;
+ if (cst[opnr] == 0 && (looking_for & SIZE) == L_3NZ)
+ goto fail;
}
- else if (looking_for & L_2)
+ else if ((looking_for & SIZE) == L_2)
{
- plen = 2;
- abs = thisnib & 0x3;
+ cstlen[opnr] = 2;
+ cst[opnr] = thisnib & 0x3;
}
- else if (looking_for & MACREG)
+ else if ((looking_for & MODE) == MACREG)
{
- abs = (thisnib == 3);
+ cst[opnr] = (thisnib == 3);
}
- else if (looking_for == E)
+ else if (looking_for == (op_type) E)
{
int i;
for (i = 0; i < qi->length; i++)
- fprintf (stream, "%02x ", data[i]);
+ outfn (stream, "%02x ", data[i]);
for (; i < 6; i++)
- fprintf (stream, " ");
+ outfn (stream, " ");
- fprintf (stream, "%s\t", q->name);
+ outfn (stream, "%s\t", q->name);
/* Gross. Disgusting. */
if (strcmp (q->name, "ldm.l") == 0)
{
int count, high;
- count = (data[1] >> 4) & 0x3;
- high = data[3] & 0x7;
+ count = (data[1] / 16) & 0x3;
+ high = regno[1];
- fprintf (stream, "@sp+,er%d-er%d", high - count, high);
+ outfn (stream, "@sp+,er%d-er%d", high - count, high);
return qi->length;
}
@@ -293,121 +685,71 @@ bfd_h8_disassemble (addr, info, mode)
{
int count, low;
- count = (data[1] >> 4) & 0x3;
- low = data[3] & 0x7;
+ count = (data[1] / 16) & 0x3;
+ low = regno[0];
- fprintf (stream, "er%d-er%d,@-sp", low, low + count);
+ outfn (stream, "er%d-er%d,@-sp", low, low + count);
+ return qi->length;
+ }
+ if (strcmp (q->name, "rte/l") == 0
+ || strcmp (q->name, "rts/l") == 0)
+ {
+ if (regno[0] == 0)
+ outfn (stream, "er%d", regno[1]);
+ else
+ {
+ outfn (stream, "(er%d-er%d)", regno[1] - regno[0],
+ regno[1]);
+ }
+ return qi->length;
+ }
+ if (strncmp (q->name, "mova", 4) == 0)
+ {
+ op_type *args = q->args.nib;
+
+ if (args[1] == (op_type) E)
+ {
+ /* Short form. */
+ print_one_arg (info, addr, args[0], cst[0],
+ cstlen[0], dispregno[0], regno[0],
+ pregnames, qi->length);
+ outfn (stream, ",er%d", dispregno[0]);
+ }
+ else
+ {
+ outfn (stream, "@(0x%x:%d,", cst[0], cstlen[0]);
+ print_one_arg (info, addr, args[1], cst[1],
+ cstlen[1], dispregno[1], regno[1],
+ pregnames, qi->length);
+ outfn (stream, ".%c),",
+ (args[0] & MODE) == INDEXB ? 'b' : 'w');
+ print_one_arg (info, addr, args[2], cst[2],
+ cstlen[2], dispregno[2], regno[2],
+ pregnames, qi->length);
+ }
return qi->length;
}
-
/* Fill in the args. */
{
op_type *args = q->args.nib;
int hadone = 0;
+ int nargs;
- while (*args != E)
+ for (nargs = 0;
+ nargs < 3 && args[nargs] != (op_type) E;
+ nargs++)
{
- int x = *args;
+ int x = args[nargs];
if (hadone)
- fprintf (stream, ",");
-
- if (x & L_3)
- {
- fprintf (stream, "#0x%x", (unsigned) bit);
- }
- else if (x & (IMM | KBIT | DBIT))
- {
- /* Bletch. For shal #2,er0 and friends. */
- if (*(args + 1) & SRC_IN_DST)
- abs = 2;
-
- fprintf (stream, "#0x%x", (unsigned) abs);
- }
- else if (x & REG)
- {
- int rn = (x & DST) ? rd : rs;
-
- switch (x & SIZE)
- {
- case L_8:
- fprintf (stream, "%s", regnames[rn]);
- break;
- case L_16:
- fprintf (stream, "%s", wregnames[rn]);
- break;
- case L_P:
- case L_32:
- fprintf (stream, "%s", lregnames[rn]);
- break;
- }
- }
- else if (x & MACREG)
- {
- fprintf (stream, "mac%c", abs ? 'l' : 'h');
- }
- else if (x & INC)
- {
- fprintf (stream, "@%s+", pregnames[rs]);
- }
- else if (x & DEC)
- {
- fprintf (stream, "@-%s", pregnames[rd]);
- }
- else if (x & IND)
- {
- int rn = (x & DST) ? rd : rs;
- fprintf (stream, "@%s", pregnames[rn]);
- }
- else if (x & ABS8MEM)
- {
- fprintf (stream, "@0x%x:8", (unsigned) abs);
- }
- else if (x & (ABS | ABSJMP))
- {
- fprintf (stream, "@0x%x:%d", (unsigned) abs, plen);
- }
- else if (x & MEMIND)
- {
- fprintf (stream, "@@%d (%x)", abs, abs);
- }
- else if (x & PCREL)
- {
- if (x & L_16)
- {
- abs += 2;
- fprintf (stream,
- ".%s%d (%x)",
- (short) abs > 0 ? "+" : "",
- (short) abs, addr + (short) abs + 2);
- }
- else
- {
- fprintf (stream,
- ".%s%d (%x)",
- (char) abs > 0 ? "+" : "",
- (char) abs, addr + (char) abs + 2);
- }
- }
- else if (x & DISP)
- {
- fprintf (stream, "@(0x%x:%d,%s)",
- abs, plen, pregnames[rdisp]);
- }
- else if (x & CCR)
- {
- fprintf (stream, "ccr");
- }
- else if (x & EXR)
- {
- fprintf (stream, "exr");
- }
- else
- /* xgettext:c-format */
- fprintf (stream, _("Hmmmm %x"), x);
+ outfn (stream, ",");
+
+ print_one_arg (info, addr, x,
+ cst[nargs], cstlen[nargs],
+ dispregno[nargs], regno[nargs],
+ pregnames, qi->length);
hadone = 1;
- args++;
}
}
@@ -415,7 +757,7 @@ bfd_h8_disassemble (addr, info, mode)
}
else
/* xgettext:c-format */
- fprintf (stream, _("Don't understand %x \n"), looking_for);
+ outfn (stream, _("Don't understand 0x%x \n"), looking_for);
}
len++;
@@ -427,7 +769,7 @@ bfd_h8_disassemble (addr, info, mode)
}
/* Fell off the end. */
- fprintf (stream, "%02x %02x .word\tH'%x,H'%x",
+ outfn (stream, "%02x %02x .word\tH'%x,H'%x",
data[0], data[1],
data[0], data[1]);
return 2;
diff --git a/opcodes/iq2000-asm.c b/opcodes/iq2000-asm.c
index 17b93eb2f40..bb61af0c3d0 100644
--- a/opcodes/iq2000-asm.c
+++ b/opcodes/iq2000-asm.c
@@ -385,15 +385,15 @@ iq2000_cgen_parse_operand (cd, opindex, strp, fields)
case IQ2000_OPERAND_EXECODE :
errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_EXECODE, &fields->f_excode);
break;
+ case IQ2000_OPERAND_F_INDEX :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_F_INDEX, &fields->f_index);
+ break;
case IQ2000_OPERAND_HI16 :
errmsg = parse_hi16 (cd, strp, IQ2000_OPERAND_HI16, &fields->f_imm);
break;
case IQ2000_OPERAND_IMM :
errmsg = parse_imm (cd, strp, IQ2000_OPERAND_IMM, &fields->f_imm);
break;
- case IQ2000_OPERAND_INDEX :
- errmsg = cgen_parse_unsigned_integer (cd, strp, IQ2000_OPERAND_INDEX, &fields->f_index);
- break;
case IQ2000_OPERAND_JMPTARG :
{
bfd_vma value;
@@ -477,9 +477,6 @@ iq2000_cgen_init_asm (cd)
iq2000_cgen_init_ibld_table (cd);
cd->parse_handlers = & iq2000_cgen_parse_handlers[0];
cd->parse_operand = iq2000_cgen_parse_operand;
-#ifdef CGEN_ASM_INIT_HOOK
-CGEN_ASM_INIT_HOOK
-#endif
}
diff --git a/opcodes/iq2000-desc.c b/opcodes/iq2000-desc.c
index a30bf56b8bf..402f7268d1f 100644
--- a/opcodes/iq2000-desc.c
+++ b/opcodes/iq2000-desc.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "ansidecl.h"
@@ -33,6 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "iq2000-opc.h"
#include "opintl.h"
#include "libiberty.h"
+#include "xregex.h"
/* Attributes. */
@@ -122,7 +122,7 @@ const CGEN_ATTR_TABLE iq2000_cgen_insn_attr_table[] =
/* Instruction set variants. */
static const CGEN_ISA iq2000_cgen_isa_table[] = {
- { "iq2000", 32, 32, 32, 32 },
+ { "iq2000", 32, 32, 23, 32 },
{ 0, 0, 0, 0, 0 }
};
@@ -255,6 +255,9 @@ const CGEN_IFLD iq2000_cgen_ifld_table[] =
{ IQ2000_F_CP_GRP, "f-cp-grp", 0, 32, 7, 2, { 0, { (1<<MACH_BASE) } } },
{ IQ2000_F_FUNC, "f-func", 0, 32, 5, 6, { 0, { (1<<MACH_BASE) } } },
{ IQ2000_F_IMM, "f-imm", 0, 32, 15, 16, { 0, { (1<<MACH_BASE) } } },
+ { IQ2000_F_RD_RS, "f-rd-rs", 0, 0, 0, 0,{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
+ { IQ2000_F_RD_RT, "f-rd-rt", 0, 0, 0, 0,{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
+ { IQ2000_F_RT_RS, "f-rt-rs", 0, 0, 0, 0,{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
{ IQ2000_F_JTARG, "f-jtarg", 0, 32, 15, 16, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
{ IQ2000_F_JTARGQ10, "f-jtargq10", 0, 32, 20, 21, { 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
{ IQ2000_F_OFFSET, "f-offset", 0, 32, 15, 16, { 0|A(PCREL_ADDR), { (1<<MACH_BASE) } } },
@@ -295,21 +298,21 @@ const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RT_RS_MULTI_IFIELD [];
const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RS_MULTI_IFIELD [] =
{
- { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
- { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
- {0,{0}}
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RD] } },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } },
+ { 0, { (const PTR) 0 } }
};
const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RD_RT_MULTI_IFIELD [] =
{
- { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
- { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
- {0,{0}}
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RD] } },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } },
+ { 0, { (const PTR) 0 } }
};
const CGEN_MAYBE_MULTI_IFLD IQ2000_F_RT_RS_MULTI_IFIELD [] =
{
- { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
- { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
- {0,{0}}
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } },
+ { 0, { (const PTR) 0 } }
};
/* The operand table. */
@@ -329,133 +332,136 @@ const CGEN_OPERAND iq2000_cgen_operand_table[] =
{
/* pc: program counter */
{ "pc", IQ2000_OPERAND_PC, HW_H_PC, 0, 0,
- { 0, { (void *) &(iq2000_cgen_ifld_table[0])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_NIL] } },
{ 0|A(SEM_ONLY), { (1<<MACH_BASE) } } },
/* rs: register Rs */
{ "rs", IQ2000_OPERAND_RS, HW_H_GR, 25, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } },
{ 0, { (1<<MACH_BASE) } } },
/* rt: register Rt */
{ "rt", IQ2000_OPERAND_RT, HW_H_GR, 20, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } },
{ 0, { (1<<MACH_BASE) } } },
/* rd: register Rd */
{ "rd", IQ2000_OPERAND_RD, HW_H_GR, 15, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[5])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RD] } },
{ 0, { (1<<MACH_BASE) } } },
/* rd-rs: register Rd from Rs */
{ "rd-rs", IQ2000_OPERAND_RD_RS, HW_H_GR, 15, 10,
- { 2, { (void *) &(IQ2000_F_RD_RS_MULTI_IFIELD[0])} },
+ { 2, { (const PTR) &IQ2000_F_RD_RS_MULTI_IFIELD[0] } },
{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
/* rd-rt: register Rd from Rt */
{ "rd-rt", IQ2000_OPERAND_RD_RT, HW_H_GR, 15, 10,
- { 2, { (void *) &(IQ2000_F_RD_RT_MULTI_IFIELD[0])} },
+ { 2, { (const PTR) &IQ2000_F_RD_RT_MULTI_IFIELD[0] } },
{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
/* rt-rs: register Rt from Rs */
{ "rt-rs", IQ2000_OPERAND_RT_RS, HW_H_GR, 20, 10,
- { 2, { (void *) &(IQ2000_F_RT_RS_MULTI_IFIELD[0])} },
+ { 2, { (const PTR) &IQ2000_F_RT_RS_MULTI_IFIELD[0] } },
{ 0|A(VIRTUAL), { (1<<MACH_BASE) } } },
/* shamt: shift amount */
{ "shamt", IQ2000_OPERAND_SHAMT, HW_H_UINT, 10, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[6])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_SHAMT] } },
{ 0, { (1<<MACH_BASE) } } },
/* imm: immediate */
{ "imm", IQ2000_OPERAND_IMM, HW_H_UINT, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } },
{ 0, { (1<<MACH_BASE) } } },
/* offset: pc-relative offset */
{ "offset", IQ2000_OPERAND_OFFSET, HW_H_IADDR, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[14])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_OFFSET] } },
{ 0|A(PCREL_ADDR), { (1<<MACH_BASE) } } },
/* baseoff: base register offset */
{ "baseoff", IQ2000_OPERAND_BASEOFF, HW_H_IADDR, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } },
{ 0, { (1<<MACH_BASE) } } },
/* jmptarg: jump target */
{ "jmptarg", IQ2000_OPERAND_JMPTARG, HW_H_IADDR, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[12])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_JTARG] } },
{ 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
/* mask: mask */
{ "mask", IQ2000_OPERAND_MASK, HW_H_UINT, 9, 4,
- { 0, { (void *) &(iq2000_cgen_ifld_table[18])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_MASK] } },
{ 0, { (1<<MACH_BASE) } } },
/* maskq10: iq10 mask */
{ "maskq10", IQ2000_OPERAND_MASKQ10, HW_H_UINT, 10, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[19])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_MASKQ10] } },
{ 0, { (1<<MACH_BASE) } } },
/* maskl: mask left */
{ "maskl", IQ2000_OPERAND_MASKL, HW_H_UINT, 4, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[20])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_MASKL] } },
{ 0, { (1<<MACH_BASE) } } },
/* count: count */
{ "count", IQ2000_OPERAND_COUNT, HW_H_UINT, 15, 7,
- { 0, { (void *) &(iq2000_cgen_ifld_table[15])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_COUNT] } },
{ 0, { (1<<MACH_BASE) } } },
-/* index: index */
- { "index", IQ2000_OPERAND_INDEX, HW_H_UINT, 8, 9,
- { 0, { (void *) &(iq2000_cgen_ifld_table[17])} },
+/* f-index: index */
+ { "f-index", IQ2000_OPERAND_F_INDEX, HW_H_UINT, 8, 9,
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_INDEX] } },
{ 0, { (1<<MACH_BASE) } } },
/* execode: execcode */
{ "execode", IQ2000_OPERAND_EXECODE, HW_H_UINT, 25, 20,
- { 0, { (void *) &(iq2000_cgen_ifld_table[21])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_EXCODE] } },
{ 0, { (1<<MACH_BASE) } } },
/* bytecount: byte count */
{ "bytecount", IQ2000_OPERAND_BYTECOUNT, HW_H_UINT, 7, 8,
- { 0, { (void *) &(iq2000_cgen_ifld_table[16])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_BYTECOUNT] } },
{ 0, { (1<<MACH_BASE) } } },
/* cam-y: cam global opn y */
{ "cam-y", IQ2000_OPERAND_CAM_Y, HW_H_UINT, 2, 3,
- { 0, { (void *) &(iq2000_cgen_ifld_table[29])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CAM_Y] } },
{ 0, { (1<<MACH_BASE) } } },
/* cam-z: cam global mask z */
{ "cam-z", IQ2000_OPERAND_CAM_Z, HW_H_UINT, 5, 3,
- { 0, { (void *) &(iq2000_cgen_ifld_table[28])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CAM_Z] } },
{ 0, { (1<<MACH_BASE) } } },
/* cm-3func: CM 3 bit fn field */
{ "cm-3func", IQ2000_OPERAND_CM_3FUNC, HW_H_UINT, 5, 3,
- { 0, { (void *) &(iq2000_cgen_ifld_table[30])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_3FUNC] } },
{ 0, { (1<<MACH_BASE) } } },
/* cm-4func: CM 4 bit fn field */
{ "cm-4func", IQ2000_OPERAND_CM_4FUNC, HW_H_UINT, 5, 4,
- { 0, { (void *) &(iq2000_cgen_ifld_table[31])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_4FUNC] } },
{ 0, { (1<<MACH_BASE) } } },
/* cm-3z: CM 3 bit Z field */
{ "cm-3z", IQ2000_OPERAND_CM_3Z, HW_H_UINT, 1, 2,
- { 0, { (void *) &(iq2000_cgen_ifld_table[32])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_3Z] } },
{ 0, { (1<<MACH_BASE) } } },
/* cm-4z: CM 4 bit Z field */
{ "cm-4z", IQ2000_OPERAND_CM_4Z, HW_H_UINT, 2, 3,
- { 0, { (void *) &(iq2000_cgen_ifld_table[33])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_CM_4Z] } },
{ 0, { (1<<MACH_BASE) } } },
/* base: base register */
{ "base", IQ2000_OPERAND_BASE, HW_H_GR, 25, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } },
{ 0, { (1<<MACH_BASE) } } },
/* maskr: mask right */
{ "maskr", IQ2000_OPERAND_MASKR, HW_H_UINT, 25, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[3])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RS] } },
{ 0, { (1<<MACH_BASE) } } },
/* bitnum: bit number */
{ "bitnum", IQ2000_OPERAND_BITNUM, HW_H_UINT, 20, 5,
- { 0, { (void *) &(iq2000_cgen_ifld_table[4])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_RT] } },
{ 0, { (1<<MACH_BASE) } } },
/* hi16: high 16 bit immediate */
{ "hi16", IQ2000_OPERAND_HI16, HW_H_UINT, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } },
{ 0, { (1<<MACH_BASE) } } },
/* lo16: 16 bit signed immediate, for low */
{ "lo16", IQ2000_OPERAND_LO16, HW_H_UINT, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } },
{ 0, { (1<<MACH_BASE) } } },
/* mlo16: negated 16 bit signed immediate */
{ "mlo16", IQ2000_OPERAND_MLO16, HW_H_UINT, 15, 16,
- { 0, { (void *) &(iq2000_cgen_ifld_table[11])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_IMM] } },
{ 0, { (1<<MACH_BASE) } } },
/* jmptargq10: iq10 21-bit jump offset */
{ "jmptargq10", IQ2000_OPERAND_JMPTARGQ10, HW_H_IADDR, 20, 21,
- { 0, { (void *) &(iq2000_cgen_ifld_table[13])} },
+ { 0, { (const PTR) &iq2000_cgen_ifld_table[IQ2000_F_JTARGQ10] } },
{ 0|A(ABS_ADDR), { (1<<MACH_BASE) } } },
- { 0, 0, 0, 0, 0, {0, {0}}, {0, {0}} }
+/* sentinel */
+ { 0, 0, 0, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { 0 } } }
};
#undef A
@@ -1161,14 +1167,14 @@ static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
IQ2000_INSN_PKRL, "pkrl", "pkrl", 32,
{ 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
},
-/* pkrlr1 $rt,$index,$count */
+/* pkrlr1 $rt,$count */
{
- IQ2000_INSN_PKRLR1, "pkrlr1", "pkrlr1", 32,
+ IQ2000_INSN_PKRLR1, "pkrlr1", "pkrlr1", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* pkrlr30 $rt,$index,$count */
+/* pkrlr30 $rt,$count */
{
- IQ2000_INSN_PKRLR30, "pkrlr30", "pkrlr30", 32,
+ IQ2000_INSN_PKRLR30, "pkrlr30", "pkrlr30", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
/* rb $rd,$rt */
@@ -1176,14 +1182,14 @@ static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
IQ2000_INSN_RB, "rb", "rb", 32,
{ 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
},
-/* rbr1 $rt,$index,$count */
+/* rbr1 $rt,$count */
{
- IQ2000_INSN_RBR1, "rbr1", "rbr1", 32,
+ IQ2000_INSN_RBR1, "rbr1", "rbr1", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* rbr30 $rt,$index,$count */
+/* rbr30 $rt,$count */
{
- IQ2000_INSN_RBR30, "rbr30", "rbr30", 32,
+ IQ2000_INSN_RBR30, "rbr30", "rbr30", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
/* rfe */
@@ -1196,14 +1202,14 @@ static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
IQ2000_INSN_RX, "rx", "rx", 32,
{ 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
},
-/* rxr1 $rt,$index,$count */
+/* rxr1 $rt,$count */
{
- IQ2000_INSN_RXR1, "rxr1", "rxr1", 32,
+ IQ2000_INSN_RXR1, "rxr1", "rxr1", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* rxr30 $rt,$index,$count */
+/* rxr30 $rt,$count */
{
- IQ2000_INSN_RXR30, "rxr30", "rxr30", 32,
+ IQ2000_INSN_RXR30, "rxr30", "rxr30", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
/* sleep */
@@ -1261,24 +1267,24 @@ static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
IQ2000_INSN_WBU, "wbu", "wbu", 32,
{ 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
},
-/* wbr1 $rt,$index,$count */
+/* wbr1 $rt,$count */
{
- IQ2000_INSN_WBR1, "wbr1", "wbr1", 32,
+ IQ2000_INSN_WBR1, "wbr1", "wbr1", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wbr1u $rt,$index,$count */
+/* wbr1u $rt,$count */
{
- IQ2000_INSN_WBR1U, "wbr1u", "wbr1u", 32,
+ IQ2000_INSN_WBR1U, "wbr1u", "wbr1u", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wbr30 $rt,$index,$count */
+/* wbr30 $rt,$count */
{
- IQ2000_INSN_WBR30, "wbr30", "wbr30", 32,
+ IQ2000_INSN_WBR30, "wbr30", "wbr30", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wbr30u $rt,$index,$count */
+/* wbr30u $rt,$count */
{
- IQ2000_INSN_WBR30U, "wbr30u", "wbr30u", 32,
+ IQ2000_INSN_WBR30U, "wbr30u", "wbr30u", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
/* wx $rd,$rt */
@@ -1291,24 +1297,24 @@ static const CGEN_IBASE iq2000_cgen_insn_table[MAX_INSNS] =
IQ2000_INSN_WXU, "wxu", "wxu", 32,
{ 0|A(YIELD_INSN)|A(USES_RT)|A(USES_RD), { (1<<MACH_IQ2000) } }
},
-/* wxr1 $rt,$index,$count */
+/* wxr1 $rt,$count */
{
- IQ2000_INSN_WXR1, "wxr1", "wxr1", 32,
+ IQ2000_INSN_WXR1, "wxr1", "wxr1", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wxr1u $rt,$index,$count */
+/* wxr1u $rt,$count */
{
- IQ2000_INSN_WXR1U, "wxr1u", "wxr1u", 32,
+ IQ2000_INSN_WXR1U, "wxr1u", "wxr1u", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wxr30 $rt,$index,$count */
+/* wxr30 $rt,$count */
{
- IQ2000_INSN_WXR30, "wxr30", "wxr30", 32,
+ IQ2000_INSN_WXR30, "wxr30", "wxr30", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
-/* wxr30u $rt,$index,$count */
+/* wxr30u $rt,$count */
{
- IQ2000_INSN_WXR30U, "wxr30u", "wxr30u", 32,
+ IQ2000_INSN_WXR30U, "wxr30u", "wxr30u", 23,
{ 0|A(YIELD_INSN)|A(USES_RT), { (1<<MACH_IQ2000) } }
},
/* ldw $rt,$lo16($base) */
@@ -2181,7 +2187,7 @@ iq2000_cgen_cpu_close (cd)
CGEN_CPU_DESC cd;
{
unsigned int i;
- CGEN_INSN *insns;
+ const CGEN_INSN *insns;
if (cd->macro_insn_table.init_entries)
{
@@ -2189,7 +2195,7 @@ iq2000_cgen_cpu_close (cd)
for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns)
{
if (CGEN_INSN_RX ((insns)))
- regfree(CGEN_INSN_RX (insns));
+ regfree (CGEN_INSN_RX (insns));
}
}
@@ -2199,7 +2205,7 @@ iq2000_cgen_cpu_close (cd)
for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns)
{
if (CGEN_INSN_RX (insns))
- regfree(CGEN_INSN_RX (insns));
+ regfree (CGEN_INSN_RX (insns));
}
}
diff --git a/opcodes/iq2000-desc.h b/opcodes/iq2000-desc.h
index 584c3ded755..fe3a5e3f6ab 100644
--- a/opcodes/iq2000-desc.h
+++ b/opcodes/iq2000-desc.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -42,7 +42,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define CGEN_INSN_LSB0_P 1
/* Minimum size of any insn (in bytes). */
-#define CGEN_MIN_INSN_SIZE 4
+#define CGEN_MIN_INSN_SIZE 3
/* Maximum size of any insn (in bytes). */
#define CGEN_MAX_INSN_SIZE 4
@@ -255,7 +255,7 @@ typedef enum cgen_operand_type {
, IQ2000_OPERAND_RD_RS, IQ2000_OPERAND_RD_RT, IQ2000_OPERAND_RT_RS, IQ2000_OPERAND_SHAMT
, IQ2000_OPERAND_IMM, IQ2000_OPERAND_OFFSET, IQ2000_OPERAND_BASEOFF, IQ2000_OPERAND_JMPTARG
, IQ2000_OPERAND_MASK, IQ2000_OPERAND_MASKQ10, IQ2000_OPERAND_MASKL, IQ2000_OPERAND_COUNT
- , IQ2000_OPERAND_INDEX, IQ2000_OPERAND_EXECODE, IQ2000_OPERAND_BYTECOUNT, IQ2000_OPERAND_CAM_Y
+ , IQ2000_OPERAND_F_INDEX, IQ2000_OPERAND_EXECODE, IQ2000_OPERAND_BYTECOUNT, IQ2000_OPERAND_CAM_Y
, IQ2000_OPERAND_CAM_Z, IQ2000_OPERAND_CM_3FUNC, IQ2000_OPERAND_CM_4FUNC, IQ2000_OPERAND_CM_3Z
, IQ2000_OPERAND_CM_4Z, IQ2000_OPERAND_BASE, IQ2000_OPERAND_MASKR, IQ2000_OPERAND_BITNUM
, IQ2000_OPERAND_HI16, IQ2000_OPERAND_LO16, IQ2000_OPERAND_MLO16, IQ2000_OPERAND_JMPTARGQ10
diff --git a/opcodes/iq2000-dis.c b/opcodes/iq2000-dis.c
index 49e01201dc6..b1bfa0ef4b4 100644
--- a/opcodes/iq2000-dis.c
+++ b/opcodes/iq2000-dis.c
@@ -4,7 +4,8 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
- the resultant file is machine generated, cgen-dis.in isn't
-Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
This file is part of the GNU Binutils and GDB, the GNU debugger.
@@ -31,6 +32,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "dis-asm.h"
#include "bfd.h"
#include "symcat.h"
+#include "libiberty.h"
#include "iq2000-desc.h"
#include "iq2000-opc.h"
#include "opintl.h"
@@ -127,15 +129,15 @@ iq2000_cgen_print_operand (cd, opindex, xinfo, fields, attrs, pc, length)
case IQ2000_OPERAND_EXECODE :
print_normal (cd, info, fields->f_excode, 0, pc, length);
break;
+ case IQ2000_OPERAND_F_INDEX :
+ print_normal (cd, info, fields->f_index, 0, pc, length);
+ break;
case IQ2000_OPERAND_HI16 :
print_normal (cd, info, fields->f_imm, 0, pc, length);
break;
case IQ2000_OPERAND_IMM :
print_normal (cd, info, fields->f_imm, 0, pc, length);
break;
- case IQ2000_OPERAND_INDEX :
- print_normal (cd, info, fields->f_index, 0, pc, length);
- break;
case IQ2000_OPERAND_JMPTARG :
print_address (cd, info, fields->f_jtarg, 0|(1<<CGEN_OPERAND_ABS_ADDR), pc, length);
break;
diff --git a/opcodes/iq2000-ibld.c b/opcodes/iq2000-ibld.c
index 5a29228c08b..4917d9fa3d5 100644
--- a/opcodes/iq2000-ibld.c
+++ b/opcodes/iq2000-ibld.c
@@ -35,9 +35,9 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "opintl.h"
#include "safe-ctype.h"
-#undef min
+#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef max
+#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
/* Used by the ifield rtx function. */
@@ -605,15 +605,15 @@ iq2000_cgen_insert_operand (cd, opindex, fields, buffer, pc)
case IQ2000_OPERAND_EXECODE :
errmsg = insert_normal (cd, fields->f_excode, 0, 0, 25, 20, 32, total_length, buffer);
break;
+ case IQ2000_OPERAND_F_INDEX :
+ errmsg = insert_normal (cd, fields->f_index, 0, 0, 8, 9, 32, total_length, buffer);
+ break;
case IQ2000_OPERAND_HI16 :
errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
break;
case IQ2000_OPERAND_IMM :
errmsg = insert_normal (cd, fields->f_imm, 0, 0, 15, 16, 32, total_length, buffer);
break;
- case IQ2000_OPERAND_INDEX :
- errmsg = insert_normal (cd, fields->f_index, 0, 0, 8, 9, 32, total_length, buffer);
- break;
case IQ2000_OPERAND_JMPTARG :
{
long value = fields->f_jtarg;
@@ -788,15 +788,15 @@ iq2000_cgen_extract_operand (cd, opindex, ex_info, insn_value, fields, pc)
case IQ2000_OPERAND_EXECODE :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 25, 20, 32, total_length, pc, & fields->f_excode);
break;
+ case IQ2000_OPERAND_F_INDEX :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 9, 32, total_length, pc, & fields->f_index);
+ break;
case IQ2000_OPERAND_HI16 :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
break;
case IQ2000_OPERAND_IMM :
length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 16, 32, total_length, pc, & fields->f_imm);
break;
- case IQ2000_OPERAND_INDEX :
- length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 9, 32, total_length, pc, & fields->f_index);
- break;
case IQ2000_OPERAND_JMPTARG :
{
long value;
@@ -961,15 +961,15 @@ iq2000_cgen_get_int_operand (cd, opindex, fields)
case IQ2000_OPERAND_EXECODE :
value = fields->f_excode;
break;
+ case IQ2000_OPERAND_F_INDEX :
+ value = fields->f_index;
+ break;
case IQ2000_OPERAND_HI16 :
value = fields->f_imm;
break;
case IQ2000_OPERAND_IMM :
value = fields->f_imm;
break;
- case IQ2000_OPERAND_INDEX :
- value = fields->f_index;
- break;
case IQ2000_OPERAND_JMPTARG :
value = fields->f_jtarg;
break;
@@ -1075,15 +1075,15 @@ iq2000_cgen_get_vma_operand (cd, opindex, fields)
case IQ2000_OPERAND_EXECODE :
value = fields->f_excode;
break;
+ case IQ2000_OPERAND_F_INDEX :
+ value = fields->f_index;
+ break;
case IQ2000_OPERAND_HI16 :
value = fields->f_imm;
break;
case IQ2000_OPERAND_IMM :
value = fields->f_imm;
break;
- case IQ2000_OPERAND_INDEX :
- value = fields->f_index;
- break;
case IQ2000_OPERAND_JMPTARG :
value = fields->f_jtarg;
break;
@@ -1198,15 +1198,15 @@ iq2000_cgen_set_int_operand (cd, opindex, fields, value)
case IQ2000_OPERAND_EXECODE :
fields->f_excode = value;
break;
+ case IQ2000_OPERAND_F_INDEX :
+ fields->f_index = value;
+ break;
case IQ2000_OPERAND_HI16 :
fields->f_imm = value;
break;
case IQ2000_OPERAND_IMM :
fields->f_imm = value;
break;
- case IQ2000_OPERAND_INDEX :
- fields->f_index = value;
- break;
case IQ2000_OPERAND_JMPTARG :
fields->f_jtarg = value;
break;
@@ -1309,15 +1309,15 @@ iq2000_cgen_set_vma_operand (cd, opindex, fields, value)
case IQ2000_OPERAND_EXECODE :
fields->f_excode = value;
break;
+ case IQ2000_OPERAND_F_INDEX :
+ fields->f_index = value;
+ break;
case IQ2000_OPERAND_HI16 :
fields->f_imm = value;
break;
case IQ2000_OPERAND_IMM :
fields->f_imm = value;
break;
- case IQ2000_OPERAND_INDEX :
- fields->f_index = value;
- break;
case IQ2000_OPERAND_JMPTARG :
fields->f_jtarg = value;
break;
diff --git a/opcodes/iq2000-opc.c b/opcodes/iq2000-opc.c
index fe8cf641502..35ffdf0a213 100644
--- a/opcodes/iq2000-opc.c
+++ b/opcodes/iq2000-opc.c
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
@@ -166,7 +166,7 @@ static const CGEN_IFMT ifmt_lulck = {
};
static const CGEN_IFMT ifmt_pkrlr1 = {
- 32, 32, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_COUNT) }, { F (F_INDEX) }, { 0 } }
+ 23, 23, 0xffe00000, { { F (F_OPCODE) }, { F (F_RS) }, { F (F_RT) }, { F (F_COUNT) }, { 0 } }
};
static const CGEN_IFMT ifmt_rfe = {
@@ -1070,16 +1070,16 @@ static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
& ifmt_chkhdr, { 0x4c200007 }
},
-/* pkrlr1 $rt,$index,$count */
+/* pkrlr1 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4fa00000 }
},
-/* pkrlr30 $rt,$index,$count */
+/* pkrlr30 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4fe00000 }
},
/* rb $rd,$rt */
@@ -1088,16 +1088,16 @@ static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
& ifmt_chkhdr, { 0x4c200004 }
},
-/* rbr1 $rt,$index,$count */
+/* rbr1 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4f000000 }
},
-/* rbr30 $rt,$index,$count */
+/* rbr30 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4f400000 }
},
/* rfe */
@@ -1112,16 +1112,16 @@ static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
& ifmt_chkhdr, { 0x4c200006 }
},
-/* rxr1 $rt,$index,$count */
+/* rxr1 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4f800000 }
},
-/* rxr30 $rt,$index,$count */
+/* rxr30 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4fc00000 }
},
/* sleep */
@@ -1190,28 +1190,28 @@ static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
& ifmt_chkhdr, { 0x4c200001 }
},
-/* wbr1 $rt,$index,$count */
+/* wbr1 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4e000000 }
},
-/* wbr1u $rt,$index,$count */
+/* wbr1u $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4e200000 }
},
-/* wbr30 $rt,$index,$count */
+/* wbr30 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4e400000 }
},
-/* wbr30u $rt,$index,$count */
+/* wbr30u $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4e600000 }
},
/* wx $rd,$rt */
@@ -1226,28 +1226,28 @@ static const CGEN_OPCODE iq2000_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (RD), ',', OP (RT), 0 } },
& ifmt_chkhdr, { 0x4c200003 }
},
-/* wxr1 $rt,$index,$count */
+/* wxr1 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4e800000 }
},
-/* wxr1u $rt,$index,$count */
+/* wxr1u $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4ea00000 }
},
-/* wxr30 $rt,$index,$count */
+/* wxr30 $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4ec00000 }
},
-/* wxr30u $rt,$index,$count */
+/* wxr30u $rt,$count */
{
{ 0, 0, 0, 0 },
- { { MNEM, ' ', OP (RT), ',', OP (INDEX), ',', OP (COUNT), 0 } },
+ { { MNEM, ' ', OP (RT), ',', OP (COUNT), 0 } },
& ifmt_pkrlr1, { 0x4ee00000 }
},
/* ldw $rt,$lo16($base) */
diff --git a/opcodes/iq2000-opc.h b/opcodes/iq2000-opc.h
index 4dca525ffe1..1242cea67a0 100644
--- a/opcodes/iq2000-opc.h
+++ b/opcodes/iq2000-opc.h
@@ -2,7 +2,7 @@
THIS FILE IS MACHINE GENERATED WITH CGEN.
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU Binutils and/or GDB, the GNU debugger.
diff --git a/opcodes/po/POTFILES.in b/opcodes/po/POTFILES.in
index 9a14a1daeb9..f16a87b428e 100644
--- a/opcodes/po/POTFILES.in
+++ b/opcodes/po/POTFILES.in
@@ -16,8 +16,8 @@ d10v-dis.c
d10v-opc.c
d30v-dis.c
d30v-opc.c
-dis-buf.c
disassemble.c
+dis-buf.c
dlx-dis.c
fr30-asm.c
fr30-desc.c
@@ -48,12 +48,12 @@ ia64-dis.c
ia64-gen.c
ia64-opc-a.c
ia64-opc-b.c
+ia64-opc.c
ia64-opc-d.c
ia64-opc-f.c
+ia64-opc.h
ia64-opc-i.c
ia64-opc-m.c
-ia64-opc.c
-ia64-opc.h
ip2k-asm.c
ip2k-desc.c
ip2k-desc.h
@@ -87,9 +87,9 @@ m68k-opc.c
m88k-dis.c
mcore-dis.c
mcore-opc.h
+mips16-opc.c
mips-dis.c
mips-opc.c
-mips16-opc.c
mmix-dis.c
mmix-opc.c
ns32k-dis.c
@@ -111,11 +111,11 @@ ppc-opc.c
s390-dis.c
s390-mkopc.c
s390-opc.c
-sh-dis.c
-sh-opc.h
sh64-dis.c
sh64-opc.c
sh64-opc.h
+sh-dis.c
+sh-opc.h
sparc-dis.c
sparc-opc.c
sysdep.h
@@ -137,6 +137,7 @@ xstormy16-dis.c
xstormy16-ibld.c
xstormy16-opc.c
xstormy16-opc.h
+xtensa-dis.c
z8k-dis.c
-z8k-opc.h
z8kgen.c
+z8k-opc.h
diff --git a/opcodes/po/opcodes.pot b/opcodes/po/opcodes.pot
index fbc549dbda2..ee61ca633f8 100644
--- a/opcodes/po/opcodes.pot
+++ b/opcodes/po/opcodes.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-02-08 03:24-0200\n"
+"POT-Creation-Date: 2003-06-05 11:34+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -26,47 +26,47 @@ msgstr ""
msgid "Illegal limm reference in last instruction!\n"
msgstr ""
-#: arm-dis.c:502
+#: arm-dis.c:554
msgid "<illegal precision>"
msgstr ""
-#: arm-dis.c:1012
+#: arm-dis.c:1162
#, c-format
msgid "Unrecognised register name set: %s\n"
msgstr ""
-#: arm-dis.c:1019
+#: arm-dis.c:1169
#, c-format
msgid "Unrecognised disassembler option: %s\n"
msgstr ""
-#: arm-dis.c:1191
+#: arm-dis.c:1343
msgid ""
"\n"
"The following ARM specific disassembler options are supported for use with\n"
"the -M switch:\n"
msgstr ""
-#: avr-dis.c:118 avr-dis.c:128
+#: avr-dis.c:117 avr-dis.c:127
msgid "undefined"
msgstr ""
-#: avr-dis.c:180
+#: avr-dis.c:179
msgid "Internal disassembler error"
msgstr ""
-#: avr-dis.c:228
+#: avr-dis.c:227
#, c-format
msgid "unknown constraint `%c'"
msgstr ""
-#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
-#: xstormy16-ibld.c:195
+#: cgen-asm.c:348 fr30-ibld.c:195 frv-ibld.c:195 ip2k-ibld.c:195
+#: iq2000-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195 xstormy16-ibld.c:195
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr ""
-#: cgen-asm.c:367
+#: cgen-asm.c:369
#, c-format
msgid "operand out of range (%lu not between %lu and %lu)"
msgstr ""
@@ -87,112 +87,134 @@ msgstr ""
msgid "Address 0x%x is out of bounds.\n"
msgstr ""
-#: fr30-asm.c:323 m32r-asm.c:325 openrisc-asm.c:244 xstormy16-asm.c:231
+#: fr30-asm.c:323 frv-asm.c:626 ip2k-asm.c:574 iq2000-asm.c:460 m32r-asm.c:325
+#: openrisc-asm.c:244 xstormy16-asm.c:284
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr ""
-#: fr30-asm.c:373 m32r-asm.c:375 openrisc-asm.c:294 xstormy16-asm.c:281
+#: fr30-asm.c:373 frv-asm.c:676 ip2k-asm.c:624 iq2000-asm.c:510 m32r-asm.c:375
+#: openrisc-asm.c:294 xstormy16-asm.c:334
msgid "missing mnemonic in syntax string"
msgstr ""
#. We couldn't parse it.
-#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 m32r-asm.c:511
-#: m32r-asm.c:515 m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430
-#: openrisc-asm.c:434 openrisc-asm.c:521 openrisc-asm.c:623
-#: xstormy16-asm.c:417 xstormy16-asm.c:421 xstormy16-asm.c:508
-#: xstormy16-asm.c:610
+#: fr30-asm.c:509 fr30-asm.c:513 fr30-asm.c:600 fr30-asm.c:702 frv-asm.c:812
+#: frv-asm.c:816 frv-asm.c:903 frv-asm.c:1005 ip2k-asm.c:760 ip2k-asm.c:764
+#: ip2k-asm.c:851 ip2k-asm.c:953 iq2000-asm.c:646 iq2000-asm.c:650
+#: iq2000-asm.c:737 iq2000-asm.c:839 m32r-asm.c:511 m32r-asm.c:515
+#: m32r-asm.c:602 m32r-asm.c:704 openrisc-asm.c:430 openrisc-asm.c:434
+#: openrisc-asm.c:521 openrisc-asm.c:623 xstormy16-asm.c:470
+#: xstormy16-asm.c:474 xstormy16-asm.c:561 xstormy16-asm.c:663
msgid "unrecognized instruction"
msgstr ""
-#: fr30-asm.c:556 m32r-asm.c:558 openrisc-asm.c:477 xstormy16-asm.c:464
+#: fr30-asm.c:556 frv-asm.c:859 ip2k-asm.c:807 iq2000-asm.c:693 m32r-asm.c:558
+#: openrisc-asm.c:477 xstormy16-asm.c:517
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr ""
-#: fr30-asm.c:566 m32r-asm.c:568 openrisc-asm.c:487 xstormy16-asm.c:474
+#: fr30-asm.c:566 frv-asm.c:869 ip2k-asm.c:817 iq2000-asm.c:703 m32r-asm.c:568
+#: openrisc-asm.c:487 xstormy16-asm.c:527
#, c-format
msgid "syntax error (expected char `%c', found end of instruction)"
msgstr ""
-#: fr30-asm.c:594 m32r-asm.c:596 openrisc-asm.c:515 xstormy16-asm.c:502
+#: fr30-asm.c:594 frv-asm.c:897 ip2k-asm.c:845 iq2000-asm.c:731 m32r-asm.c:596
+#: openrisc-asm.c:515 xstormy16-asm.c:555
msgid "junk at end of line"
msgstr ""
-#: fr30-asm.c:701 m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:609
+#: fr30-asm.c:701 frv-asm.c:1004 ip2k-asm.c:952 iq2000-asm.c:838
+#: m32r-asm.c:703 openrisc-asm.c:622 xstormy16-asm.c:662
msgid "unrecognized form of instruction"
msgstr ""
-#: fr30-asm.c:713 m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:621
+#: fr30-asm.c:713 frv-asm.c:1016 ip2k-asm.c:964 iq2000-asm.c:850
+#: m32r-asm.c:715 openrisc-asm.c:634 xstormy16-asm.c:674
#, c-format
msgid "bad instruction `%.50s...'"
msgstr ""
-#: fr30-asm.c:716 m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:624
+#: fr30-asm.c:716 frv-asm.c:1019 ip2k-asm.c:967 iq2000-asm.c:853
+#: m32r-asm.c:718 openrisc-asm.c:637 xstormy16-asm.c:677
#, c-format
msgid "bad instruction `%.50s'"
msgstr ""
#. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
-#: xstormy16-dis.c:39
+#: fr30-dis.c:41 frv-dis.c:41 ip2k-dis.c:41 iq2000-dis.c:41 m32r-dis.c:41
+#: mmix-dis.c:284 openrisc-dis.c:41 xstormy16-dis.c:41
msgid "*unknown*"
msgstr ""
-#: fr30-dis.c:318 m32r-dis.c:249 openrisc-dis.c:136 xstormy16-dis.c:169
+#: fr30-dis.c:320 frv-dis.c:371 ip2k-dis.c:329 iq2000-dis.c:192 m32r-dis.c:251
+#: openrisc-dis.c:138 xstormy16-dis.c:171
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr ""
-#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
+#: fr30-ibld.c:166 frv-ibld.c:166 ip2k-ibld.c:166 iq2000-ibld.c:166
+#: m32r-ibld.c:166 openrisc-ibld.c:166 xstormy16-ibld.c:166
#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
msgstr ""
-#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
+#: fr30-ibld.c:179 frv-ibld.c:179 ip2k-ibld.c:179 iq2000-ibld.c:179
+#: m32r-ibld.c:179 openrisc-ibld.c:179 xstormy16-ibld.c:179
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
msgstr ""
-#: fr30-ibld.c:730 m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
+#: fr30-ibld.c:730 frv-ibld.c:829 ip2k-ibld.c:607 iq2000-ibld.c:713
+#: m32r-ibld.c:659 openrisc-ibld.c:633 xstormy16-ibld.c:678
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr ""
-#: fr30-ibld.c:937 m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
+#: fr30-ibld.c:937 frv-ibld.c:1121 ip2k-ibld.c:684 iq2000-ibld.c:890
+#: m32r-ibld.c:792 openrisc-ibld.c:735 xstormy16-ibld.c:826
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr ""
-#: fr30-ibld.c:1086 m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
+#: fr30-ibld.c:1086 frv-ibld.c:1375 ip2k-ibld.c:761 iq2000-ibld.c:1024
+#: m32r-ibld.c:902 openrisc-ibld.c:815 xstormy16-ibld.c:939
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1215 m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
+#: fr30-ibld.c:1215 frv-ibld.c:1609 ip2k-ibld.c:818 iq2000-ibld.c:1138
+#: m32r-ibld.c:992 openrisc-ibld.c:875 xstormy16-ibld.c:1032
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr ""
-#: fr30-ibld.c:1349 m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
+#: fr30-ibld.c:1349 frv-ibld.c:1852 ip2k-ibld.c:880 iq2000-ibld.c:1261
+#: m32r-ibld.c:1090 openrisc-ibld.c:944 xstormy16-ibld.c:1134
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1471 m32r-ibld.c:1176 openrisc-ibld.c:1001
-#: xstormy16-ibld.c:1224
+#: fr30-ibld.c:1471 frv-ibld.c:2083 ip2k-ibld.c:930 iq2000-ibld.c:1372
+#: m32r-ibld.c:1176 openrisc-ibld.c:1001 xstormy16-ibld.c:1224
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr ""
-#: h8300-dis.c:384
+#: frv-asm.c:365
+msgid "register number must be even"
+msgstr ""
+
+#: h8300-dis.c:377
#, c-format
-msgid "Hmmmm %x"
+msgid "Hmmmm 0x%x"
msgstr ""
-#: h8300-dis.c:395
+#: h8300-dis.c:760
#, c-format
-msgid "Don't understand %x \n"
+msgid "Don't understand 0x%x \n"
msgstr ""
#: h8500-dis.c:143
@@ -206,10 +228,185 @@ msgstr ""
msgid "%02x\t\t*unknown*"
msgstr ""
-#: i386-dis.c:1649
+#: i386-dis.c:1650
msgid "<internal disassembler error>"
msgstr ""
+#: ia64-gen.c:295
+#, c-format
+msgid "%s: Error: "
+msgstr ""
+
+#: ia64-gen.c:308
+#, c-format
+msgid "%s: Warning: "
+msgstr ""
+
+#: ia64-gen.c:494 ia64-gen.c:728
+#, c-format
+msgid "multiple note %s not handled\n"
+msgstr ""
+
+#: ia64-gen.c:605
+msgid "can't find ia64-ic.tbl for reading\n"
+msgstr ""
+
+#: ia64-gen.c:810
+#, c-format
+msgid "can't find %s for reading\n"
+msgstr ""
+
+#: ia64-gen.c:1034
+#, c-format
+msgid ""
+"most recent format '%s'\n"
+"appears more restrictive than '%s'\n"
+msgstr ""
+
+#: ia64-gen.c:1045
+#, c-format
+msgid "overlapping field %s->%s\n"
+msgstr ""
+
+#: ia64-gen.c:1236
+#, c-format
+msgid "overwriting note %d with note %d (IC:%s)\n"
+msgstr ""
+
+#: ia64-gen.c:1435
+#, c-format
+msgid "don't know how to specify %% dependency %s\n"
+msgstr ""
+
+#: ia64-gen.c:1457
+#, c-format
+msgid "Don't know how to specify # dependency %s\n"
+msgstr ""
+
+#: ia64-gen.c:1496
+#, c-format
+msgid "IC:%s [%s] has no terminals or sub-classes\n"
+msgstr ""
+
+#: ia64-gen.c:1499
+#, c-format
+msgid "IC:%s has no terminals or sub-classes\n"
+msgstr ""
+
+#: ia64-gen.c:1508
+#, c-format
+msgid "no insns mapped directly to terminal IC %s [%s]"
+msgstr ""
+
+#: ia64-gen.c:1511
+#, c-format
+msgid "no insns mapped directly to terminal IC %s\n"
+msgstr ""
+
+#: ia64-gen.c:1522
+#, c-format
+msgid "class %s is defined but not used\n"
+msgstr ""
+
+#: ia64-gen.c:1533
+#, c-format
+msgid "Warning: rsrc %s (%s) has no chks%s\n"
+msgstr ""
+
+#: ia64-gen.c:1537
+#, c-format
+msgid "rsrc %s (%s) has no regs\n"
+msgstr ""
+
+#: ia64-gen.c:2436
+#, c-format
+msgid "IC note %d in opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr ""
+
+#: ia64-gen.c:2464
+#, c-format
+msgid "IC note %d for opcode %s (IC:%s) conflicts with resource %s note %d\n"
+msgstr ""
+
+#: ia64-gen.c:2478
+#, c-format
+msgid "opcode %s has no class (ops %d %d %d)\n"
+msgstr ""
+
+#: ia64-gen.c:2789
+#, c-format
+msgid "unable to change directory to \"%s\", errno = %s\n"
+msgstr ""
+
+#. We've been passed a w. Return with an error message so that
+#. cgen will try the next parsing option.
+#: ip2k-asm.c:92
+msgid "W keyword invalid in FR operand slot."
+msgstr ""
+
+#. Invalid offset present.
+#: ip2k-asm.c:122
+msgid "offset(IP) is not a valid form"
+msgstr ""
+
+#. Found something there in front of (DP) but it's out
+#. of range.
+#: ip2k-asm.c:175
+msgid "(DP) offset out of range."
+msgstr ""
+
+#. Found something there in front of (SP) but it's out
+#. of range.
+#: ip2k-asm.c:221
+msgid "(SP) offset out of range."
+msgstr ""
+
+#: ip2k-asm.c:241
+msgid "illegal use of parentheses"
+msgstr ""
+
+#: ip2k-asm.c:248
+msgid "operand out of range (not between 1 and 255)"
+msgstr ""
+
+#. Something is very wrong. opindex has to be one of the above.
+#: ip2k-asm.c:273
+msgid "parse_addr16: invalid opindex."
+msgstr ""
+
+#: ip2k-asm.c:353
+msgid "Byte address required. - must be even."
+msgstr ""
+
+#: ip2k-asm.c:362
+msgid "cgen_parse_address returned a symbol. Literal required."
+msgstr ""
+
+#: ip2k-asm.c:420
+#, c-format
+msgid "%operator operand is not a symbol"
+msgstr ""
+
+#: ip2k-asm.c:474
+msgid "Attempt to find bit index of 0"
+msgstr ""
+
+#: iq2000-asm.c:110 iq2000-asm.c:141
+msgid "immediate value cannot be register"
+msgstr ""
+
+#: iq2000-asm.c:120 iq2000-asm.c:151
+msgid "immediate value out of range"
+msgstr ""
+
+#: iq2000-asm.c:180
+msgid "21-bit offset out of range"
+msgstr ""
+
+#: iq2000-asm.c:205 iq2000-asm.c:235 iq2000-asm.c:272 iq2000-asm.c:305
+msgid "missing `)'"
+msgstr ""
+
#: m10200-dis.c:199
#, c-format
msgid "unknown\t0x%02x"
@@ -235,21 +432,99 @@ msgstr ""
msgid "<function code %d>"
msgstr ""
-#: m88k-dis.c:255
+#: m88k-dis.c:746
#, c-format
msgid "# <dis error: %08x>"
msgstr ""
-#: mips-dis.c:290
+#: mips-dis.c:699
+msgid "# internal error, incomplete extension sequence (+)"
+msgstr ""
+
+#: mips-dis.c:742
+#, c-format
+msgid "# internal error, undefined extension sequence (+%c)"
+msgstr ""
+
+#: mips-dis.c:1000
#, c-format
msgid "# internal error, undefined modifier(%c)"
msgstr ""
-#: mips-dis.c:1154
+#: mips-dis.c:1751
#, c-format
msgid "# internal disassembler error, unrecognised modifier (%c)"
msgstr ""
+#: mips-dis.c:1763
+msgid ""
+"\n"
+"The following MIPS specific disassembler options are supported for use\n"
+"with the -M switch (multiple options should be separated by commas):\n"
+msgstr ""
+
+#: mips-dis.c:1767
+msgid ""
+"\n"
+" gpr-names=ABI Print GPR names according to specified ABI.\n"
+" Default: based on binary being disassembled.\n"
+msgstr ""
+
+#: mips-dis.c:1771
+msgid ""
+"\n"
+" fpr-names=ABI Print FPR names according to specified ABI.\n"
+" Default: numeric.\n"
+msgstr ""
+
+#: mips-dis.c:1775
+msgid ""
+"\n"
+" cp0-names=ARCH Print CP0 register names according to\n"
+" specified architecture.\n"
+" Default: based on binary being disassembled.\n"
+msgstr ""
+
+#: mips-dis.c:1780
+msgid ""
+"\n"
+" hwr-names=ARCH Print HWR names according to specified \n"
+"\t\t\t architecture.\n"
+" Default: based on binary being disassembled.\n"
+msgstr ""
+
+#: mips-dis.c:1785
+msgid ""
+"\n"
+" reg-names=ABI Print GPR and FPR names according to\n"
+" specified ABI.\n"
+msgstr ""
+
+#: mips-dis.c:1789
+msgid ""
+"\n"
+" reg-names=ARCH Print CP0 register and HWR names according to\n"
+" specified architecture.\n"
+msgstr ""
+
+#: mips-dis.c:1793
+msgid ""
+"\n"
+" For the options above, the following values are supported for \"ABI\":\n"
+" "
+msgstr ""
+
+#: mips-dis.c:1798 mips-dis.c:1806 mips-dis.c:1808
+msgid "\n"
+msgstr ""
+
+#: mips-dis.c:1800
+msgid ""
+"\n"
+" For the options above, The following values are supported for \"ARCH\":\n"
+" "
+msgstr ""
+
#: mmix-dis.c:34
#, c-format
msgid "Bad case %d (%s) in %s:%d\n"
@@ -264,7 +539,7 @@ msgstr ""
msgid "(unknown)"
msgstr ""
-#: mmix-dis.c:517
+#: mmix-dis.c:519
#, c-format
msgid "*unknown operands type: %d*"
msgstr ""
@@ -275,76 +550,96 @@ msgstr ""
#. * aoffsetp by since whatever generated this is broken
#. * anyway!
#.
-#: ns32k-dis.c:628
+#: ns32k-dis.c:631
msgid "$<undefined>"
msgstr ""
-#: ppc-opc.c:765 ppc-opc.c:798
+#: ppc-opc.c:818 ppc-opc.c:851
msgid "invalid conditional option"
msgstr ""
-#: ppc-opc.c:800
+#: ppc-opc.c:853
msgid "attempt to set y bit when using + or - modifier"
msgstr ""
-#: ppc-opc.c:832 ppc-opc.c:884
+#: ppc-opc.c:881
+msgid "offset not a multiple of 2"
+msgstr ""
+
+#: ppc-opc.c:883
+msgid "offset greater than 62"
+msgstr ""
+
+#: ppc-opc.c:904 ppc-opc.c:954 ppc-opc.c:1006
msgid "offset not a multiple of 4"
msgstr ""
-#: ppc-opc.c:857
+#: ppc-opc.c:906
+msgid "offset greater than 124"
+msgstr ""
+
+#: ppc-opc.c:927
+msgid "offset not a multiple of 8"
+msgstr ""
+
+#: ppc-opc.c:929
+msgid "offset greater than 248"
+msgstr ""
+
+#: ppc-opc.c:979
msgid "offset not between -2048 and 2047"
msgstr ""
-#: ppc-opc.c:882
+#: ppc-opc.c:1004
msgid "offset not between -8192 and 8191"
msgstr ""
-#: ppc-opc.c:910
+#: ppc-opc.c:1032
msgid "ignoring least significant bits in branch offset"
msgstr ""
-#: ppc-opc.c:944 ppc-opc.c:981
+#: ppc-opc.c:1066 ppc-opc.c:1103
msgid "illegal bitmask"
msgstr ""
-#: ppc-opc.c:1054
+#: ppc-opc.c:1176
msgid "value out of range"
msgstr ""
-#: ppc-opc.c:1130
+#: ppc-opc.c:1252
msgid "index register in load range"
msgstr ""
-#: ppc-opc.c:1146
+#: ppc-opc.c:1268
msgid "invalid register operand when updating"
msgstr ""
-#. Mark as non-valid instruction
-#: sparc-dis.c:750
+#. Mark as non-valid instruction.
+#: sparc-dis.c:760
msgid "unknown"
msgstr ""
-#: sparc-dis.c:825
+#: sparc-dis.c:835
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr ""
-#: sparc-dis.c:836
+#: sparc-dis.c:846
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr ""
-#: sparc-dis.c:885
+#: sparc-dis.c:895
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
msgstr ""
-#: v850-dis.c:224
+#: v850-dis.c:221
#, c-format
msgid "unknown operand shift: %x\n"
msgstr ""
-#: v850-dis.c:236
+#: v850-dis.c:233
#, c-format
msgid "unknown pop reg: %d\n"
msgstr ""
@@ -398,30 +693,42 @@ msgstr ""
msgid "immediate value must be even"
msgstr ""
-#: xstormy16-asm.c:74
+#: xstormy16-asm.c:76
msgid "Bad register in preincrement"
msgstr ""
-#: xstormy16-asm.c:79
+#: xstormy16-asm.c:81
msgid "Bad register in postincrement"
msgstr ""
-#: xstormy16-asm.c:81
+#: xstormy16-asm.c:83
msgid "Bad register name"
msgstr ""
-#: xstormy16-asm.c:85
+#: xstormy16-asm.c:87
msgid "Label conflicts with register name"
msgstr ""
-#: xstormy16-asm.c:89
+#: xstormy16-asm.c:91
msgid "Label conflicts with `Rx'"
msgstr ""
-#: xstormy16-asm.c:91
+#: xstormy16-asm.c:93
msgid "Bad immediate expression"
msgstr ""
-#: xstormy16-asm.c:120
+#: xstormy16-asm.c:115
+msgid "No relocation for small immediate"
+msgstr ""
+
+#: xstormy16-asm.c:125
msgid "Small operand was not an immediate number"
msgstr ""
+
+#: xstormy16-asm.c:164
+msgid "Operand is not a symbol"
+msgstr ""
+
+#: xstormy16-asm.c:172
+msgid "Syntax error: No trailing ')'"
+msgstr ""
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index fb3e1b786ea..71c3c38545f 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,11 @@
+2003-06-04 Michael Snyder <msnyder@redhat.com>
+
+ * common/run.c (main): Remove SIM_H8300 ifdef.
+ (usage): Ditto.
+ * common/sim-options.c (STANDARD_OPTIONS): Add SIM_H8300SX.
+ (standard_options): Add '-x' for h8/300sx.
+ (standard_option_handler): Add case for SIM_H8300SX.
+
2003-04-13 Michael Snyder <msnyder@redhat.com>
* Make-common.in (sim-events.o, sim-config.o): Depend on sim-main.h.
diff --git a/sim/common/run.c b/sim/common/run.c
index 4131dd79bbb..79642007618 100644
--- a/sim/common/run.c
+++ b/sim/common/run.c
@@ -119,11 +119,7 @@ main (ac, av)
/* FIXME: This is currently being rewritten to have each simulator
do all argv processing. */
-#ifdef SIM_H8300 /* FIXME: quick hack */
- while ((i = getopt (ac, av, "a:c:m:op:s:hStv")) != EOF)
-#else
while ((i = getopt (ac, av, "a:c:m:op:s:tv")) != EOF)
-#endif
switch (i)
{
case 'a':
@@ -176,14 +172,6 @@ main (ac, av)
/* sim_set_verbose (1); */
break;
/* FIXME: Quick hack, to be replaced by more general facility. */
-#ifdef SIM_H8300
- case 'h':
- set_h8300h (1, 0);
- break;
- case 'S':
- set_h8300h (1, 1);
- break;
-#endif
default:
usage ();
}
@@ -288,11 +276,6 @@ main (ac, av)
the signal that the simulator received; we want to return that to
indicate failure. */
-#ifdef SIM_H8300 /* FIXME: Ugh. grep for SLEEP in compile.c */
- if (sigrc == SIGILL)
- abort ();
- sigrc = 0;
-#else
/* Why did we stop? */
switch (reason)
{
@@ -311,7 +294,6 @@ main (ac, av)
break;
}
-#endif
return sigrc;
}
@@ -325,10 +307,6 @@ usage ()
#ifdef SIM_HAVE_SIMCACHE
fprintf (stderr, "-c size Set simulator cache size to `size'.\n");
#endif
-#ifdef SIM_H8300
- fprintf (stderr, "-h Executable is for H8/300H.\n");
- fprintf (stderr, "-S Executable is for H8S.\n");
-#endif
fprintf (stderr, "-m size Set memory size of simulator, in bytes.\n");
#ifdef SIM_HAVE_ENVIRONMENT
fprintf (stderr, "-o Select operating (kernel) environment.\n");
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index aae0245613e..8c16d56cc75 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -109,8 +109,9 @@ typedef enum {
#endif
OPTION_HELP,
#ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir. */
- OPTION_H8300,
+ OPTION_H8300H,
OPTION_H8300S,
+ OPTION_H8300SX,
#endif
OPTION_LOAD_LMA,
OPTION_LOAD_VMA,
@@ -152,12 +153,15 @@ static const OPTION standard_options[] =
standard_option_handler },
#ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir. */
- { {"h8300h", no_argument, NULL, OPTION_H8300},
+ { {"h8300h", no_argument, NULL, OPTION_H8300H},
'h', NULL, "Indicate the CPU is h8/300h",
standard_option_handler },
{ {"h8300s", no_argument, NULL, OPTION_H8300S},
'S', NULL, "Indicate the CPU is h8/300s",
standard_option_handler },
+ { {"h8300sx", no_argument, NULL, OPTION_H8300SX},
+ 'x', NULL, "Indicate the CPU is h8/300sx",
+ standard_option_handler },
#endif
#ifdef SIM_HAVE_FLATMEM
@@ -357,11 +361,14 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
break;
#ifdef SIM_H8300 /* FIXME: Can be moved to h8300 dir. */
- case OPTION_H8300:
- set_h8300h (1,0);
+ case OPTION_H8300H:
+ set_h8300h (bfd_mach_h8300h);
break;
case OPTION_H8300S:
- set_h8300h (1,1);
+ set_h8300h (bfd_mach_h8300s);
+ break;
+ case OPTION_H8300SX:
+ set_h8300h (bfd_mach_h8300sx);
break;
#endif
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 600e9cc08a9..e35d2b7eb7c 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,17 @@
+2003-06-04 Michael Snyder <msnyder@redhat.com>
+
+ * compile.c (sim_info): Fix typo in output.
+
+ * h8300/compile.c (set_h8300h): Replace 'flag' arguments
+ with a bfd_machine argument, and decode it inline.
+ Check for bfd_mach_h8300hn and bfd_mach_h8300sn.
+
+2003-06-03 Michael Snyder <msnyder@redhat.com>
+
+ * compile.c: Add h8300sx insns and addressing modes.
+ * sim-main.h: Replaces h8300/inst.h.
+ * Makefile.in: Tweak to bring in some sim/common stuff.
+
2003-04-13 Michael Snyder <msnyder@redhat.com>
* compile.c (sim_resume): Implement 'daa' and 'das' instructions.
diff --git a/sim/h8300/Makefile.in b/sim/h8300/Makefile.in
index 55dc3db7310..1d1f9d3db76 100644
--- a/sim/h8300/Makefile.in
+++ b/sim/h8300/Makefile.in
@@ -18,10 +18,20 @@
## COMMON_PRE_CONFIG_FRAG
-SIM_OBJS = compile.o sim-load.o
+# List of main object files for `run'.
+SIM_RUN_OBJS = nrun.o
+
+SIM_OBJS = compile.o \
+ $(SIM_NEW_COMMON_OBJS) \
+ sim-cpu.o \
+ sim-engine.o \
+ sim-load.o \
+ $(SIM_EXTRA_OBJS)
+
## COMMON_POST_CONFIG_FRAG
compile.o: compile.c inst.h config.h \
- $(srcdir)/../../include/gdb/sim-h8300.h \
- $(srcdir)/../../include/gdb/remote-sim.h \
- $(srcdir)/../../include/gdb/callback.h
+ $(srcdir)/../../include/gdb/sim-h8300.h \
+ $(srcdir)/../../include/opcode/h8300.h \
+ $(srcdir)/../../include/gdb/remote-sim.h \
+ $(srcdir)/../../include/gdb/callback.h
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 0e4b6d2b291..c71658e5c8b 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -17,9 +17,6 @@
* AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#include "config.h"
-
-#include <stdio.h>
#include <signal.h>
#ifdef HAVE_TIME_H
#include <time.h>
@@ -30,10 +27,9 @@
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#include "ansidecl.h"
+
#include "bfd.h"
-#include "gdb/callback.h"
-#include "gdb/remote-sim.h"
+#include "sim-main.h"
#include "gdb/sim-h8300.h"
#include "sys/stat.h"
#include "sys/types.h"
@@ -53,61 +49,440 @@ static char *myname;
This header should also include the things in remote-sim.h.
One could move this to remote-sim.h but this function isn't needed
by gdb. */
-void sim_set_simcache_size PARAMS ((int));
+static void set_simcache_size (SIM_DESC, int);
-#define X(op, size) op * 4 + size
+#define X(op, size) (op * 4 + size)
#define SP (h8300hmode ? SL : SW)
-#define SB 0
-#define SW 1
-#define SL 2
-#define OP_REG 1
-#define OP_DEC 2
-#define OP_DISP 3
-#define OP_INC 4
-#define OP_PCREL 5
-#define OP_MEM 6
-#define OP_CCR 7
-#define OP_IMM 8
-#define OP_ABS 10
-#define OP_EXR 11
+
#define h8_opcodes ops
#define DEFINE_TABLE
#include "opcode/h8300.h"
-#include "inst.h"
+/* CPU data object: */
+
+static int
+sim_state_initialize (SIM_DESC sd, sim_cpu *cpu)
+{
+ /* FIXME: not really necessary, since sim_cpu_alloc calls zalloc. */
+
+ memset (&cpu->regs, 0, sizeof(cpu->regs));
+ cpu->regs[SBR_REGNUM] = 0xFFFFFF00;
+ cpu->pc = 0;
+ cpu->delayed_branch = 0;
+ cpu->memory = NULL;
+ cpu->eightbit = NULL;
+ cpu->mask = 0;
+
+ /* Initialize local simulator state. */
+ sd->sim_cache = NULL;
+ sd->sim_cache_size = 0;
+ sd->cache_idx = NULL;
+ sd->cache_top = 0;
+ sd->memory_size = 0;
+ sd->compiles = 0;
+#ifdef ADEBUG
+ memset (&cpu->stats, 0, sizeof (cpu->stats));
+#endif
+ return 0;
+}
+
+static unsigned int
+h8_get_pc (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> pc;
+}
+
+static void
+h8_set_pc (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> pc = val;
+}
+
+static unsigned int
+h8_get_ccr (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[CCR_REGNUM];
+}
+
+static void
+h8_set_ccr (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[CCR_REGNUM] = val;
+}
+
+static unsigned int
+h8_get_exr (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[EXR_REGNUM];
+}
+
+static void
+h8_set_exr (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[EXR_REGNUM] = val;
+}
+
+static int
+h8_get_sbr (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[SBR_REGNUM];
+}
+
+static void
+h8_set_sbr (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[SBR_REGNUM] = val;
+}
+
+static int
+h8_get_vbr (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[VBR_REGNUM];
+}
+
+static void
+h8_set_vbr (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[VBR_REGNUM] = val;
+}
+
+static int
+h8_get_cache_top (SIM_DESC sd)
+{
+ return sd -> cache_top;
+}
+
+static void
+h8_set_cache_top (SIM_DESC sd, int val)
+{
+ sd -> cache_top = val;
+}
+
+static int
+h8_get_mask (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> mask;
+}
+
+static void
+h8_set_mask (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> mask = val;
+}
+#if 0
+static int
+h8_get_exception (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> exception;
+}
+
+static void
+h8_set_exception (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> exception = val;
+}
+
+static enum h8300_sim_state
+h8_get_state (SIM_DESC sd)
+{
+ return sd -> state;
+}
+
+static void
+h8_set_state (SIM_DESC sd, enum h8300_sim_state val)
+{
+ sd -> state = val;
+}
+#endif
+static unsigned int
+h8_get_cycles (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[CYCLE_REGNUM];
+}
+
+static void
+h8_set_cycles (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[CYCLE_REGNUM] = val;
+}
+
+static unsigned int
+h8_get_insts (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[INST_REGNUM];
+}
+
+static void
+h8_set_insts (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[INST_REGNUM] = val;
+}
+
+static unsigned int
+h8_get_ticks (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[TICK_REGNUM];
+}
+
+static void
+h8_set_ticks (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[TICK_REGNUM] = val;
+}
+
+static unsigned int
+h8_get_mach (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[MACH_REGNUM];
+}
+
+static void
+h8_set_mach (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[MACH_REGNUM] = val;
+}
+
+static unsigned int
+h8_get_macl (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> regs[MACL_REGNUM];
+}
+
+static void
+h8_set_macl (SIM_DESC sd, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[MACL_REGNUM] = val;
+}
+
+static int
+h8_get_compiles (SIM_DESC sd)
+{
+ return sd -> compiles;
+}
+
+static void
+h8_increment_compiles (SIM_DESC sd)
+{
+ sd -> compiles ++;
+}
+
+static unsigned int *
+h8_get_reg_buf (SIM_DESC sd)
+{
+ return &(((STATE_CPU (sd, 0)) -> regs)[0]);
+}
+
+static unsigned int
+h8_get_reg (SIM_DESC sd, int regnum)
+{
+ return (STATE_CPU (sd, 0)) -> regs[regnum];
+}
+
+static void
+h8_set_reg (SIM_DESC sd, int regnum, int val)
+{
+ (STATE_CPU (sd, 0)) -> regs[regnum] = val;
+}
+
+#ifdef ADEBUG
+static int
+h8_get_stats (SIM_DESC sd, int idx)
+{
+ return sd -> stats[idx];
+}
+
+static void
+h8_increment_stats (SIM_DESC sd, int idx)
+{
+ sd -> stats[idx] ++;
+}
+#endif /* ADEBUG */
+
+static unsigned short *
+h8_get_cache_idx_buf (SIM_DESC sd)
+{
+ return sd -> cache_idx;
+}
+
+static void
+h8_set_cache_idx_buf (SIM_DESC sd, unsigned short *ptr)
+{
+ sd -> cache_idx = ptr;
+}
+
+static unsigned short
+h8_get_cache_idx (SIM_DESC sd, unsigned int idx)
+{
+ if (idx > sd->memory_size)
+ return (unsigned short) -1;
+ return sd -> cache_idx[idx];
+}
+
+static void
+h8_set_cache_idx (SIM_DESC sd, int idx, unsigned int val)
+{
+ sd -> cache_idx[idx] = (unsigned short) val;
+}
+
+static unsigned char *
+h8_get_memory_buf (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> memory;
+}
+
+static void
+h8_set_memory_buf (SIM_DESC sd, unsigned char *ptr)
+{
+ (STATE_CPU (sd, 0)) -> memory = ptr;
+}
+
+static unsigned char
+h8_get_memory (SIM_DESC sd, int idx)
+{
+ return (STATE_CPU (sd, 0)) -> memory[idx];
+}
+
+static void
+h8_set_memory (SIM_DESC sd, int idx, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> memory[idx] = (unsigned char) val;
+}
+
+static unsigned char *
+h8_get_eightbit_buf (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> eightbit;
+}
+
+static void
+h8_set_eightbit_buf (SIM_DESC sd, unsigned char *ptr)
+{
+ (STATE_CPU (sd, 0)) -> eightbit = ptr;
+}
+
+static unsigned char
+h8_get_eightbit (SIM_DESC sd, int idx)
+{
+ return (STATE_CPU (sd, 0)) -> eightbit[idx];
+}
+
+static void
+h8_set_eightbit (SIM_DESC sd, int idx, unsigned int val)
+{
+ (STATE_CPU (sd, 0)) -> eightbit[idx] = (unsigned char) val;
+}
+
+static unsigned int
+h8_get_delayed_branch (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> delayed_branch;
+}
+
+static void
+h8_set_delayed_branch (SIM_DESC sd, unsigned int dest)
+{
+ (STATE_CPU (sd, 0)) -> delayed_branch = dest;
+}
+
+static char **
+h8_get_command_line (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> command_line;
+}
+
+static void
+h8_set_command_line (SIM_DESC sd, char ** val)
+{
+ (STATE_CPU (sd, 0)) -> command_line = val;
+}
+
+static char *
+h8_get_cmdline_arg (SIM_DESC sd, int index)
+{
+ return (STATE_CPU (sd, 0)) -> command_line[index];
+}
+
+static void
+h8_set_cmdline_arg (SIM_DESC sd, int index, char * val)
+{
+ (STATE_CPU (sd, 0)) -> command_line[index] = val;
+}
+
+/* MAC Saturation Mode */
+static int
+h8_get_macS (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> macS;
+}
+
+static void
+h8_set_macS (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> macS = (val != 0);
+}
+
+/* MAC Zero Flag */
+static int
+h8_get_macZ (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> macZ;
+}
+
+static void
+h8_set_macZ (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> macZ = (val != 0);
+}
+
+/* MAC Negative Flag */
+static int
+h8_get_macN (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> macN;
+}
+
+static void
+h8_set_macN (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> macN = (val != 0);
+}
+
+/* MAC Overflow Flag */
+static int
+h8_get_macV (SIM_DESC sd)
+{
+ return (STATE_CPU (sd, 0)) -> macV;
+}
+
+static void
+h8_set_macV (SIM_DESC sd, int val)
+{
+ (STATE_CPU (sd, 0)) -> macV = (val != 0);
+}
+
+/* End CPU data object. */
/* The rate at which to call the host's poll_quit callback. */
-#define POLL_QUIT_INTERVAL 0x80000
+enum { POLL_QUIT_INTERVAL = 0x80000 };
#define LOW_BYTE(x) ((x) & 0xff)
#define HIGH_BYTE(x) (((x) >> 8) & 0xff)
-#define P(X,Y) ((X << 8) | Y)
-
-#define BUILDSR() \
- cpu.ccr = ((I << 7) | (UI << 6) | (H << 5) | (U << 4) \
- | (N << 3) | (Z << 2) | (V << 1) | C);
-
-#define BUILDEXR() \
- if (h8300smode) cpu.exr = (trace<<7) | intMask;
-
-#define GETSR() \
- c = (cpu.ccr >> 0) & 1;\
- v = (cpu.ccr >> 1) & 1;\
- nz = !((cpu.ccr >> 2) & 1);\
- n = (cpu.ccr >> 3) & 1;\
- u = (cpu.ccr >> 4) & 1;\
- h = (cpu.ccr >> 5) & 1;\
- ui = ((cpu.ccr >> 6) & 1);\
- intMaskBit = (cpu.ccr >> 7) & 1;
-
-#define GETEXR() \
- if (h8300smode) \
- { \
- trace = (cpu.exr >> 7) & 1; \
- intMask = cpu.exr & 7; \
- }
+#define P(X, Y) ((X << 8) | Y)
+
+#define C (c != 0)
+#define Z (nz == 0)
+#define V (v != 0)
+#define N (n != 0)
+#define U (u != 0)
+#define H (h != 0)
+#define UI (ui != 0)
+#define I (intMaskBit != 0)
+
+#define BUILDSR(SD) \
+ h8_set_ccr (SD, (I << 7) | (UI << 6) | (H << 5) | (U << 4) \
+ | (N << 3) | (Z << 2) | (V << 1) | C)
#ifdef __CHAR_IS_SIGNED__
#define SEXTCHAR(x) ((char) (x))
@@ -121,17 +496,16 @@ void sim_set_simcache_size PARAMS ((int));
#define UEXTSHORT(x) ((x) & 0xffff)
#define SEXTSHORT(x) ((short) (x))
-static cpu_state_type cpu;
-
-int h8300hmode = 0;
-int h8300smode = 0;
+int h8300hmode = 0;
+int h8300smode = 0;
+int h8300sxmode = 0;
static int memory_size;
static int
get_now (void)
{
- return time (0); /* WinXX HAS UNIX like 'time', so why not using it? */
+ return time (0); /* WinXX HAS UNIX like 'time', so why not use it? */
}
static int
@@ -148,32 +522,42 @@ bitfrom (int x)
case L_8:
return SB;
case L_16:
+ case L_16U:
return SW;
case L_32:
return SL;
case L_P:
return h8300hmode ? SL : SW;
}
+ return 0;
}
+/* Simulate an indirection / dereference.
+ return 0 for success, -1 for failure.
+*/
+
static unsigned int
-lvalue (int x, int rn)
+lvalue (SIM_DESC sd, int x, int rn, unsigned int *val)
{
+ if (val == NULL) /* Paranoia. */
+ return -1;
+
switch (x / 4)
{
case OP_DISP:
- if (rn == 8)
- {
- return X (OP_IMM, SP);
- }
- return X (OP_REG, SP);
-
+ if (rn == ZERO_REGNUM)
+ *val = X (OP_IMM, SP);
+ else
+ *val = X (OP_REG, SP);
+ break;
case OP_MEM:
- return X (OP_MEM, SP);
-
+ *val = X (OP_MEM, SP);
+ break;
default:
- abort (); /* ?? May be something more usefull? */
+ sim_engine_set_run_state (sd, sim_stopped, SIGSEGV);
+ return -1;
}
+ return 0;
}
static int
@@ -187,17 +571,14 @@ cmdline_location()
return 0xff00L;
}
-static unsigned int
-decode (int addr, unsigned char *data, decoded_inst *dst)
+static void
+decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
{
- int rs = 0;
- int rd = 0;
- int rdisp = 0;
- int abs = 0;
- int bit = 0;
- int plen = 0;
- struct h8_opcode *q;
- int size = 0;
+ int cst[3] = {0, 0, 0};
+ int reg[3] = {0, 0, 0};
+ int rdisp[3] = {0, 0, 0};
+ int opnum;
+ const struct h8_opcode *q;
dst->dst.type = -1;
dst->src.type = -1;
@@ -208,12 +589,18 @@ decode (int addr, unsigned char *data, decoded_inst *dst)
op_type *nib = q->data.nib;
unsigned int len = 0;
+ if ((q->available == AV_H8SX && !h8300sxmode) ||
+ (q->available == AV_H8H && !h8300hmode))
+ continue;
+
while (1)
{
op_type looking_for = *nib;
- int thisnib = data[len >> 1];
+ int thisnib = data[len / 2];
thisnib = (len & 1) ? (thisnib & 0xf) : ((thisnib >> 4) & 0xf);
+ opnum = ((looking_for & OP3) ? 2 :
+ (looking_for & DST) ? 1 : 0);
if (looking_for < 16 && looking_for >= 0)
{
@@ -222,24 +609,81 @@ decode (int addr, unsigned char *data, decoded_inst *dst)
}
else
{
- if ((int) looking_for & (int) B31)
+ if (looking_for & B31)
{
- if (!(((int) thisnib & 0x8) != 0))
+ if (!((thisnib & 0x8) != 0))
goto fail;
- looking_for = (op_type) ((int) looking_for & ~(int) B31);
+ looking_for = (op_type) (looking_for & ~B31);
thisnib &= 0x7;
}
+ else if (looking_for & B30)
+ {
+ if (!((thisnib & 0x8) == 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B30);
+ }
+
+ if (looking_for & B21)
+ {
+ if (!((thisnib & 0x4) != 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B21);
+ thisnib &= 0xb;
+ }
+ else if (looking_for & B20)
+ {
+ if (!((thisnib & 0x4) == 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B20);
+ }
+
+ if (looking_for & B11)
+ {
+ if (!((thisnib & 0x2) != 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B11);
+ thisnib &= 0xd;
+ }
+ else if (looking_for & B10)
+ {
+ if (!((thisnib & 0x2) == 0))
+ goto fail;
+
+ looking_for = (op_type) (looking_for & ~B10);
+ }
- if ((int) looking_for & (int) B30)
+ if (looking_for & B01)
{
- if (!(((int) thisnib & 0x8) == 0))
+ if (!((thisnib & 0x1) != 0))
goto fail;
- looking_for = (op_type) ((int) looking_for & ~(int) B30);
+ looking_for = (op_type) (looking_for & ~B01);
+ thisnib &= 0xe;
}
+ else if (looking_for & B00)
+ {
+ if (!((thisnib & 0x1) == 0))
+ goto fail;
- if (looking_for & DBIT)
+ looking_for = (op_type) (looking_for & ~B00);
+ }
+
+ if (looking_for & IGNORE)
+ {
+ /* Hitachi has declared that IGNORE must be zero. */
+ if (thisnib != 0)
+ goto fail;
+ }
+ else if ((looking_for & MODE) == DATA)
+ {
+ ; /* Skip embedded data. */
+ }
+ else if ((looking_for & MODE) == DBIT)
{
/* Exclude adds/subs by looking at bit 0 and 2, and
make sure the operand size, either w or l,
@@ -247,223 +691,438 @@ decode (int addr, unsigned char *data, decoded_inst *dst)
if ((looking_for & 7) != (thisnib & 7))
goto fail;
- abs = (thisnib & 0x8) ? 2 : 1;
+ cst[opnum] = (thisnib & 0x8) ? 2 : 1;
}
- else if (looking_for & (REG | IND | INC | DEC))
+ else if ((looking_for & MODE) == REG ||
+ (looking_for & MODE) == LOWREG ||
+ (looking_for & MODE) == IND ||
+ (looking_for & MODE) == PREINC ||
+ (looking_for & MODE) == POSTINC ||
+ (looking_for & MODE) == PREDEC ||
+ (looking_for & MODE) == POSTDEC)
{
- if (looking_for & REG)
+ reg[opnum] = thisnib;
+ }
+ else if (looking_for & CTRL)
+ {
+ thisnib &= 7;
+ if (((looking_for & MODE) == CCR && (thisnib != C_CCR)) ||
+ ((looking_for & MODE) == EXR && (thisnib != C_EXR)) ||
+ ((looking_for & MODE) == MACH && (thisnib != C_MACH)) ||
+ ((looking_for & MODE) == MACL && (thisnib != C_MACL)) ||
+ ((looking_for & MODE) == VBR && (thisnib != C_VBR)) ||
+ ((looking_for & MODE) == SBR && (thisnib != C_SBR)))
+ goto fail;
+ if (((looking_for & MODE) == CCR_EXR &&
+ (thisnib != C_CCR && thisnib != C_EXR)) ||
+ ((looking_for & MODE) == VBR_SBR &&
+ (thisnib != C_VBR && thisnib != C_SBR)) ||
+ ((looking_for & MODE) == MACREG &&
+ (thisnib != C_MACH && thisnib != C_MACL)))
+ goto fail;
+ if (((looking_for & MODE) == CC_EX_VB_SB &&
+ (thisnib != C_CCR && thisnib != C_EXR &&
+ thisnib != C_VBR && thisnib != C_SBR)))
+ goto fail;
+
+ reg[opnum] = thisnib;
+ }
+ else if ((looking_for & MODE) == ABS)
+ {
+ /* Absolute addresses are unsigned. */
+ switch (looking_for & SIZE)
{
- /* Can work out size from the register. */
- size = bitfrom (looking_for);
+ case L_8:
+ cst[opnum] = UEXTCHAR (data[len / 2]);
+ break;
+ case L_16:
+ case L_16U:
+ cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
+ break;
+ case L_32:
+ cst[opnum] =
+ (data[len / 2 + 0] << 24) +
+ (data[len / 2 + 1] << 16) +
+ (data[len / 2 + 2] << 8) +
+ (data[len / 2 + 3]);
+ break;
+ default:
+ printf ("decode: bad size ABS: %d\n",
+ (looking_for & SIZE));
+ goto end;
}
- if (looking_for & SRC)
- rs = thisnib;
- else
- rd = thisnib;
}
- else if (looking_for & L_16)
+ else if ((looking_for & MODE) == DISP ||
+ (looking_for & MODE) == PCREL ||
+ (looking_for & MODE) == INDEXB ||
+ (looking_for & MODE) == INDEXW ||
+ (looking_for & MODE) == INDEXL)
+
{
- abs = (data[len >> 1]) * 256 + data[(len + 2) >> 1];
- plen = 16;
- if (looking_for & (PCREL | DISP))
+ switch (looking_for & SIZE)
{
- abs = (short) (abs);
+ case L_2:
+ cst[opnum] = thisnib & 3;
+
+ /* DISP2 special treatment. */
+ if ((looking_for & MODE) == DISP)
+ {
+ switch (OP_SIZE (q->how)) {
+ default: break;
+ case SW:
+ cst[opnum] *= 2;
+ break;
+ case SL:
+ cst[opnum] *= 4;
+ break;
+ }
+ }
+ break;
+ case L_8:
+ cst[opnum] = SEXTCHAR (data[len / 2]);
+ break;
+ case L_16:
+ cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
+ cst[opnum] = (short) cst[opnum]; /* Sign extend. */
+ break;
+ case L_16U:
+ cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
+ break;
+ case L_32:
+ cst[opnum] =
+ (data[len / 2 + 0] << 24) +
+ (data[len / 2 + 1] << 16) +
+ (data[len / 2 + 2] << 8) +
+ (data[len / 2 + 3]);
+ break;
+ default:
+ printf ("decode: bad size DISP/PCREL/INDEX: %d\n",
+ (looking_for & SIZE));
+ goto end;
}
}
- else if (looking_for & ABSJMP)
+ else if ((looking_for & SIZE) == L_16 ||
+ (looking_for & SIZE) == L_16U)
{
- abs = (data[1] << 16) | (data[2] << 8) | (data[3]);
+ cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
+ if ((looking_for & SIZE) != L_16U)
+ cst[opnum] = (short) cst[opnum]; /* Sign extend. */
}
- else if (looking_for & MEMIND)
+ else if (looking_for & ABSJMP)
{
- abs = data[1];
+ switch (looking_for & SIZE) {
+ case L_24:
+ cst[opnum] = (data[1] << 16) | (data[2] << 8) | (data[3]);
+ break;
+ case L_32:
+ cst[opnum] =
+ (data[len / 2 + 0] << 24) +
+ (data[len / 2 + 1] << 16) +
+ (data[len / 2 + 2] << 8) +
+ (data[len / 2 + 3]);
+ break;
+ default:
+ printf ("decode: bad size ABSJMP: %d\n",
+ (looking_for & SIZE));
+ goto end;
+ }
}
- else if (looking_for & L_32)
+ else if ((looking_for & MODE) == MEMIND)
{
- int i = len >> 1;
-
- abs = (data[i] << 24)
- | (data[i + 1] << 16)
- | (data[i + 2] << 8)
- | (data[i + 3]);
-
- plen = 32;
+ cst[opnum] = data[1];
}
- else if (looking_for & L_24)
+ else if ((looking_for & SIZE) == L_32)
{
- int i = len >> 1;
+ int i = len / 2;
- abs = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);
- plen = 24;
+ cst[opnum] =
+ (data[i + 0] << 24) |
+ (data[i + 1] << 16) |
+ (data[i + 2] << 8) |
+ (data[i + 3]);
}
- else if (looking_for & IGNORE)
+ else if ((looking_for & SIZE) == L_24)
{
- ;
+ int i = len / 2;
+
+ cst[opnum] =
+ (data[i + 0] << 16) |
+ (data[i + 1] << 8) |
+ (data[i + 2]);
}
else if (looking_for & DISPREG)
{
- rdisp = thisnib & 0x7;
+ rdisp[opnum] = thisnib & 0x7;
}
- else if (looking_for & KBIT)
+ else if ((looking_for & MODE) == KBIT)
{
switch (thisnib)
{
case 9:
- abs = 4;
+ cst[opnum] = 4;
break;
case 8:
- abs = 2;
+ cst[opnum] = 2;
break;
case 0:
- abs = 1;
+ cst[opnum] = 1;
break;
default:
goto fail;
}
}
- else if (looking_for & L_8)
+ else if ((looking_for & SIZE) == L_8)
{
- plen = 8;
-
- if (looking_for & PCREL)
+ if ((looking_for & MODE) == ABS)
{
- abs = SEXTCHAR (data[len >> 1]);
- }
- else if (looking_for & ABS8MEM)
- {
- plen = 8;
- abs = h8300hmode ? ~0xff0000ff : ~0xffff00ff;
- abs |= data[len >> 1] & 0xff;
+ /* Will be combined with contents of SBR_REGNUM
+ by fetch (). For all modes except h8sx, this
+ will always contain the value 0xFFFFFF00. */
+ cst[opnum] = data[len / 2] & 0xff;
}
else
{
- abs = data[len >> 1] & 0xff;
+ cst[opnum] = data[len / 2] & 0xff;
}
}
- else if (looking_for & L_3)
+ else if ((looking_for & SIZE) == L_3 ||
+ (looking_for & SIZE) == L_3NZ)
{
- plen = 3;
-
- bit = thisnib;
+ cst[opnum] = thisnib & 7;
+ if (cst[opnum] == 0 && (looking_for & SIZE) == L_3NZ)
+ goto fail;
+ }
+ else if ((looking_for & SIZE) == L_4)
+ {
+ cst[opnum] = thisnib & 15;
+ }
+ else if ((looking_for & SIZE) == L_5)
+ {
+ cst[opnum] = data[len / 2] & 0x1f;
}
else if (looking_for == E)
{
+#ifdef ADEBUG
dst->op = q;
-
+#endif
/* Fill in the args. */
{
op_type *args = q->args.nib;
int hadone = 0;
+ int nargs;
- while (*args != E)
+ for (nargs = 0;
+ nargs < 3 && *args != E;
+ nargs++)
{
int x = *args;
- int rn = (x & DST) ? rd : rs;
ea_type *p;
+ opnum = ((x & OP3) ? 2 :
+ (x & DST) ? 1 : 0);
if (x & DST)
- p = &(dst->dst);
+ p = &dst->dst;
+ else if (x & OP3)
+ p = &dst->op3;
else
- p = &(dst->src);
+ p = &dst->src;
- if (x & L_3)
+ if ((x & MODE) == IMM ||
+ (x & MODE) == KBIT ||
+ (x & MODE) == DBIT)
{
- p->type = X (OP_IMM, size);
- p->literal = bit;
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_IMM, OP_SIZE (q->how));
+ p->literal = cst[opnum];
}
- else if (x & (IMM | KBIT | DBIT))
+ else if ((x & MODE) == CONST_2 ||
+ (x & MODE) == CONST_4 ||
+ (x & MODE) == CONST_8 ||
+ (x & MODE) == CONST_16)
{
- p->type = X (OP_IMM, size);
- p->literal = abs;
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_IMM, OP_SIZE (q->how));
+ switch (x & MODE) {
+ case CONST_2: p->literal = 2; break;
+ case CONST_4: p->literal = 4; break;
+ case CONST_8: p->literal = 8; break;
+ case CONST_16: p->literal = 16; break;
+ }
}
- else if (x & REG)
+ else if ((x & MODE) == REG)
{
- /* Reset the size.
- Some ops (like mul) have two sizes. */
-
- size = bitfrom (x);
- p->type = X (OP_REG, size);
- p->reg = rn;
+ p->type = X (OP_REG, bitfrom (x));
+ p->reg = reg[opnum];
}
- else if (x & INC)
+ else if ((x & MODE) == LOWREG)
{
- p->type = X (OP_INC, size);
- p->reg = rn & 0x7;
+ p->type = X (OP_LOWREG, bitfrom (x));
+ p->reg = reg[opnum];
}
- else if (x & DEC)
+ else if ((x & MODE) == PREINC)
{
- p->type = X (OP_DEC, size);
- p->reg = rn & 0x7;
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_PREINC, OP_SIZE (q->how));
+ p->reg = reg[opnum] & 0x7;
}
- else if (x & IND)
+ else if ((x & MODE) == POSTINC)
{
- p->type = X (OP_DISP, size);
- p->reg = rn & 0x7;
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_POSTINC, OP_SIZE (q->how));
+ p->reg = reg[opnum] & 0x7;
+ }
+ else if ((x & MODE) == PREDEC)
+ {
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_PREDEC, OP_SIZE (q->how));
+ p->reg = reg[opnum] & 0x7;
+ }
+ else if ((x & MODE) == POSTDEC)
+ {
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_POSTDEC, OP_SIZE (q->how));
+ p->reg = reg[opnum] & 0x7;
+ }
+ else if ((x & MODE) == IND)
+ {
+ /* Note: an indirect is transformed into
+ a displacement of zero.
+ */
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_DISP, OP_SIZE (q->how));
+ p->reg = reg[opnum] & 0x7;
p->literal = 0;
+ if (OP_KIND (q->how) == O_JSR ||
+ OP_KIND (q->how) == O_JMP)
+ if (lvalue (sd, p->type, p->reg, &p->type))
+ goto end;
}
- else if (x & (ABS | ABSJMP | ABS8MEM))
+ else if ((x & MODE) == ABS)
{
- p->type = X (OP_DISP, size);
- p->literal = abs;
- p->reg = 8;
+ /* Note: a 16 or 32 bit ABS is transformed into a
+ displacement from pseudo-register ZERO_REGNUM,
+ which is always zero. An 8 bit ABS becomes
+ a displacement from SBR_REGNUM.
+ */
+ /* Use the instruction to determine
+ the operand size. */
+ p->type = X (OP_DISP, OP_SIZE (q->how));
+ p->literal = cst[opnum];
+
+ /* 8-bit ABS is displacement from SBR.
+ 16 and 32-bit ABS are displacement from ZERO.
+ (SBR will always be zero except for h8/sx)
+ */
+ if ((x & SIZE) == L_8)
+ p->reg = SBR_REGNUM;
+ else
+ p->reg = ZERO_REGNUM;;
}
- else if (x & MEMIND)
+ else if ((x & MODE) == MEMIND)
{
- p->type = X (OP_MEM, size);
- p->literal = abs;
+ /* Size doesn't matter. */
+ p->type = X (OP_MEM, SB);
+ p->literal = cst[opnum];
+ if (OP_KIND (q->how) == O_JSR ||
+ OP_KIND (q->how) == O_JMP)
+ if (lvalue (sd, p->type, p->reg, &p->type))
+ goto end;
}
- else if (x & PCREL)
+ else if ((x & MODE) == PCREL)
{
- p->type = X (OP_PCREL, size);
- p->literal = abs + addr + 2;
- if (x & L_16)
- p->literal += 2;
+ /* Size doesn't matter. */
+ p->type = X (OP_PCREL, SB);
+ p->literal = cst[opnum];
}
else if (x & ABSJMP)
{
p->type = X (OP_IMM, SP);
- p->literal = abs;
+ p->literal = cst[opnum];
+ }
+ else if ((x & MODE) == INDEXB ||
+ (x & MODE) == INDEXW ||
+ (x & MODE) == INDEXL ||
+ (x & MODE) == DISP)
+ {
+ /* Use the instruction to determine
+ the operand size. */
+ switch (x & MODE) {
+ case INDEXB:
+ p->type = X (OP_INDEXB, OP_SIZE (q->how));
+ break;
+ case INDEXW:
+ p->type = X (OP_INDEXW, OP_SIZE (q->how));
+ break;
+ case INDEXL:
+ p->type = X (OP_INDEXL, OP_SIZE (q->how));
+ break;
+ case DISP:
+ p->type = X (OP_DISP, OP_SIZE (q->how));
+ break;
+ }
+
+ p->literal = cst[opnum];
+ p->reg = rdisp[opnum];
}
- else if (x & DISP)
+ else if (x & CTRL)
{
- p->type = X (OP_DISP, size);
- p->literal = abs;
- p->reg = rdisp & 0x7;
+ switch (reg[opnum])
+ {
+ case C_CCR:
+ p->type = X (OP_CCR, SB);
+ break;
+ case C_EXR:
+ p->type = X (OP_EXR, SB);
+ break;
+ case C_MACH:
+ p->type = X (OP_MACH, SL);
+ break;
+ case C_MACL:
+ p->type = X (OP_MACL, SL);
+ break;
+ case C_VBR:
+ p->type = X (OP_VBR, SL);
+ break;
+ case C_SBR:
+ p->type = X (OP_SBR, SL);
+ break;
+ }
}
- else if (x & CCR)
+ else if ((x & MODE) == CCR)
{
p->type = OP_CCR;
}
- else if (x & EXR)
+ else if ((x & MODE) == EXR)
{
p->type = OP_EXR;
}
else
- printf ("Hmmmm %x", x);
+ printf ("Hmmmm %x...\n", x);
args++;
}
}
- /* But a jmp or a jsr gets automagically lvalued,
- since we branch to their address not their
- contents. */
- if (q->how == O (O_JSR, SB)
- || q->how == O (O_JMP, SB))
- {
- dst->src.type = lvalue (dst->src.type, dst->src.reg);
- }
-
+ /* Unary operators: treat src and dst as equivalent. */
if (dst->dst.type == -1)
dst->dst = dst->src;
+ if (dst->src.type == -1)
+ dst->src = dst->dst;
dst->opcode = q->how;
dst->cycles = q->time;
- /* And a jsr to these locations are turned into magic
- traps. */
+ /* And jsr's to these locations are turned into
+ magic traps. */
- if (dst->opcode == O (O_JSR, SB))
+ if (OP_KIND (dst->opcode) == O_JSR)
{
switch (dst->src.literal)
{
@@ -509,165 +1168,344 @@ decode (int addr, unsigned char *data, decoded_inst *dst)
fail:
;
}
-
+ end:
/* Fell off the end. */
dst->opcode = O (O_ILL, SB);
}
static void
-compile (int pc)
+compile (SIM_DESC sd, int pc)
{
int idx;
/* Find the next cache entry to use. */
- idx = cpu.cache_top + 1;
- cpu.compiles++;
- if (idx >= cpu.csize)
+ idx = h8_get_cache_top (sd) + 1;
+ h8_increment_compiles (sd);
+ if (idx >= sd->sim_cache_size)
{
idx = 1;
}
- cpu.cache_top = idx;
+ h8_set_cache_top (sd, idx);
/* Throw away its old meaning. */
- cpu.cache_idx[cpu.cache[idx].oldpc] = 0;
+ h8_set_cache_idx (sd, sd->sim_cache[idx].oldpc, 0);
/* Set to new address. */
- cpu.cache[idx].oldpc = pc;
+ sd->sim_cache[idx].oldpc = pc;
/* Fill in instruction info. */
- decode (pc, cpu.memory + pc, cpu.cache + idx);
+ decode (sd, pc, h8_get_memory_buf (sd) + pc, sd->sim_cache + idx);
/* Point to new cache entry. */
- cpu.cache_idx[pc] = idx;
+ h8_set_cache_idx (sd, pc, idx);
}
-static unsigned char *breg[18];
-static unsigned short *wreg[18];
-static unsigned int *lreg[18];
-
-#define GET_B_REG(x) *(breg[x])
-#define SET_B_REG(x,y) (*(breg[x])) = (y)
-#define GET_W_REG(x) *(wreg[x])
-#define SET_W_REG(x,y) (*(wreg[x])) = (y)
-
-#define GET_L_REG(x) *(lreg[x])
-#define SET_L_REG(x,y) (*(lreg[x])) = (y)
-
-#define GET_MEMORY_L(x) \
- (x < memory_size \
- ? ((cpu.memory[x+0] << 24) | (cpu.memory[x+1] << 16) \
- | (cpu.memory[x+2] << 8) | cpu.memory[x+3]) \
- : ((cpu.eightbit[(x+0) & 0xff] << 24) | (cpu.eightbit[(x+1) & 0xff] << 16) \
- | (cpu.eightbit[(x+2) & 0xff] << 8) | cpu.eightbit[(x+3) & 0xff]))
-
-#define GET_MEMORY_W(x) \
- (x < memory_size \
- ? ((cpu.memory[x+0] << 8) | (cpu.memory[x+1] << 0)) \
- : ((cpu.eightbit[(x+0) & 0xff] << 8) | (cpu.eightbit[(x+1) & 0xff] << 0)))
-
-
-#define GET_MEMORY_B(x) \
- (x < memory_size ? (cpu.memory[x]) : (cpu.eightbit[x & 0xff]))
+static unsigned char *breg[32];
+static unsigned short *wreg[16];
+static unsigned int *lreg[18];
+
+#define GET_B_REG(X) *(breg[X])
+#define SET_B_REG(X, Y) (*(breg[X])) = (Y)
+#define GET_W_REG(X) *(wreg[X])
+#define SET_W_REG(X, Y) (*(wreg[X])) = (Y)
+#define GET_L_REG(X) h8_get_reg (sd, X)
+#define SET_L_REG(X, Y) h8_set_reg (sd, X, Y)
+
+#define GET_MEMORY_L(X) \
+ ((X) < memory_size \
+ ? ((h8_get_memory (sd, (X)+0) << 24) | (h8_get_memory (sd, (X)+1) << 16) \
+ | (h8_get_memory (sd, (X)+2) << 8) | (h8_get_memory (sd, (X)+3) << 0)) \
+ : ((h8_get_eightbit (sd, ((X)+0) & 0xff) << 24) \
+ | (h8_get_eightbit (sd, ((X)+1) & 0xff) << 16) \
+ | (h8_get_eightbit (sd, ((X)+2) & 0xff) << 8) \
+ | (h8_get_eightbit (sd, ((X)+3) & 0xff) << 0)))
+
+#define GET_MEMORY_W(X) \
+ ((X) < memory_size \
+ ? ((h8_get_memory (sd, (X)+0) << 8) \
+ | (h8_get_memory (sd, (X)+1) << 0)) \
+ : ((h8_get_eightbit (sd, ((X)+0) & 0xff) << 8) \
+ | (h8_get_eightbit (sd, ((X)+1) & 0xff) << 0)))
+
+
+#define GET_MEMORY_B(X) \
+ ((X) < memory_size ? (h8_get_memory (sd, (X))) \
+ : (h8_get_eightbit (sd, (X) & 0xff)))
+
+#define SET_MEMORY_L(X, Y) \
+{ register unsigned char *_p; register int __y = (Y); \
+ _p = ((X) < memory_size ? h8_get_memory_buf (sd) + (X) : \
+ h8_get_eightbit_buf (sd) + ((X) & 0xff)); \
+ _p[0] = __y >> 24; _p[1] = __y >> 16; \
+ _p[2] = __y >> 8; _p[3] = __y >> 0; \
+}
-#define SET_MEMORY_L(x,y) \
-{ register unsigned char *_p; register int __y = y; \
- _p = (x < memory_size ? cpu.memory+x : cpu.eightbit + (x & 0xff)); \
- _p[0] = (__y)>>24; _p[1] = (__y)>>16; \
- _p[2] = (__y)>>8; _p[3] = (__y)>>0;}
+#define SET_MEMORY_W(X, Y) \
+{ register unsigned char *_p; register int __y = (Y); \
+ _p = ((X) < memory_size ? h8_get_memory_buf (sd) + (X) : \
+ h8_get_eightbit_buf (sd) + ((X) & 0xff)); \
+ _p[0] = __y >> 8; _p[1] = __y; \
+}
-#define SET_MEMORY_W(x,y) \
-{ register unsigned char *_p; register int __y = y; \
- _p = (x < memory_size ? cpu.memory+x : cpu.eightbit + (x & 0xff)); \
- _p[0] = (__y)>>8; _p[1] =(__y);}
+#define SET_MEMORY_B(X, Y) \
+ ((X) < memory_size ? (h8_set_memory (sd, (X), (Y))) \
+ : (h8_set_eightbit (sd, (X) & 0xff, (Y))))
-#define SET_MEMORY_B(x,y) \
- (x < memory_size ? (cpu.memory[(x)] = y) : (cpu.eightbit[x & 0xff] = y))
+/* Simulate a memory fetch.
+ Return 0 for success, -1 for failure.
+*/
static int
-fetch (ea_type *arg)
+fetch_1 (SIM_DESC sd, ea_type *arg, int *val, int twice)
{
int rn = arg->reg;
int abs = arg->literal;
int r;
int t;
+ if (val == NULL)
+ return -1; /* Paranoia. */
+
switch (arg->type)
{
- case X (OP_REG, SB):
- return GET_B_REG (rn);
- case X (OP_REG, SW):
- return GET_W_REG (rn);
- case X (OP_REG, SL):
- return GET_L_REG (rn);
- case X (OP_IMM, SB):
- case X (OP_IMM, SW):
- case X (OP_IMM, SL):
- return abs;
- case X (OP_DEC, SB):
- abort ();
-
- case X (OP_INC, SB):
+ /* Indexed register plus displacement mode:
+
+ This new family of addressing modes are similar to OP_DISP
+ (register plus displacement), with two differences:
+ 1) INDEXB uses only the least significant byte of the register,
+ INDEXW uses only the least significant word, and
+ INDEXL uses the entire register (just like OP_DISP).
+ and
+ 2) The displacement value in abs is multiplied by two
+ for SW-sized operations, and by four for SL-size.
+
+ This gives nine possible variations.
+ */
+
+ case X (OP_INDEXB, SB):
+ case X (OP_INDEXB, SW):
+ case X (OP_INDEXB, SL):
+ case X (OP_INDEXW, SB):
+ case X (OP_INDEXW, SW):
+ case X (OP_INDEXW, SL):
+ case X (OP_INDEXL, SB):
+ case X (OP_INDEXL, SW):
+ case X (OP_INDEXL, SL):
+ t = GET_L_REG (rn);
+ switch (OP_KIND (arg->type)) {
+ case OP_INDEXB: t &= 0xff; break;
+ case OP_INDEXW: t &= 0xffff; break;
+ case OP_INDEXL:
+ default: break;
+ }
+ switch (OP_SIZE (arg->type)) {
+ case SB:
+ *val = GET_MEMORY_B ((t * 1 + abs) & h8_get_mask (sd));
+ break;
+ case SW:
+ *val = GET_MEMORY_W ((t * 2 + abs) & h8_get_mask (sd));
+ break;
+ case SL:
+ *val = GET_MEMORY_L ((t * 4 + abs) & h8_get_mask (sd));
+ break;
+ }
+ break;
+
+ case X (OP_LOWREG, SB):
+ *val = GET_L_REG (rn) & 0xff;
+ break;
+ case X (OP_LOWREG, SW):
+ *val = GET_L_REG (rn) & 0xffff;
+ break;
+
+ case X (OP_REG, SB): /* Register direct, byte. */
+ *val = GET_B_REG (rn);
+ break;
+ case X (OP_REG, SW): /* Register direct, word. */
+ *val = GET_W_REG (rn);
+ break;
+ case X (OP_REG, SL): /* Register direct, long. */
+ *val = GET_L_REG (rn);
+ break;
+ case X (OP_IMM, SB): /* Immediate, byte. */
+ case X (OP_IMM, SW): /* Immediate, word. */
+ case X (OP_IMM, SL): /* Immediate, long. */
+ *val = abs;
+ break;
+ case X (OP_POSTINC, SB): /* Register indirect w/post-incr: byte. */
+ t = GET_L_REG (rn);
+ t &= h8_get_mask (sd);
+ r = GET_MEMORY_B (t);
+ if (!twice)
+ t += 1;
+ t = t & h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = r;
+ break;
+ case X (OP_POSTINC, SW): /* Register indirect w/post-incr: word. */
+ t = GET_L_REG (rn);
+ t &= h8_get_mask (sd);
+ r = GET_MEMORY_W (t);
+ if (!twice)
+ t += 2;
+ t = t & h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = r;
+ break;
+ case X (OP_POSTINC, SL): /* Register indirect w/post-incr: long. */
+ t = GET_L_REG (rn);
+ t &= h8_get_mask (sd);
+ r = GET_MEMORY_L (t);
+ if (!twice)
+ t += 4;
+ t = t & h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = r;
+ break;
+
+ case X (OP_POSTDEC, SB): /* Register indirect w/post-decr: byte. */
t = GET_L_REG (rn);
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
r = GET_MEMORY_B (t);
- t++;
- t = t & cpu.mask;
+ if (!twice)
+ t -= 1;
+ t = t & h8_get_mask (sd);
SET_L_REG (rn, t);
- return r;
+ *val = r;
break;
- case X (OP_INC, SW):
+ case X (OP_POSTDEC, SW): /* Register indirect w/post-decr: word. */
t = GET_L_REG (rn);
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
r = GET_MEMORY_W (t);
- t += 2;
- t = t & cpu.mask;
+ if (!twice)
+ t -= 2;
+ t = t & h8_get_mask (sd);
SET_L_REG (rn, t);
- return r;
- case X (OP_INC, SL):
+ *val = r;
+ break;
+ case X (OP_POSTDEC, SL): /* Register indirect w/post-decr: long. */
t = GET_L_REG (rn);
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
r = GET_MEMORY_L (t);
+ if (!twice)
+ t -= 4;
+ t = t & h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = r;
+ break;
+
+ case X (OP_PREDEC, SB): /* Register indirect w/pre-decr: byte. */
+ t = GET_L_REG (rn) - 1;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = GET_MEMORY_B (t);
+ break;
+
+ case X (OP_PREDEC, SW): /* Register indirect w/pre-decr: word. */
+ t = GET_L_REG (rn) - 2;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = GET_MEMORY_W (t);
+ break;
+
+ case X (OP_PREDEC, SL): /* Register indirect w/pre-decr: long. */
+ t = GET_L_REG (rn) - 4;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = GET_MEMORY_L (t);
+ break;
+
+ case X (OP_PREINC, SB): /* Register indirect w/pre-incr: byte. */
+ t = GET_L_REG (rn) + 1;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = GET_MEMORY_B (t);
+ break;
- t += 4;
- t = t & cpu.mask;
+ case X (OP_PREINC, SW): /* Register indirect w/pre-incr: long. */
+ t = GET_L_REG (rn) + 2;
+ t &= h8_get_mask (sd);
SET_L_REG (rn, t);
- return r;
+ *val = GET_MEMORY_W (t);
+ break;
- case X (OP_DISP, SB):
+ case X (OP_PREINC, SL): /* Register indirect w/pre-incr: long. */
+ t = GET_L_REG (rn) + 4;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ *val = GET_MEMORY_L (t);
+ break;
+
+ case X (OP_DISP, SB): /* Register indirect w/displacement: byte. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
- return GET_MEMORY_B (t);
+ t &= h8_get_mask (sd);
+ *val = GET_MEMORY_B (t);
+ break;
- case X (OP_DISP, SW):
+ case X (OP_DISP, SW): /* Register indirect w/displacement: word. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
- return GET_MEMORY_W (t);
+ t &= h8_get_mask (sd);
+ *val = GET_MEMORY_W (t);
+ break;
- case X (OP_DISP, SL):
+ case X (OP_DISP, SL): /* Register indirect w/displacement: long. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
- return GET_MEMORY_L (t);
+ t &= h8_get_mask (sd);
+ *val =GET_MEMORY_L (t);
+ break;
- case X (OP_MEM, SL):
+ case X (OP_MEM, SL): /* Absolute memory address, long. */
t = GET_MEMORY_L (abs);
- t &= cpu.mask;
- return t;
+ t &= h8_get_mask (sd);
+ *val = t;
+ break;
- case X (OP_MEM, SW):
+ case X (OP_MEM, SW): /* Absolute memory address, word. */
t = GET_MEMORY_W (abs);
- t &= cpu.mask;
- return t;
+ t &= h8_get_mask (sd);
+ *val = t;
+ break;
- default:
- abort (); /* ?? May be something more usefull? */
+ case X (OP_PCREL, SB): /* PC relative (for jump, branch etc). */
+ case X (OP_PCREL, SW):
+ case X (OP_PCREL, SL):
+ case X (OP_PCREL, SN):
+ *val = abs;
+ break;
+ case X (OP_MEM, SB): /* Why isn't this implemented? */
+ default:
+ sim_engine_set_run_state (sd, sim_stopped, SIGSEGV);
+ return -1;
}
+ return 0; /* Success. */
}
+/* Normal fetch. */
-static void
-store (ea_type *arg, int n)
+static int
+fetch (SIM_DESC sd, ea_type *arg, int *val)
+{
+ return fetch_1 (sd, arg, val, 0);
+}
+
+/* Fetch which will be followed by a store to the same location.
+ The difference being that we don't want to do a post-increment
+ or post-decrement at this time: we'll do it when we store. */
+
+static int
+fetch2 (SIM_DESC sd, ea_type *arg, int *val)
+{
+ return fetch_1 (sd, arg, val, 1);
+}
+
+/* Simulate a memory store.
+ Return 0 for success, -1 for failure.
+*/
+
+static int
+store_1 (SIM_DESC sd, ea_type *arg, int n, int twice)
{
int rn = arg->reg;
int abs = arg->literal;
@@ -675,57 +1513,195 @@ store (ea_type *arg, int n)
switch (arg->type)
{
- case X (OP_REG, SB):
+ /* Indexed register plus displacement mode:
+
+ This new family of addressing modes are similar to OP_DISP
+ (register plus displacement), with two differences:
+ 1) INDEXB uses only the least significant byte of the register,
+ INDEXW uses only the least significant word, and
+ INDEXL uses the entire register (just like OP_DISP).
+ and
+ 2) The displacement value in abs is multiplied by two
+ for SW-sized operations, and by four for SL-size.
+
+ This gives nine possible variations.
+ */
+
+ case X (OP_INDEXB, SB):
+ case X (OP_INDEXB, SW):
+ case X (OP_INDEXB, SL):
+ case X (OP_INDEXW, SB):
+ case X (OP_INDEXW, SW):
+ case X (OP_INDEXW, SL):
+ case X (OP_INDEXL, SB):
+ case X (OP_INDEXL, SW):
+ case X (OP_INDEXL, SL):
+ t = GET_L_REG (rn);
+ switch (OP_KIND (arg->type)) {
+ case OP_INDEXB: t &= 0xff; break;
+ case OP_INDEXW: t &= 0xffff; break;
+ case OP_INDEXL:
+ default: break;
+ }
+ switch (OP_SIZE (arg->type)) {
+ case SB:
+ SET_MEMORY_B ((t * 1 + abs) & h8_get_mask (sd), n);
+ break;
+ case SW:
+ SET_MEMORY_W ((t * 2 + abs) & h8_get_mask (sd), n);
+ break;
+ case SL:
+ SET_MEMORY_L ((t * 4 + abs) & h8_get_mask (sd), n);
+ break;
+ }
+ break;
+
+ case X (OP_REG, SB): /* Register direct, byte. */
SET_B_REG (rn, n);
break;
- case X (OP_REG, SW):
+ case X (OP_REG, SW): /* Register direct, word. */
SET_W_REG (rn, n);
break;
- case X (OP_REG, SL):
+ case X (OP_REG, SL): /* Register direct, long. */
SET_L_REG (rn, n);
break;
- case X (OP_DEC, SB):
- t = GET_L_REG (rn) - 1;
- t &= cpu.mask;
+ case X (OP_PREDEC, SB): /* Register indirect w/pre-decr, byte. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t -= 1;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ SET_MEMORY_B (t, n);
+
+ break;
+ case X (OP_PREDEC, SW): /* Register indirect w/pre-decr, word. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t -= 2;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ SET_MEMORY_W (t, n);
+ break;
+
+ case X (OP_PREDEC, SL): /* Register indirect w/pre-decr, long. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t -= 4;
+ t &= h8_get_mask (sd);
+ SET_L_REG (rn, t);
+ SET_MEMORY_L (t, n);
+ break;
+
+ case X (OP_PREINC, SB): /* Register indirect w/pre-incr, byte. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t += 1;
+ t &= h8_get_mask (sd);
SET_L_REG (rn, t);
SET_MEMORY_B (t, n);
break;
- case X (OP_DEC, SW):
- t = (GET_L_REG (rn) - 2) & cpu.mask;
+ case X (OP_PREINC, SW): /* Register indirect w/pre-incr, word. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t += 2;
+ t &= h8_get_mask (sd);
SET_L_REG (rn, t);
SET_MEMORY_W (t, n);
break;
- case X (OP_DEC, SL):
- t = (GET_L_REG (rn) - 4) & cpu.mask;
+ case X (OP_PREINC, SL): /* Register indirect w/pre-incr, long. */
+ t = GET_L_REG (rn);
+ if (!twice)
+ t += 4;
+ t &= h8_get_mask (sd);
SET_L_REG (rn, t);
SET_MEMORY_L (t, n);
break;
- case X (OP_DISP, SB):
+ case X (OP_POSTDEC, SB): /* Register indirect w/post-decr, byte. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_B (t, n);
+ SET_L_REG (rn, t - 1);
+ break;
+
+ case X (OP_POSTDEC, SW): /* Register indirect w/post-decr, word. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_W (t, n);
+ SET_L_REG (rn, t - 2);
+ break;
+
+ case X (OP_POSTDEC, SL): /* Register indirect w/post-decr, long. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_L (t, n);
+ SET_L_REG (rn, t - 4);
+ break;
+
+ case X (OP_POSTINC, SB): /* Register indirect w/post-incr, byte. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_B (t, n);
+ SET_L_REG (rn, t + 1);
+ break;
+
+ case X (OP_POSTINC, SW): /* Register indirect w/post-incr, word. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_W (t, n);
+ SET_L_REG (rn, t + 2);
+ break;
+
+ case X (OP_POSTINC, SL): /* Register indirect w/post-incr, long. */
+ t = GET_L_REG (rn) & h8_get_mask (sd);
+ SET_MEMORY_L (t, n);
+ SET_L_REG (rn, t + 4);
+ break;
+
+ case X (OP_DISP, SB): /* Register indirect w/displacement, byte. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
SET_MEMORY_B (t, n);
break;
- case X (OP_DISP, SW):
+ case X (OP_DISP, SW): /* Register indirect w/displacement, word. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
SET_MEMORY_W (t, n);
break;
- case X (OP_DISP, SL):
+ case X (OP_DISP, SL): /* Register indirect w/displacement, long. */
t = GET_L_REG (rn) + abs;
- t &= cpu.mask;
+ t &= h8_get_mask (sd);
SET_MEMORY_L (t, n);
break;
+
+
+ case X (OP_MEM, SB): /* Why isn't this implemented? */
+ case X (OP_MEM, SW): /* Why isn't this implemented? */
+ case X (OP_MEM, SL): /* Why isn't this implemented? */
default:
- abort ();
+ sim_engine_set_run_state (sd, sim_stopped, SIGSEGV);
+ return -1;
}
+ return 0;
}
+/* Normal store. */
+
+static int
+store (SIM_DESC sd, ea_type *arg, int n)
+{
+ return store_1 (sd, arg, n, 0);
+}
+
+/* Store which follows a fetch from the same location.
+ The difference being that we don't want to do a pre-increment
+ or pre-decrement at this time: it was already done when we fetched. */
+
+static int
+store2 (SIM_DESC sd, ea_type *arg, int n)
+{
+ return store_1 (sd, arg, n, 1);
+}
static union
{
@@ -736,20 +1712,18 @@ static union
char high;
}
u;
-}
+} littleendian;
-littleendian;
+/* Flag to be set whenever a new SIM_DESC object is created. */
+static int init_pointers_needed = 1;
static void
-init_pointers (void)
+init_pointers (SIM_DESC sd)
{
- static int init;
-
- if (!init)
+ if (init_pointers_needed)
{
int i;
- init = 1;
littleendian.i = 1;
if (h8300smode)
@@ -758,39 +1732,55 @@ init_pointers (void)
memory_size = H8300H_MSIZE;
else
memory_size = H8300_MSIZE;
- cpu.memory = (unsigned char *) calloc (sizeof (char), memory_size);
- cpu.cache_idx = (unsigned short *) calloc (sizeof (short), memory_size);
- cpu.eightbit = (unsigned char *) calloc (sizeof (char), 256);
-
/* `msize' must be a power of two. */
if ((memory_size & (memory_size - 1)) != 0)
- abort ();
- cpu.mask = memory_size - 1;
-
- for (i = 0; i < 9; i++)
{
- cpu.regs[i] = 0;
+ (*sim_callback->printf_filtered)
+ (sim_callback,
+ "init_pointers: bad memory size %d, defaulting to %d.\n",
+ memory_size, memory_size = H8300S_MSIZE);
}
+ if (h8_get_memory_buf (sd))
+ free (h8_get_memory_buf (sd));
+ if (h8_get_cache_idx_buf (sd))
+ free (h8_get_cache_idx_buf (sd));
+ if (h8_get_eightbit_buf (sd))
+ free (h8_get_eightbit_buf (sd));
+
+ h8_set_memory_buf (sd, (unsigned char *)
+ calloc (sizeof (char), memory_size));
+ h8_set_cache_idx_buf (sd, (unsigned short *)
+ calloc (sizeof (short), memory_size));
+ sd->memory_size = memory_size;
+ h8_set_eightbit_buf (sd, (unsigned char *) calloc (sizeof (char), 256));
+
+ h8_set_mask (sd, memory_size - 1);
+
+ memset (h8_get_reg_buf (sd), 0, sizeof (((STATE_CPU (sd, 0))->regs)));
+
for (i = 0; i < 8; i++)
{
- unsigned char *p = (unsigned char *) (cpu.regs + i);
- unsigned char *e = (unsigned char *) (cpu.regs + i + 1);
- unsigned short *q = (unsigned short *) (cpu.regs + i);
- unsigned short *u = (unsigned short *) (cpu.regs + i + 1);
- cpu.regs[i] = 0x00112233;
+ /* FIXME: rewrite using local buffer. */
+ unsigned char *p = (unsigned char *) (h8_get_reg_buf (sd) + i);
+ unsigned char *e = (unsigned char *) (h8_get_reg_buf (sd) + i + 1);
+ unsigned short *q = (unsigned short *) (h8_get_reg_buf (sd) + i);
+ unsigned short *u = (unsigned short *) (h8_get_reg_buf (sd) + i + 1);
+ h8_set_reg (sd, i, 0x00112233);
+
while (p < e)
{
if (*p == 0x22)
- {
breg[i] = p;
- }
if (*p == 0x33)
- {
breg[i + 8] = p;
- }
+ if (*p == 0x11)
+ breg[i + 16] = p;
+ if (*p == 0x00)
+ breg[i + 24] = p;
p++;
}
+
wreg[i] = wreg[i + 8] = 0;
while (q < u)
{
@@ -804,196 +1794,60 @@ init_pointers (void)
}
q++;
}
+
if (wreg[i] == 0 || wreg[i + 8] == 0)
- abort ();
- cpu.regs[i] = 0;
- lreg[i] = &cpu.regs[i];
+ (*sim_callback->printf_filtered) (sim_callback,
+ "init_pointers: internal error.\n");
+
+ h8_set_reg (sd, i, 0);
+ lreg[i] = h8_get_reg_buf (sd) + i;
}
- lreg[8] = &cpu.regs[8];
+ /* Note: sim uses pseudo-register ZERO as a zero register. */
+ lreg[ZERO_REGNUM] = h8_get_reg_buf (sd) + ZERO_REGNUM;
+ init_pointers_needed = 0;
/* Initialize the seg registers. */
- if (!cpu.cache)
- sim_set_simcache_size (CSIZE);
+ if (!sd->sim_cache)
+ set_simcache_size (sd, CSIZE);
}
}
+/* Grotty global variable for use by control_c signal handler. */
+static SIM_DESC control_c_sim_desc;
+
static void
control_c (int sig)
{
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGINT;
+ sim_engine_set_run_state (control_c_sim_desc, sim_stopped, SIGINT);
}
-#define C (c != 0)
-#define Z (nz == 0)
-#define V (v != 0)
-#define N (n != 0)
-#define U (u != 0)
-#define H (h != 0)
-#define UI (ui != 0)
-#define I (intMaskBit != 0)
-
-static int
-mop (decoded_inst *code, int bsize, int sign)
+int
+sim_stop (SIM_DESC sd)
{
- int multiplier;
- int multiplicand;
- int result;
- int n, nz;
-
- if (sign)
- {
- multiplicand =
- bsize ? SEXTCHAR (GET_W_REG (code->dst.reg)) :
- SEXTSHORT (GET_W_REG (code->dst.reg));
- multiplier =
- bsize ? SEXTCHAR (GET_B_REG (code->src.reg)) :
- SEXTSHORT (GET_W_REG (code->src.reg));
- }
- else
- {
- multiplicand = bsize ? UEXTCHAR (GET_W_REG (code->dst.reg)) :
- UEXTSHORT (GET_W_REG (code->dst.reg));
- multiplier =
- bsize ? UEXTCHAR (GET_B_REG (code->src.reg)) :
- UEXTSHORT (GET_W_REG (code->src.reg));
-
- }
- result = multiplier * multiplicand;
-
- if (sign)
- {
- n = result & (bsize ? 0x8000 : 0x80000000);
- nz = result & (bsize ? 0xffff : 0xffffffff);
- }
- if (bsize)
- {
- SET_W_REG (code->dst.reg, result);
- }
- else
- {
- SET_L_REG (code->dst.reg, result);
- }
-#if 0
- return ((n == 1) << 1) | (nz == 1);
-#endif
-}
-
-#define ONOT(name, how) \
-case O (name, SB): \
-{ \
- int t; \
- int hm = 0x80; \
- rd = GET_B_REG (code->src.reg); \
- how; \
- goto shift8; \
-} \
-case O (name, SW): \
-{ \
- int t; \
- int hm = 0x8000; \
- rd = GET_W_REG (code->src.reg); \
- how; \
- goto shift16; \
-} \
-case O (name, SL): \
-{ \
- int t; \
- int hm = 0x80000000; \
- rd = GET_L_REG (code->src.reg); \
- how; \
- goto shift32; \
+ /* FIXME: use a real signal value. */
+ sim_engine_set_run_state (sd, sim_stopped, SIGINT);
+ return 1;
}
-#define OSHIFTS(name, how1, how2) \
+#define OBITOP(name, f, s, op) \
case O (name, SB): \
{ \
- int t; \
- int hm = 0x80; \
- rd = GET_B_REG (code->src.reg); \
- if ((GET_MEMORY_B (pc + 1) & 0x40) == 0) \
- { \
- how1; \
- } \
- else \
- { \
- how2; \
- } \
- goto shift8; \
-} \
-case O (name, SW): \
-{ \
- int t; \
- int hm = 0x8000; \
- rd = GET_W_REG (code->src.reg); \
- if ((GET_MEMORY_B (pc + 1) & 0x40) == 0) \
- { \
- how1; \
- } \
- else \
- { \
- how2; \
- } \
- goto shift16; \
-} \
-case O (name, SL): \
-{ \
- int t; \
- int hm = 0x80000000; \
- rd = GET_L_REG (code->src.reg); \
- if ((GET_MEMORY_B (pc + 1) & 0x40) == 0) \
- { \
- how1; \
- } \
- else \
- { \
- how2; \
- } \
- goto shift32; \
-}
-
-#define OBITOP(name,f, s, op) \
-case O (name, SB): \
-{ \
- int m; \
- int b; \
- if (f) ea = fetch (&code->dst); \
- m=1<< fetch (&code->src); \
+ int m, tmp; \
+ \
+ if (f) \
+ if (fetch (sd, &code->dst, &ea)) \
+ goto end; \
+ if (fetch (sd, &code->src, &tmp)) \
+ goto end; \
+ m = 1 << tmp; \
op; \
- if (s) store (&code->dst,ea); goto next; \
-}
-
-int
-sim_stop (SIM_DESC sd)
-{
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGINT;
- return 1;
+ if (s) \
+ if (store (sd, &code->dst,ea)) \
+ goto end; \
+ goto next; \
}
-#define R0_REGNUM 0
-#define R1_REGNUM 1
-#define R2_REGNUM 2
-#define R3_REGNUM 3
-#define R4_REGNUM 4
-#define R5_REGNUM 5
-#define R6_REGNUM 6
-#define R7_REGNUM 7
-
-#define SP_REGNUM R7_REGNUM /* Contains address of top of stack */
-#define FP_REGNUM R6_REGNUM /* Contains address of executing
- * stack frame */
-
-#define CCR_REGNUM 8 /* Contains processor status */
-#define PC_REGNUM 9 /* Contains program counter */
-
-#define CYCLE_REGNUM 10
-
-#define EXR_REGNUM 11
-#define INST_REGNUM 12
-#define TICK_REGNUM 13
-
void
sim_resume (SIM_DESC sd, int step, int siggnal)
{
@@ -1012,55 +1866,63 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int c, nz, v, n, u, h, ui, intMaskBit;
int trace, intMask;
int oldmask;
- init_pointers ();
+ enum sim_stop reason;
+ int sigrc;
+ init_pointers (sd);
+
+ control_c_sim_desc = sd;
prev = signal (SIGINT, control_c);
if (step)
{
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGTRAP;
+ sim_engine_set_run_state (sd, sim_stopped, SIGTRAP);
}
else
{
- cpu.state = SIM_STATE_RUNNING;
- cpu.exception = 0;
+ sim_engine_set_run_state (sd, sim_running, 0);
}
- pc = cpu.pc;
+ pc = h8_get_pc (sd);
/* The PC should never be odd. */
if (pc & 0x1)
- abort ();
+ {
+ sim_engine_set_run_state (sd, sim_stopped, SIGBUS);
+ return;
+ }
- GETSR ();
- GETEXR ();
+ /* Get Status Register (flags). */
+ c = (h8_get_ccr (sd) >> 0) & 1;
+ v = (h8_get_ccr (sd) >> 1) & 1;
+ nz = !((h8_get_ccr (sd) >> 2) & 1);
+ n = (h8_get_ccr (sd) >> 3) & 1;
+ u = (h8_get_ccr (sd) >> 4) & 1;
+ h = (h8_get_ccr (sd) >> 5) & 1;
+ ui = ((h8_get_ccr (sd) >> 6) & 1);
+ intMaskBit = (h8_get_ccr (sd) >> 7) & 1;
+
+ if (h8300smode) /* Get exr. */
+ {
+ trace = (h8_get_exr (sd) >> 7) & 1;
+ intMask = h8_get_exr (sd) & 7;
+ }
- oldmask = cpu.mask;
+ oldmask = h8_get_mask (sd);
if (!h8300hmode)
- cpu.mask = 0xffff;
+ h8_set_mask (sd, 0xffff);
do
{
- int cidx;
+ unsigned short cidx;
decoded_inst *code;
top:
- cidx = cpu.cache_idx[pc];
- code = cpu.cache + cidx;
-
-
-#define ALUOP(STORE, NAME, HOW) \
- case O (NAME, SB): HOW; if (STORE) goto alu8; else goto just_flags_alu8; \
- case O (NAME, SW): HOW; if (STORE) goto alu16; else goto just_flags_alu16; \
- case O (NAME, SL): HOW; if (STORE) goto alu32; else goto just_flags_alu32;
-
-
-#define LOGOP(NAME, HOW) \
- case O (NAME, SB): HOW; goto log8; \
- case O (NAME, SW): HOW; goto log16; \
- case O (NAME, SL): HOW; goto log32;
-
-
+ cidx = h8_get_cache_idx (sd, pc);
+ if (cidx == (unsigned short) -1 ||
+ cidx >= sd->sim_cache_size)
+ goto illegal;
+
+ code = sd->sim_cache + cidx;
#if ADEBUG
if (debug)
@@ -1068,8 +1930,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
printf ("%x %d %s\n", pc, code->opcode,
code->op ? code->op->name : "**");
}
- cpu.stats[code->opcode]++;
-
+ h8_increment_stats (sd, code->opcode);
#endif
if (code->opcode)
@@ -1085,231 +1946,547 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
* This opcode is a fake for when we get to an
* instruction which hasnt been compiled
*/
- compile (pc);
+ compile (sd, pc);
goto top;
break;
+ case O (O_MOVAB, SL):
+ case O (O_MOVAW, SL):
+ case O (O_MOVAL, SL):
+ /* 1) Evaluate 2nd argument (dst).
+ 2) Mask / zero extend according to whether 1st argument (src)
+ is INDEXB, INDEXW, or INDEXL.
+ 3) Left-shift the result by 0, 1 or 2, according to size of mova
+ (mova/b, mova/w, mova/l).
+ 4) Add literal value of 1st argument (src).
+ 5) Store result in 3rd argument (op3).
+
+ */
+ if (fetch (sd, &code->dst, &ea))
+ goto end;
+
+ switch (OP_KIND (code->src.type)) {
+ case OP_INDEXB: ea = ea & 0xff; break;
+ case OP_INDEXW: ea = ea & 0xffff; break;
+ case OP_INDEXL: break;
+ default: goto illegal;
+ }
+
+ switch (code->opcode) {
+ case O (O_MOVAB, SL): break;
+ case O (O_MOVAW, SL): ea = ea << 1; break;
+ case O (O_MOVAL, SL): ea = ea << 2; break;
+ default: goto illegal;
+ }
+
+ ea = ea + code->src.literal;
+
+ if (store (sd, &code->op3, ea))
+ goto end;
+
+ goto next;
+
+ case O (O_SUBX, SB): /* subx, extended sub */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ ea = -(ea + C);
+ res = rd + ea;
+ goto alu8;
+
+ case O (O_SUBX, SW): /* subx, extended sub */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ ea = -(ea + C);
+ res = rd + ea;
+ goto alu16;
- case O (O_SUBX, SB):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
+ case O (O_SUBX, SL): /* subx, extended sub */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
ea = -(ea + C);
res = rd + ea;
+ goto alu32;
+
+ case O (O_ADDX, SB): /* addx, extended add */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ ea = ea + C;
+ res = rd + ea;
goto alu8;
- case O (O_ADDX, SB):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
- ea = C + ea;
+ case O (O_ADDX, SW): /* addx, extended add */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ ea = ea + C;
+ res = rd + ea;
+ goto alu16;
+
+ case O (O_ADDX, SL): /* addx, extended add */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ ea = ea + C;
+ res = rd + ea;
+ goto alu32;
+
+ case O (O_SUB, SB): /* sub.b */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ ea = -ea;
res = rd + ea;
goto alu8;
-#define EA ea = fetch (&code->src);
-#define RD_EA ea = fetch (&code->src); rd = fetch (&code->dst);
+ case O (O_SUB, SW): /* sub.w */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ ea = -ea;
+ res = rd + ea;
+ goto alu16;
- ALUOP (1, O_SUB, RD_EA;
- ea = -ea;
- res = rd + ea);
- ALUOP (1, O_NEG, EA;
- ea = -ea;
- rd = 0;
- res = rd + ea);
+ case O (O_SUB, SL): /* sub.l */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ ea = -ea;
+ res = rd + ea;
+ goto alu32;
- case O (O_ADD, SB):
- rd = GET_B_REG (code->dst.reg);
- ea = fetch (&code->src);
+ case O (O_NEG, SB): /* neg.b */
+ /* Fetch ea. */
+ if (fetch2 (sd, &code->src, &ea))
+ goto end;
+ ea = -ea;
+ rd = 0;
res = rd + ea;
goto alu8;
- case O (O_ADD, SW):
- rd = GET_W_REG (code->dst.reg);
- ea = fetch (&code->src);
+
+ case O (O_NEG, SW): /* neg.w */
+ /* Fetch ea. */
+ if (fetch2 (sd, &code->src, &ea))
+ goto end;
+ ea = -ea;
+ rd = 0;
res = rd + ea;
goto alu16;
- case O (O_ADD, SL):
- rd = GET_L_REG (code->dst.reg);
- ea = fetch (&code->src);
+
+ case O (O_NEG, SL): /* neg.l */
+ /* Fetch ea. */
+ if (fetch2 (sd, &code->src, &ea))
+ goto end;
+ ea = -ea;
+ rd = 0;
res = rd + ea;
goto alu32;
+ case O (O_ADD, SB): /* add.b */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ res = rd + ea;
+ goto alu8;
- LOGOP (O_AND, RD_EA;
- res = rd & ea);
+ case O (O_ADD, SW): /* add.w */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ res = rd + ea;
+ goto alu16;
- LOGOP (O_OR, RD_EA;
- res = rd | ea);
+ case O (O_ADD, SL): /* add.l */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+ res = rd + ea;
+ goto alu32;
- LOGOP (O_XOR, RD_EA;
- res = rd ^ ea);
+ case O (O_AND, SB): /* and.b */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd & ea;
+ goto log8;
+ case O (O_AND, SW): /* and.w */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd & ea;
+ goto log16;
- case O (O_MOV_TO_MEM, SB):
- res = GET_B_REG (code->src.reg);
+ case O (O_AND, SL): /* and.l */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd & ea;
+ goto log32;
+
+ case O (O_OR, SB): /* or.b */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd | ea;
goto log8;
- case O (O_MOV_TO_MEM, SW):
- res = GET_W_REG (code->src.reg);
+
+ case O (O_OR, SW): /* or.w */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd | ea;
goto log16;
- case O (O_MOV_TO_MEM, SL):
- res = GET_L_REG (code->src.reg);
+
+ case O (O_OR, SL): /* or.l */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd | ea;
goto log32;
+ case O (O_XOR, SB): /* xor.b */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd ^ ea;
+ goto log8;
- case O (O_MOV_TO_REG, SB):
- res = fetch (&code->src);
- SET_B_REG (code->dst.reg, res);
+ case O (O_XOR, SW): /* xor.w */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd ^ ea;
+ goto log16;
+
+ case O (O_XOR, SL): /* xor.l */
+ /* Fetch rd and ea. */
+ if (fetch (sd, &code->src, &ea) || fetch2 (sd, &code->dst, &rd))
+ goto end;
+ res = rd ^ ea;
+ goto log32;
+
+ case O (O_MOV, SB):
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ if (store (sd, &code->dst, res))
+ goto end;
goto just_flags_log8;
- case O (O_MOV_TO_REG, SW):
- res = fetch (&code->src);
- SET_W_REG (code->dst.reg, res);
+ case O (O_MOV, SW):
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ if (store (sd, &code->dst, res))
+ goto end;
goto just_flags_log16;
- case O (O_MOV_TO_REG, SL):
- res = fetch (&code->src);
- SET_L_REG (code->dst.reg, res);
+ case O (O_MOV, SL):
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ if (store (sd, &code->dst, res))
+ goto end;
goto just_flags_log32;
- case O (O_EEPMOV, SB):
- case O (O_EEPMOV, SW):
+ case O (O_MOVMD, SB): /* movsd.b */
+ ea = GET_W_REG (4);
+ if (ea == 0)
+ ea = 0x10000;
+
+ while (ea--)
+ {
+ rd = GET_MEMORY_B (GET_L_REG (5));
+ SET_MEMORY_B (GET_L_REG (6), rd);
+ SET_L_REG (5, GET_L_REG (5) + 1);
+ SET_L_REG (6, GET_L_REG (6) + 1);
+ SET_W_REG (4, ea);
+ }
+ goto next;
+
+ case O (O_MOVMD, SW): /* movsd.b */
+ ea = GET_W_REG (4);
+ if (ea == 0)
+ ea = 0x10000;
+
+ while (ea--)
+ {
+ rd = GET_MEMORY_W (GET_L_REG (5));
+ SET_MEMORY_W (GET_L_REG (6), rd);
+ SET_L_REG (5, GET_L_REG (5) + 2);
+ SET_L_REG (6, GET_L_REG (6) + 2);
+ SET_W_REG (4, ea);
+ }
+ goto next;
+
+ case O (O_MOVMD, SL): /* movsd.b */
+ ea = GET_W_REG (4);
+ if (ea == 0)
+ ea = 0x10000;
+
+ while (ea--)
+ {
+ rd = GET_MEMORY_L (GET_L_REG (5));
+ SET_MEMORY_L (GET_L_REG (6), rd);
+ SET_L_REG (5, GET_L_REG (5) + 4);
+ SET_L_REG (6, GET_L_REG (6) + 4);
+ SET_W_REG (4, ea);
+ }
+ goto next;
+
+ case O (O_MOVSD, SB): /* movsd.b */
+ /* This instruction implements strncpy, with a conditional branch.
+ r4 contains n, r5 contains src, and r6 contains dst.
+ The 16-bit displacement operand is added to the pc
+ if and only if the end of string is reached before
+ n bytes are transferred. */
+
+ ea = GET_L_REG (4) & 0xffff;
+ if (ea == 0)
+ ea = 0x10000;
+
+ while (ea--)
+ {
+ rd = GET_MEMORY_B (GET_L_REG (5));
+ SET_MEMORY_B (GET_L_REG (6), rd);
+ SET_L_REG (5, GET_L_REG (5) + 1);
+ SET_L_REG (6, GET_L_REG (6) + 1);
+ SET_W_REG (4, ea);
+ if (rd == 0)
+ goto condtrue;
+ }
+ goto next;
+
+ case O (O_EEPMOV, SB): /* eepmov.b */
+ case O (O_EEPMOV, SW): /* eepmov.w */
if (h8300hmode || h8300smode)
{
register unsigned char *_src, *_dst;
unsigned int count = ((code->opcode == O (O_EEPMOV, SW))
- ? cpu.regs[R4_REGNUM] & 0xffff
- : cpu.regs[R4_REGNUM] & 0xff);
-
- _src = (cpu.regs[R5_REGNUM] < memory_size
- ? cpu.memory + cpu.regs[R5_REGNUM]
- : cpu.eightbit + (cpu.regs[R5_REGNUM] & 0xff));
- if ((_src + count) >= (cpu.memory + memory_size))
+ ? h8_get_reg (sd, R4_REGNUM) & 0xffff
+ : h8_get_reg (sd, R4_REGNUM) & 0xff);
+
+ _src = (h8_get_reg (sd, R5_REGNUM) < memory_size
+ ? h8_get_memory_buf (sd) + h8_get_reg (sd, R5_REGNUM)
+ : h8_get_eightbit_buf (sd) +
+ (h8_get_reg (sd, R5_REGNUM) & 0xff));
+ if ((_src + count) >= (h8_get_memory_buf (sd) + memory_size))
{
- if ((_src + count) >= (cpu.eightbit + 0x100))
+ if ((_src + count) >= (h8_get_eightbit_buf (sd) + 0x100))
goto illegal;
}
- _dst = (cpu.regs[R6_REGNUM] < memory_size
- ? cpu.memory + cpu.regs[R6_REGNUM]
- : cpu.eightbit + (cpu.regs[R6_REGNUM] & 0xff));
- if ((_dst + count) >= (cpu.memory + memory_size))
+ _dst = (h8_get_reg (sd, R6_REGNUM) < memory_size
+ ? h8_get_memory_buf (sd) + h8_get_reg (sd, R6_REGNUM)
+ : h8_get_eightbit_buf (sd) +
+ (h8_get_reg (sd, R6_REGNUM) & 0xff));
+
+ if ((_dst + count) >= (h8_get_memory_buf (sd) + memory_size))
{
- if ((_dst + count) >= (cpu.eightbit + 0x100))
+ if ((_dst + count) >= (h8_get_eightbit_buf (sd) + 0x100))
goto illegal;
}
memcpy (_dst, _src, count);
- cpu.regs[R5_REGNUM] += count;
- cpu.regs[R6_REGNUM] += count;
- cpu.regs[R4_REGNUM] &= ((code->opcode == O (O_EEPMOV, SW))
- ? (~0xffff) : (~0xff));
+ h8_set_reg (sd, R5_REGNUM, h8_get_reg (sd, R5_REGNUM) + count);
+ h8_set_reg (sd, R6_REGNUM, h8_get_reg (sd, R6_REGNUM) + count);
+ h8_set_reg (sd, R4_REGNUM, h8_get_reg (sd, R4_REGNUM) &
+ ((code->opcode == O (O_EEPMOV, SW))
+ ? (~0xffff) : (~0xff)));
cycles += 2 * count;
goto next;
}
goto illegal;
- case O (O_ADDS, SL):
+ case O (O_ADDS, SL): /* adds (.l) */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
SET_L_REG (code->dst.reg,
GET_L_REG (code->dst.reg)
+ code->src.literal);
goto next;
- case O (O_SUBS, SL):
+ case O (O_SUBS, SL): /* subs (.l) */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
SET_L_REG (code->dst.reg,
GET_L_REG (code->dst.reg)
- code->src.literal);
goto next;
- case O (O_CMP, SB):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
+ case O (O_CMP, SB): /* cmp.b */
+ if (fetch (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
ea = -ea;
res = rd + ea;
goto just_flags_alu8;
- case O (O_CMP, SW):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
+ case O (O_CMP, SW): /* cmp.w */
+ if (fetch (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
ea = -ea;
res = rd + ea;
goto just_flags_alu16;
- case O (O_CMP, SL):
- rd = fetch (&code->dst);
- ea = fetch (&code->src);
+ case O (O_CMP, SL): /* cmp.l */
+ if (fetch (sd, &code->dst, &rd))
+ goto end;
+ if (fetch (sd, &code->src, &ea))
+ goto end;
ea = -ea;
res = rd + ea;
goto just_flags_alu32;
-
- case O (O_DEC, SB):
+ case O (O_DEC, SB): /* dec.b */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_B_REG (code->src.reg);
ea = -1;
res = rd + ea;
SET_B_REG (code->src.reg, res);
goto just_flags_inc8;
- case O (O_DEC, SW):
+ case O (O_DEC, SW): /* dec.w */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_W_REG (code->dst.reg);
ea = -code->src.literal;
res = rd + ea;
SET_W_REG (code->dst.reg, res);
goto just_flags_inc16;
- case O (O_DEC, SL):
+ case O (O_DEC, SL): /* dec.l */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_L_REG (code->dst.reg);
ea = -code->src.literal;
res = rd + ea;
SET_L_REG (code->dst.reg, res);
goto just_flags_inc32;
-
- case O (O_INC, SB):
+ case O (O_INC, SB): /* inc.b */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_B_REG (code->src.reg);
ea = 1;
res = rd + ea;
SET_B_REG (code->src.reg, res);
goto just_flags_inc8;
- case O (O_INC, SW):
+ case O (O_INC, SW): /* inc.w */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_W_REG (code->dst.reg);
ea = code->src.literal;
res = rd + ea;
SET_W_REG (code->dst.reg, res);
goto just_flags_inc16;
- case O (O_INC, SL):
+ case O (O_INC, SL): /* inc.l */
+ /* FIXME fetch.
+ * This insn only uses register operands, but still
+ * it would be cleaner to use fetch and store... */
rd = GET_L_REG (code->dst.reg);
ea = code->src.literal;
res = rd + ea;
SET_L_REG (code->dst.reg, res);
goto just_flags_inc32;
-#define GET_CCR(x) BUILDSR();x = cpu.ccr
-#define GET_EXR(x) BUILDEXR ();x = cpu.exr
+ case O (O_LDC, SB): /* ldc.b */
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ goto setc;
+
+ case O (O_LDC, SW): /* ldc.w */
+ if (fetch (sd, &code->src, &res))
+ goto end;
- case O (O_LDC, SB):
- case O (O_LDC, SW):
- res = fetch (&code->src);
+ /* Word operand, value from MSB, must be shifted. */
+ res >>= 8;
goto setc;
- case O (O_STC, SB):
- case O (O_STC, SW):
- if (code->src.type == OP_CCR)
+
+ case O (O_LDC, SL): /* ldc.l */
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ switch (code->dst.type) {
+ case X (OP_SBR, SL):
+ h8_set_sbr (sd, res);
+ break;
+ case X (OP_VBR, SL):
+ h8_set_vbr (sd, res);
+ break;
+ default:
+ goto illegal;
+ }
+ goto next;
+
+ case O (O_STC, SW): /* stc.w */
+ case O (O_STC, SB): /* stc.b */
+ if (code->src.type == X (OP_CCR, SB))
{
- GET_CCR (res);
+ BUILDSR (sd);
+ res = h8_get_ccr (sd);
}
- else if (code->src.type == OP_EXR && h8300smode)
+ else if (code->src.type == X (OP_EXR, SB) && h8300smode)
{
- GET_EXR (res);
+ if (h8300smode)
+ h8_set_exr (sd, (trace << 7) | intMask);
+ res = h8_get_exr (sd);
}
else
goto illegal;
- store (&code->dst, res);
+
+ /* Word operand, value to MSB, must be shifted. */
+ if (code->opcode == X (O_STC, SW))
+ res <<= 8;
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+ case O (O_STC, SL): /* stc.l */
+ switch (code->src.type) {
+ case X (OP_SBR, SL):
+ res = h8_get_sbr (sd);
+ break;
+ case X (OP_VBR, SL):
+ res = h8_get_vbr (sd);
+ break;
+ default:
+ goto illegal;
+ }
+ if (store (sd, &code->dst, res))
+ goto end;
goto next;
- case O (O_ANDC, SB):
- if (code->dst.type == OP_CCR)
+ case O (O_ANDC, SB): /* andc.b */
+ if (code->dst.type == X (OP_CCR, SB))
{
- GET_CCR (rd);
+ BUILDSR (sd);
+ rd = h8_get_ccr (sd);
}
- else if (code->dst.type == OP_EXR && h8300smode)
+ else if (code->dst.type == X (OP_EXR, SB) && h8300smode)
{
- GET_EXR (rd);
+ if (h8300smode)
+ h8_set_exr (sd, (trace << 7) | intMask);
+ res = h8_get_exr (sd);
}
else
goto illegal;
@@ -1317,14 +2494,17 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
res = rd & ea;
goto setc;
- case O (O_ORC, SB):
- if (code->dst.type == OP_CCR)
+ case O (O_ORC, SB): /* orc.b */
+ if (code->dst.type == X (OP_CCR, SB))
{
- GET_CCR (rd);
+ BUILDSR (sd);
+ rd = h8_get_ccr (sd);
}
- else if (code->dst.type == OP_EXR && h8300smode)
+ else if (code->dst.type == X (OP_EXR, SB) && h8300smode)
{
- GET_EXR (rd);
+ if (h8300smode)
+ h8_set_exr (sd, (trace << 7) | intMask);
+ rd = h8_get_exr (sd);
}
else
goto illegal;
@@ -1332,14 +2512,17 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
res = rd | ea;
goto setc;
- case O (O_XORC, SB):
- if (code->dst.type == OP_CCR)
+ case O (O_XORC, SB): /* xorc.b */
+ if (code->dst.type == X (OP_CCR, SB))
{
- GET_CCR (rd);
+ BUILDSR (sd);
+ rd = h8_get_ccr (sd);
}
- else if (code->dst.type == OP_EXR && h8300smode)
+ else if (code->dst.type == X (OP_EXR, SB) && h8300smode)
{
- GET_EXR (rd);
+ if (h8300smode)
+ h8_set_exr (sd, (trace << 7) | intMask);
+ rd = h8_get_exr (sd);
}
else
goto illegal;
@@ -1347,79 +2530,139 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
res = rd ^ ea;
goto setc;
+ case O (O_BRAS, SB): /* bra/s */
+ /* This is basically an ordinary branch, with a delay slot. */
+ if (fetch (sd, &code->src, &res))
+ goto end;
+
+ if ((res & 1) == 0)
+ goto illegal;
+
+ res -= 1;
+
+ /* Execution continues at next instruction, but
+ delayed_branch is set up for next cycle. */
+ h8_set_delayed_branch (sd, code->next_pc + res);
+ pc = code->next_pc;
+ goto end;
+
+ case O (O_BRAB, SB): /* bra rd.b */
+ case O (O_BRAW, SW): /* bra rd.w */
+ case O (O_BRAL, SL): /* bra erd.l */
+ if (fetch (sd, &code->src, &rd))
+ goto end;
+ switch (OP_SIZE (code->opcode)) {
+ case SB: rd &= 0xff; break;
+ case SW: rd &= 0xffff; break;
+ case SL: rd &= 0xffffffff; break;
+ }
+ pc = code->next_pc + rd;
+ goto end;
+
+ case O (O_BRABC, SB): /* bra/bc, branch if bit clear */
+ case O (O_BRABS, SB): /* bra/bs, branch if bit set */
+ case O (O_BSRBC, SB): /* bsr/bc, call if bit clear */
+ case O (O_BSRBS, SB): /* bsr/bs, call if bit set */
+ if (fetch (sd, &code->dst, &rd) ||
+ fetch (sd, &code->src, &bit))
+ goto end;
+
+ if (code->opcode == O (O_BRABC, SB) || /* branch if clear */
+ code->opcode == O (O_BSRBC, SB)) /* call if clear */
+ {
+ if ((rd & (1 << bit))) /* no branch */
+ goto next;
+ }
+ else /* branch/call if set */
+ {
+ if (!(rd & (1 << bit))) /* no branch */
+ goto next;
+ }
+
+ if (fetch (sd, &code->op3, &res)) /* branch */
+ goto end;
+ pc = code->next_pc + res;
+
+ if (code->opcode == O (O_BRABC, SB) ||
+ code->opcode == O (O_BRABS, SB)) /* branch */
+ goto end;
+ else /* call */
+ goto call;
- case O (O_BRA, SB):
+ case O (O_BRA, SN):
+ case O (O_BRA, SL):
+ case O (O_BRA, SW):
+ case O (O_BRA, SB): /* bra, branch always */
if (1)
goto condtrue;
goto next;
- case O (O_BRN, SB):
+ case O (O_BRN, SB): /* brn, ;-/ branch never? */
if (0)
goto condtrue;
goto next;
- case O (O_BHI, SB):
+ case O (O_BHI, SB): /* bhi */
if ((C || Z) == 0)
goto condtrue;
goto next;
- case O (O_BLS, SB):
+ case O (O_BLS, SB): /* bls */
if ((C || Z))
goto condtrue;
goto next;
- case O (O_BCS, SB):
+ case O (O_BCS, SB): /* bcs, branch if carry set */
if ((C == 1))
goto condtrue;
goto next;
- case O (O_BCC, SB):
+ case O (O_BCC, SB): /* bcc, branch if carry clear */
if ((C == 0))
goto condtrue;
goto next;
- case O (O_BEQ, SB):
+ case O (O_BEQ, SB): /* beq, branch if zero set */
if (Z)
goto condtrue;
goto next;
- case O (O_BGT, SB):
+ case O (O_BGT, SB): /* bgt */
if (((Z || (N ^ V)) == 0))
goto condtrue;
goto next;
-
- case O (O_BLE, SB):
+ case O (O_BLE, SB): /* ble */
if (((Z || (N ^ V)) == 1))
goto condtrue;
goto next;
- case O (O_BGE, SB):
+ case O (O_BGE, SB): /* bge */
if ((N ^ V) == 0)
goto condtrue;
goto next;
- case O (O_BLT, SB):
+ case O (O_BLT, SB): /* blt */
if ((N ^ V))
goto condtrue;
goto next;
- case O (O_BMI, SB):
+ case O (O_BMI, SB): /* bmi */
if ((N))
goto condtrue;
goto next;
- case O (O_BNE, SB):
+ case O (O_BNE, SB): /* bne, branch if zero clear */
if ((Z == 0))
goto condtrue;
goto next;
- case O (O_BPL, SB):
+ case O (O_BPL, SB): /* bpl */
if (N == 0)
goto condtrue;
goto next;
- case O (O_BVC, SB):
+ case O (O_BVC, SB): /* bvc */
if ((V == 0))
goto condtrue;
goto next;
- case O (O_BVS, SB):
+ case O (O_BVS, SB): /* bvs */
if ((V == 1))
goto condtrue;
goto next;
@@ -1451,10 +2694,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
/* Set the address of 256 free locations where command line is
stored. */
addr_cmdline = cmdline_location();
- cpu.regs[0] = addr_cmdline;
+ h8_set_reg (sd, 0, addr_cmdline);
/* Counting the no. of commandline arguments. */
- for (i = 0; ptr_command_line[i] != NULL; i++)
+ for (i = 0; h8_get_cmdline_arg (sd, i) != NULL; i++)
continue;
/* No. of arguments in the command line. */
@@ -1484,7 +2727,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
ind_arg_len = 0;
/* The size of the commandline argument. */
- ind_arg_len = (strlen (ptr_command_line[i]) + 1);
+ ind_arg_len = strlen (h8_get_cmdline_arg (sd, i) + 1);
/* The total size of the command line string. */
size_cmdline += ind_arg_len;
@@ -1495,7 +2738,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
given may behave unpredictably. */
if (size_cmdline >= 256)
{
- cpu.regs[0] = 0;
+ h8_set_reg (sd, 0, 0);
goto next;
}
else
@@ -1507,7 +2750,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
{
SET_MEMORY_B ((current_location +
(sizeof (char) * j)),
- *(ptr_command_line[i] +
+ *(h8_get_cmdline_arg (sd, i) +
sizeof (char) * j));
}
@@ -1518,7 +2761,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
}
/* This is the original position of the stack pointer. */
- old_sp = cpu.regs[7];
+ old_sp = h8_get_reg (sd, SP_REGNUM);
/* We need space from the stack to store the pointers to argvs. */
/* As we will infringe on the stack, we need to shift the stack
@@ -1568,16 +2811,16 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
free (argv_ptrs);
for (i = 0; i <= no_of_args; i++)
{
- free (ptr_command_line[i]);
+ free (h8_get_cmdline_arg (sd, i));
}
- free (ptr_command_line);
+ free (h8_get_command_line (sd));
/* The no. of argv arguments are returned in Reg 0. */
- cpu.regs[0] = no_of_args;
+ h8_set_reg (sd, 0, no_of_args);
/* The Pointer to argv in Register 1. */
- cpu.regs[1] = new_sp;
+ h8_set_reg (sd, 1, new_sp);
/* Setting the stack pointer to the new value. */
- cpu.regs[7] = new_sp;
+ h8_set_reg (sd, SP_REGNUM, new_sp);
}
goto next;
@@ -1592,21 +2835,21 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int i; /* Loop counter */
int filename_ptr; /* Pointer to filename in cpu memory. */
- /* Setting filename_ptr to first argument of open. */
- filename_ptr = h8300hmode ? GET_L_REG (0) : GET_W_REG (0);
-
- /* Trying to get mode. */
- if (h8300hmode || h8300smode)
+ /* Setting filename_ptr to first argument of open, */
+ /* and trying to get mode. */
+ if (h8300sxmode || h8300hmode || h8300smode)
{
- mode = GET_MEMORY_L (cpu.regs[7] + 4);
+ filename_ptr = GET_L_REG (0);
+ mode = GET_MEMORY_L (h8_get_reg (sd, SP_REGNUM) + 4);
}
else
{
- mode = GET_MEMORY_W (cpu.regs[7] + 2);
+ filename_ptr = GET_W_REG (0);
+ mode = GET_MEMORY_W (h8_get_reg (sd, SP_REGNUM) + 2);
}
/* Trying to find the length of the filename. */
- temp_char = GET_MEMORY_B (cpu.regs[0]);
+ temp_char = GET_MEMORY_B (h8_get_reg (sd, 0));
len = 1;
while (temp_char != '\0')
@@ -1629,7 +2872,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
open_return = sim_callback->open (sim_callback, filename, mode);
/* Return value in register 0. */
- cpu.regs[0] = open_return;
+ h8_set_reg (sd, 0, open_return);
/* Freeing memory used for filename. */
free (filename);
@@ -1657,12 +2900,12 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
/* The characters read are stored in cpu memory. */
for (i = 0; i < buf_size; i++)
{
- SET_MEMORY_B ((cpu.regs[1] + (sizeof (char) * i)),
+ SET_MEMORY_B ((h8_get_reg (sd, 1) + (sizeof (char) * i)),
*(char_ptr + (sizeof (char) * i)));
}
/* Return value in Register 0. */
- cpu.regs[0] = read_return;
+ h8_set_reg (sd, 0, read_return);
/* Freeing memory used as buffer. */
free (char_ptr);
@@ -1698,7 +2941,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
write_return = sim_callback->write (sim_callback, fd, ptr, len);
/* Return value in Register 0. */
- cpu.regs[0] = write_return;
+ h8_set_reg (sd, 0, write_return);
/* Freeing memory used as buffer. */
free (ptr);
@@ -1721,7 +2964,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
sim_callback->lseek (sim_callback, fd, offset, origin);
/* Return value in register 0. */
- cpu.regs[0] = lseek_return;
+ h8_set_reg (sd, 0, lseek_return);
}
goto next;
@@ -1736,7 +2979,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
close_return = sim_callback->close (sim_callback, fd);
/* Return value in register 0. */
- cpu.regs[0] = close_return;
+ h8_set_reg (sd, 0, close_return);
}
goto next;
@@ -1783,7 +3026,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
SET_MEMORY_L (stat_ptr, stat_rec.st_ctime);
/* Return value in register 0. */
- cpu.regs[0] = fstat_return;
+ h8_set_reg (sd, 0, fstat_return);
}
goto next;
@@ -1803,7 +3046,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
filename_ptr = h8300hmode ? GET_L_REG (0) : GET_W_REG (0);
/* Trying to find the length of the filename. */
- temp_char = GET_MEMORY_B (cpu.regs[0]);
+ temp_char = GET_MEMORY_B (h8_get_reg (sd, 0));
len = 1;
while (temp_char != '\0')
@@ -1823,7 +3066,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
}
/* Setting stat_ptr to second argument of stat. */
- /* stat_ptr = cpu.regs[1]; */
+ /* stat_ptr = h8_get_reg (sd, 1); */
stat_ptr = h8300hmode ? GET_L_REG (1) : GET_W_REG (1);
/* Callback stat and return. */
@@ -1832,10 +3075,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
/* Have stat_ptr point to starting of stat_rec. */
temp_stat_ptr = (char *) (&stat_rec);
-
+
/* Freeing memory used for filename. */
free (filename);
-
+
/* Setting up the stat structure returned. */
SET_MEMORY_W (stat_ptr, stat_rec.st_dev);
stat_ptr += 2;
@@ -1858,52 +3101,383 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
SET_MEMORY_L (stat_ptr, stat_rec.st_mtime);
stat_ptr += 8;
SET_MEMORY_L (stat_ptr, stat_rec.st_ctime);
-
+
/* Return value in register 0. */
- cpu.regs[0] = stat_return;
+ h8_set_reg (sd, 0, stat_return);
}
goto next;
/* End of system call processing. */
- ONOT (O_NOT, rd = ~rd; v = 0;);
- OSHIFTS (O_SHLL,
- c = rd & hm; v = 0; rd <<= 1,
- c = rd & (hm >> 1); v = 0; rd <<= 2);
- OSHIFTS (O_SHLR,
- c = rd & 1; v = 0; rd = (unsigned int) rd >> 1,
- c = rd & 2; v = 0; rd = (unsigned int) rd >> 2);
- OSHIFTS (O_SHAL,
- c = rd & hm; v = (rd & hm) != ((rd & (hm >> 1)) << 1); rd <<= 1,
- c = rd & (hm >> 1); v = (rd & (hm >> 1)) != ((rd & (hm >> 2)) << 2); rd <<= 2);
- OSHIFTS (O_SHAR,
- t = rd & hm; c = rd & 1; v = 0; rd >>= 1; rd |= t,
- t = rd & hm; c = rd & 2; v = 0; rd >>= 2; rd |= t | t >> 1);
- OSHIFTS (O_ROTL,
- c = rd & hm; v = 0; rd <<= 1; rd |= C,
- c = rd & hm; v = 0; rd <<= 1; rd |= C; c = rd & hm; rd <<= 1; rd |= C);
- OSHIFTS (O_ROTR,
- c = rd & 1; v = 0; rd = (unsigned int) rd >> 1; if (c) rd |= hm,
- c = rd & 1; v = 0; rd = (unsigned int) rd >> 1; if (c) rd |= hm; c = rd & 1; rd = (unsigned int) rd >> 1; if (c) rd |= hm);
- OSHIFTS (O_ROTXL,
- t = rd & hm; rd <<= 1; rd |= C; c = t; v = 0,
- t = rd & hm; rd <<= 1; rd |= C; c = t; v = 0; t = rd & hm; rd <<= 1; rd |= C; c = t);
- OSHIFTS (O_ROTXR,
- t = rd & 1; rd = (unsigned int) rd >> 1; if (C) rd |= hm; c = t; v = 0,
- t = rd & 1; rd = (unsigned int) rd >> 1; if (C) rd |= hm; c = t; v = 0; t = rd & 1; rd = (unsigned int) rd >> 1; if (C) rd |= hm; c = t);
-
- case O (O_JMP, SB):
- {
- pc = fetch (&code->src);
+ case O (O_NOT, SB): /* not.b */
+ if (fetch2 (sd, &code->src, &rd))
+ goto end;
+ rd = ~rd;
+ v = 0;
+ goto shift8;
+
+ case O (O_NOT, SW): /* not.w */
+ if (fetch2 (sd, &code->src, &rd))
+ goto end;
+ rd = ~rd;
+ v = 0;
+ goto shift16;
+
+ case O (O_NOT, SL): /* not.l */
+ if (fetch2 (sd, &code->src, &rd))
+ goto end;
+ rd = ~rd;
+ v = 0;
+ goto shift32;
+
+ case O (O_SHLL, SB): /* shll.b */
+ case O (O_SHLR, SB): /* shlr.b */
+ if (fetch2 (sd, &code->dst, &rd))
goto end;
+ if (code->src.type == X (OP_IMM, SB))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHLL, SB))
+ {
+ v = (ea > 8);
+ c = rd & (0x80 >> (ea - 1));
+ rd <<= ea;
+ }
+ else
+ {
+ v = 0;
+ c = rd & (1 << (ea - 1));
+ rd = (unsigned char) rd >> ea;
+ }
+ goto shift8;
+
+ case O (O_SHLL, SW): /* shll.w */
+ case O (O_SHLR, SW): /* shlr.w */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SW))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHLL, SW))
+ {
+ v = (ea > 16);
+ c = rd & (0x8000 >> (ea - 1));
+ rd <<= ea;
+ }
+ else
+ {
+ v = 0;
+ c = rd & (1 << (ea - 1));
+ rd = (unsigned short) rd >> ea;
+ }
+ goto shift16;
+
+ case O (O_SHLL, SL): /* shll.l */
+ case O (O_SHLR, SL): /* shlr.l */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SL))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHLL, SL))
+ {
+ v = (ea > 32);
+ c = rd & (0x80000000 >> (ea - 1));
+ rd <<= ea;
+ }
+ else
+ {
+ v = 0;
+ c = rd & (1 << (ea - 1));
+ rd = (unsigned int) rd >> ea;
+ }
+ goto shift32;
+
+ case O (O_SHAL, SB):
+ case O (O_SHAR, SB):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SB))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHAL, SB))
+ {
+ c = rd & (0x80 >> (ea - 1));
+ res = rd >> (7 - ea);
+ v = ((res & 1) && !(res & 2))
+ || (!(res & 1) && (res & 2));
+ rd <<= ea;
+ }
+ else
+ {
+ c = rd & (1 << (ea - 1));
+ v = 0;
+ rd = ((signed char) rd) >> ea;
+ }
+ goto shift8;
+
+ case O (O_SHAL, SW):
+ case O (O_SHAR, SW):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SW))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHAL, SW))
+ {
+ c = rd & (0x8000 >> (ea - 1));
+ res = rd >> (15 - ea);
+ v = ((res & 1) && !(res & 2))
+ || (!(res & 1) && (res & 2));
+ rd <<= ea;
+ }
+ else
+ {
+ c = rd & (1 << (ea - 1));
+ v = 0;
+ rd = ((signed short) rd) >> ea;
+ }
+ goto shift16;
+
+ case O (O_SHAL, SL):
+ case O (O_SHAR, SL):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SL))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ if (code->opcode == O (O_SHAL, SL))
+ {
+ c = rd & (0x80000000 >> (ea - 1));
+ res = rd >> (31 - ea);
+ v = ((res & 1) && !(res & 2))
+ || (!(res & 1) && (res & 2));
+ rd <<= ea;
+ }
+ else
+ {
+ c = rd & (1 << (ea - 1));
+ v = 0;
+ rd = ((signed int) rd) >> ea;
+ }
+ goto shift32;
+
+ case O (O_ROTL, SB):
+ case O (O_ROTR, SB):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SB))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTL, SB))
+ {
+ c = rd & 0x80;
+ rd <<= 1;
+ if (c)
+ rd |= 1;
+ }
+ else
+ {
+ c = rd & 1;
+ rd = ((unsigned char) rd) >> 1;
+ if (c)
+ rd |= 0x80;
+ }
+
+ v = 0;
+ goto shift8;
+
+ case O (O_ROTL, SW):
+ case O (O_ROTR, SW):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SW))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTL, SW))
+ {
+ c = rd & 0x8000;
+ rd <<= 1;
+ if (c)
+ rd |= 1;
+ }
+ else
+ {
+ c = rd & 1;
+ rd = ((unsigned short) rd) >> 1;
+ if (c)
+ rd |= 0x8000;
+ }
+
+ v = 0;
+ goto shift16;
+
+ case O (O_ROTL, SL):
+ case O (O_ROTR, SL):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SL))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTL, SL))
+ {
+ c = rd & 0x80000000;
+ rd <<= 1;
+ if (c)
+ rd |= 1;
+ }
+ else
+ {
+ c = rd & 1;
+ rd = ((unsigned int) rd) >> 1;
+ if (c)
+ rd |= 0x80000000;
+ }
+
+ v = 0;
+ goto shift32;
+
+ case O (O_ROTXL, SB):
+ case O (O_ROTXR, SB):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SB))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTXL, SB))
+ {
+ res = rd & 0x80;
+ rd <<= 1;
+ if (C)
+ rd |= 1;
+ c = res;
+ }
+ else
+ {
+ res = rd & 1;
+ rd = ((unsigned char) rd) >> 1;
+ if (C)
+ rd |= 0x80;
+ c = res;
+ }
+
+ v = 0;
+ goto shift8;
+
+ case O (O_ROTXL, SW):
+ case O (O_ROTXR, SW):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SW))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTXL, SW))
+ {
+ res = rd & 0x8000;
+ rd <<= 1;
+ if (C)
+ rd |= 1;
+ c = res;
+ }
+ else
+ {
+ res = rd & 1;
+ rd = ((unsigned short) rd) >> 1;
+ if (C)
+ rd |= 0x8000;
+ c = res;
+ }
+
+ v = 0;
+ goto shift16;
+
+ case O (O_ROTXL, SL):
+ case O (O_ROTXR, SL):
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+
+ if (code->src.type == X (OP_IMM, SL))
+ fetch (sd, &code->src, &ea);
+ else
+ ea = 1;
+
+ while (ea--)
+ if (code->opcode == O (O_ROTXL, SL))
+ {
+ res = rd & 0x80000000;
+ rd <<= 1;
+ if (C)
+ rd |= 1;
+ c = res;
+ }
+ else
+ {
+ res = rd & 1;
+ rd = ((unsigned int) rd) >> 1;
+ if (C)
+ rd |= 0x80000000;
+ c = res;
+ }
+
+ v = 0;
+ goto shift32;
+
+ case O (O_JMP, SN):
+ case O (O_JMP, SL):
+ case O (O_JMP, SB): /* jmp */
+ case O (O_JMP, SW):
+ {
+ fetch (sd, &code->src, &pc);
+ goto end;
}
- case O (O_JSR, SB):
+ case O (O_JSR, SN):
+ case O (O_JSR, SL):
+ case O (O_JSR, SB): /* jsr, jump to subroutine */
+ case O (O_JSR, SW):
{
int tmp;
- pc = fetch (&code->src);
+ if (fetch (sd, &code->src, &pc))
+ goto end;
call:
- tmp = cpu.regs[7];
+ tmp = h8_get_reg (sd, SP_REGNUM);
if (h8300hmode)
{
@@ -1915,19 +3489,24 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
tmp -= 2;
SET_MEMORY_W (tmp, code->next_pc);
}
- cpu.regs[7] = tmp;
+ h8_set_reg (sd, SP_REGNUM, tmp);
goto end;
}
- case O (O_BSR, SB):
- pc = code->src.literal;
+
+ case O (O_BSR, SW):
+ case O (O_BSR, SL):
+ case O (O_BSR, SB): /* bsr, branch to subroutine */
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ pc = code->next_pc + res;
goto call;
- case O (O_RTS, SN):
+ case O (O_RTS, SN): /* rts, return from subroutine */
{
int tmp;
- tmp = cpu.regs[7];
+ tmp = h8_get_reg (sd, SP_REGNUM);
if (h8300hmode)
{
@@ -1940,67 +3519,386 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
tmp += 2;
}
- cpu.regs[7] = tmp;
+ h8_set_reg (sd, SP_REGNUM, tmp);
goto end;
}
- case O (O_ILL, SB):
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGILL;
+ case O (O_ILL, SB): /* illegal */
+ sim_engine_set_run_state (sd, sim_stopped, SIGILL);
goto end;
- case O (O_SLEEP, SN):
- /* FIXME: Doesn't this break for breakpoints when r0
- contains just the right (er, wrong) value? */
- cpu.state = SIM_STATE_STOPPED;
- /* The format of r0 is defined by target newlib. Expand
- the macros here instead of looking for .../sys/wait.h. */
-#define SIM_WIFEXITED(v) (((v) & 0xff) == 0)
-#define SIM_WIFSIGNALED(v) (((v) & 0x7f) > 0 && (((v) & 0x7f) < 0x7f))
- if (! SIM_WIFEXITED (cpu.regs[0]) && SIM_WIFSIGNALED (cpu.regs[0]))
- cpu.exception = SIGILL;
+
+ case O (O_SLEEP, SN): /* sleep */
+ /* Check for magic numbers in r1 and r2. */
+ if ((h8_get_reg (sd, R1_REGNUM) & 0xffff) == LIBC_EXIT_MAGIC1 &&
+ (h8_get_reg (sd, R2_REGNUM) & 0xffff) == LIBC_EXIT_MAGIC2 &&
+ SIM_WIFEXITED (h8_get_reg (sd, 0)))
+ {
+ /* This trap comes from _exit, not from gdb. */
+ sim_engine_set_run_state (sd, sim_exited,
+ SIM_WEXITSTATUS (h8_get_reg (sd, 0)));
+ }
else
- cpu.exception = SIGTRAP;
+ {
+ /* Treat it as a sigtrap. */
+ sim_engine_set_run_state (sd, sim_stopped, SIGTRAP);
+ }
goto end;
+
case O (O_BPT, SN):
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGTRAP;
+ sim_engine_set_run_state (sd, sim_stopped, SIGTRAP);
goto end;
- OBITOP (O_BNOT, 1, 1, ea ^= m);
- OBITOP (O_BTST, 1, 0, nz = ea & m);
- OBITOP (O_BCLR, 1, 1, ea &= ~m);
- OBITOP (O_BSET, 1, 1, ea |= m);
- OBITOP (O_BLD, 1, 0, c = ea & m);
- OBITOP (O_BILD, 1, 0, c = !(ea & m));
+ case O (O_BSETEQ, SB):
+ if (Z)
+ goto bset;
+ goto next;
+
+ case O (O_BSETNE, SB):
+ if (!Z)
+ goto bset;
+ goto next;
+
+ case O (O_BCLREQ, SB):
+ if (Z)
+ goto bclr;
+ goto next;
+
+ case O (O_BCLRNE, SB):
+ if (!Z)
+ goto bclr;
+ goto next;
+
+ OBITOP (O_BNOT, 1, 1, ea ^= m); /* bnot */
+ OBITOP (O_BTST, 1, 0, nz = ea & m); /* btst */
+ bset:
+ OBITOP (O_BSET, 1, 1, ea |= m); /* bset */
+ bclr:
+ OBITOP (O_BCLR, 1, 1, ea &= ~m); /* bclr */
+ OBITOP (O_BLD, 1, 0, c = ea & m); /* bld */
+ OBITOP (O_BILD, 1, 0, c = !(ea & m)); /* bild */
OBITOP (O_BST, 1, 1, ea &= ~m;
- if (C) ea |= m);
+ if (C) ea |= m); /* bst */
OBITOP (O_BIST, 1, 1, ea &= ~m;
- if (!C) ea |= m);
- OBITOP (O_BAND, 1, 0, c = (ea & m) && C);
- OBITOP (O_BIAND, 1, 0, c = !(ea & m) && C);
- OBITOP (O_BOR, 1, 0, c = (ea & m) || C);
- OBITOP (O_BIOR, 1, 0, c = !(ea & m) || C);
- OBITOP (O_BXOR, 1, 0, c = ((ea & m) != 0) != C);
- OBITOP (O_BIXOR, 1, 0, c = !(ea & m) != C);
-
-#define MOP(bsize, signed) \
- mop (code, bsize, signed); \
- goto next;
-
- case O (O_MULS, SB):
- MOP (1, 1);
- break;
- case O (O_MULS, SW):
- MOP (0, 1);
- break;
- case O (O_MULU, SB):
- MOP (1, 0);
- break;
- case O (O_MULU, SW):
- MOP (0, 0);
- break;
+ if (!C) ea |= m); /* bist */
+ OBITOP (O_BSTZ, 1, 1, ea &= ~m;
+ if (Z) ea |= m); /* bstz */
+ OBITOP (O_BISTZ, 1, 1, ea &= ~m;
+ if (!Z) ea |= m); /* bistz */
+ OBITOP (O_BAND, 1, 0, c = (ea & m) && C); /* band */
+ OBITOP (O_BIAND, 1, 0, c = !(ea & m) && C); /* biand */
+ OBITOP (O_BOR, 1, 0, c = (ea & m) || C); /* bor */
+ OBITOP (O_BIOR, 1, 0, c = !(ea & m) || C); /* bior */
+ OBITOP (O_BXOR, 1, 0, c = ((ea & m) != 0)!= C); /* bxor */
+ OBITOP (O_BIXOR, 1, 0, c = !(ea & m) != C); /* bixor */
+
+ case O (O_BFLD, SB): /* bfld */
+ /* bitfield load */
+ ea = 0;
+ if (fetch (sd, &code->src, &bit))
+ goto end;
+
+ if (bit != 0)
+ {
+ if (fetch (sd, &code->dst, &ea))
+ goto end;
+
+ ea &= bit;
+ while (!(bit & 1))
+ {
+ ea >>= 1;
+ bit >>= 1;
+ }
+ }
+ if (store (sd, &code->op3, ea))
+ goto end;
+
+ goto next;
- case O (O_TAS, SB):
+ case O(O_BFST, SB): /* bfst */
+ /* bitfield store */
+ /* NOTE: the imm8 value is in dst, and the ea value
+ (which is actually the destination) is in op3.
+ It has to be that way, to avoid breaking the assembler. */
+
+ if (fetch (sd, &code->dst, &bit)) /* imm8 */
+ goto end;
+ if (bit == 0) /* noop -- nothing to do. */
+ goto next;
+
+ if (fetch (sd, &code->src, &rd)) /* reg8 src */
+ goto end;
+
+ if (fetch2 (sd, &code->op3, &ea)) /* ea dst */
+ goto end;
+
+ /* Left-shift the register data into position. */
+ for (tmp = bit; !(tmp & 1); tmp >>= 1)
+ rd <<= 1;
+
+ /* Combine it with the neighboring bits. */
+ ea = (ea & ~bit) | (rd & bit);
+
+ /* Put it back. */
+ if (store2 (sd, &code->op3, ea))
+ goto end;
+ goto next;
+
+ case O (O_CLRMAC, SN): /* clrmac */
+ h8_set_mach (sd, 0);
+ h8_set_macl (sd, 0);
+ h8_set_macZ (sd, 1);
+ h8_set_macV (sd, 0);
+ h8_set_macN (sd, 0);
+ goto next;
+
+ case O (O_STMAC, SL): /* stmac, 260 */
+ switch (code->src.type) {
+ case X (OP_MACH, SL):
+ res = h8_get_mach (sd);
+ if (res & 0x200) /* sign extend */
+ res |= 0xfffffc00;
+ break;
+ case X (OP_MACL, SL):
+ res = h8_get_macl (sd);
+ break;
+ default: goto illegal;
+ }
+ nz = !h8_get_macZ (sd);
+ n = h8_get_macN (sd);
+ v = h8_get_macV (sd);
+
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_LDMAC, SL): /* ldmac, 179 */
+ if (fetch (sd, &code->src, &rd))
+ goto end;
+
+ switch (code->dst.type) {
+ case X (OP_MACH, SL):
+ rd &= 0x3ff; /* Truncate to 10 bits */
+ h8_set_mach (sd, rd);
+ break;
+ case X (OP_MACL, SL):
+ h8_set_macl (sd, rd);
+ break;
+ default: goto illegal;
+ }
+ h8_set_macV (sd, 0);
+ goto next;
+
+ case O (O_MAC, SW):
+ if (fetch (sd, &code->src, &rd) ||
+ fetch (sd, &code->dst, &res))
+ goto end;
+
+ /* Ye gods, this is non-portable!
+ However, the existing mul/div code is similar. */
+ res = SEXTSHORT (res) * SEXTSHORT (rd);
+
+ if (h8_get_macS (sd)) /* Saturating mode */
+ {
+ long long mac = h8_get_macl (sd);
+
+ if (mac & 0x80000000) /* sign extend */
+ mac |= 0xffffffff00000000LL;
+
+ mac += res;
+ if (mac > 0x7fffffff || mac < 0xffffffff80000000LL)
+ h8_set_macV (sd, 1);
+ h8_set_macZ (sd, (mac == 0));
+ h8_set_macN (sd, (mac < 0));
+ h8_set_macl (sd, (int) mac);
+ }
+ else /* "Less Saturating" mode */
+ {
+ long long mac = h8_get_mach (sd);
+ mac <<= 32;
+ mac += h8_get_macl (sd);
+
+ if (mac & 0x20000000000LL) /* sign extend */
+ mac |= 0xfffffc0000000000LL;
+
+ mac += res;
+ if (mac > 0x1ffffffffffLL ||
+ mac < (long long) 0xfffffe0000000000LL)
+ h8_set_macV (sd, 1);
+ h8_set_macZ (sd, (mac == 0));
+ h8_set_macN (sd, (mac < 0));
+ h8_set_macl (sd, (int) mac);
+ mac >>= 32;
+ h8_set_mach (sd, (int) (mac & 0x3ff));
+ }
+ goto next;
+
+ case O (O_MULS, SW): /* muls.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfff0;
+ else
+ ea = SEXTSHORT (ea);
+
+ res = SEXTSHORT (ea * SEXTSHORT (rd));
+
+ n = res & 0x8000;
+ nz = res & 0xffff;
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULS, SL): /* muls.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+
+ res = ea * rd;
+
+ n = res & 0x80000000;
+ nz = res & 0xffffffff;
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ case O (O_MULSU, SL): /* muls/u.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+
+ /* Compute upper 32 bits of the 64-bit result. */
+ res = (((long long) ea) * ((long long) rd)) >> 32;
+
+ n = res & 0x80000000;
+ nz = res & 0xffffffff;
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ case O (O_MULU, SW): /* mulu.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ res = UEXTSHORT ((UEXTSHORT (ea) * UEXTSHORT (rd)));
+
+ /* Don't set Z or N. */
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULU, SL): /* mulu.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ res = ea * rd;
+
+ /* Don't set Z or N. */
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULUU, SL): /* mulu/u.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* Compute upper 32 bits of the 64-bit result. */
+ res = (((unsigned long long) (unsigned) ea) *
+ ((unsigned long long) (unsigned) rd)) >> 32;
+
+ /* Don't set Z or N. */
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULXS, SB): /* mulxs.b */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+ else
+ ea = SEXTCHAR (ea);
+
+ res = ea * SEXTCHAR (rd);
+
+ n = res & 0x8000;
+ nz = res & 0xffff;
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULXS, SW): /* mulxs.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfff0;
+ else
+ ea = SEXTSHORT (ea);
+
+ res = ea * SEXTSHORT (rd & 0xffff);
+
+ n = res & 0x80000000;
+ nz = res & 0xffffffff;
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULXU, SB): /* mulxu.b */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ res = UEXTCHAR (ea) * UEXTCHAR (rd);
+
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_MULXU, SW): /* mulxu.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ res = UEXTSHORT (ea) * UEXTSHORT (rd);
+
+ if (store (sd, &code->dst, res))
+ goto end;
+
+ goto next;
+
+ case O (O_TAS, SB): /* tas, (test and set?) */
if (!h8300smode || code->src.type != X (OP_REG, SL))
goto illegal;
switch (code->src.reg)
@@ -2013,127 +3911,297 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
default:
goto illegal;
}
- res = fetch (&code->src);
- store (&code->src, res | 0x80);
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ if (store (sd, &code->src, res | 0x80))
+ goto end;
+
goto just_flags_log8;
- case O (O_DIVU, SB):
- {
- rd = GET_W_REG (code->dst.reg);
- ea = GET_B_REG (code->src.reg);
- if (ea)
- {
- tmp = (unsigned) rd % ea;
- rd = (unsigned) rd / ea;
- }
- SET_W_REG (code->dst.reg, (rd & 0xff) | (tmp << 8));
- n = ea & 0x80;
- nz = ea & 0xff;
+ case O (O_DIVU, SW): /* divu.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
- goto next;
- }
- case O (O_DIVU, SW):
- {
- rd = GET_L_REG (code->dst.reg);
- ea = GET_W_REG (code->src.reg);
- n = ea & 0x8000;
- nz = ea & 0xffff;
- if (ea)
- {
- tmp = (unsigned) rd % ea;
- rd = (unsigned) rd / ea;
- }
- SET_L_REG (code->dst.reg, (rd & 0xffff) | (tmp << 16));
- goto next;
- }
+ n = ea & 0x8000;
+ nz = ea & 0xffff;
+ if (ea)
+ res = (unsigned) (UEXTSHORT (rd) / UEXTSHORT (ea));
+ else
+ res = 0;
- case O (O_DIVS, SB):
- {
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
- rd = SEXTSHORT (GET_W_REG (code->dst.reg));
- ea = SEXTCHAR (GET_B_REG (code->src.reg));
- if (ea)
- {
- tmp = (int) rd % (int) ea;
- rd = (int) rd / (int) ea;
- n = rd & 0x8000;
- nz = 1;
- }
- else
- nz = 0;
- SET_W_REG (code->dst.reg, (rd & 0xff) | (tmp << 8));
- goto next;
- }
- case O (O_DIVS, SW):
- {
- rd = GET_L_REG (code->dst.reg);
- ea = SEXTSHORT (GET_W_REG (code->src.reg));
- if (ea)
- {
- tmp = (int) rd % (int) ea;
- rd = (int) rd / (int) ea;
- n = rd & 0x80000000;
- nz = 1;
- }
- else
- nz = 0;
- SET_L_REG (code->dst.reg, (rd & 0xffff) | (tmp << 16));
- goto next;
- }
- case O (O_EXTS, SW):
- rd = GET_W_REG (code->src.reg) & 0xff; /* Yes, src, not dst. */
+ case O (O_DIVU, SL): /* divu.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ n = ea & 0x80000000;
+ nz = ea & 0xffffffff;
+ if (ea)
+ res = (unsigned) rd / ea;
+ else
+ res = 0;
+
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ case O (O_DIVS, SW): /* divs.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+
+ if (ea)
+ {
+ res = SEXTSHORT (rd) / SEXTSHORT (ea);
+ nz = 1;
+ }
+ else
+ {
+ res = 0;
+ nz = 0;
+ }
+
+ n = res & 0x8000;
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ case O (O_DIVS, SL): /* divs.l */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+
+ if (ea)
+ {
+ res = rd / ea;
+ nz = 1;
+ }
+ else
+ {
+ res = 0;
+ nz = 0;
+ }
+
+ n = res & 0x80000000;
+ if (store (sd, &code->dst, res))
+ goto end;
+ goto next;
+
+ case O (O_DIVXU, SB): /* divxu.b */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ rd = UEXTSHORT (rd);
+ ea = UEXTCHAR (ea);
+
+ n = ea & 0x80;
+ nz = ea & 0xff;
+ if (ea)
+ {
+ tmp = (unsigned) rd % ea;
+ res = (unsigned) rd / ea;
+ }
+ else
+ {
+ tmp = 0;
+ res = 0;
+ }
+
+ if (store (sd, &code->dst, (res & 0xffff) | (tmp << 8)))
+ goto end;
+ goto next;
+
+ case O (O_DIVXU, SW): /* divxu.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ ea = UEXTSHORT (ea);
+
+ n = ea & 0x8000;
+ nz = ea & 0xffff;
+ if (ea)
+ {
+ tmp = (unsigned) rd % ea;
+ res = (unsigned) rd / ea;
+ }
+ else
+ {
+ tmp = 0;
+ res = 0;
+ }
+
+ if (store (sd, &code->dst, (res & 0xffff) | (tmp << 16)))
+ goto end;
+ goto next;
+
+ case O (O_DIVXS, SB): /* divxs.b */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ rd = SEXTSHORT (rd);
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+ else
+ ea = SEXTCHAR (ea);
+
+ if (ea)
+ {
+ tmp = (int) rd % (int) ea;
+ res = (int) rd / (int) ea;
+ nz = 1;
+ }
+ else
+ {
+ tmp = 0;
+ res = 0;
+ nz = 0;
+ }
+
+ n = res & 0x8000;
+ if (store (sd, &code->dst, (res & 0xff) | (tmp << 8)))
+ goto end;
+ goto next;
+
+ case O (O_DIVXS, SW): /* divxs.w */
+ if (fetch (sd, &code->src, &ea) ||
+ fetch (sd, &code->dst, &rd))
+ goto end;
+
+ /* FIXME: is this the right place to be doing sign extend? */
+ if (OP_KIND (code->src.type) == OP_IMM &&
+ (ea & 8) != 0)
+ ea |= 0xfffffff0;
+ else
+ ea = SEXTSHORT (ea);
+
+ if (ea)
+ {
+ tmp = (int) rd % (int) ea;
+ res = (int) rd / (int) ea;
+ nz = 1;
+ }
+ else
+ {
+ tmp = 0;
+ res = 0;
+ nz = 0;
+ }
+
+ n = res & 0x80000000;
+ if (store (sd, &code->dst, (res & 0xffff) | (tmp << 16)))
+ goto end;
+ goto next;
+
+ case O (O_EXTS, SW): /* exts.w, signed extend */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
ea = rd & 0x80 ? -256 : 0;
- res = rd + ea;
+ res = (rd & 0xff) + ea;
goto log16;
- case O (O_EXTS, SL):
- rd = GET_W_REG (code->src.reg) & 0xffff;
+
+ case O (O_EXTS, SL): /* exts.l, signed extend */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (code->src.type == X (OP_IMM, SL))
+ {
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+
+ if (ea == 2) /* exts.l #2, nn */
+ {
+ /* Sign-extend from 8-bit to 32-bit. */
+ ea = rd & 0x80 ? -256 : 0;
+ res = (rd & 0xff) + ea;
+ goto log32;
+ }
+ }
+ /* Sign-extend from 16-bit to 32-bit. */
ea = rd & 0x8000 ? -65536 : 0;
- res = rd + ea;
+ res = (rd & 0xffff) + ea;
goto log32;
- case O (O_EXTU, SW):
- rd = GET_W_REG (code->src.reg) & 0xff;
+
+ case O (O_EXTU, SW): /* extu.w, unsigned extend */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
ea = 0;
- res = rd + ea;
+ res = (rd & 0xff) + ea;
goto log16;
- case O (O_EXTU, SL):
- rd = GET_W_REG (code->src.reg) & 0xffff;
+
+ case O (O_EXTU, SL): /* extu.l, unsigned extend */
+ if (fetch2 (sd, &code->dst, &rd))
+ goto end;
+ if (code->src.type == X (OP_IMM, SL))
+ {
+ if (fetch (sd, &code->src, &ea))
+ goto end;
+
+ if (ea == 2) /* extu.l #2, nn */
+ {
+ /* Zero-extend from 8-bit to 32-bit. */
+ ea = 0;
+ res = (rd & 0xff) + ea;
+ goto log32;
+ }
+ }
+ /* Zero-extend from 16-bit to 32-bit. */
ea = 0;
- res = rd + ea;
+ res = (rd & 0xffff) + ea;
goto log32;
- case O (O_NOP, SN):
+ case O (O_NOP, SN): /* nop */
goto next;
- case O (O_STM, SL):
+ case O (O_STM, SL): /* stm, store to memory */
{
int nregs, firstreg, i;
nregs = GET_MEMORY_B (pc + 1);
nregs >>= 4;
nregs &= 0xf;
- firstreg = GET_MEMORY_B (pc + 3);
+ firstreg = code->src.reg;
firstreg &= 0xf;
for (i = firstreg; i <= firstreg + nregs; i++)
{
- cpu.regs[7] -= 4;
- SET_MEMORY_L (cpu.regs[7], cpu.regs[i]);
+ h8_set_reg (sd, SP_REGNUM, h8_get_reg (sd, SP_REGNUM) - 4);
+ SET_MEMORY_L (h8_get_reg (sd, SP_REGNUM), h8_get_reg (sd, i));
}
}
goto next;
- case O (O_LDM, SL):
+ case O (O_LDM, SL): /* ldm, load from memory */
{
int nregs, firstreg, i;
nregs = GET_MEMORY_B (pc + 1);
nregs >>= 4;
nregs &= 0xf;
- firstreg = GET_MEMORY_B (pc + 3);
+ firstreg = code->dst.reg;
firstreg &= 0xf;
for (i = firstreg; i >= firstreg - nregs; i--)
{
- cpu.regs[i] = GET_MEMORY_L (cpu.regs[7]);
- cpu.regs[7] += 4;
+ h8_set_reg (sd, i, GET_MEMORY_L (h8_get_reg (sd, SP_REGNUM)));
+ h8_set_reg (sd, SP_REGNUM, h8_get_reg (sd, SP_REGNUM) + 4);
}
}
goto next;
@@ -2141,73 +4209,91 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
case O (O_DAA, SB):
/* Decimal Adjust Addition. This is for BCD arithmetic. */
res = GET_B_REG (code->src.reg);
- if (!c && (0 <= (res >> 4) && (res >> 4) <= 9)
- && !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
+ if (!c && (0 <= (res >> 4) && (res >> 4) <= 9) &&
+ !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
res = res; /* Value added == 0. */
- else if (!c && (0 <= (res >> 4) && (res >> 4) <= 8)
- && !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
+ else if (!c && (0 <= (res >> 4) && (res >> 4) <= 8) &&
+ !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
res = res + 0x6; /* Value added == 6. */
- else if (!c && (0 <= (res >> 4) && (res >> 4) <= 9)
- && h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
+ else if (!c && (0 <= (res >> 4) && (res >> 4) <= 9) &&
+ h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
res = res + 0x6; /* Value added == 6. */
- else if (!c && (10 <= (res >> 4) && (res >> 4) <= 15)
- && !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
+ else if (!c && (10 <= (res >> 4) && (res >> 4) <= 15) &&
+ !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
res = res + 0x60; /* Value added == 60. */
- else if (!c && (9 <= (res >> 4) && (res >> 4) <= 15)
- && !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
+ else if (!c && (9 <= (res >> 4) && (res >> 4) <= 15) &&
+ !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
+ res = res + 0x66; /* Value added == 66. */
+ else if (!c && (10 <= (res >> 4) && (res >> 4) <= 15) &&
+ h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
res = res + 0x66; /* Value added == 66. */
- else if (!c && (10 <= (res >> 4) && (res >> 4) <= 15)
- && h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
+ else if ( c && (1 <= (res >> 4) && (res >> 4) <= 2) &&
+ !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
+ res = res + 0x60; /* Value added == 60. */
+ else if ( c && (1 <= (res >> 4) && (res >> 4) <= 2) &&
+ !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
+ res = res + 0x66; /* Value added == 66. */
+ else if (c && (1 <= (res >> 4) && (res >> 4) <= 3) &&
+ h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
res = res + 0x66; /* Value added == 66. */
- else if (c && (1 <= (res >> 4) && (res >> 4) <= 2)
- && !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
- res = res + 0x160; /* Value added == 60, plus 'carry'. */
- else if (c && (1 <= (res >> 4) && (res >> 4) <= 2)
- && !h && (10 <= (res & 0xf) && (res & 0xf) <= 15))
- res = res + 0x166; /* Value added == 66, plus 'carry'. */
- else if (c && (1 <= (res >> 4) && (res >> 4) <= 3)
- && h && (0 <= (res & 0xf) && (res & 0xf) <= 3))
- res = res + 0x166; /* Value added == 66, plus 'carry'. */
goto alu8;
case O (O_DAS, SB):
/* Decimal Adjust Subtraction. This is for BCD arithmetic. */
res = GET_B_REG (code->src.reg); /* FIXME fetch, fetch2... */
- if (!c && (0 <= (res >> 4) && (res >> 4) <= 9)
- && !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
+ if (!c && (0 <= (res >> 4) && (res >> 4) <= 9) &&
+ !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
res = res; /* Value added == 0. */
- else if (!c && (0 <= (res >> 4) && (res >> 4) <= 8)
- && h && (6 <= (res & 0xf) && (res & 0xf) <= 15))
+ else if (!c && (0 <= (res >> 4) && (res >> 4) <= 8) &&
+ h && (6 <= (res & 0xf) && (res & 0xf) <= 15))
res = res + 0xfa; /* Value added == 0xfa. */
- else if (c && (7 <= (res >> 4) && (res >> 4) <= 15)
- && !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
+ else if ( c && (7 <= (res >> 4) && (res >> 4) <= 15) &&
+ !h && (0 <= (res & 0xf) && (res & 0xf) <= 9))
res = res + 0xa0; /* Value added == 0xa0. */
- else if (c && (6 <= (res >> 4) && (res >> 4) <= 15)
- && h && (6 <= (res & 0xf) && (res & 0xf) <= 15))
+ else if (c && (6 <= (res >> 4) && (res >> 4) <= 15) &&
+ h && (6 <= (res & 0xf) && (res & 0xf) <= 15))
res = res + 0x9a; /* Value added == 0x9a. */
goto alu8;
default:
illegal:
- cpu.state = SIM_STATE_STOPPED;
- cpu.exception = SIGILL;
+ sim_engine_set_run_state (sd, sim_stopped, SIGILL);
goto end;
}
- abort ();
+
+ (*sim_callback->printf_filtered) (sim_callback,
+ "sim_resume: internal error.\n");
+ sim_engine_set_run_state (sd, sim_stopped, SIGILL);
+ goto end;
setc:
- if (code->dst.type == OP_CCR)
+ if (code->dst.type == X (OP_CCR, SB) ||
+ code->dst.type == X (OP_CCR, SW))
{
- cpu.ccr = res;
- GETSR ();
+ h8_set_ccr (sd, res);
+ /* Get Status Register (flags). */
+ c = (h8_get_ccr (sd) >> 0) & 1;
+ v = (h8_get_ccr (sd) >> 1) & 1;
+ nz = !((h8_get_ccr (sd) >> 2) & 1);
+ n = (h8_get_ccr (sd) >> 3) & 1;
+ u = (h8_get_ccr (sd) >> 4) & 1;
+ h = (h8_get_ccr (sd) >> 5) & 1;
+ ui = ((h8_get_ccr (sd) >> 6) & 1);
+ intMaskBit = (h8_get_ccr (sd) >> 7) & 1;
}
- else if (code->dst.type == OP_EXR && h8300smode)
+ else if (h8300smode &&
+ (code->dst.type == X (OP_EXR, SB) ||
+ code->dst.type == X (OP_EXR, SW)))
{
- cpu.exr = res;
- GETEXR ();
+ h8_set_exr (sd, res);
+ if (h8300smode) /* Get exr. */
+ {
+ trace = (h8_get_exr (sd) >> 7) & 1;
+ intMask = h8_get_exr (sd) & 7;
+ }
}
else
goto illegal;
@@ -2216,7 +4302,11 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
condtrue:
/* When a branch works */
- pc = code->src.literal;
+ if (fetch (sd, &code->src, &res))
+ goto end;
+ if (res & 1) /* bad address */
+ goto illegal;
+ pc = code->next_pc + res;
goto end;
/* Set the cond codes from res */
@@ -2229,7 +4319,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
v = (rd & 0x7f) == 0x7f;
goto next;
-
/* Set the flags after an 16 bit inc/dec operation */
just_flags_inc16:
n = res & 0x8000;
@@ -2237,7 +4326,6 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
v = (rd & 0x7fff) == 0x7fff;
goto next;
-
/* Set the flags after an 32 bit inc/dec operation */
just_flags_inc32:
n = res & 0x80000000;
@@ -2245,30 +4333,34 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
v = (rd & 0x7fffffff) == 0x7fffffff;
goto next;
-
shift8:
/* Set flags after an 8 bit shift op, carry,overflow set in insn */
n = (rd & 0x80);
nz = rd & 0xff;
- SET_B_REG (code->src.reg, rd);
+ if (store2 (sd, &code->dst, rd))
+ goto end;
goto next;
shift16:
/* Set flags after an 16 bit shift op, carry,overflow set in insn */
n = (rd & 0x8000);
nz = rd & 0xffff;
- SET_W_REG (code->src.reg, rd);
+ if (store2 (sd, &code->dst, rd))
+ goto end;
goto next;
shift32:
/* Set flags after an 32 bit shift op, carry,overflow set in insn */
n = (rd & 0x80000000);
nz = rd & 0xffffffff;
- SET_L_REG (code->src.reg, rd);
+ if (store2 (sd, &code->dst, rd))
+ goto end;
goto next;
log32:
- store (&code->dst, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_log32:
/* flags after a 32bit logical operation */
n = res & 0x80000000;
@@ -2277,7 +4369,9 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
goto next;
log16:
- store (&code->dst, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_log16:
/* flags after a 16bit logical operation */
n = res & 0x8000;
@@ -2285,9 +4379,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
v = 0;
goto next;
-
log8:
- store (&code->dst, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_log8:
n = res & 0x80;
nz = res & 0xff;
@@ -2295,7 +4390,9 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
goto next;
alu8:
- SET_B_REG (code->dst.reg, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_alu8:
n = res & 0x80;
nz = res & 0xff;
@@ -2303,10 +4400,12 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
switch (code->opcode / 4)
{
case O_ADD:
+ case O_ADDX:
v = ((rd & 0x80) == (ea & 0x80)
&& (rd & 0x80) != (res & 0x80));
break;
case O_SUB:
+ case O_SUBX:
case O_CMP:
v = ((rd & 0x80) != (-ea & 0x80)
&& (rd & 0x80) != (res & 0x80));
@@ -2314,11 +4413,16 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
case O_NEG:
v = (rd == 0x80);
break;
+ case O_DAA:
+ case O_DAS:
+ break; /* No effect on v flag. */
}
goto next;
alu16:
- SET_W_REG (code->dst.reg, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_alu16:
n = res & 0x8000;
nz = res & 0xffff;
@@ -2326,10 +4430,12 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
switch (code->opcode / 4)
{
case O_ADD:
+ case O_ADDX:
v = ((rd & 0x8000) == (ea & 0x8000)
&& (rd & 0x8000) != (res & 0x8000));
break;
case O_SUB:
+ case O_SUBX:
case O_CMP:
v = ((rd & 0x8000) != (-ea & 0x8000)
&& (rd & 0x8000) != (res & 0x8000));
@@ -2341,18 +4447,23 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
goto next;
alu32:
- SET_L_REG (code->dst.reg, res);
+ if (store2 (sd, &code->dst, res))
+ goto end;
+
just_flags_alu32:
n = res & 0x80000000;
nz = res & 0xffffffff;
switch (code->opcode / 4)
{
case O_ADD:
+ case O_ADDX:
v = ((rd & 0x80000000) == (ea & 0x80000000)
&& (rd & 0x80000000) != (res & 0x80000000));
- c = ((unsigned) res < (unsigned) rd) || ((unsigned) res < (unsigned) ea);
+ c = ((unsigned) res < (unsigned) rd) ||
+ ((unsigned) res < (unsigned) ea);
break;
case O_SUB:
+ case O_SUBX:
case O_CMP:
v = ((rd & 0x80000000) != (-ea & 0x80000000)
&& (rd & 0x80000000) != (res & 0x80000000));
@@ -2365,34 +4476,37 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
}
goto next;
- next:;
- pc = code->next_pc;
+ next:
+ if ((res = h8_get_delayed_branch (sd)) != 0)
+ {
+ pc = res;
+ h8_set_delayed_branch (sd, 0);
+ }
+ else
+ pc = code->next_pc;
end:
- ;
-#if 0
- if (cpu.regs[8])
- abort ();
-#endif
-
+
if (--poll_count < 0)
{
poll_count = POLL_QUIT_INTERVAL;
if ((*sim_callback->poll_quit) != NULL
&& (*sim_callback->poll_quit) (sim_callback))
- sim_stop (sd);
+ sim_engine_set_run_state (sd, sim_stopped, SIGINT);
}
+ sim_engine_get_run_state (sd, &reason, &sigrc);
+ } while (reason == sim_running);
- }
- while (cpu.state == SIM_STATE_RUNNING);
- cpu.ticks += get_now () - tick_start;
- cpu.cycles += cycles;
- cpu.insts += insts;
-
- cpu.pc = pc;
- BUILDSR ();
- BUILDEXR ();
- cpu.mask = oldmask;
+ h8_set_ticks (sd, h8_get_ticks (sd) + get_now () - tick_start);
+ h8_set_cycles (sd, h8_get_cycles (sd) + cycles);
+ h8_set_insts (sd, h8_get_insts (sd) + insts);
+ h8_set_pc (sd, pc);
+ BUILDSR (sd);
+
+ if (h8300smode)
+ h8_set_exr (sd, (trace<<7) | intMask);
+
+ h8_set_mask (sd, oldmask);
signal (SIGINT, prev);
}
@@ -2400,7 +4514,9 @@ int
sim_trace (SIM_DESC sd)
{
/* FIXME: Unfinished. */
- abort ();
+ (*sim_callback->printf_filtered) (sim_callback,
+ "sim_trace: trace not supported.\n");
+ return 1; /* Done. */
}
int
@@ -2408,18 +4524,20 @@ sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
{
int i;
- init_pointers ();
+ init_pointers (sd);
if (addr < 0)
return 0;
for (i = 0; i < size; i++)
{
if (addr < memory_size)
{
- cpu.memory[addr + i] = buffer[i];
- cpu.cache_idx[addr + i] = 0;
+ h8_set_memory (sd, addr + i, buffer[i]);
+ h8_set_cache_idx (sd, addr + i, 0);
}
else
- cpu.eightbit[(addr + i) & 0xff] = buffer[i];
+ {
+ h8_set_eightbit (sd, (addr + i) & 0xff, buffer[i]);
+ }
}
return size;
}
@@ -2427,13 +4545,13 @@ sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
int
sim_read (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
{
- init_pointers ();
+ init_pointers (sd);
if (addr < 0)
return 0;
if (addr < memory_size)
- memcpy (buffer, cpu.memory + addr, size);
+ memcpy (buffer, h8_get_memory_buf (sd) + addr, size);
else
- memcpy (buffer, cpu.eightbit + (addr & 0xff), size);
+ memcpy (buffer, h8_get_eightbit_buf (sd) + (addr & 0xff), size);
return size;
}
@@ -2448,14 +4566,16 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length)
shortval = (value[0] << 8) | (value[1]);
intval = h8300hmode ? longval : shortval;
- init_pointers ();
+ init_pointers (sd);
switch (rn)
{
case PC_REGNUM:
- cpu.pc = intval;
+ h8_set_pc (sd, intval);
break;
default:
- abort ();
+ (*sim_callback->printf_filtered) (sim_callback,
+ "sim_store_register: bad regnum %d.\n",
+ rn);
case R0_REGNUM:
case R1_REGNUM:
case R2_REGNUM:
@@ -2464,24 +4584,24 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length)
case R5_REGNUM:
case R6_REGNUM:
case R7_REGNUM:
- cpu.regs[rn] = intval;
+ h8_set_reg (sd, rn, intval);
break;
case CCR_REGNUM:
- cpu.ccr = intval;
+ h8_set_ccr (sd, intval);
break;
case EXR_REGNUM:
- cpu.exr = intval;
+ h8_set_exr (sd, intval);
break;
case CYCLE_REGNUM:
- cpu.cycles = longval;
+ h8_set_cycles (sd, longval);
break;
case INST_REGNUM:
- cpu.insts = longval;
+ h8_set_insts (sd, longval);
break;
case TICK_REGNUM:
- cpu.ticks = longval;
+ h8_set_ticks (sd, longval);
break;
}
return -1;
@@ -2493,22 +4613,26 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
int v;
int longreg = 0;
- init_pointers ();
+ init_pointers (sd);
if (!h8300smode && rn >= EXR_REGNUM)
rn++;
switch (rn)
{
default:
- abort ();
+ (*sim_callback->printf_filtered) (sim_callback,
+ "sim_fetch_register: bad regnum %d.\n",
+ rn);
+ v = 0;
+ break;
case CCR_REGNUM:
- v = cpu.ccr;
+ v = h8_get_ccr (sd);
break;
case EXR_REGNUM:
- v = cpu.exr;
+ v = h8_get_exr (sd);
break;
case PC_REGNUM:
- v = cpu.pc;
+ v = h8_get_pc (sd);
break;
case R0_REGNUM:
case R1_REGNUM:
@@ -2518,18 +4642,18 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
case R5_REGNUM:
case R6_REGNUM:
case R7_REGNUM:
- v = cpu.regs[rn];
+ v = h8_get_reg (sd, rn);
break;
case CYCLE_REGNUM:
- v = cpu.cycles;
+ v = h8_get_cycles (sd);
longreg = 1;
break;
case TICK_REGNUM:
- v = cpu.ticks;
+ v = h8_get_ticks (sd);
longreg = 1;
break;
case INST_REGNUM:
- v = cpu.insts;
+ v = h8_get_insts (sd);
longreg = 1;
break;
}
@@ -2551,19 +4675,7 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
void
sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc)
{
-#if 0 /* FIXME: This should work but we can't use it.
- grep for SLEEP above. */
- switch (cpu.state)
- {
- case SIM_STATE_EXITED : *reason = sim_exited; break;
- case SIM_STATE_SIGNALLED : *reason = sim_signalled; break;
- case SIM_STATE_STOPPED : *reason = sim_stopped; break;
- default : abort ();
- }
-#else
- *reason = sim_stopped;
-#endif
- *sigrc = cpu.exception;
+ sim_engine_get_run_state (sd, reason, sigrc);
}
/* FIXME: Rename to sim_set_mem_size. */
@@ -2574,36 +4686,36 @@ sim_size (int n)
/* Memory size is fixed. */
}
-void
-sim_set_simcache_size (int n)
+static void
+set_simcache_size (SIM_DESC sd, int n)
{
- if (cpu.cache)
- free (cpu.cache);
+ if (sd->sim_cache)
+ free (sd->sim_cache);
if (n < 2)
n = 2;
- cpu.cache = (decoded_inst *) malloc (sizeof (decoded_inst) * n);
- memset (cpu.cache, 0, sizeof (decoded_inst) * n);
- cpu.csize = n;
+ sd->sim_cache = (decoded_inst *) malloc (sizeof (decoded_inst) * n);
+ memset (sd->sim_cache, 0, sizeof (decoded_inst) * n);
+ sd->sim_cache_size = n;
}
void
sim_info (SIM_DESC sd, int verbose)
{
- double timetaken = (double) cpu.ticks / (double) now_persec ();
- double virttime = cpu.cycles / 10.0e6;
+ double timetaken = (double) h8_get_ticks (sd) / (double) now_persec ();
+ double virttime = h8_get_cycles (sd) / 10.0e6;
(*sim_callback->printf_filtered) (sim_callback,
"\n\n#instructions executed %10d\n",
- cpu.insts);
+ h8_get_insts (sd));
(*sim_callback->printf_filtered) (sim_callback,
"#cycles (v approximate) %10d\n",
- cpu.cycles);
+ h8_get_cycles (sd));
(*sim_callback->printf_filtered) (sim_callback,
"#real time taken %10.4f\n",
timetaken);
(*sim_callback->printf_filtered) (sim_callback,
- "#virtual time taked %10.4f\n",
+ "#virtual time taken %10.4f\n",
virttime);
if (timetaken != 0.0)
(*sim_callback->printf_filtered) (sim_callback,
@@ -2611,10 +4723,10 @@ sim_info (SIM_DESC sd, int verbose)
virttime / timetaken);
(*sim_callback->printf_filtered) (sim_callback,
"#compiles %10d\n",
- cpu.compiles);
+ h8_get_compiles (sd));
(*sim_callback->printf_filtered) (sim_callback,
"#cache size %10d\n",
- cpu.csize);
+ sd->sim_cache_size);
#ifdef ADEBUG
/* This to be conditional on `what' (aka `verbose'),
@@ -2624,9 +4736,9 @@ sim_info (SIM_DESC sd, int verbose)
int i;
for (i = 0; i < O_LAST; i++)
{
- if (cpu.stats[i])
- (*sim_callback->printf_filtered) (sim_callback,
- "%d: %d\n", i, cpu.stats[i]);
+ if (h8_get_stats (sd, i))
+ (*sim_callback->printf_filtered) (sim_callback, "%d: %d\n",
+ i, h8_get_stats (sd, i));
}
}
#endif
@@ -2636,28 +4748,105 @@ sim_info (SIM_DESC sd, int verbose)
FLAG is non-zero for the H8/300H. */
void
-set_h8300h (int h_flag, int s_flag)
+set_h8300h (unsigned long machine)
{
/* FIXME: Much of the code in sim_load can be moved to sim_open.
This function being replaced by a sim_open:ARGV configuration
option. */
- h8300hmode = h_flag;
- h8300smode = s_flag;
+
+ if (machine == bfd_mach_h8300sx)
+ h8300sxmode = 1;
+
+ if (machine == bfd_mach_h8300s || machine == bfd_mach_h8300sn || h8300sxmode)
+ h8300smode = 1;
+
+ if (machine == bfd_mach_h8300h || machine == bfd_mach_h8300hn || h8300smode)
+ h8300hmode = 1;
+}
+
+/* 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);
+
+ /* Fixme: free buffers in _sim_cpu. */
+ sim_state_free (sd);
}
SIM_DESC
sim_open (SIM_OPEN_KIND kind,
- struct host_callback_struct *ptr,
+ struct host_callback_struct *callback,
struct bfd *abfd,
char **argv)
{
+ SIM_DESC sd;
+ sim_cpu *cpu;
+
+ sd = sim_state_alloc (kind, callback);
+ sd->cpu = sim_cpu_alloc (sd, 0);
+ cpu = STATE_CPU (sd, 0);
+ SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
+ sim_state_initialize (sd, cpu);
+ /* sim_cpu object is new, so some initialization is needed. */
+ init_pointers_needed = 1;
+
+ /* For compatibility (FIXME: is this right?). */
+ current_alignment = NONSTRICT_ALIGNMENT;
+ current_target_byte_order = BIG_ENDIAN;
+
+ if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
+ {
+ free_state (sd);
+ return 0;
+ }
+
+ /* getopt will print the error message so we just have to exit if
+ this fails. FIXME: Hmmm... in the case of gdb we need getopt
+ to call print_filtered. */
+ if (sim_parse_args (sd, argv) != SIM_RC_OK)
+ {
+ /* Uninstall the modules to avoid memory leaks,
+ file descriptor leaks, etc. */
+ free_state (sd);
+ return 0;
+ }
+
+ /* Check for/establish the a reference program image. */
+ if (sim_analyze_program (sd,
+ (STATE_PROG_ARGV (sd) != NULL
+ ? *STATE_PROG_ARGV (sd)
+ : NULL), abfd) != SIM_RC_OK)
+ {
+ 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)
+ {
+ /* Uninstall the modules to avoid memory leaks,
+ file descriptor leaks, etc. */
+ free_state (sd);
+ return 0;
+ }
+
+ /* sim_hw_configure (sd); */
+
/* FIXME: Much of the code in sim_load can be moved here. */
sim_kind = kind;
myname = argv[0];
- sim_callback = ptr;
- /* Fudge our descriptor. */
- return (SIM_DESC) 1;
+ sim_callback = callback;
+ return sd;
}
void
@@ -2689,9 +4878,7 @@ sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
and bfd_openr as sim_load_file checks too. */
if (bfd_check_format (prog_bfd, bfd_object))
{
- unsigned long mach = bfd_get_mach (prog_bfd);
- set_h8300h (mach == bfd_mach_h8300h || mach == bfd_mach_h8300s,
- mach == bfd_mach_h8300s);
+ set_h8300h (bfd_get_mach (prog_bfd));
}
}
@@ -2717,21 +4904,27 @@ sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
else
memory_size = H8300_MSIZE;
- if (cpu.memory)
- free (cpu.memory);
- if (cpu.cache_idx)
- free (cpu.cache_idx);
- if (cpu.eightbit)
- free (cpu.eightbit);
+ if (h8_get_memory_buf (sd))
+ free (h8_get_memory_buf (sd));
+ if (h8_get_cache_idx_buf (sd))
+ free (h8_get_cache_idx_buf (sd));
+ if (h8_get_eightbit_buf (sd))
+ free (h8_get_eightbit_buf (sd));
- cpu.memory = (unsigned char *) calloc (sizeof (char), memory_size);
- cpu.cache_idx = (unsigned short *) calloc (sizeof (short), memory_size);
- cpu.eightbit = (unsigned char *) calloc (sizeof (char), 256);
+ h8_set_memory_buf (sd, (unsigned char *)
+ calloc (sizeof (char), memory_size));
+ h8_set_cache_idx_buf (sd, (unsigned short *)
+ calloc (sizeof (short), memory_size));
+ h8_set_eightbit_buf (sd, (unsigned char *) calloc (sizeof (char), 256));
/* `msize' must be a power of two. */
if ((memory_size & (memory_size - 1)) != 0)
- abort ();
- cpu.mask = memory_size - 1;
+ {
+ (*sim_callback->printf_filtered) (sim_callback,
+ "sim_load: bad memory size.\n");
+ return SIM_RC_FAIL;
+ }
+ h8_set_mask (sd, memory_size - 1);
if (sim_load_file (sd, myname, sim_callback, prog, prog_bfd,
sim_kind == SIM_OPEN_DEBUG,
@@ -2756,11 +4949,11 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env)
int i = 0;
int len_arg = 0;
int no_of_args = 0;
-
+
if (abfd != NULL)
- cpu.pc = bfd_get_start_address (abfd);
+ h8_set_pc (sd, bfd_get_start_address (abfd));
else
- cpu.pc = 0;
+ h8_set_pc (sd, 0);
/* Command Line support. */
if (argv != NULL)
@@ -2770,18 +4963,15 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env)
continue;
/* Allocating memory for the argv pointers. */
- ptr_command_line = (char **) malloc ((sizeof (char *))
- * (no_of_args + 1));
+ h8_set_command_line (sd, (char **) malloc ((sizeof (char *))
+ * (no_of_args + 1)));
for (i = 0; i < no_of_args; i++)
{
- /* Calculating the length of argument for allocating memory. */
- len_arg = strlen (argv[i] + 1);
- ptr_command_line[i] = (char *) malloc (sizeof (char) * len_arg);
/* Copying the argument string. */
- ptr_command_line[i] = (char *) strdup (argv[i]);
+ h8_set_cmdline_arg (sd, i, (char *) strdup (argv[i]));
}
- ptr_command_line[i] = NULL;
+ h8_set_cmdline_arg (sd, i, NULL);
}
return SIM_RC_OK;
diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h
new file mode 100644
index 00000000000..11fc3204759
--- /dev/null
+++ b/sim/h8300/sim-main.h
@@ -0,0 +1,170 @@
+/* Main header for the Hitachi h8/300 architecture. */
+
+#include "bfd.h"
+
+#ifndef SIM_MAIN_H
+#define SIM_MAIN_H
+
+#define DEBUG
+
+/* These define the size of main memory for the simulator.
+
+ Note the size of main memory for the H8/300H is only 256k. Keeping it
+ small makes the simulator run much faster and consume less memory.
+
+ The linker knows about the limited size of the simulator's main memory
+ on the H8/300H (via the h8300h.sc linker script). So if you change
+ H8300H_MSIZE, be sure to fix the linker script too.
+
+ Also note that there's a separate "eightbit" area aside from main
+ memory. For simplicity, the simulator assumes any data memory reference
+ outside of main memory refers to the eightbit area (in theory, this
+ can only happen when simulating H8/300H programs). We make no attempt
+ to catch overlapping addresses, wrapped addresses, etc etc. */
+
+#define H8300_MSIZE (1 << 16)
+
+/* avolkov:
+ Next 2 macros are ugly for any workstation, but while they're work.
+ Memory size MUST be configurable. */
+#define H8300H_MSIZE (1 << 18)
+#define H8300S_MSIZE (1 << 24)
+
+#define CSIZE 1024
+
+enum h8_regnum {
+ R0_REGNUM = 0,
+ R1_REGNUM = 1,
+ R2_REGNUM = 2,
+ R3_REGNUM = 3,
+ R4_REGNUM = 4,
+ R5_REGNUM = 5,
+ R6_REGNUM = 6,
+ R7_REGNUM = 7,
+
+ SP_REGNUM = R7_REGNUM, /* Contains address of top of stack */
+ FP_REGNUM = R6_REGNUM, /* Contains address of executing
+ stack frame */
+ CCR_REGNUM = 8, /* Contains processor status */
+ PC_REGNUM = 9, /* Contains program counter */
+ CYCLE_REGNUM = 10,
+ EXR_REGNUM = 11,
+ INST_REGNUM = 12,
+ TICK_REGNUM = 13,
+ SBR_REGNUM = 14,
+ VBR_REGNUM = 15,
+ MACH_REGNUM = 16,
+ MACL_REGNUM = 17,
+
+ ZERO_REGNUM = 18
+};
+
+enum h8_typecodes {
+ OP_NULL,
+ OP_REG, /* Register direct. */
+ OP_LOWREG, /* Special reg syntax for "bra". */
+ OP_DISP, /* Register indirect w/displacement. */
+ /* Note: h8300, h8300h, and h8300s permit only pre-decr and post-incr. */
+ OP_PREDEC, /* Register indirect w/pre-decrement. */
+ OP_POSTDEC, /* Register indirect w/post-decrement. */
+ OP_PREINC, /* Register indirect w/pre-increment. */
+ OP_POSTINC, /* Register indirect w/post-increment. */
+ OP_PCREL, /* PC Relative. */
+ OP_MEM, /* Absolute memory address. */
+ OP_CCR, /* Condition Code Register. */
+ OP_IMM, /* Immediate value. */
+ /*OP_ABS*/ /* Un-used (duplicates op_mem?). */
+ OP_EXR, /* EXtended control Register. */
+ OP_SBR, /* Vector Base Register. */
+ OP_VBR, /* Short-address Base Register. */
+ OP_MACH, /* Multiply Accumulator - high. */
+ OP_MACL, /* Multiply Accumulator - low. */
+ /* FIXME: memory indirect? */
+ OP_INDEXB, /* Byte index mode */
+ OP_INDEXW, /* Word index mode */
+ OP_INDEXL /* Long index mode */
+};
+
+#include "sim-basics.h"
+
+/* Define sim_cia. */
+typedef unsigned32 sim_cia;
+
+#include "sim-base.h"
+
+/* Structure used to describe addressing */
+
+typedef struct
+{
+ int type;
+ int reg;
+ int literal;
+} ea_type;
+
+/* Struct for instruction decoder. */
+typedef struct
+{
+ ea_type src;
+ ea_type dst;
+ ea_type op3;
+ int opcode;
+ int next_pc;
+ int oldpc;
+ int cycles;
+#ifdef DEBUG
+ struct h8_opcode *op;
+#endif
+} decoded_inst;
+
+struct _sim_cpu {
+ unsigned int regs[20]; /* 8 GR's plus ZERO, SBR, and VBR. */
+ unsigned int pc;
+
+ int macS; /* MAC Saturating mode */
+ int macV; /* MAC Overflow */
+ int macN; /* MAC Negative */
+ int macZ; /* MAC Zero */
+
+ int delayed_branch;
+ char **command_line; /* Pointer to command line arguments. */
+
+ unsigned char *memory;
+ unsigned char *eightbit;
+ int mask;
+
+ sim_cpu_base base;
+};
+
+/* The sim_state struct. */
+struct sim_state {
+ struct _sim_cpu *cpu;
+ unsigned int sim_cache_size;
+ decoded_inst *sim_cache;
+ unsigned short *cache_idx;
+ unsigned long memory_size;
+ int cache_top;
+ int compiles;
+#ifdef ADEBUG
+ int stats[O_LAST];
+#endif
+ sim_state_base base;
+};
+
+/* The current state of the processor; registers, memory, etc. */
+
+#define CIA_GET(CPU) (cpu_get_pc (CPU))
+#define CIA_SET(CPU, VAL) (cpu_set_pc ((CPU), (VAL)))
+#define STATE_CPU(SD, N) ((SD)->cpu) /* Single Processor. */
+#define cpu_set_pc(CPU, VAL) (((CPU)->pc) = (VAL))
+#define cpu_get_pc(CPU) (((CPU)->pc))
+
+/* Magic numbers used to distinguish an exit from a breakpoint. */
+#define LIBC_EXIT_MAGIC1 0xdead
+#define LIBC_EXIT_MAGIC2 0xbeef
+/* Local version of macros for decoding exit status.
+ (included here rather than try to find target version of wait.h)
+*/
+#define SIM_WIFEXITED(V) (((V) & 0xff) == 0)
+#define SIM_WEXITSTATUS(V) ((V) >> 8)
+
+#endif /* SIM_MAIN_H */
diff --git a/sim/testsuite/sim/sh64/ChangeLog b/sim/testsuite/sim/sh64/ChangeLog
new file mode 100644
index 00000000000..8bb2f764ae6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/ChangeLog
@@ -0,0 +1,21 @@
+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.
diff --git a/sim/testsuite/sim/sh64/compact.exp b/sim/testsuite/sim/sh64/compact.exp
new file mode 100644
index 00000000000..d3d482acf0f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact.exp
@@ -0,0 +1,19 @@
+# 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
+ }
+}
diff --git a/sim/testsuite/sim/sh64/compact/ChangeLog b/sim/testsuite/sim/sh64/compact/ChangeLog
new file mode 100644
index 00000000000..99aaec1ff02
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ChangeLog
@@ -0,0 +1,26 @@
+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.
+
diff --git a/sim/testsuite/sim/sh64/compact/add.cgs b/sim/testsuite/sim/sh64/compact/add.cgs
new file mode 100644
index 00000000000..105e4849069
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/add.cgs
@@ -0,0 +1,55 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/addc.cgs b/sim/testsuite/sim/sh64/compact/addc.cgs
new file mode 100644
index 00000000000..f6e46e1a969
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/addc.cgs
@@ -0,0 +1,90 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/addi.cgs b/sim/testsuite/sim/sh64/compact/addi.cgs
new file mode 100644
index 00000000000..7c96ddf76d5
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/addi.cgs
@@ -0,0 +1,46 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/addv.cgs b/sim/testsuite/sim/sh64/compact/addv.cgs
new file mode 100644
index 00000000000..0267e5dfa00
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/addv.cgs
@@ -0,0 +1,48 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/and.cgs b/sim/testsuite/sim/sh64/compact/and.cgs
new file mode 100644
index 00000000000..e1452752ae0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/and.cgs
@@ -0,0 +1,33 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/andb.cgs b/sim/testsuite/sim/sh64/compact/andb.cgs
new file mode 100644
index 00000000000..77e628598b1
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/andb.cgs
@@ -0,0 +1,24 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/andi.cgs b/sim/testsuite/sim/sh64/compact/andi.cgs
new file mode 100644
index 00000000000..32d71c5b477
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/andi.cgs
@@ -0,0 +1,43 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/bf.cgs b/sim/testsuite/sim/sh64/compact/bf.cgs
new file mode 100644
index 00000000000..5c361f94b89
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/bf.cgs
@@ -0,0 +1,24 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/bfs.cgs b/sim/testsuite/sim/sh64/compact/bfs.cgs
new file mode 100644
index 00000000000..3cad5f6fc73
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/bfs.cgs
@@ -0,0 +1,28 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/bra.cgs b/sim/testsuite/sim/sh64/compact/bra.cgs
new file mode 100644
index 00000000000..77c6da9bdde
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/bra.cgs
@@ -0,0 +1,23 @@
+# 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
+
diff --git a/sim/testsuite/sim/sh64/compact/braf.cgs b/sim/testsuite/sim/sh64/compact/braf.cgs
new file mode 100644
index 00000000000..e761f6d0a6d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/braf.cgs
@@ -0,0 +1,24 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/brk.cgs b/sim/testsuite/sim/sh64/compact/brk.cgs
new file mode 100644
index 00000000000..99080724565
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/brk.cgs
@@ -0,0 +1,18 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/bsr.cgs b/sim/testsuite/sim/sh64/compact/bsr.cgs
new file mode 100644
index 00000000000..75a1a2b275e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/bsr.cgs
@@ -0,0 +1,21 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/bsrf.cgs b/sim/testsuite/sim/sh64/compact/bsrf.cgs
new file mode 100644
index 00000000000..9360eaa88b0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/bsrf.cgs
@@ -0,0 +1,22 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/bt.cgs b/sim/testsuite/sim/sh64/compact/bt.cgs
new file mode 100644
index 00000000000..65b9d61b885
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/bt.cgs
@@ -0,0 +1,24 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/bts.cgs b/sim/testsuite/sim/sh64/compact/bts.cgs
new file mode 100644
index 00000000000..3d62e4d822c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/bts.cgs
@@ -0,0 +1,28 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/clrmac.cgs b/sim/testsuite/sim/sh64/compact/clrmac.cgs
new file mode 100644
index 00000000000..482dc804d62
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/clrmac.cgs
@@ -0,0 +1,13 @@
+# sh testcase for clrmac -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global clrmac
+clrmac:
+ clrmac
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/clrs.cgs b/sim/testsuite/sim/sh64/compact/clrs.cgs
new file mode 100644
index 00000000000..bed5fd5178e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/clrs.cgs
@@ -0,0 +1,14 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/clrt.cgs b/sim/testsuite/sim/sh64/compact/clrt.cgs
new file mode 100644
index 00000000000..281c2f4243d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/clrt.cgs
@@ -0,0 +1,16 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/cmpeq.cgs b/sim/testsuite/sim/sh64/compact/cmpeq.cgs
new file mode 100644
index 00000000000..3cc744cf7f7
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/cmpeq.cgs
@@ -0,0 +1,52 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/cmpeqi.cgs b/sim/testsuite/sim/sh64/compact/cmpeqi.cgs
new file mode 100644
index 00000000000..79900a0cecc
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/cmpeqi.cgs
@@ -0,0 +1,39 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/cmpge.cgs b/sim/testsuite/sim/sh64/compact/cmpge.cgs
new file mode 100644
index 00000000000..9d4327e35cc
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/cmpge.cgs
@@ -0,0 +1,69 @@
+# 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
+
diff --git a/sim/testsuite/sim/sh64/compact/cmpgt.cgs b/sim/testsuite/sim/sh64/compact/cmpgt.cgs
new file mode 100644
index 00000000000..460ca65ae68
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/cmpgt.cgs
@@ -0,0 +1,69 @@
+# 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
+
diff --git a/sim/testsuite/sim/sh64/compact/cmphi.cgs b/sim/testsuite/sim/sh64/compact/cmphi.cgs
new file mode 100644
index 00000000000..efbcaa328cd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/cmphi.cgs
@@ -0,0 +1,68 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/cmphs.cgs b/sim/testsuite/sim/sh64/compact/cmphs.cgs
new file mode 100644
index 00000000000..957f80c0245
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/cmphs.cgs
@@ -0,0 +1,59 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/cmppl.cgs b/sim/testsuite/sim/sh64/compact/cmppl.cgs
new file mode 100644
index 00000000000..1c11377f34b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/cmppl.cgs
@@ -0,0 +1,37 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/cmppz.cgs b/sim/testsuite/sim/sh64/compact/cmppz.cgs
new file mode 100644
index 00000000000..2e0bf48e827
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/cmppz.cgs
@@ -0,0 +1,37 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/cmpstr.cgs b/sim/testsuite/sim/sh64/compact/cmpstr.cgs
new file mode 100644
index 00000000000..70d90d33c20
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/cmpstr.cgs
@@ -0,0 +1,148 @@
+# 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
+
diff --git a/sim/testsuite/sim/sh64/compact/div0s.cgs b/sim/testsuite/sim/sh64/compact/div0s.cgs
new file mode 100644
index 00000000000..8cd6422bea8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/div0s.cgs
@@ -0,0 +1,52 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/div0u.cgs b/sim/testsuite/sim/sh64/compact/div0u.cgs
new file mode 100644
index 00000000000..02f8534d4c4
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/div0u.cgs
@@ -0,0 +1,21 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/div1.cgs b/sim/testsuite/sim/sh64/compact/div1.cgs
new file mode 100644
index 00000000000..63a0e81cb12
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/div1.cgs
@@ -0,0 +1,52 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/dmulsl.cgs b/sim/testsuite/sim/sh64/compact/dmulsl.cgs
new file mode 100644
index 00000000000..081ce169955
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/dmulsl.cgs
@@ -0,0 +1,115 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/dmulul.cgs b/sim/testsuite/sim/sh64/compact/dmulul.cgs
new file mode 100644
index 00000000000..b34b870269d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/dmulul.cgs
@@ -0,0 +1,53 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/dt.cgs b/sim/testsuite/sim/sh64/compact/dt.cgs
new file mode 100644
index 00000000000..38e91638bd9
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/dt.cgs
@@ -0,0 +1,42 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/extsb.cgs b/sim/testsuite/sim/sh64/compact/extsb.cgs
new file mode 100644
index 00000000000..90878020a28
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/extsb.cgs
@@ -0,0 +1,29 @@
+# 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
+
diff --git a/sim/testsuite/sim/sh64/compact/extsw.cgs b/sim/testsuite/sim/sh64/compact/extsw.cgs
new file mode 100644
index 00000000000..d6257747df7
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/extsw.cgs
@@ -0,0 +1,32 @@
+# 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
+
diff --git a/sim/testsuite/sim/sh64/compact/extub.cgs b/sim/testsuite/sim/sh64/compact/extub.cgs
new file mode 100644
index 00000000000..51c14ac4359
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/extub.cgs
@@ -0,0 +1,31 @@
+# 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
+
diff --git a/sim/testsuite/sim/sh64/compact/extuw.cgs b/sim/testsuite/sim/sh64/compact/extuw.cgs
new file mode 100644
index 00000000000..057afe7d949
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/extuw.cgs
@@ -0,0 +1,31 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/fabs.cgs b/sim/testsuite/sim/sh64/compact/fabs.cgs
new file mode 100644
index 00000000000..6955fa2aa16
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fabs.cgs
@@ -0,0 +1,88 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/fadd.cgs b/sim/testsuite/sim/sh64/compact/fadd.cgs
new file mode 100644
index 00000000000..b00035308f8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fadd.cgs
@@ -0,0 +1,31 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/fcmpeq.cgs b/sim/testsuite/sim/sh64/compact/fcmpeq.cgs
new file mode 100644
index 00000000000..151d5e5647a
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fcmpeq.cgs
@@ -0,0 +1,88 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/fcmpgt.cgs b/sim/testsuite/sim/sh64/compact/fcmpgt.cgs
new file mode 100644
index 00000000000..931ae3e2e6c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fcmpgt.cgs
@@ -0,0 +1,95 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/fcnvds.cgs b/sim/testsuite/sim/sh64/compact/fcnvds.cgs
new file mode 100644
index 00000000000..abf9e704ffb
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fcnvds.cgs
@@ -0,0 +1,13 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/fcnvsd.cgs b/sim/testsuite/sim/sh64/compact/fcnvsd.cgs
new file mode 100644
index 00000000000..699bde55c6e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fcnvsd.cgs
@@ -0,0 +1,27 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/fdiv.cgs b/sim/testsuite/sim/sh64/compact/fdiv.cgs
new file mode 100644
index 00000000000..06d1e93a014
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fdiv.cgs
@@ -0,0 +1,83 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/fipr.cgs b/sim/testsuite/sim/sh64/compact/fipr.cgs
new file mode 100644
index 00000000000..092f0f6c066
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fipr.cgs
@@ -0,0 +1,44 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/fldi0.cgs b/sim/testsuite/sim/sh64/compact/fldi0.cgs
new file mode 100644
index 00000000000..b0d35e4fb09
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fldi0.cgs
@@ -0,0 +1,17 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/fldi1.cgs b/sim/testsuite/sim/sh64/compact/fldi1.cgs
new file mode 100644
index 00000000000..8bd5c521be2
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fldi1.cgs
@@ -0,0 +1,17 @@
+# 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
diff --git a/sim/testsuite/sim/sh64/compact/flds.cgs b/sim/testsuite/sim/sh64/compact/flds.cgs
new file mode 100644
index 00000000000..797e7cba9ab
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/flds.cgs
@@ -0,0 +1,26 @@
+# sh testcase for flds -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ fldi0 fr0
+ flds fr0, fpul
+ fsts fpul, fr1
+ fcmp/eq fr0, fr1
+ bf wrong
+
+ fldi1 fr0
+ flds fr0, fpul
+ fsts fpul, fr1
+ fcmp/eq fr0, fr1
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/float.cgs b/sim/testsuite/sim/sh64/compact/float.cgs
new file mode 100644
index 00000000000..8532d7fd651
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/float.cgs
@@ -0,0 +1,80 @@
+# sh testcase for float -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+pos:
+ mov #3, r0
+ lds r0, fpul
+ float fpul, fr7
+
+ # Check the result.
+ fldi1 fr0
+ fldi1 fr1
+ fadd fr0, fr1
+ fadd fr0, fr1
+ fcmp/eq fr1, fr7
+ bf wrong
+
+neg:
+ mov #3, r0
+ neg r0, r0
+ lds r0, fpul
+ float fpul, fr7
+
+ # Check the result.
+ fldi1 fr0
+ fldi1 fr1
+ fadd fr0, fr1
+ fadd fr0, fr1
+ fneg fr1
+ fcmp/eq fr1, fr7
+ bf wrong
+
+ bra double
+ nop
+
+wrong:
+ fail
+
+double:
+ mov #3, r0
+ lds r0, fpul
+ _setpr
+ float fpul, dr8
+ _clrpr
+ # check the result.
+ fldi1 fr0
+ fldi1 fr1
+ fadd fr0, fr1
+ fadd fr0, fr1
+ _s2d fr1, dr2
+ fcmp/eq dr2, dr8
+ bf wrong
+
+dneg:
+ mov #3, r0
+ neg r0, r0
+ lds r0, fpul
+ _setpr
+ float fpul, dr8
+ _clrpr
+ # check the result.
+ fldi1 fr0
+ fldi1 fr1
+ fadd fr0, fr1
+ fadd fr0, fr1
+ fneg fr1
+ _s2d fr1, dr2
+ fcmp/eq dr2, dr8
+ bf wrong
+
+okay:
+ pass
+
+wrong2:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/fmac.cgs b/sim/testsuite/sim/sh64/compact/fmac.cgs
new file mode 100644
index 00000000000..dbf36ab78c8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fmac.cgs
@@ -0,0 +1,78 @@
+# sh testcase for fmac -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ # 0.0 * x + y = y.
+
+ fldi0 fr0
+ fldi1 fr1
+ fldi1 fr2
+ fmac fr0, fr1, fr2
+ # check result.
+ fldi1 fr0
+ fcmp/eq fr0, fr2
+ bf wrong
+
+ # x * y + 0.0 = x * y.
+
+ fldi1 fr0
+ fldi1 fr1
+ fldi0 fr2
+ # double it.
+ fadd fr1, fr2
+ fmac fr0, fr1, fr2
+ # check result.
+ fldi1 fr0
+ fadd fr0, fr0
+ fcmp/eq fr0, fr2
+ bf wrong
+
+ # x * 0.0 + y = y.
+
+ fldi1 fr0
+ fldi0 fr1
+ fldi1 fr2
+ fadd fr2, fr2
+ fmac fr0, fr1, fr2
+ # check result.
+ fldi1 fr0
+ # double fr0.
+ fadd fr0, fr0
+ fcmp/eq fr0, fr2
+ bf wrong
+
+ # x * 0.0 + 0.0 = 0.0
+
+ fldi1 fr0
+ fadd fr0, fr0
+ fldi0 fr1
+ fldi0 fr2
+ fmac fr0, fr1, fr2
+ # check result.
+ fldi0 fr0
+ fcmp/eq fr0, fr2
+ bf wrong
+
+ # 0.0 * x + 0.0 = 0.0.
+
+ fldi0 fr0
+ fldi1 fr1
+ # double it.
+ fadd fr1, fr1
+ fldi0 fr2
+ fmac fr0, fr1, fr2
+ # check result.
+ fldi0 fr0
+ fcmp/eq fr0, fr2
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/fmov.cgs b/sim/testsuite/sim/sh64/compact/fmov.cgs
new file mode 100644
index 00000000000..f4e1fde3c11
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fmov.cgs
@@ -0,0 +1,273 @@
+# sh testcase for all fmov instructions
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ .macro init
+ fldi0 fr0
+ fldi1 fr2
+ .endm
+
+ # Set the SZ (SiZe) bit in the fpscr.
+ .macro _setsz
+ sts fpscr, r7
+ mov #16, r8
+ shll16 r8
+ or r8, r7
+ lds r7, fpscr
+ .endm
+
+ # Clear the SZ bit.
+ .macro _clrsz
+ sts fpscr, r7
+ mov #16, r8
+ shll16 r8
+ not r8, r8
+ and r8, r7
+ lds r7, fpscr
+ .endm
+ start
+
+fmov1: # Test fr -> fr.
+ init
+ _clrpr
+ _clrsz
+ fmov fr0, fr10
+ # Ensure fr0 and fr10 are now equal.
+ fcmp/eq fr0, fr10
+ bt fmov2
+ fail
+
+fmov2: # Test dr -> dr.
+ init
+ _setpr
+ _setsz
+ fmov dr0, dr2
+ # Ensure dr0 and dr2 are now equal.
+ fcmp/eq dr0, dr2
+ bt fmov3
+ fail
+
+fmov3: # Test dr -> xd and xd -> dr.
+ init
+ _setsz
+ fmov dr0, xd0
+ # Ensure dr0 and xd0 are now equal.
+ fmov xd0, dr2
+ fcmp/eq dr0, dr2
+ bt fmov4
+ fail
+
+fmov4: # Test xd -> xd.
+ init
+ _setsz
+ _setpr
+ fmov dr0, xd0
+ fmov xd0, xd2
+ fmov xd2, dr2
+ # Ensure dr0 and dr2 are now equal.
+ fcmp/eq dr0, dr2
+ bt fmov5
+ fail
+
+fmov5: # Test fr -> @rn and @rn -> fr.
+ init
+ _clrsz
+ _clrpr
+ mov #40, r0
+ shll8 r0
+ fmov fr0, @r0
+ fmov @r0, fr1
+ fcmp/eq fr0, fr1
+ bt fmov6
+ fail
+
+fmov6: # Test dr -> @rn and @rn -> dr.
+ init
+ _setsz
+ _setpr
+ mov #40, r0
+ shll8 r0
+ fmov dr0, @r0
+ fmov @r0, dr2
+ fcmp/eq dr0, dr2
+ bt fmov7
+ fail
+
+fmov7: # Test xd -> @rn and @rn -> xd.
+ init
+ _setsz
+ _setpr
+ mov #40, r0
+ shll8 r0
+ fmov dr0, xd0
+ fmov xd0, @r0
+ fmov @r0, xd2
+ fmov xd2, dr2
+ fcmp/eq dr0, dr2
+ bt fmov8
+ fail
+
+fmov8: # Test fr -> @-rn.
+ init
+ _clrsz
+ _clrpr
+ mov #40, r0
+ shll8 r0
+ # Preserve.
+ mov r0, r1
+ fmov fr0, @-r0
+ fmov @r0, fr2
+ fcmp/eq fr0, fr2
+ bt f8b
+ fail
+f8b: # check pre-dec.
+ add #4, r0
+ cmp/eq r0, r1
+ bt fmov9
+ fail
+
+fmov9: # Test dr -> @-rn.
+ init
+ _setsz
+ _setpr
+ mov #40, r0
+ shll8 r0
+ # Preserve r0.
+ mov r0, r1
+ fmov dr0, @-r0
+ fmov @r0, dr2
+ fcmp/eq dr0, dr2
+ bt f9b
+ fail
+f9b: # check pre-dec.
+ add #8, r0
+ cmp/eq r0, r1
+ bt fmov10
+ fail
+
+fmov10: # Test xd -> @-rn.
+ init
+ _setsz
+ _setpr
+ mov #40, r0
+ shll8 r0
+ # Preserve r0.
+ mov r0, r1
+ fmov dr0, xd0
+ fmov xd0, @-r0
+ fmov @r0, xd2
+ fmov xd2, dr2
+ fcmp/eq dr0, dr2
+ bt f10b
+ fail
+f10b: # check pre-dec.
+ add #8, r0
+ cmp/eq r0, r1
+ bt fmov11
+ fail
+
+fmov11: # Test @rn+ -> fr.
+ init
+ _clrsz
+ _clrpr
+ mov #40, r0
+ shll8 r0
+ # Preserve r0.
+ mov r0, r1
+ fmov fr0, @r0
+ fmov @r0+, fr2
+ fcmp/eq fr0, fr2
+ bt f11b
+ fail
+f11b: # check post-inc.
+ add #4, r1
+ cmp/eq r0, r1
+ bt fmov12
+ fail
+
+fmov12: # Test @rn+ -> dr.
+ init
+ _setsz
+ _setpr
+ mov #40, r0
+ shll8 r0
+ # preserve r0.
+ mov r0, r1
+ fmov dr0, @r0
+ fmov @r0+, dr2
+ fcmp/eq dr0, dr2
+ bt f12b
+ fail
+f12b: # check post-inc.
+ add #8, r1
+ cmp/eq r0, r1
+ bt fmov13
+ fail
+
+fmov13: # Test @rn -> xd.
+ init
+ _setsz
+ _setpr
+ mov #40, r0
+ shll8 r0
+ # Preserve r0.
+ mov r0, r1
+ fmov dr0, xd0
+ fmov xd0, @r0
+ fmov @r0+, xd2
+ fmov xd2, dr2
+ fcmp/eq dr0, dr2
+ bt f13b
+ fail
+f13b:
+ add #8, r1
+ cmp/eq r0, r1
+ bt fmov14
+ fail
+
+fmov14: # Test fr -> @(r0,rn), @(r0, rn) -> fr.
+ init
+ _clrsz
+ _clrpr
+ mov #40, r0
+ shll8 r0
+ mov #0, r1
+ fmov fr0, @(r0, r1)
+ fmov @(r0, r1), fr1
+ fcmp/eq fr0, fr1
+ bt fmov15
+ fail
+
+fmov15: # Test dr -> @(r0, rn), @(r0, rn) -> dr.
+ init
+ _setsz
+ _setpr
+ mov #40, r0
+ shll8 r0
+ mov #0, r1
+ fmov dr0, @(r0, r1)
+ fmov @(r0, r1), dr2
+ fcmp/eq dr0, dr2
+ bt fmov16
+ fail
+
+fmov16: # Test xd -> @(r0, rn), @(r0, rn) -> xd.
+ init
+ _setsz
+ _setpr
+ mov #40, r0
+ shll8 r0
+ mov #0, r1
+ fmov dr0, xd0
+ fmov xd0, @(r0, r1)
+ fmov @(r0, r1), xd2
+ fmov xd2, dr2
+ fcmp/eq dr0, dr2
+ bt okay
+ fail
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/fmul.cgs b/sim/testsuite/sim/sh64/compact/fmul.cgs
new file mode 100644
index 00000000000..a1325d6395b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fmul.cgs
@@ -0,0 +1,121 @@
+# sh testcase for fmul -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ .macro init
+ fldi0 fr0
+ fldi1 fr1
+ fldi1 fr2
+ fadd fr2, fr2
+ fldi0 fr7
+ fldi1 fr8
+ .endm
+
+ start
+
+ # 0.0 * 0.0 = 0.0.
+ init
+ fmul fr0, fr0
+ fcmp/eq fr7, fr0
+ bf wrong
+
+ # 0.0 * 1.0 = 0.0.
+ init
+ fmul fr1, fr0
+ fcmp/eq fr7, fr0
+ bf wrong
+
+ # 1.0 * 0.0 = 0.0.
+ init
+ fmul fr0, fr1
+ fcmp/eq fr7, fr1
+ bf wrong
+
+ # 1.0 * 1.0 = 1.0.
+ init
+ fmul fr1, fr1
+ fcmp/eq fr8, fr1
+ bf wrong
+
+ # 2.0 * 1.0 = 2.0.
+ init
+ fmul fr2, fr1
+ fcmp/eq fr2, fr1
+ bf wrong
+
+ bra double
+ nop
+
+wrong:
+ fail
+
+ .macro dinit
+ fldi0 fr0
+ fldi1 fr2
+ fldi1 fr4
+ fadd fr4, fr4
+ fldi0 fr8
+ fldi1 fr10
+ _s2d fr0, dr0
+ _s2d fr2, dr2
+ _s2d fr4, dr4
+ _s2d fr8, dr8
+ _s2d fr10, dr10
+ .endm
+
+double:
+ # 0.0 * 0.0 = 0.0.
+ dinit
+ _setpr
+ fmul dr0, dr0
+ fcmp/eq dr8, dr0
+ bf wrong
+ _clrpr
+
+ # 0.0 * 1.0 = 0.0.
+ dinit
+ _setpr
+ fmul dr2, dr0
+ fcmp/eq dr8, dr0
+ bf wrong2
+ _clrpr
+
+ # 1.0 * 0.0 = 0.0.
+ dinit
+ _setpr
+ fmul dr0, dr2
+ fcmp/eq dr8, dr2
+ bf wrong2
+ _clrpr
+
+ bra next
+ nop
+
+wrong2:
+ fail
+
+next:
+ # 1.0 * 1.0 = 1.0.
+ dinit
+ _setpr
+ fmul dr2, dr2
+ fcmp/eq dr10, dr2
+ bf wrong3
+ _clrpr
+
+ # 2.0 * 1.0 = 2.0.
+ dinit
+ _setpr
+ fmul dr4, dr2
+ fcmp/eq dr4, dr2
+ bf wrong3
+ _clrpr
+
+okay:
+ pass
+
+wrong3:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/fneg.cgs b/sim/testsuite/sim/sh64/compact/fneg.cgs
new file mode 100644
index 00000000000..71fc901fb6d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fneg.cgs
@@ -0,0 +1,83 @@
+# sh testcase for fneg -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ # neg(0.0) = 0.0.
+ fldi0 fr0
+ fldi0 fr1
+ fneg fr0
+ fcmp/eq fr0, fr1
+ bf wrong
+
+ # neg(1.0) = fsub(0,1)
+ fldi1 fr0
+ fneg fr0
+ fldi0 fr1
+ fldi1 fr2
+ fsub fr2, fr1
+ fcmp/eq fr0, fr1
+ bf wrong
+
+ # neg(neg(1.0)) = 1.0.
+ fldi1 fr0
+ fldi1 fr1
+ fneg fr0
+ fneg fr0
+ fcmp/eq fr0, fr1
+ bf wrong
+
+ bra double
+ nop
+
+wrong:
+ fail
+
+double:
+ # neg(0.0) = 0.0.
+ fldi0 fr0
+ fldi0 fr2
+ _s2d fr0, dr0
+ _s2d fr2, dr2
+ _setpr
+ fneg dr0
+ fcmp/eq dr0, dr2
+ bf wrong2
+ _clrpr
+
+ # neg(1.0) = fsub(0,1)
+ fldi1 fr0
+ _s2d fr0, dr0
+ _setpr
+ fneg dr0
+ _clrpr
+ fldi0 fr2
+ fldi1 fr3
+ fsub fr3, fr2
+ _s2d fr2, dr2
+ _setpr
+ fcmp/eq fr0, fr2
+ bf wrong2
+ _clrpr
+
+ # neg(neg(1.0)) = 1.0.
+ fldi1 fr0
+ _s2d fr0, dr0
+ fldi1 fr2
+ _s2d fr2, dr2
+ _setpr
+ fneg dr0
+ fneg dr2
+ fcmp/eq dr0, dr2
+ bf wrong2
+ _clrpr
+
+okay:
+ pass
+
+wrong2:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/frchg.cgs b/sim/testsuite/sim/sh64/compact/frchg.cgs
new file mode 100644
index 00000000000..6f2e743fc37
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/frchg.cgs
@@ -0,0 +1,13 @@
+# sh testcase for frchg
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ frchg
+ frchg
+ frchg
+ frchg
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/fschg.cgs b/sim/testsuite/sim/sh64/compact/fschg.cgs
new file mode 100644
index 00000000000..54a1491962b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fschg.cgs
@@ -0,0 +1,13 @@
+# sh testcase for fschg
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ fschg
+ fschg
+ fschg
+ fschg
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/fsqrt.cgs b/sim/testsuite/sim/sh64/compact/fsqrt.cgs
new file mode 100644
index 00000000000..933e112c903
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fsqrt.cgs
@@ -0,0 +1,93 @@
+# sh testcase for fsqrt -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ # sqrt(0.0) = 0.0.
+ fldi0 fr0
+ fsqrt fr0
+ fldi0 fr1
+ fcmp/eq fr0, fr1
+ bf wrong
+
+ # sqrt(1.0) = 1.0.
+ fldi1 fr0
+ fsqrt fr0
+ fldi1 fr1
+ fcmp/eq fr0, fr1
+ bf wrong
+
+ # sqrt(4.0) = 2.0
+ fldi1 fr0
+ # Double it.
+ fadd fr0, fr0
+ # Double it again.
+ fadd fr0, fr0
+ fsqrt fr0
+ fldi1 fr1
+ # Double it.
+ fadd fr1, fr1
+ fcmp/eq fr0, fr1
+ bf wrong
+
+ bra double
+ nop
+
+wrong:
+ fail
+
+double:
+ # sqrt(0.0) = 0.0.
+ fldi0 fr0
+ _s2d fr0, dr0
+ _setpr
+ fsqrt dr0
+ _clrpr
+ fldi0 fr2
+ _s2d fr2, dr2
+ _setpr
+ fcmp/eq dr0, dr2
+ bf wrong2
+ _clrpr
+
+ # sqrt(1.0) = 1.0.
+ fldi1 fr0
+ _s2d fr0, dr0
+ _setpr
+ fsqrt dr0
+ _clrpr
+ fldi1 fr2
+ _s2d fr2, dr2
+ _setpr
+ fcmp/eq fr0, fr2
+ bf wrong2
+ _clrpr
+
+ # sqrt(4.0) = 2.0.
+ fldi1 fr0
+ # Double it.
+ fadd fr0, fr0
+ # Double it again.
+ fadd fr0, fr0
+ _s2d fr0, dr0
+ _setpr
+ fsqrt dr0
+ _clrpr
+ fldi1 fr2
+ # Double it.
+ fadd fr2, fr2
+ _s2d fr2, dr2
+ _setpr
+ fcmp/eq fr0, fr2
+ bf wrong2
+ _clrpr
+
+okay:
+ pass
+
+wrong2:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/fsts.cgs b/sim/testsuite/sim/sh64/compact/fsts.cgs
new file mode 100644
index 00000000000..518533db094
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fsts.cgs
@@ -0,0 +1,11 @@
+# sh testcase for fsts fpul, $frn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ fsts fpul, fr0
+ fsts fpul, fr1
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/fsub.cgs b/sim/testsuite/sim/sh64/compact/fsub.cgs
new file mode 100644
index 00000000000..346d01ffcaa
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/fsub.cgs
@@ -0,0 +1,120 @@
+# sh testcase for fmul -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ # 0.0 - 0.0 = 0.0.
+ fldi0 fr0
+ fldi0 fr1
+ fsub fr0, fr1
+ fldi0 fr2
+ fcmp/eq fr1, fr2
+ bf wrong
+
+ # 1.0 - 0.0 = 1.0.
+ fldi0 fr0
+ fldi1 fr1
+ fsub fr0, fr1
+ fldi1 fr2
+ fcmp/eq fr1, fr2
+ bf wrong
+
+ # 1.0 - 1.0 = 0.0.
+ fldi1 fr0
+ fldi1 fr1
+ fsub fr0, fr1
+ fldi0 fr2
+ fcmp/eq fr1, fr2
+ bf wrong
+
+ # 0.0 - 1.0 = -1.0.
+ fldi1 fr0
+ fldi0 fr1
+ fsub fr0, fr1
+ fldi1 fr2
+ fneg fr2
+ fcmp/eq fr1, fr2
+ bf wrong
+
+ bra double
+ nop
+
+wrong:
+ fail
+
+double:
+ # 0.0 - 0.0 = 0.0.
+ fldi0 fr0
+ fldi0 fr2
+ _s2d fr0, dr0
+ _s2d fr2, dr2
+ _setpr
+ fsub dr0, dr2
+ _clrpr
+ fldi0 fr4
+ _s2d fr4, dr4
+ _setpr
+ fcmp/eq dr2, dr4
+ bf wrong
+ _clrpr
+
+onezero:
+ # 1.0 - 0.0 = 1.0.
+ fldi0 fr0
+ fldi1 fr2
+ _s2d fr0, dr0
+ _s2d fr2, dr2
+ _setpr
+ fsub dr0, dr2
+ _clrpr
+ fldi1 fr4
+ _s2d fr4, dr4
+ _setpr
+ fcmp/eq dr2, dr4
+ bf wrong2
+ _clrpr
+
+oneone:
+ # 1.0 - 1.0 = 0.0.
+ fldi1 fr0
+ fldi1 fr2
+ _s2d fr0, dr0
+ _s2d fr2, dr2
+ _setpr
+ fsub dr0, dr2
+ _clrpr
+ fldi0 fr4
+ _s2d fr4, dr4
+ _setpr
+ fcmp/eq dr2, dr4
+ bf wrong2
+ _clrpr
+
+ bra zeroone
+ nop
+
+wrong2:
+ fail
+
+zeroone:
+ # 0.0 - 1.0 = -1.0.
+ fldi1 fr0
+ fldi0 fr2
+ _s2d fr0, dr0
+ _s2d fr2, dr2
+ _setpr
+ fsub dr0, dr2
+ _clrpr
+ fldi1 fr4
+ fneg fr4
+ _s2d fr4, dr4
+ _setpr
+ fcmp/eq dr2, dr4
+ bf wrong2
+ _clrpr
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/ftrc.cgs b/sim/testsuite/sim/sh64/compact/ftrc.cgs
new file mode 100644
index 00000000000..6a89744b33e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ftrc.cgs
@@ -0,0 +1,132 @@
+# sh testcase for ftrc -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ # ftrc(0.0) = 0.
+ fldi0 fr0
+ ftrc fr0, fpul
+ # check results.
+ mov #0, r0
+ sts fpul, r1
+ cmp/eq r0, r1
+ bf wrong
+
+ # ftrc(1.5) = 1.
+ fldi1 fr0
+ fldi1 fr1
+ fldi1 fr2
+ # double it.
+ fadd fr2, fr2
+ # form the fraction.
+ fdiv fr2, fr1
+ fadd fr1, fr0
+ # now we've got 1.5 in fr0.
+ ftrc fr0, fpul
+ # check results.
+ mov #1, r0
+ sts fpul, r1
+ cmp/eq r0, r1
+ bf wrong
+
+ # ftrc(-1.5) = -1.
+ fldi1 fr0
+ fneg fr0
+ fldi1 fr1
+ fldi1 fr2
+ # double it.
+ fadd fr2, fr2
+ # form the fraction.
+ fdiv fr2, fr1
+ fneg fr1
+ # -1 + -0.5 = -1.5.
+ fadd fr1, fr0
+ # now we've got 1.5 in fr0.
+ ftrc fr0, fpul
+ # check results.
+ mov #1, r0
+ neg r0, r0
+ sts fpul, r1
+ cmp/eq r0, r1
+ bf wrong
+
+ bra double
+ nop
+
+wrong:
+ fail
+
+double:
+ # ftrc(0.0) = 0.
+ fldi0 fr0
+ _s2d fr0, dr0
+ _setpr
+ ftrc dr0, fpul
+ _clrpr
+ # check results.
+ mov #0, r0
+ sts fpul, r1
+ cmp/eq r0, r1
+foo:
+ bf wrong2
+
+ # ftrc(1.5) = 1.
+ fldi1 fr0
+ fldi1 fr2
+ fldi1 fr4
+ # double it.
+ fadd fr4, fr4
+ # form 0.5.
+ fdiv fr4, fr2
+ fadd fr2, fr0
+ # now we've got 1.5 in fr0, so do some single->double
+ # conversions and perform the ftrc.
+ _s2d fr0, dr0
+ _s2d fr2, dr2
+ _s2d fr4, dr4
+ _setpr
+ ftrc dr0, fpul
+ _clrpr
+
+ # check results.
+ mov #1, r0
+ sts fpul, r1
+ cmp/eq r0, r1
+ bf wrong2
+
+ # ftrc(-1.5) = -1.
+ fldi1 fr0
+ fneg fr0
+ fldi1 fr2
+ fldi1 fr4
+ # double it.
+ fadd fr4, fr4
+ # form the fraction.
+ fdiv fr4, fr2
+ fneg fr2
+ # -1 + -0.5 = -1.5.
+ fadd fr2, fr0
+ # now we've got 1.5 in fr0, so do some single->double
+ # conversions and perform the ftrc.
+ _s2d fr0, dr0
+ _s2d fr2, dr2
+ _s2d fr4, dr4
+ _setpr
+ ftrc dr0, fpul
+ _clrpr
+
+ # check results.
+ mov #1, r0
+ neg r0, r0
+ sts fpul, r1
+ cmp/eq r0, r1
+ bf wrong2
+
+okay:
+ pass
+wrong2:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/ftrv.cgs b/sim/testsuite/sim/sh64/compact/ftrv.cgs
new file mode 100644
index 00000000000..9bdf806ba13
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ftrv.cgs
@@ -0,0 +1,74 @@
+# sh testcase for ftrv xmtrx, $fvn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ # set the fr bit in the fpscr
+ .macro _setfr
+ sts fpscr, r7
+ mov #32, r8
+ shll16 r8
+ or r8, r7
+ lds r7, fpscr
+ .endm
+
+ # clear the fr bit
+ .macro _clrfr
+ sts fpscr, r7
+ mov #32, r8
+ shll16 r8
+ not r8, r8
+ and r8, r7
+ lds r7, fpscr
+ .endm
+
+ .macro incr old new
+ fldi1 \new
+ fadd \old, \new
+ .endm
+
+ start
+ _setfr
+popmtrx:
+ # 1.0.
+ fldi1 fr0
+ # 2.0.
+ fldi1 fr1
+ fadd fr1, fr1
+
+ incr fr1, fr2
+ incr fr2, fr3
+ incr fr3, fr4
+ incr fr4, fr5
+ incr fr5, fr6
+ incr fr6, fr7
+ incr fr7, fr8
+ incr fr8, fr9
+ incr fr9, fr10
+ incr fr10, fr11
+ incr fr11, fr12
+ incr fr12, fr13
+ incr fr13, fr14
+ incr fr14, fr15
+
+popvect:
+ # Swtich fp banks.
+ _clrfr
+ fldi1 fr4
+ fldi1 fr5
+ fadd fr5, fr5
+ fldi1 fr6
+ fadd fr5, fr6
+ fldi1 fr7
+ fadd fr6, fr7
+
+ftrv:
+ # fr[4,7] should contain the results:
+ # { 30, 70, 110, 150 }.
+ ftrv xmtrx, fv4
+
+okay:
+ pass
+
diff --git a/sim/testsuite/sim/sh64/compact/jmp.cgs b/sim/testsuite/sim/sh64/compact/jmp.cgs
new file mode 100644
index 00000000000..e9e99401545
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/jmp.cgs
@@ -0,0 +1,29 @@
+# sh testcase for jmp @$rn
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global jmp
+jmp:
+ # Load 0x1010 into r0.
+ mov #1, r0
+ shll8 r0
+ shll2 r0
+ shll2 r0
+ add #16, r0
+ jmp @r0
+slot:
+ nop
+bad:
+ fail
+okay:
+ pass
+alsobad:
+ fail
+ fail
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/jsr.cgs b/sim/testsuite/sim/sh64/compact/jsr.cgs
new file mode 100644
index 00000000000..5ad7aefc931
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/jsr.cgs
@@ -0,0 +1,29 @@
+# sh testcase for jsr @$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global jsr
+jsr:
+ # Load 0x1010 into r0.
+ mov #1, r0
+ shll8 r0
+ shll2 r0
+ shll2 r0
+ add #16, r0
+ jsr @r0
+slot:
+ nop
+bad:
+ fail
+okay:
+ pass
+alsobad:
+ fail
+ fail
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/ldc-gbr.cgs b/sim/testsuite/sim/sh64/compact/ldc-gbr.cgs
new file mode 100644
index 00000000000..b19a3c194fe
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ldc-gbr.cgs
@@ -0,0 +1,22 @@
+# sh testcase for ldc $rn, gbr -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global ldc
+ldc:
+ mov #40, r0
+ shll8 r0
+ ldc r0, gbr
+ stc gbr, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs b/sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs
new file mode 100644
index 00000000000..613e58e722c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ldcl-gbr.cgs
@@ -0,0 +1,28 @@
+# sh testcase for ldc.l @${rn}+, gbr -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global ldcl
+ldcl:
+ mov #40, r0
+ shll8 r0
+ # Preserve address.
+ mov r0, r1
+ ldc.l @r0+, gbr
+
+ # Add 4 to saved address (r1).
+ # Then compare with r0.
+ add #4, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/lds-fpscr.cgs b/sim/testsuite/sim/sh64/compact/lds-fpscr.cgs
new file mode 100644
index 00000000000..2dce253375d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/lds-fpscr.cgs
@@ -0,0 +1,22 @@
+# sh testcase for lds $rn, fpscr -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global lds_fpscr
+lds_fpscr:
+ mov #0, r0
+ lds r0, fpscr
+readback:
+ sts fpscr, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/lds-fpul.cgs b/sim/testsuite/sim/sh64/compact/lds-fpul.cgs
new file mode 100644
index 00000000000..1a80a7032ea
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/lds-fpul.cgs
@@ -0,0 +1,17 @@
+# sh testcase for lds $rn, fpul -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global lds_fpul
+lds_fpul:
+ mov #63, r0
+ shll8 r0
+ add #128, r0
+ shll16 r0
+ lds r0, fpul
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/lds-mach.cgs b/sim/testsuite/sim/sh64/compact/lds-mach.cgs
new file mode 100644
index 00000000000..1ffd6566c9a
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/lds-mach.cgs
@@ -0,0 +1,23 @@
+# sh testcase for lds $rn, mach
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global lds_mach
+lds_mach:
+ mov #41, r0
+ shll8 r0
+ lds r0, mach
+readback:
+ sts mach, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/lds-macl.cgs b/sim/testsuite/sim/sh64/compact/lds-macl.cgs
new file mode 100644
index 00000000000..f09315abbb6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/lds-macl.cgs
@@ -0,0 +1,23 @@
+# sh testcase for lds $rn, macl
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global lds_macl
+lds_macl:
+ mov #42, r0
+ shll8 r0
+ lds r0, macl
+readback:
+ sts macl, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/lds-pr.cgs b/sim/testsuite/sim/sh64/compact/lds-pr.cgs
new file mode 100644
index 00000000000..97e3a650767
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/lds-pr.cgs
@@ -0,0 +1,23 @@
+# sh testcase for lds $rn, pr
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global lds_pr
+lds_pr:
+ mov #40, r0
+ shll8 r0
+ lds r0, pr
+readback:
+ sts pr, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs b/sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs
new file mode 100644
index 00000000000..642f15dc527
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ldsl-fpscr.cgs
@@ -0,0 +1,43 @@
+# sh testcase for lds.l @${rn}+, fpscr -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ mov #40, r0
+ shll8 r0
+ # save address for later examination.
+ mov r0, r1
+
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+ shll8 r2
+ add #85, r2
+ shll8 r2
+ add #170, r2
+ # Store it in memory.
+ mov.l r2, @r0
+
+ lds.l @r0+, fpscr
+
+check:
+ # Read it back.
+ sts fpscr, r3
+ cmp/eq r2, r3
+ bf wrong
+
+inc:
+ # Test for proper post-increment.
+ add #4, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs b/sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs
new file mode 100644
index 00000000000..428a5b71816
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ldsl-fpul.cgs
@@ -0,0 +1,27 @@
+# sh testcase for lds.l @${rn}+, fpul -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global ldsl_fpul
+ldsl_fpul:
+ mov #40, r0
+ shll8 r0
+ # remember the address.
+ mov r0, r1
+ lds.l @r0+, fpul
+
+ # ensure post increment occurred.
+ add #4, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs b/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs
new file mode 100644
index 00000000000..f5ffdec8dce
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ldsl-mach.cgs
@@ -0,0 +1,26 @@
+# sh testcase for lds.l @${rn}+, mach -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global ldsl_mach
+ldsl_mach:
+ mov #40, r0
+ shll8 r0
+ # save address for later examination.
+ mov r0, r1
+
+ lds.l @r0+, mach
+
+ add #4, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs b/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs
new file mode 100644
index 00000000000..4e21bf1942f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ldsl-macl.cgs
@@ -0,0 +1,26 @@
+# sh testcase for lds.l @${rn}+, macl -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global ldsl_macl
+ldsl_macl:
+ mov #40, r0
+ shll8 r0
+ # save address for later examination.
+ mov r0, r1
+
+ lds.l @r0+, macl
+
+ add #4, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/ldsl-pr.cgs b/sim/testsuite/sim/sh64/compact/ldsl-pr.cgs
new file mode 100644
index 00000000000..eb8ee531bd3
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ldsl-pr.cgs
@@ -0,0 +1,28 @@
+# sh testcase for lds.l @${rn}+, pr -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global ldsl_pr
+ldsl_pr:
+ mov #40, r0
+ shll8 r0
+ # Preserve address.
+ mov r0, r1
+ lds.l @r0+, pr
+
+ # Add 4 to saved address (r1).
+ # Then compare with r0.
+ add #4, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/macl.cgs b/sim/testsuite/sim/sh64/compact/macl.cgs
new file mode 100644
index 00000000000..ef2dfa6e929
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/macl.cgs
@@ -0,0 +1,76 @@
+# sh testcase for mac.l @${rm}+, @${rn}+
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ # force S-bit clear
+ clrs
+
+ # Store some magic numbers in memory.
+ mov #40, r1
+ shll8 r1
+ mov #85, r0
+ mov.l r0, @r1
+ # Keep for later.
+ mov r1, r10
+store2:
+ mov #40, r1
+ shll8 r1
+ add #12, r1
+ mov #17, r0
+ mov.l r0, @r1
+ # Keep for later.
+ mov r1, r11
+
+init:
+ # Set up addresses.
+ mov #40, r1
+ shll8 r1
+ mov #40, r2
+ shll8 r2
+ add #12, r2
+
+ # Prime {MACL, MACH} to #1.
+ mov #1, r3
+ dmulu.l r3, r3
+
+test:
+ mac.l @r1+, @r2+
+
+check:
+ # Check result.
+ sts mach, r5
+ assert r5, #0
+
+ mov #5, r0
+ shll8 r0
+ or #166, r0
+ sts macl, r6
+ cmp/eq r6, r0
+ bf wrong
+
+ # Ensure post-increment occurred.
+ add #4, r10
+ cmp/eq r10, r1
+ bf wrong
+
+ add #4, r11
+ cmp/eq r11, r2
+ bf wrong
+
+doubleinc:
+ mov #40, r0
+ shll8 r0
+ mov r0, r1
+ mac.l @r0+, @r0+
+ add #16, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/macw.cgs b/sim/testsuite/sim/sh64/compact/macw.cgs
new file mode 100644
index 00000000000..f5935f7054d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/macw.cgs
@@ -0,0 +1,70 @@
+# sh testcase for mac.w @${rm}+, @${rn}+
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ # Store some magic numbers in memory.
+ mov #40, r1
+ shll8 r1
+ mov #85, r0
+ mov.l r0, @r1
+ # Keep for later.
+ mov r1, r10
+store2:
+ mov #40, r1
+ shll8 r1
+ add #12, r1
+ mov #17, r0
+ mov.l r0, @r1
+ # Keep for later.
+ mov r1, r11
+
+init:
+ # Set up addresses.
+ mov #40, r1
+ shll8 r1
+ mov #40, r2
+ shll8 r2
+ add #12, r2
+
+ # Prime {MACL, MACH} to #1.
+ mov #1, r3
+ dmulu.l r3, r3
+
+test:
+ mac.w @r1+, @r2+
+
+check:
+ # Check result.
+ sts mach, r5
+ assert r5, #0
+
+ sts macl, r6
+ assert r6, #1
+
+ # Ensure post-increment occurred.
+ add #2, r10
+ cmp/eq r10, r1
+ bf wrong
+
+ add #2, r11
+ cmp/eq r11, r2
+ bf wrong
+
+doubleinc:
+ mov #40, r0
+ shll8 r0
+ mov r0, r1
+ mac.w @r0+, @r0+
+ add #8, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/mov.cgs b/sim/testsuite/sim/sh64/compact/mov.cgs
new file mode 100644
index 00000000000..9442388384e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/mov.cgs
@@ -0,0 +1,40 @@
+# sh testcase for mov $rm64, $rn64
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global mov
+mov:
+ mov #1, r0
+ rotr r0
+ mov #0, r15
+ mov #10, r0
+
+ mov r0, r1
+ mov r1, r2
+ mov r2, r3
+ mov r3, r4
+ mov r4, r5
+ mov r5, r6
+ mov r6, r7
+ mov r7, r8
+ mov r8, r9
+ mov r9, r10
+ mov r10, r11
+ mov r11, r12
+ mov r12, r13
+ mov r13, r14
+ mov r14, r15
+
+ cmp/eq r0, r15
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/mova.cgs b/sim/testsuite/sim/sh64/compact/mova.cgs
new file mode 100644
index 00000000000..f555d66e093
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/mova.cgs
@@ -0,0 +1,29 @@
+# sh testcase for mova @($imm8x4, pc), r0 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global mova
+mova:
+ mova @(40, pc), r0
+ mov #16, r1
+ shll8 r1
+ add #40, r1
+ cmp/eq r0, r1
+ bf wrong
+ mova @(12, pc), r0
+ mov #16, r1
+ shll8 r1
+ add #24, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movb1.cgs b/sim/testsuite/sim/sh64/compact/movb1.cgs
new file mode 100644
index 00000000000..8278e1bbeaa
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movb1.cgs
@@ -0,0 +1,27 @@
+# sh testcase for mov.b $rm, @$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #55, r1
+ mov #40, r2
+ shll8 r2
+ mov.b r1, @r2
+
+ # Load it back into r3.
+ mov #40, r2
+ shll8 r2
+ mov.b @r2, r3
+
+ # Make sure r1 and r3 match.
+ cmp/eq r1, r3
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movb10.cgs b/sim/testsuite/sim/sh64/compact/movb10.cgs
new file mode 100644
index 00000000000..0ddb736f868
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movb10.cgs
@@ -0,0 +1,25 @@
+# sh testcase for mov.b @($imm4, $rm), r0 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r1
+ shll8 r1
+ # Store something there first.
+ mov #0, r0
+ or #170, r0
+ mov r0, r7
+ mov.b r0, @(3, r1)
+ # Load it back.
+ mov.b @(3, r1), r0
+ and #255, r0
+ cmp/eq r0, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movb2.cgs b/sim/testsuite/sim/sh64/compact/movb2.cgs
new file mode 100644
index 00000000000..692c34fb648
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movb2.cgs
@@ -0,0 +1,34 @@
+# sh testcase for mov.b $rm, @-$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #40, r1
+ shll8 r1
+ mov #55, r2
+
+ # Save ADDR, DATA.
+ mov r1, r7
+ mov r2, r8
+
+ # Do the move.
+ mov.b r2, @-r1
+
+ # Load the value back into r3.
+ mov.b @r1, r3
+ cmp/eq r2, r3
+ bf wrong
+
+ # Ensure that r1 has been decremented.
+ mov #1, r0
+ sub r0, r7
+ cmp/eq r7, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movb3.cgs b/sim/testsuite/sim/sh64/compact/movb3.cgs
new file mode 100644
index 00000000000..6143562b8c1
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movb3.cgs
@@ -0,0 +1,30 @@
+# sh testcase for mov.b $rm, @(r0,$rn) -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #40, r2
+ shll8 r2
+ mov #3, r1
+ mov #0, r0
+ or #170, r0
+ mov r0, r3
+ mov r2, r0
+ mov.b r3, @(r0, r1)
+
+ # Load the value back into a different register.
+ mov.b @(r0, r1), r4
+ # Check the lowest order byte matches the stored value.
+ mov r4, r0
+ and #255, r0
+ cmp/eq r0, r3
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movb4.cgs b/sim/testsuite/sim/sh64/compact/movb4.cgs
new file mode 100644
index 00000000000..d30a7a8641f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movb4.cgs
@@ -0,0 +1,28 @@
+# sh testcase for mov.b r0, @($imm8, gbr) -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #0, r0
+ or #170, r0
+ mov r0, r3
+ mov #30, r2
+ ldc r2, gbr
+ mov.b r0, @(40, gbr)
+
+ # Load the value back into a different register.
+ mov.b @(40, gbr), r0
+ # Check the lowest order byte matches the stored value.
+ and #255, r0
+ cmp/eq r0, r3
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movb5.cgs b/sim/testsuite/sim/sh64/compact/movb5.cgs
new file mode 100644
index 00000000000..4f6795a8860
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movb5.cgs
@@ -0,0 +1,25 @@
+# sh testcase for mov.b r0, @($imm4, rm) -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #0, r0
+ or #170, r0
+ mov r0, r3
+ mov #30, r2
+ mov.b r0, @(3, r2)
+
+ # Load the value back into a different register.
+ mov.b @(3, r2), r0
+ and #255, r0
+ cmp/eq r3, r0
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movb6.cgs b/sim/testsuite/sim/sh64/compact/movb6.cgs
new file mode 100644
index 00000000000..9ddebde5ce4
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movb6.cgs
@@ -0,0 +1,26 @@
+# sh testcase for mov.b @$rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r2
+ shll8 r2
+ # Store something first.
+ mov #0, r0
+ or #170, r0
+ mov r0, r7
+ mov.b r7, @r2
+ # Load it back.
+ mov.b @r2, r1
+ mov r1, r0
+ and #255, r0
+ cmp/eq r7, r0
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movb7.cgs b/sim/testsuite/sim/sh64/compact/movb7.cgs
new file mode 100644
index 00000000000..f55a223436b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movb7.cgs
@@ -0,0 +1,35 @@
+# sh testcase for mov.b @${rm}+, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r1
+ shll8 r1
+ # Store addr.
+ mov r1, r8
+
+ # Store something there first.
+ mov #0, r0
+ or #170, r0
+ mov r0, r7
+ mov.b r7, @r1
+ # Load it back.
+ mov.b @r1+, r2
+ mov r2, r0
+ and #255, r0
+ cmp/eq r7, r0
+ bf wrong
+
+ # Test address for post-incrementing.
+ add #1, r8
+ cmp/eq r8, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movb8.cgs b/sim/testsuite/sim/sh64/compact/movb8.cgs
new file mode 100644
index 00000000000..883e4b357ed
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movb8.cgs
@@ -0,0 +1,27 @@
+# sh testcase for mov.b @(r0, $rm), $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r0
+ shll8 r0
+ mov #14, r1
+ # Store something there first.
+ mov #0, r0
+ or #170, r0
+ mov r0, r7
+ mov.b r7, @(r0, r1)
+ # Load it back.
+ mov.b @(r0, r1), r2
+ mov r2, r0
+ and #255, r0
+ cmp/eq r0, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movb9.cgs b/sim/testsuite/sim/sh64/compact/movb9.cgs
new file mode 100644
index 00000000000..3ad1b46f2c0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movb9.cgs
@@ -0,0 +1,27 @@
+# sh testcase for mov.b @($imm8, gbr), r0 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r0
+ shll8 r0
+ ldc r0, gbr
+ # Store something there first.
+ mov #0, r0
+ or #170, r0
+ mov r0, r7
+ mov.b r0, @(3, gbr)
+ # Load it back.
+ mov.b @(3, gbr), r0
+ and #255, r0
+ cmp/eq r7, r0
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movcal.cgs b/sim/testsuite/sim/sh64/compact/movcal.cgs
new file mode 100644
index 00000000000..7aac57e7f43
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movcal.cgs
@@ -0,0 +1,28 @@
+# sh testcase for movca.l r0, @$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global movcal
+movcal:
+ mov #1, r0
+ rotr r0
+ add #128, r0
+ mov #40, r1
+ shll8 r1
+ movca.l r0, @r1
+
+ # Load the word back in.
+ mov.l @r1, r3
+ cmp/eq r0, r3
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movi.cgs b/sim/testsuite/sim/sh64/compact/movi.cgs
new file mode 100644
index 00000000000..bc72c1b8e63
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movi.cgs
@@ -0,0 +1,39 @@
+# sh testcase for mov #$imm8, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global movi
+movi:
+ mov #0, r0
+ cmp/eq #0, r0
+ bf wrong
+
+ mov #1, r0
+ cmp/eq #1, r0
+ bf wrong
+
+ mov #255, r0
+ cmp/eq #255, r0
+ bf wrong
+
+ mov #1, r15
+ mov #1, r0
+ cmp/eq r0, r15
+ bf wrong
+
+ mov #255, r15
+ mov r15, r0
+ cmp/eq r0, r15
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movl1.cgs b/sim/testsuite/sim/sh64/compact/movl1.cgs
new file mode 100644
index 00000000000..7d85c380f3e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl1.cgs
@@ -0,0 +1,31 @@
+# sh testcase for mov.l $rm, @$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r1
+ shll8 r1
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+ shll8 r2
+ add #85, r2
+ shll8 r2
+ add #170, r2
+
+ mov.l r2, @r1
+
+ # Load it back.
+ mov.l @r1, r3
+ cmp/eq r2, r3
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movl10.cgs b/sim/testsuite/sim/sh64/compact/movl10.cgs
new file mode 100644
index 00000000000..5e9cf2d2fbd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl10.cgs
@@ -0,0 +1,34 @@
+# sh testcase for mov.l @($imm8x4, pc), $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+ shll8 r2
+ add #85, r2
+ shll8 r2
+ add #170, r2
+
+ # Store to memory.
+ mov #16, r1
+ shll8 r1
+ add #32, r1
+ mov.l r2, @r1
+check:
+ # Read it back.
+ mov.l @(12, pc), r0
+ cmp/eq r2, r0
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movl11.cgs b/sim/testsuite/sim/sh64/compact/movl11.cgs
new file mode 100644
index 00000000000..32c763d8a2e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl11.cgs
@@ -0,0 +1,32 @@
+# sh testcase for mov.l @($imm4x4, $rm), $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r0
+ shll8 r0
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+ shll8 r2
+ add #85, r2
+ shll8 r2
+ add #170, r2
+ # Store something first.
+ mov.l r2, @(12, r0)
+
+check:
+ # Read it back.
+ mov.l @(12, r0), r1
+ cmp/eq r2, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movl2.cgs b/sim/testsuite/sim/sh64/compact/movl2.cgs
new file mode 100644
index 00000000000..bb550612cce
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl2.cgs
@@ -0,0 +1,43 @@
+# sh testcase for mov.l $rm, @-$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ mov #30, r1
+ shll8 r1
+ # Save address.
+ mov r1, r7
+
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+ shll8 r2
+ add #85, r2
+ shll8 r2
+ add #170, r2
+ mov.l r2, @-r1
+
+check:
+ # Compare the value loaded into another reg.
+ mov.l @r1, r3
+ cmp/eq r2, r3
+ bf wrong
+
+dec:
+ # Ensure address is decremented.
+ mov #4, r6
+ sub r6, r7
+ cmp/eq r1, r7
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movl3.cgs b/sim/testsuite/sim/sh64/compact/movl3.cgs
new file mode 100644
index 00000000000..6205de7558d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl3.cgs
@@ -0,0 +1,36 @@
+# sh testcase for mov.l $rm, @(r0, $rn)
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+setaddr:
+ mov #0, r0
+ mov #30, r1
+ shll8 r1
+
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+ shll8 r2
+ add #85, r2
+ shll8 r2
+ add #170, r2
+
+ mov.l r2, @(r0, r1)
+
+check:
+ # Load it back.
+ mov.l @(r0, r1), r3
+ cmp/eq r2, r3
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movl4.cgs b/sim/testsuite/sim/sh64/compact/movl4.cgs
new file mode 100644
index 00000000000..44440946365
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl4.cgs
@@ -0,0 +1,38 @@
+# sh testcase for mov.l r0, @($imm8x4, gbr) -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+setaddr:
+ mov #30, r1
+ shll8 r1
+ ldc r1, gbr
+
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r0
+ shll8 r0
+ add #12, r0
+ shll8 r0
+ add #85, r0
+ shll8 r0
+ add #170, r0
+ # Preserve.
+ mov r0, r7
+
+ mov.l r0, @(4, gbr)
+check:
+ # Load it back.
+ mov.l @(4, gbr), r0
+ cmp/eq r0, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movl5.cgs b/sim/testsuite/sim/sh64/compact/movl5.cgs
new file mode 100644
index 00000000000..897ebef2367
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl5.cgs
@@ -0,0 +1,37 @@
+# sh testcase for mov.l $rm, @($imm4x4, $rn) -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+setaddr:
+ mov #30, r1
+ shll8 r1
+
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r0
+ shll8 r0
+ add #12, r0
+ shll8 r0
+ add #85, r0
+ shll8 r0
+ add #170, r0
+ # Preserve.
+ mov r0, r7
+
+ mov.l r0, @(4, r1)
+check:
+ # Load it back.
+ mov.l @(4, r1), r0
+ cmp/eq r7, r0
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movl6.cgs b/sim/testsuite/sim/sh64/compact/movl6.cgs
new file mode 100644
index 00000000000..42f63b2a9ac
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl6.cgs
@@ -0,0 +1,25 @@
+# sh testcase for mov.l @$rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ mov #30, r0
+ shll8 r0
+ # Store something there first.
+ mov #170, r1
+ mov.l r1, @r0
+check:
+ # Load it back.
+ mov.l @r0, r3
+ cmp/eq r1, r3
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movl7.cgs b/sim/testsuite/sim/sh64/compact/movl7.cgs
new file mode 100644
index 00000000000..b6c12fc5515
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl7.cgs
@@ -0,0 +1,37 @@
+# sh testcase for mov.l @$rm+, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ mov #30, r0
+ shll8 r0
+ # Preserve address.
+ mov r0, r7
+ # Store something first.
+ mov #170, r3
+ mov.l r3, @r0
+
+ mov.l @r0+, r1
+check:
+ cmp/eq r1, r3
+ bf wrong
+
+ # Ensure address is post-incremented.
+ add #4, r7
+ cmp/eq r7, r0
+ bf wrong
+
+equal:
+ # Test rm = rn.
+ mov #30, r0
+ shll8 r0
+ mov.l @r0+, r0
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movl8.cgs b/sim/testsuite/sim/sh64/compact/movl8.cgs
new file mode 100644
index 00000000000..a6cd932d0a2
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl8.cgs
@@ -0,0 +1,24 @@
+# sh testcase for mov.l @(r0, $rm), $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #0, r0
+ mov #30, r1
+ shll8 r1
+ # Store something there first.
+ mov #170, r3
+ mov.l r3, @(r0, r1)
+check:
+ # Load it back.
+ mov.l @(r0, r1), r2
+ cmp/eq r2, r3
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movl9.cgs b/sim/testsuite/sim/sh64/compact/movl9.cgs
new file mode 100644
index 00000000000..4fa07b069d8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movl9.cgs
@@ -0,0 +1,24 @@
+# sh testcase for mov.l @($imm8x4, gbr), r0 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r1
+ shll8 r1
+ ldc r1, gbr
+ # Store something there first.
+ mov #170, r0
+ mov r0, r7
+ mov.l r0, @(12, gbr)
+check:
+ # Load it back.
+ mov.l @(12, gbr), r0
+ cmp/eq r0, r7
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movt.cgs b/sim/testsuite/sim/sh64/compact/movt.cgs
new file mode 100644
index 00000000000..45539810beb
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movt.cgs
@@ -0,0 +1,28 @@
+# sh testcase for movt $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global movt
+init:
+ sett
+ movt r1
+ assert r1, #1
+clear:
+ clrt
+ movt r1
+ assert r1, #0
+set:
+ sett
+ movt r1
+ assert r1, #1
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movw1.cgs b/sim/testsuite/sim/sh64/compact/movw1.cgs
new file mode 100644
index 00000000000..5d55a581ffd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw1.cgs
@@ -0,0 +1,29 @@
+# sh testcase for mov.w $rm, @$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ mov #30, r1
+ shll8 r1
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+ mov.w r2, @r1
+check:
+ # Read it back.
+ mov.w @r1, r3
+ shll16 r2
+ shll16 r3
+ cmp/eq r2, r3
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movw10.cgs b/sim/testsuite/sim/sh64/compact/movw10.cgs
new file mode 100644
index 00000000000..5bab9117e9e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw10.cgs
@@ -0,0 +1,32 @@
+# sh testcase for mov.w @($imm8x2, pc), $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+
+ # Store to memory.
+ mov #16, r1
+ shll8 r1
+ add #32, r1
+ mov.w r2, @r1
+
+check:
+ # Read it back.
+ mov.w @(18, pc), r0
+ shll16 r0
+ shll16 r2
+ cmp/eq r0, r2
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movw11.cgs b/sim/testsuite/sim/sh64/compact/movw11.cgs
new file mode 100644
index 00000000000..df739fa783d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw11.cgs
@@ -0,0 +1,35 @@
+# sh testcase for mov.w @($imm4x2, $rm), r0 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r1
+ shll8 r1
+
+ # Build up a distinctive bit pattern.
+ mov #1, r0
+ shll8 r0
+ add #12, r0
+
+ # Preserve r0.
+ mov r0, r3
+
+ # Store something first.
+ mov.w r0, @(12, r1)
+
+check:
+ # Read it back.
+ mov.w @(12, r1), r0
+ shll16 r0
+ shll16 r3
+ cmp/eq r0, r3
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movw2.cgs b/sim/testsuite/sim/sh64/compact/movw2.cgs
new file mode 100644
index 00000000000..27c29dc0292
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw2.cgs
@@ -0,0 +1,36 @@
+# sh testcase for mov.w $rm, @-$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ mov #30, r1
+ shll8 r1
+ # Preserve.
+ mov r1, r7
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+store:
+ mov.w r2, @-r1
+check:
+ # Read it back.
+ mov.w @r1, r3
+ shll16 r2
+ shll16 r3
+ cmp/eq r2, r3
+ bf wrong
+dec:
+ add #2, r1
+ cmp/eq r7, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movw3.cgs b/sim/testsuite/sim/sh64/compact/movw3.cgs
new file mode 100644
index 00000000000..d7b39c81506
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw3.cgs
@@ -0,0 +1,31 @@
+# sh testcase for mov.w $rm, @(r0, $rn) -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ mov #0, r0
+ mov #30, r1
+ shll8 r1
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+ mov.w r2, @(r0, r1)
+check:
+ # Read it back.
+ mov.w @(r0, r1), r3
+ shll16 r2
+ shll16 r3
+ cmp/eq r2, r3
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movw4.cgs b/sim/testsuite/sim/sh64/compact/movw4.cgs
new file mode 100644
index 00000000000..4853b5019bc
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw4.cgs
@@ -0,0 +1,31 @@
+# sh testcase for mov.w r0, @($imm8x2, gbr) -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ mov #30, r0
+ shll8 r0
+ ldc r0, gbr
+
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r0
+ shll8 r0
+ add #12, r0
+ # Preserve r0.
+ mov r0, r7
+ mov.w r0, @(12, gbr)
+check:
+ mov.w @(12, gbr), r0
+ cmp/eq r0, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movw5.cgs b/sim/testsuite/sim/sh64/compact/movw5.cgs
new file mode 100644
index 00000000000..9b4f84f6516
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw5.cgs
@@ -0,0 +1,32 @@
+# sh testcase for mov.w r0, @($imm4x2, $rn) -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r1
+ shll8 r1
+
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r0
+ shll8 r0
+ add #12, r0
+ # Preserve.
+ mov r0, r7
+move:
+ mov.w r0, @(12, r1)
+check:
+ mov.w @(12, r1), r0
+ shll16 r0
+ shll16 r7
+ cmp/eq r0, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movw6.cgs b/sim/testsuite/sim/sh64/compact/movw6.cgs
new file mode 100644
index 00000000000..758497c13e7
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw6.cgs
@@ -0,0 +1,30 @@
+# sh testcase for mov.w @$rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ mov #30, r0
+ shll8 r0
+
+ # Store something first.
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+ mov.w r2, @r0
+
+check:
+ # Read it back.
+ mov.w @r0, r1
+ cmp/eq r1, r2
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movw7.cgs b/sim/testsuite/sim/sh64/compact/movw7.cgs
new file mode 100644
index 00000000000..45f5c098e4e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw7.cgs
@@ -0,0 +1,36 @@
+# sh testcase for mov.w @${rm}+, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r0
+ shll8 r0
+ # Preserve address.
+ mov r0, r7
+
+ # Store something first.
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+ mov.w r2, @r0
+check:
+ # Read it back.
+ mov.w @r0+, r3
+ cmp/eq r2, r3
+ bf wrong
+
+inc:
+ # Ensure address is post-incremented.
+ add #2, r7
+ cmp/eq r0, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/movw8.cgs b/sim/testsuite/sim/sh64/compact/movw8.cgs
new file mode 100644
index 00000000000..0a7ce3f346c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw8.cgs
@@ -0,0 +1,31 @@
+# sh testcase for mov.w @(r0, $rm), $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r0
+ shll8 r0
+ mov #10, r1
+
+ # Store something first.
+ # Build up a distinctive bit pattern.
+ mov #1, r2
+ shll8 r2
+ add #12, r2
+
+ mov.w r2, @(r0, r1)
+check:
+ # Read it back.
+ mov.w @(r0, r1), r3
+ shll16 r2
+ shll16 r3
+ cmp/eq r2, r3
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/movw9.cgs b/sim/testsuite/sim/sh64/compact/movw9.cgs
new file mode 100644
index 00000000000..1872f06afb6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/movw9.cgs
@@ -0,0 +1,33 @@
+# sh testcase for mov.w @($imm8x2, gbr), r0 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ mov #30, r0
+ shll8 r0
+ ldc r0, gbr
+
+ # Store something first.
+ # Build up a distinctive bit pattern.
+ mov #1, r0
+ shll8 r0
+ add #12, r0
+ # Preserve r0.
+ mov r0, r7
+ mov.w r0, @(12, gbr)
+
+check:
+ # Load it back.
+ mov.w @(12, gbr), r0
+ shll16 r0
+ shll16 r7
+ cmp/eq r0, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/mull.cgs b/sim/testsuite/sim/sh64/compact/mull.cgs
new file mode 100644
index 00000000000..921141aafd6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/mull.cgs
@@ -0,0 +1,64 @@
+# sh testcase for mul.l $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global mull
+mull:
+ mov #3, r0
+ mov #5, r1
+ mul.l r0, r1
+
+ # Check the result.
+ sts macl, r3
+ mov #15, r4
+ cmp/eq r3, r4
+ bf wrong
+
+lxs:
+ # Large * small.
+ mov #255, r0
+ mov #0, r1
+ mul.l r0, r1
+
+ # Check the result.
+ sts macl, r3
+ mov #0, r4
+ cmp/eq r3, r4
+ bf wrong
+
+sxl:
+ # Small * large.
+ mov #0, r0
+ mov #255, r1
+ mul.l r0, r1
+
+ # Check the result.
+ sts macl, r3
+ mov #0, r4
+ cmp/eq r3, r4
+ bf wrong
+
+lxl:
+ # Large * large.
+ mov #1, r0
+ neg r0, r0
+ mov #2, r1
+ mul.l r0, r1
+
+ # Check the result.
+ sts macl, r3
+ mov #2, r4
+ neg r4, r4
+ cmp/eq r3, r4
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/mulsw.cgs b/sim/testsuite/sim/sh64/compact/mulsw.cgs
new file mode 100644
index 00000000000..05c8a3d384c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/mulsw.cgs
@@ -0,0 +1,91 @@
+# sh testcase for muls.w $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ sts mach, r7
+
+ .global mulsw
+zero:
+ mov #0, r0
+ mov #1, r1
+ muls.w r0, r1
+
+ # Check the result.
+ sts macl, r3
+ mov #0, r4
+ cmp/eq r3, r4
+ bf wrong
+
+sxs:
+ # Small * small.
+ mov #1, r0
+ mov #2, r1
+ muls.w r0, r1
+
+ # Check the result.
+ sts macl, r3
+ mov #2, r4
+ cmp/eq r3, r4
+ bf wrong
+
+sxl:
+ # Small * large.
+ mov #1, r0
+ mov #255, r1
+ shll8 r1
+ muls.w r0, r1
+
+ # Check the result.
+ sts macl, r3
+ mov #0, r4
+ not r4, r4
+ shll8 r4
+ cmp/eq r3, r4
+ bf wrong
+
+lxs:
+ # Large * small.
+ mov #255, r0
+ shll8 r0
+ mov #1, r1
+ muls.w r0, r1
+
+ # Check the result.
+ sts macl, r3
+ mov #0, r4
+ not r4, r4
+ shll8 r4
+ cmp/eq r3, r4
+ bf wrong
+
+lxl:
+ # Large * large.
+ mov #255, r0
+ shll8 r0
+ mov #255, r1
+ shll8 r1
+ muls.w r0, r1
+
+ # Check the result.
+ sts macl, r3
+ mov #1, r4
+ shll16 r4
+ cmp/eq r3, r4
+ bf wrong
+
+invariant:
+ # Ensure MACH is invariant.
+ sts mach, r8
+ cmp/eq r7, r8
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/muluw.cgs b/sim/testsuite/sim/sh64/compact/muluw.cgs
new file mode 100644
index 00000000000..fa0a3343332
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/muluw.cgs
@@ -0,0 +1,96 @@
+# sh testcase for mulu.w $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ sts mach, r7
+
+ .global mulsw
+zero:
+ mov #0, r0
+ mov #1, r1
+ mulu.w r0, r1
+
+ # Check the result.
+ sts macl, r1
+ mov #0, r0
+ cmp/eq r0, r1
+ bf wrong
+
+sxs:
+ # Small * small.
+ mov #1, r0
+ mov #2, r1
+ mulu.w r0, r1
+
+ # Check the result.
+ sts macl, r1
+ mov #2, r0
+ cmp/eq r0, r1
+ bf wrong
+
+sxl:
+ # Small * large.
+ mov #1, r1
+ mov #0, r0
+ or #255, r0
+ shll8 r0
+ mulu.w r1, r0
+
+ # Check the result.
+ sts macl, r1
+ mov #0, r0
+ or #255, r0
+ shll8 r0
+ cmp/eq r0, r1
+ bf wrong
+
+lxs:
+ # Large * small.
+ mov #0, r0
+ or #255, r0
+ shll8 r0
+ mov #1, r1
+ mulu.w r0, r1
+
+ # Check the result.
+ sts macl, r1
+ mov #0, r0
+ or #255, r0
+ shll8 r0
+ cmp/eq r0, r1
+ bf wrong
+
+lxl:
+ # Large * large.
+ mov #0, r0
+ or #255, r0
+ shll8 r0
+ mov r0, r1
+ mulu.w r0, r1
+
+ # Check the result.
+ sts macl, r1
+ mov #0, r0
+ or #254, r0
+ shll8 r0
+ or #1, r0
+ shll16 r0
+ cmp/eq r0, r1
+ bf wrong
+
+invariant:
+ # Ensure MACH is invariant.
+ sts mach, r8
+ cmp/eq r7, r8
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/neg.cgs b/sim/testsuite/sim/sh64/compact/neg.cgs
new file mode 100644
index 00000000000..b6f98d74060
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/neg.cgs
@@ -0,0 +1,55 @@
+# sh testcase for neg $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ .macro signbit sign
+ shlr16 r1
+ shlr8 r1
+ shlr r1
+ shlr r1
+ shlr r1
+ shlr r1
+ shlr r1
+ shlr r1
+ shlr r1
+ assert r1, \sign
+ .endm
+ start
+
+ .global neg
+neg:
+ mov #0, r0
+ neg r0, r1
+ signbit #0
+
+ mov #42, r0
+ neg r0, r1
+ signbit #1
+
+ mov #0, r0
+ or #25, r0
+ neg r0, r1
+ signbit #1
+
+ # neg(0) is 0.
+ mov #0, r0
+ neg r0, r1
+ signbit #0
+
+ # neg(neg(x)) = x.
+ mov #42, r0
+ neg r0, r1
+ signbit #1
+ mov #42, r0
+ neg r0, r2
+ neg r2, r1
+ signbit #0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/negc.cgs b/sim/testsuite/sim/sh64/compact/negc.cgs
new file mode 100644
index 00000000000..1f5547d9bab
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/negc.cgs
@@ -0,0 +1,66 @@
+# sh testcase for negc $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ .macro signbit sign
+ mov r1, r2
+ shlr16 r2
+ shlr8 r2
+ shlr r2
+ shlr r2
+ shlr r2
+ shlr r2
+ shlr r2
+ shlr r2
+ shlr r2
+ assert r2, \sign
+ .endm
+ start
+
+ .global negc
+negc:
+ clrt
+ mov #1, r0
+ negc r0, r1
+ signbit #1
+
+negc2:
+ sett
+ mov #1, r0
+ negc r0, r1
+ signbit #1
+
+negc3:
+ clrt
+ mov #0, r0
+ negc r0, r1
+ signbit #0
+
+negc4:
+ sett
+ mov #0, r0
+ negc r0, r1
+ signbit #1
+
+negc5:
+ clrt
+ mov #0, r0
+ or #255, r0
+ negc r0, r1
+ signbit #1
+
+negc6:
+ sett
+ mov #0, r0
+ or #255, r0
+ negc r0, r1
+ signbit #1
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/nop.cgs b/sim/testsuite/sim/sh64/compact/nop.cgs
new file mode 100644
index 00000000000..8ce910c5abd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/nop.cgs
@@ -0,0 +1,13 @@
+# sh testcase for nop
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global nop
+nop:
+ nop
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/not.cgs b/sim/testsuite/sim/sh64/compact/not.cgs
new file mode 100644
index 00000000000..380808ddb57
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/not.cgs
@@ -0,0 +1,47 @@
+# sh testcase for not $rm64, $rn64 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global not
+not:
+ mov #0, r0
+ or #192, r0
+ not r0, r1
+
+ mov #0, r0
+ or #255, r0
+ shll8 r0
+ or #255, r0
+ shll8 r0
+ or #255, r0
+ shll8 r0
+ or #63, r0
+
+ cmp/eq r0, r1
+ bf wrong
+
+ones:
+ mov #0, r1
+ not r1, r2
+
+ mov #0, r0
+ or #255, r0
+ shll8 r0
+ or #255, r0
+ shll8 r0
+ or #255, r0
+ shll8 r0
+ or #255, r0
+ cmp/eq r0, r2
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/ocbi.cgs b/sim/testsuite/sim/sh64/compact/ocbi.cgs
new file mode 100644
index 00000000000..12fb2a116c4
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ocbi.cgs
@@ -0,0 +1,14 @@
+# sh testcase for ocbi @$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+ .global ocbi
+ocbi:
+ ocbi @r0
+ ocbi @r1
+ ocbi @r15
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/ocbp.cgs b/sim/testsuite/sim/sh64/compact/ocbp.cgs
new file mode 100644
index 00000000000..153aff2eade
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ocbp.cgs
@@ -0,0 +1,15 @@
+# sh testcase for ocbp @$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global ocbp
+ocbp:
+ ocbp @r0
+ ocbp @r1
+ ocbp @r15
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/ocbwb.cgs b/sim/testsuite/sim/sh64/compact/ocbwb.cgs
new file mode 100644
index 00000000000..6b0a741cbca
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ocbwb.cgs
@@ -0,0 +1,15 @@
+# sh testcase for ocbwb @$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global ocbwb
+ocbwb:
+ ocbwb @r0
+ ocbwb @r1
+ ocbwb @r15
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/or.cgs b/sim/testsuite/sim/sh64/compact/or.cgs
new file mode 100644
index 00000000000..a02eee39aaf
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/or.cgs
@@ -0,0 +1,43 @@
+# sh testcase for or $rm64, $rn64 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global or
+or:
+ mov #1, r0
+ rotr r0
+ mov #1, r1
+ or r0, r1
+
+ mov #1, r7
+ rotr r7
+ add #1, r7
+ cmp/eq r7, r1
+ bf wrong
+
+ .global or2
+or2:
+ mov #85, r0
+ shll16 r0
+ shll8 r0
+ mov #85, r1
+ shll8 r1
+ or r0, r1
+
+ mov #85, r7
+ shll16 r7
+ add #85 ,r7
+ shll8 r7
+ cmp/eq r1, r7
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/orb.cgs b/sim/testsuite/sim/sh64/compact/orb.cgs
new file mode 100644
index 00000000000..7e962f6fe69
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/orb.cgs
@@ -0,0 +1,24 @@
+# sh testcase for or.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:
+ or.b #0, @(r0, gbr)
+ or.b #170, @(r0, gbr)
+ or.b #0, @(r0, gbr)
+ or.b #255, @(r0, gbr)
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/ori.cgs b/sim/testsuite/sim/sh64/compact/ori.cgs
new file mode 100644
index 00000000000..63a5fb58740
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/ori.cgs
@@ -0,0 +1,40 @@
+# sh testcase for or #$imm8, r0 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global ori
+ori:
+ mov #1, r0
+ rotr r0
+ or #1, r0
+
+ mov #1, r7
+ rotr r7
+ add #1, r7
+ cmp/eq r0, r7
+ bf wrong
+
+ .global ori2
+ori2:
+ mov #85, r0
+ shll16 r0
+ shll8 r0
+ or #85, r0
+
+ mov #85, r7
+ shll16 r7
+ shll8 r7
+ add #85, r7
+ cmp/eq r0, r7
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/pref.cgs b/sim/testsuite/sim/sh64/compact/pref.cgs
new file mode 100644
index 00000000000..065e0932e6c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/pref.cgs
@@ -0,0 +1,15 @@
+# sh testcase for pref @$rn
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global pref
+pref:
+ pref @r0
+ pref @r1
+ pref @r15
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/rotcl.cgs b/sim/testsuite/sim/sh64/compact/rotcl.cgs
new file mode 100644
index 00000000000..5e1a3b91137
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/rotcl.cgs
@@ -0,0 +1,121 @@
+# sh testcase for rotcl $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global rotcl
+
+rotcl:
+ clrt
+ mov #1, r1
+ rotcl r1
+ assert r1, #2
+ clrt
+ rotcl r1
+ assert r1, #4
+ clrt
+ rotcl r1
+ assert r1, #8
+ clrt
+ rotcl r1
+ assert r1, #16
+ clrt
+ rotcl r1
+ assert r1, #32
+ clrt
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ bf wrong
+ rotcl r1
+ assert r1, #1
+
+ bra trotcl
+ nop
+
+wrong:
+ fail
+
+trotcl:
+ sett
+ mov #1, r1
+ rotcl r1
+ assert r1, #3
+ clrt
+ rotcl r1
+ assert r1, #6
+ clrt
+ rotcl r1
+ assert r1, #12
+ clrt
+ rotcl r1
+ assert r1, #24
+ clrt
+ rotcl r1
+ assert r1, #48
+ clrt
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ rotcl r1
+ bf wrong2
+ assert r1, #1
+ rotcl r1
+ rotcl r1
+
+okay:
+ pass
+wrong2:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/rotcr.cgs b/sim/testsuite/sim/sh64/compact/rotcr.cgs
new file mode 100644
index 00000000000..b53300ec54f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/rotcr.cgs
@@ -0,0 +1,103 @@
+# sh testcase for rotcr $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global rotcr
+rotcr:
+ clrt
+ mov #1, r1
+ rotcr r1
+ bf wrong
+ assert r1, #0
+ sett
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ assert r1, #1
+ rotcr r1
+ bf wrong
+
+trotcr:
+ sett
+ mov #1, r1
+ rotcr r1
+ bf wrong
+ sett
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ rotcr r1
+ bf wrong
+ assert r1, #1
+ rotcr r1
+ bf wrong
+ rotcr r1
+
+okay:
+ pass
+wrong:
+ fail
+
+
diff --git a/sim/testsuite/sim/sh64/compact/rotl.cgs b/sim/testsuite/sim/sh64/compact/rotl.cgs
new file mode 100644
index 00000000000..e292de7e437
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/rotl.cgs
@@ -0,0 +1,62 @@
+# sh testcase for rotl $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global rotl
+rotl:
+ mov #1, r1
+ rotl r1
+ assert r1, #2
+ rotl r1
+ assert r1, #4
+ rotl r1
+ assert r1, #8
+ rotl r1
+ assert r1, #16
+ rotl r1
+ assert r1, #32
+ rotl r1
+ assert r1, #64
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ rotl r1
+ bf wrong
+ assert r1, #1
+ rotl r1
+ rotl r1
+ rotl r1
+ assert r1, #8
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/rotr.cgs b/sim/testsuite/sim/sh64/compact/rotr.cgs
new file mode 100644
index 00000000000..7f80f993aea
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/rotr.cgs
@@ -0,0 +1,55 @@
+# sh testcase for rotr $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global rotr
+rotr:
+ mov #1, r1
+ rotr r1
+ bf wrong
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ rotr r1
+ assert r1, #1
+ rotr r1
+ rotr r1
+ rotr r1
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/rts.cgs b/sim/testsuite/sim/sh64/compact/rts.cgs
new file mode 100644
index 00000000000..eeb8dce9332
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/rts.cgs
@@ -0,0 +1,24 @@
+# sh testcase for rts -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global rts
+rts:
+ bsr subroutine
+slot:
+ nop
+return:
+ pass
+ fail
+
+subroutine:
+ rts
+rts_slot:
+ nop
+bad:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/sets.cgs b/sim/testsuite/sim/sh64/compact/sets.cgs
new file mode 100644
index 00000000000..f031701d6ee
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/sets.cgs
@@ -0,0 +1,13 @@
+# sh testcase for sets -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global sets
+sets:
+ sets
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/sett.cgs b/sim/testsuite/sim/sh64/compact/sett.cgs
new file mode 100644
index 00000000000..9ae8af536e7
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/sett.cgs
@@ -0,0 +1,16 @@
+# sh testcase for sett -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global sett
+sett:
+ sett
+ bf wrong
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/shad.cgs b/sim/testsuite/sim/sh64/compact/shad.cgs
new file mode 100644
index 00000000000..340743d8f1f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shad.cgs
@@ -0,0 +1,58 @@
+# sh testcase for shad $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global null
+null:
+ mov #1, r0
+ mov #0, r1
+ shad r1, r0
+ # no shift is performed.
+ assert r0, #1
+
+ .global gt0
+gt0:
+ mov #4, r0
+ mov #3, r1
+ shad r1, r0
+ # shift left 3 bits.
+ assert r0, #32
+
+ .global lt0
+lt0:
+ mov #32, r0
+ mov #3, r1
+ neg r1, r1
+ shad r1, r0
+ # shift right 3 bits.
+ assert r0, #4
+
+ .global fillpos
+fillpos:
+ mov #1, r0
+ mov #1, r1
+ rotr r1
+ shad r1, r0
+ # check result.
+ assert r0, #0
+
+ .global fillneg
+fillneg:
+ mov #1, r0
+ neg r0, r0
+ mov #1, r1
+ rotr r1
+ shad r1, r0
+ # check result.
+ not r0, r0
+ assert r0, #0
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/shal.cgs b/sim/testsuite/sim/sh64/compact/shal.cgs
new file mode 100644
index 00000000000..dfea947e856
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shal.cgs
@@ -0,0 +1,57 @@
+# sh testcase for shal $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global shal
+shal:
+ mov #1, r1
+ shal r1
+ assert r1, #2
+ shal r1
+ assert r1, #4
+ shal r1
+ assert r1, #8
+ shal r1
+ assert r1, #16
+ shal r1
+ assert r1, #32
+ shal r1
+ assert r1, #64
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ shal r1
+ assert r1, #0
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/shar.cgs b/sim/testsuite/sim/sh64/compact/shar.cgs
new file mode 100644
index 00000000000..e3e92fca080
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shar.cgs
@@ -0,0 +1,40 @@
+# sh testcase for shar $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global shar
+shar:
+ mov #0, r0
+ or #192, r0
+ shar r0
+ bt wrong
+ shar r0
+ bt wrong
+ shar r0
+ bt wrong
+ shar r0
+ bt wrong
+ shar r0
+ bt wrong
+ shar r0
+ bt wrong
+ shar r0
+ bf wrong
+ shar r0
+ bf wrong
+ shar r0
+ bt wrong
+ shar r0
+ bt wrong
+ assert r0, #0
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/shld.cgs b/sim/testsuite/sim/sh64/compact/shld.cgs
new file mode 100644
index 00000000000..32e4100259d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shld.cgs
@@ -0,0 +1,48 @@
+# sh testcase for shld $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global null
+null:
+ mov #1, r0
+ mov #0, r1
+ shld r1, r0
+ # no shift is performed.
+ assert r0, #1
+
+ .global gt0
+gt0:
+ mov #4, r0
+ mov #3, r1
+ shld r1, r0
+ # shift left 3 bits.
+ assert r0, #32
+
+ .global lt0
+lt0:
+ mov #32, r0
+ mov #3, r1
+ neg r1, r1
+ shld r1, r0
+ # shift right 3 bits.
+ assert r0, #4
+
+ .global fill
+fill:
+ mov #1, r0
+ rotr r0
+ mov #1, r1
+ rotr r1
+ shld r1, r0
+ assert r0, #0
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/shll.cgs b/sim/testsuite/sim/sh64/compact/shll.cgs
new file mode 100644
index 00000000000..882f2c2e1ef
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shll.cgs
@@ -0,0 +1,57 @@
+# sh testcase for shll $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global shll
+shll:
+ mov #1, r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ shll r1
+ assert r1, #0
+another:
+ mov #1, r1
+ shll r1
+ shll r1
+ shll r1
+ assert r1, #8
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/shll16.cgs b/sim/testsuite/sim/sh64/compact/shll16.cgs
new file mode 100644
index 00000000000..0637c3de706
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shll16.cgs
@@ -0,0 +1,44 @@
+# sh testcase for shll16 $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global shll16
+shll16:
+ mov #108, r1
+ shll16 r1
+ shll16 r1
+ assert r1, #0
+
+another:
+ mov #1, r1
+ shll16 r1
+ mov #1, r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ cmp/eq r1, r7
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/shll2.cgs b/sim/testsuite/sim/sh64/compact/shll2.cgs
new file mode 100644
index 00000000000..6e28c664307
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shll2.cgs
@@ -0,0 +1,40 @@
+# sh testcase for shll2 $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global shll2
+shll2:
+ mov #1, r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ shll2 r1
+ assert r1, #0
+
+another:
+ mov #1, r1
+ shll2 r1
+ assert r1, #4
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/shll8.cgs b/sim/testsuite/sim/sh64/compact/shll8.cgs
new file mode 100644
index 00000000000..fe455ec753d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shll8.cgs
@@ -0,0 +1,38 @@
+# sh testcase for shll8 $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global shll8
+shll8:
+ mov #1, r1
+ shll8 r1
+ shll8 r1
+ shll8 r1
+ shll8 r1
+ assert r1, #0
+
+another:
+ mov #1, r1
+ shll8 r1
+ mov #1, r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ shll r7
+ cmp/eq r1, r7
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/shlr.cgs b/sim/testsuite/sim/sh64/compact/shlr.cgs
new file mode 100644
index 00000000000..9d86461b959
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shlr.cgs
@@ -0,0 +1,33 @@
+# sh testcase for shlr $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global shlr
+shlr:
+ mov #0, r0
+ or #192, r0
+ shlr r0
+ shlr r0
+ shlr r0
+ shlr r0
+ shlr r0
+ shlr r0
+ # Make sure a bit is shifted into T.
+ shlr r0
+ bf wrong
+ # Ditto.
+ shlr r0
+ bf wrong
+ shlr r0
+ assert r0, #0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/shlr16.cgs b/sim/testsuite/sim/sh64/compact/shlr16.cgs
new file mode 100644
index 00000000000..7bfc62788f3
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shlr16.cgs
@@ -0,0 +1,14 @@
+# sh testcase for shlr16 $rn
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global shrl16
+shrl16:
+ shlr16 r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/shlr2.cgs b/sim/testsuite/sim/sh64/compact/shlr2.cgs
new file mode 100644
index 00000000000..6f085979443
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shlr2.cgs
@@ -0,0 +1,14 @@
+# sh testcase for shlr2 $rn
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global shrl2
+shrl2:
+ shlr2 r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/shlr8.cgs b/sim/testsuite/sim/sh64/compact/shlr8.cgs
new file mode 100644
index 00000000000..82040b581b8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/shlr8.cgs
@@ -0,0 +1,14 @@
+# sh testcase for shlr8 $rn
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global shrl8
+shrl8:
+ shlr8 r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/stc-gbr.cgs b/sim/testsuite/sim/sh64/compact/stc-gbr.cgs
new file mode 100644
index 00000000000..1b84008c9d2
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/stc-gbr.cgs
@@ -0,0 +1,21 @@
+# sh testcase for stc gbr, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global stc_gbr
+stc_gbr:
+ stc gbr, r1
+ mov #42, r1
+ ldc r1, gbr
+ stc gbr, r2
+ cmp/eq r1, r2
+ bf wrong
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/stcl-gbr.cgs b/sim/testsuite/sim/sh64/compact/stcl-gbr.cgs
new file mode 100644
index 00000000000..3e74cc551de
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/stcl-gbr.cgs
@@ -0,0 +1,27 @@
+# sh testcase for stc.l gbr, @-$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global stcl_gbr
+stcl_gbr:
+ mov #42, r0
+ ldc r0, gbr
+ mov #40, r0
+ shll8 r0
+ # save address
+ mov r0, r1
+ stc.l gbr, @-r0
+
+ add #4, r0
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/sts-fpscr.cgs b/sim/testsuite/sim/sh64/compact/sts-fpscr.cgs
new file mode 100644
index 00000000000..42724b44fff
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/sts-fpscr.cgs
@@ -0,0 +1,23 @@
+# sh testcase for sts fpscr, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global sts_fpscr
+sts_fpscr:
+ sts fpscr, r0
+ mov #42, r0
+ lds r0, fpscr
+ sts fpscr, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/sts-fpul.cgs b/sim/testsuite/sim/sh64/compact/sts-fpul.cgs
new file mode 100644
index 00000000000..ddbdaf15fb2
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/sts-fpul.cgs
@@ -0,0 +1,14 @@
+# sh testcase for sts fpul, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global sts_fpul
+sts_fpul:
+ # This is properly exercised by the lds-fpul test case.
+ sts fpul, r1
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/sts-mach.cgs b/sim/testsuite/sim/sh64/compact/sts-mach.cgs
new file mode 100644
index 00000000000..4d34bc17aa8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/sts-mach.cgs
@@ -0,0 +1,22 @@
+# sh testcase for sts mach, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global sts_mach
+sts_mach:
+ mov #42, r0
+ lds r0, mach
+ sts mach, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/sts-macl.cgs b/sim/testsuite/sim/sh64/compact/sts-macl.cgs
new file mode 100644
index 00000000000..b805f796e44
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/sts-macl.cgs
@@ -0,0 +1,21 @@
+# sh testcase for sts macl, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global sts_macl
+sts_macl:
+ mov #42, r0
+ lds r0, macl
+ sts macl, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/sts-pr.cgs b/sim/testsuite/sim/sh64/compact/sts-pr.cgs
new file mode 100644
index 00000000000..3e4f6ee880a
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/sts-pr.cgs
@@ -0,0 +1,22 @@
+# sh testcase for sts pr, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global sts_pr
+sts_pr:
+ mov #42, r0
+ lds r0, pr
+ sts pr, r1
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs b/sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs
new file mode 100644
index 00000000000..032870dc189
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/stsl-fpscr.cgs
@@ -0,0 +1,28 @@
+# sh testcase for sts.l fpscr, @-$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global stsl_fpscr
+stsl_fpscr:
+ mov #40, r0
+ shll8 r0
+ # Preserve r0.
+ mov r0, r7
+ sts.l fpscr, @-r0
+
+check:
+ # Ensure r0 is decremented.
+ add #4, r0
+ cmp/eq r0, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/stsl-fpul.cgs b/sim/testsuite/sim/sh64/compact/stsl-fpul.cgs
new file mode 100644
index 00000000000..89bd9e73849
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/stsl-fpul.cgs
@@ -0,0 +1,27 @@
+# sh testcase for sts.l fpul, @-$rn -*- Asm -*_
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global stsl_fpul
+stsl_fpul:
+ mov #40, r0
+ shll8 r0
+ # Preserve r0.
+ mov r0, r7
+ sts.l fpul, @-r0
+
+dec:
+ # Check for proper pre-decrementing.
+ add #4, r0
+ cmp/eq r0, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/stsl-mach.cgs b/sim/testsuite/sim/sh64/compact/stsl-mach.cgs
new file mode 100644
index 00000000000..e15bddece29
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/stsl-mach.cgs
@@ -0,0 +1,42 @@
+# sh testcase for sts.l mach, @-$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global stsl_mach
+stsl_mach:
+ # Build up a distinctive bit pattern.
+ mov #1, r0
+ shll8 r0
+ add #12, r0
+ shll8 r0
+ add #85, r0
+ shll8 r0
+ add #170, r0
+
+ lds r0, mach
+ mov #40, r2
+ shll8 r2
+ # Preserve r2.
+ mov r2, r7
+ sts.l mach, @-r2
+
+ # check results.
+ mov.l @r2, r3
+ cmp/eq r0, r3
+ bf wrong
+
+ # Ensure decrement occurred.
+ add #4, r2
+ cmp/eq r2, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/stsl-macl.cgs b/sim/testsuite/sim/sh64/compact/stsl-macl.cgs
new file mode 100644
index 00000000000..854ef341552
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/stsl-macl.cgs
@@ -0,0 +1,42 @@
+# sh testcase for sts.l macl, @-$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global stsl_macl
+stsl_macl:
+ # Build up a distinctive bit pattern.
+ mov #1, r0
+ shll8 r0
+ add #12, r0
+ shll8 r0
+ add #85, r0
+ shll8 r0
+ add #170, r0
+
+ lds r0, macl
+ mov #40, r2
+ shll8 r2
+ # Preserve r2.
+ mov r2, r7
+ sts.l macl, @-r2
+
+ # check results.
+ mov.l @r2, r3
+ cmp/eq r0, r3
+ bf wrong
+
+ # Ensure decrement occurred.
+ add #4, r2
+ cmp/eq r2, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/stsl-pr.cgs b/sim/testsuite/sim/sh64/compact/stsl-pr.cgs
new file mode 100644
index 00000000000..b519c9bb5bd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/stsl-pr.cgs
@@ -0,0 +1,42 @@
+# sh testcase for sts.l pr, @-$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global stsl_pr
+stsl_pr:
+ # Build up a distinctive bit pattern.
+ mov #1, r0
+ shll8 r0
+ add #12, r0
+ shll8 r0
+ add #85, r0
+ shll8 r0
+ add #170, r0
+
+ lds r0, pr
+ mov #40, r2
+ shll8 r2
+ # Preserve r2.
+ mov r2, r7
+ sts.l pr, @-r2
+
+ # check results.
+ mov.l @r2, r3
+ cmp/eq r0, r3
+ bf wrong
+
+ # Ensure decrement occurred.
+ add #4, r2
+ cmp/eq r2, r7
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/sub.cgs b/sim/testsuite/sim/sh64/compact/sub.cgs
new file mode 100644
index 00000000000..3ba29f872aa
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/sub.cgs
@@ -0,0 +1,68 @@
+# sh testcase for sub $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global sub1
+sub1:
+ # 0 - x.
+ mov #0, r0
+ mov #3, r1
+ sub r1, r0
+
+ mov #2, r7
+ not r7, r7
+ cmp/eq r7, r0
+ bf wrong
+
+ .global sub2
+sub2:
+ # x - 0.
+ mov #0, r0
+ mov #3, r1
+ sub r0, r1
+ assert r1, #3
+
+ .global sub3
+sub3:
+ # x - y.
+ mov #4, r0
+ mov #3, r1
+ sub r0, r1
+
+ mov #0, r7
+ not r7, r7
+ cmp/eq r7, r1
+ bf wrong
+
+ .global sub4
+sub4:
+ # y - x.
+ mov #4, r0
+ mov #3, r1
+ sub r1, r0
+ assert r0, #1
+
+ .global sub5
+sub5:
+ # y - y == 0 (where y are in two distinct registers).
+ mov #4, r0
+ mov #4, r1
+ sub r1, r0
+ assert r0, #0
+
+ .global sub6
+sub6:
+ # y - y = 0 (where y is the same register).
+ mov #4, r1
+ sub r1, r1
+ assert r1, #0
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/subc.cgs b/sim/testsuite/sim/sh64/compact/subc.cgs
new file mode 100644
index 00000000000..cda1e84ae9d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/subc.cgs
@@ -0,0 +1,109 @@
+# sh testcase for subc $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+zero:
+ mov #0, r0
+ mov #0, r1
+ clrt
+ subc r0, r1
+ assert r1, #0
+
+zerot:
+ mov #0, r0
+ mov #0, r1
+ sett
+ subc r0, r1
+ # Invert all 1's to all 0's for ease of comparison.
+ not r1, r1
+ assert r1, #0
+
+null:
+ mov #0, r0
+ mov #10, r1
+ clrt
+ subc r0, r1
+ assert r1, #10
+
+nullt:
+ mov #0, r0
+ mov #10, r1
+ sett
+ subc r0, r1
+ assert r1, #9
+
+subc:
+ mov #10, r0
+ mov #0, r1
+ clrt
+ subc r0, r1
+ # Again, invert ..
+ not r1, r1
+ assert r1, #9
+
+subct:
+ mov #10, r0
+ mov #0, r1
+ sett
+ subc r0, r1
+ # Again, invert ..
+ not r1, r1
+ assert r1, #10
+
+subc2:
+ mov #10, r0
+ mov #20, r1
+ clrt
+ subc r0, r1
+ assert r1, #10
+
+subc2t:
+ mov #20, r0
+ mov #10, r1
+ sett
+ subc r0, r1
+ # Again, invert ..
+ not r1, r1
+ assert r1, #10
+
+subc3:
+ mov #5, r0
+ mov #5, r1
+ clrt
+ subc r0, r1
+ assert r1, #0
+
+subc3t:
+ mov #5, r0
+ mov #5, r1
+ sett
+ subc r0, r1
+ # Again, invert ..
+ not r1, r1
+ assert r1, #0
+
+large:
+ mov #2, r0
+ mov #10, r1
+ clrt
+ subc r1, r0
+ # Again, invert ..
+ not r0, r0
+ assert r0, #7
+
+larget:
+ mov #2, r0
+ mov #10, r1
+ sett
+ subc r0, r1
+ assert r1, #7
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/subv.cgs b/sim/testsuite/sim/sh64/compact/subv.cgs
new file mode 100644
index 00000000000..ceb8c64e7fd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/subv.cgs
@@ -0,0 +1,55 @@
+# sh testcase for subv $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+zero:
+ mov #0, r0
+ mov #0, r1
+ subv r0, r1
+ bt wrong
+ assert r1, #0
+
+one:
+ mov #10, r0
+ mov #0, r1
+ subv r0, r1
+ bt wrong
+ not r1, r1
+ assert r1, #9
+
+large:
+ # Produce MAXINT in R0.
+ mov #0, r0
+ not r0, r0
+ shlr r0
+
+ # Put -3 into R1.
+ mov #3, r1
+ neg r1, r1
+
+ # Subtract them and underflow.
+ subv r0, r1
+ bf wrong
+
+another:
+ # Produce MAXINT in R0.
+ mov #0, r0
+ not r0, r0
+ shlr r0
+
+ # Put -3 into R1.
+ mov #3, r1
+ neg r1, r1
+
+ # Subtract them and overflow.
+ subv r1, r0
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/swapb.cgs b/sim/testsuite/sim/sh64/compact/swapb.cgs
new file mode 100644
index 00000000000..22f6f16a2e1
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/swapb.cgs
@@ -0,0 +1,44 @@
+# sh testcase for swap.b $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+init:
+ # Build up a distinctive bit pattern.
+ mov #1, r0
+ shll8 r0
+ add #12, r0
+ shll8 r0
+ add #85, r0
+ shll8 r0
+ add #70, r0
+
+test:
+ # Swap the lower two bytes into a different register.
+ swap.b r0, r1
+ mov #1, r7
+ shll8 r7
+ add #12, r7
+ shll8 r7
+ add #70, r7
+ shll8 r7
+ add #85, r7
+ cmp/eq r1, r7
+ bf wrong
+
+swapback:
+ # Swap the lower two bytes into the same registers.
+ # R0 should now equal R1.
+ swap.b r1, r2
+ cmp/eq r0, r2
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/swapw.cgs b/sim/testsuite/sim/sh64/compact/swapw.cgs
new file mode 100644
index 00000000000..fa1ab697f27
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/swapw.cgs
@@ -0,0 +1,43 @@
+# sh testcase for swap.w $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global swapw
+swapw:
+ # Build up a characteristic bit pattern in R0.
+ mov #85, r0
+ shll16 r0
+ add #3, r0
+ rotr r0
+ rotr r0
+ or #170, r0
+ # Preserve for later.
+ mov r0, r8
+
+test:
+ swap.w r0, r1
+ mov #64, r0
+ shll8 r0
+ or #170, r0
+ shll8 r0
+ or #192, r0
+ shll8 r0
+ or #21, r0
+ cmp/eq r1, r0
+ bf wrong
+
+swapback:
+ swap.w r1, r2
+ cmp/eq r2, r8
+ bf wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/tasb.cgs b/sim/testsuite/sim/sh64/compact/tasb.cgs
new file mode 100644
index 00000000000..cb7f61870d2
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/tasb.cgs
@@ -0,0 +1,26 @@
+# sh testcase for tas.b @$rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+tasb1:
+ mov #40, r0
+ shll8 r0
+ tas.b @r0
+ bf wrong
+
+tasb2:
+ mov #40, r0
+ shll8 r0
+ tas.b @r0
+ bt wrong
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/testutils.inc b/sim/testsuite/sim/sh64/compact/testutils.inc
new file mode 100644
index 00000000000..b1ad830578b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/testutils.inc
@@ -0,0 +1,49 @@
+# Support macros for the assembly test cases.
+
+ .macro start
+ .text
+ .global start
+start:
+ .endm
+
+ # Perform a single to double precision floating point conversion.
+ .macro _s2d fpr dpr
+ flds \fpr, fpul
+ _setpr
+ fcnvsd fpul, \dpr
+ _clrpr
+ .endm
+
+ # Set the PR (PRecision) bit in the FPSCR.
+ .macro _setpr
+ sts fpscr, r7
+ mov #8, r8
+ shll16 r8
+ or r8, r7
+ lds r7, fpscr
+ .endm
+
+ # Clear the PR bit.
+ .macro _clrpr
+ sts fpscr, r7
+ mov #8, r8
+ shll16 r8
+ not r8, r8
+ and r8, r7
+ lds r7, fpscr
+ .endm
+
+ # nb: this macro clobbers R7.
+ .macro assert reg value
+ mov \value, r7
+ cmp/eq \reg, r7
+ bf wrong
+ .endm
+
+ .macro pass
+ trapa #253
+ .endm
+
+ .macro fail
+ trapa #254
+ .endm
diff --git a/sim/testsuite/sim/sh64/compact/trapa.cgs b/sim/testsuite/sim/sh64/compact/trapa.cgs
new file mode 100644
index 00000000000..24f8a6b13ba
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/trapa.cgs
@@ -0,0 +1,13 @@
+# sh testcase for trapa #$imm8 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global trapa
+trapa:
+ # pass is a macro for "trapa #253".
+ trapa #253
diff --git a/sim/testsuite/sim/sh64/compact/tst.cgs b/sim/testsuite/sim/sh64/compact/tst.cgs
new file mode 100644
index 00000000000..a72b8a9a743
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/tst.cgs
@@ -0,0 +1,62 @@
+# sh testcase for tst $rm, $rn
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global tst1
+tst1:
+ mov #0, r0
+ mov #0, r1
+ tst r0, r0
+ bf wrong
+
+test2:
+ mov #0, r0
+ mov #1, r1
+ tst r0, r1
+ bf wrong
+
+test3:
+ mov #0, r0
+ mov #1, r1
+ tst r1, r0
+ bf wrong
+
+test4:
+ mov #1, r0
+ mov #1, r1
+ tst r0, r1
+ bt wrong
+
+test5:
+ mov #1, r0
+ rotr r0
+ add #85, r0
+ shll16 r0
+ add #12, r0
+ mov #1, r1
+ rotr r1
+ add #85, r1
+ shll16 r1
+ add #12, r1
+ tst r0, r1
+ bt wrong
+
+test6:
+ mov #1, r0
+ rotr r0
+ add #85, r0
+ shll16 r0
+ add #12, r0
+ mov #1, r1
+ tst r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/tstb.cgs b/sim/testsuite/sim/sh64/compact/tstb.cgs
new file mode 100644
index 00000000000..1b3829b1d30
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/tstb.cgs
@@ -0,0 +1,30 @@
+# sh testcase for tst.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:
+ tst.b #0, @(r0, gbr)
+ bf wrong
+ tst.b #170, @(r0, gbr)
+ bf wrong
+ tst.b #0, @(r0, gbr)
+ bf wrong
+ tst.b #255, @(r0, gbr)
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/compact/tsti.cgs b/sim/testsuite/sim/sh64/compact/tsti.cgs
new file mode 100644
index 00000000000..e088029b470
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/tsti.cgs
@@ -0,0 +1,32 @@
+# sh testcase for tst #$imm8, r0 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global tsti
+tsti:
+ mov #0, r0
+ tst #0, r0
+
+tsti2:
+ mov #0, r0
+ tst #1, r0
+
+tsti3:
+ mov #1, r0
+ tst #0, r0
+
+tsti4:
+ mov #1, r0
+ tst #1, r0
+
+tsti5:
+ mov #255, r0
+ tst #255, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/xor.cgs b/sim/testsuite/sim/sh64/compact/xor.cgs
new file mode 100644
index 00000000000..d158aaf3713
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/xor.cgs
@@ -0,0 +1,70 @@
+# sh testcase for xor $rm64, $rn64 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global xor
+xor:
+ # 0 (+) 1 = 1.
+ mov #0, r0
+ mov #1, r1
+ xor r0, r1
+ assert r1, #1
+
+xor2:
+ # 1 (+) 0 = 0.
+ mov #1, r0
+ mov #0, r1
+ xor r0, r1
+ assert r1, #1
+
+xor3:
+ # 0 (+) 0 = 0.
+ mov #0, r0
+ mov #0, r1
+ xor r0, r1
+ assert r1, #0
+
+xor4:
+ # 0 (+) 0 = 0.
+ mov #0, r0
+ xor r0, r0
+ assert r0, #0
+
+xor5:
+ mov #0, r0
+ or #85, r0
+ shll16 r0
+ or #170, r0
+ mov r0, r1
+ mov #0, r0
+ or #85, r0
+ shll16 r0
+ or #170, r0
+ xor r1, r0
+ assert r0, #0
+
+xor6:
+ mov #0, r0
+ or #85, r0
+ shll16 r0
+ or #170, r0
+ mov r0, r1
+ mov #0, r0
+ or #85, r0
+ shll16 r0
+ or #12, r0
+ xor r0, r1
+ mov #0, r0
+ or #166, r0
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/xorb.cgs b/sim/testsuite/sim/sh64/compact/xorb.cgs
new file mode 100644
index 00000000000..b31464b3c13
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/xorb.cgs
@@ -0,0 +1,24 @@
+# sh testcase for xor.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:
+ xor.b #0, @(r0, gbr)
+ xor.b #170, @(r0, gbr)
+ xor.b #0, @(r0, gbr)
+ xor.b #255, @(r0, gbr)
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/compact/xori.cgs b/sim/testsuite/sim/sh64/compact/xori.cgs
new file mode 100644
index 00000000000..732b9ec5c48
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/xori.cgs
@@ -0,0 +1,50 @@
+# sh testcase for xor #$imm8, r0 -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+ .global xori
+xori:
+ # 0 (+) 1 = 1.
+ mov #0, r0
+ xor #1, r0
+ assert r0, #1
+
+xori2:
+ # 1 (+) 0 = 1.
+ mov #1, r0
+ xor #0, r0
+ assert r0, #1
+
+xori3:
+ # 1 (+) 1 = 0.
+ mov #1, r0
+ xor #1, r0
+ assert r0, #0
+
+xori4:
+ # 255 (+) 255 = 0.
+ mov #0, r0
+ or #255, r0
+ xor #255, r0
+ assert r0, #0
+
+xori5:
+ # 0 (+) 255 = 255.
+ mov #0, r0
+ xor #255, r0
+ mov r0, r1
+
+ mov #0, r0
+ or #255, r0
+ cmp/eq r0, r1
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/compact/xtrct.cgs b/sim/testsuite/sim/sh64/compact/xtrct.cgs
new file mode 100644
index 00000000000..11dae7cbdec
--- /dev/null
+++ b/sim/testsuite/sim/sh64/compact/xtrct.cgs
@@ -0,0 +1,46 @@
+# sh testcase for xtrct $rm, $rn -*- Asm -*-
+# mach: all
+# as: -isa=shcompact
+# ld: -m shelf32
+
+ .include "compact/testutils.inc"
+
+ start
+
+init:
+ mov #170, r0
+ shll8 r0
+ add #1, r0
+ shll8 r0
+ add #66, r0
+ shll8 r0
+ mov r0, r1
+
+ mov #85, r0
+ shll8 r0
+ add #2, r0
+ shll8 r0
+ add #42, r0
+ shll8 r0
+ add #3, r0
+
+copy:
+ mov r0, r3
+ mov r1, r4
+
+xtrct:
+ xtrct r0, r1
+
+check:
+ # Lower r3, upper r4.
+ shll16 r3
+ shlr16 r4
+ or r3, r4
+ cmp/eq r1, r4
+ bf wrong
+
+okay:
+ pass
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/interwork.exp b/sim/testsuite/sim/sh64/interwork.exp
new file mode 100644
index 00000000000..acd19b3c90c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/interwork.exp
@@ -0,0 +1,20 @@
+# SH64 interworking testsuite.
+# In particular, test parts of the instruction set that can be used
+# for SHmedia/SHcompact instruction set mode switches.
+
+if [istarget sh64-*-*] {
+ # load support procs (none yet)
+ # load_lib cgen.exp
+
+ # all machines
+ set all_machs "sh5"
+
+ foreach src [lsort [glob -nocomplain $srcdir/$subdir/misc/*.s]] {
+ # 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
+ }
+}
diff --git a/sim/testsuite/sim/sh64/media.exp b/sim/testsuite/sim/sh64/media.exp
new file mode 100644
index 00000000000..1a3d9f4c961
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media.exp
@@ -0,0 +1,19 @@
+# SHmedia 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/media/*.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
+ }
+}
diff --git a/sim/testsuite/sim/sh64/media/ChangeLog b/sim/testsuite/sim/sh64/media/ChangeLog
new file mode 100644
index 00000000000..e435dbe5278
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ChangeLog
@@ -0,0 +1,102 @@
+2001-01-09 Ben Elliston <bje@redhat.com>
+
+ * nsb.cgs: Test consecutive bits of zeros as well as ones.
+ * ptb.cgs: Clean up.
+
+2001-01-08 Ben Elliston <bje@redhat.com>
+
+ * fcmpund.cgs, fcmpuns.cgs: Complete test cases.
+ * fcnvds.cgs, fcnvsd.cgs, fgetscr.cgs, fiprs.cgs: Ditto.
+ * floatld.cgs, floatls.cgs, floatqd.cgs, floatqs.cgs: Ditto.
+ * fmuld.cgs, fmuls.cgs, fputscr.cgs, fstxp.cgs: Ditto.
+ * fsubd.cgs, fsubs.cgs, ftrcdl.cgs, ftrcdq.cgs: Ditto.
+ * ftrcsl.cgs, ftrcsq.cgs, ftrvs.cgs: Ditto.
+ * ldhil.cgs, ldhiq.cgs, ldlol.cgs, ldloq.cgs: Ditto.
+ * mabsl.cgs, mabsw.cgs, maddl.cgs, maddsl.cgs: Ditto.
+ * maddsub.cgs, maddsw.cgs, maddw.cgs: Ditto.
+ * mcmpeqb.cgs, mcmpeql.cgs, mcmpeqw.cgs: Ditto.
+ * mcmpgtl.cgs, mcmpgtub.cgs, mcmpgtw.cgs: Ditto.
+ * mcmv.cgs, mcnvslw.cgs, mcnvswb.cgs, mcnvswub.cgs: Ditto.
+ * mmacfxwl.cgs, mmacnfx-wl.cgs: Ditto.
+ * mmulfxl.cgs, mmulfxrpw.cgs, mmulfxw.cgs: Ditto.
+ * mmulhiwl.cgs, mmull.cgs, mmullowl.cgs: Ditto.
+ * mmulsumwq.cgs, mmulw.cgs, movi.cgs: Ditto.
+ * mpermw.cgs, msadubq.cgs: Ditto.
+ * mshaldsl.cgs, mshaldsw.cgs: Ditto.
+ * mshardl.cgs, mshardsq.cgs, mshardw.cgs: Ditto.
+ * mshfhib.cgs, mshfhil.cgs, mshfhiw.cgs: Ditto.
+ * mshflob.cgs, mshflol.cgs, mshflow.cgs: Ditto.
+ * mshlldl.cgs, mshlldw.cgs, mshlrdl.cgs: Ditto.
+ * mshlrdw.cgs, msubl.cgs, msubsl.cgs: Ditto.
+ * msubsub.cgs, msubsw.cgs, msubw.cgs: Ditto.
+ * mulsl.cgs, mulul.cgs: Ditto.
+ * ptabs.cgs, ptb.cgs, ptrel.cgs: Ditto.
+ * shard.cgs, shardl.cgs, shari.cgs, sharil.cgs: Ditto.
+ * shlld.cgs, shlldl.cgs, shlli.cgs, shllil.cgs: Ditto.
+ * shlrd.cgs, shlrdl.cgs, shlri.cgs, shlril.cgs: Ditto.
+ * sthil.cgs, sthiq.cgs, swapq.cgs, trapa.cgs: Ditto.
+
+ * testutils.inc (pass): Pass correct "syscall" number.
+ (fail): Ditto.
+
+2000-12-13 Ben Elliston <bje@redhat.com>
+
+ * sub.cgs, subl.cgs: Complete test cases.
+ * ptrel.cgs: Likewise.
+
+ * shori.cgs: Test for zero extension of immediate operand.
+ * fcmpged.cgs, fcmpges.cgs, fldd.cgs: Complete test cases.
+ * fldp.cgs, flds.cgs, fldxd.cgs, fldxp.cgs: Likewise.
+ * fldxs.cgs, fmacs.cgs, fnegd.cgs, fnegs.cgs: Likewise.
+ * fsqrtd.cgs, fsqrts.cgs, fstd.cgs, fstp.cgs: Likewise.
+ * fsts.cgs, fstxd.cgs, fstxs.cgs: Likewise.
+
+2000-12-12 Ben Elliston <bje@redhat.com>
+
+ * testutils.inc (pass): Use simple syscall mechanism.
+ (fail): Likewise.
+ (_packb, _packw, _packl): New macros for packing slices.
+
+ * stb.cgs, stq.cgs, stxb.cgs, stxq.cgs: Complete test cases.
+ * stl.cgs, stw.cgs, stxl.cgs, stxw.cgs: Likewise.
+ * ldl.cgs, ldq.cgs, ldub.cgs, lduw.cgs, ldw.cgs: Likewise.
+ * ldxb.cgs, ldxl.cgs, ldxq.cgs, ldxub.cgs: Likewise.
+ * ldxuw.cgs, ldxw.cgs, nsb.cgs, trapa.cgs: Likewise.
+
+ * fcmpeqd.cgs, fcmpeqs.cgs, fcmpgtd.cgs: Complete test cases.
+ * fcmpgts.cgs, fdivd.cgs, fdivs.cgs, fmovd.cgs: Likewise.
+ * fmovdq.cgs, fmovqd.cgs, fmovls.cgs, fmovs.cgs: Likewise.
+ * fmovsl.cgs: Likewise.
+
+2000-12-11 Ben Elliston <bje@redhat.com>
+
+ * fabss.cgs, fabsd.cgs, fadds.cgs, faddd.cgs: Complete test cases.
+ * getcfg.cgs, getcon.cgs, gettr.cgs, icbi.cgs: Likewise.
+ * prefi.cgs, pta.cgs, ptabs.cgs, ptb.cgs: Likewise.
+ * putcon.cgs, putcfg.cgs, rte.cgs: Likewise.
+
+ * add.cgs, addi.cgs, addl.cgs, addil.cgs: Complete test cases.
+ * addl.cgs, addzl.cgs, alloco.cgs, and.cgs, andc.cgs: Likewise.
+ * andi.cgs, beq.cgs, beqi.cgs, bge.cgs, bgeu.cgs: Likewise.
+ * bgt.cgs, bgtu.cgs, blink.cgs, bne.cgs, bnei.cgs: Likewise.
+ * brk.cgs, byterev.cgs, cmpeq.cgs, cmpgt.cgs: Likewise.
+ * cmpgtu.cgs, cmveq.cgs, cmvne.cgs: Likewise.
+
+2000-12-07 Ben Elliston <bje@redhat.com>
+
+ * mextr1.cgs, mextr2.cgs, mextr3.cgs: Complete test cases.
+ * mextr4.cgs, mextr5.cgs, mextr6.cgs, mextr7.cgs: Likewise.
+
+2000-12-05 Ben Elliston <bje@redhat.com>
+
+ * nop.cgs, ocbi.cgs, ocbp.cgs, ocbwb.cgs: Complete test cases.
+ * or.cgs, ori.cgs, xor.cgs, xori.cgs: Ditto.
+ * sleep.cgs, synci.cgs, synco.cgs: Ditto.
+
+2000-11-22 Ben Elliston <bje@redhat.com>
+
+ * *.cgs: Include "media/testutils.inc", not "testutils.inc" as
+ generated test cases do. Miscellaneous fixes.
+
+ * testutils.inc: New file.
+ * *.cgs: Generate test cases.
diff --git a/sim/testsuite/sim/sh64/media/add.cgs b/sim/testsuite/sim/sh64/media/add.cgs
new file mode 100644
index 00000000000..9778e8fd62c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/add.cgs
@@ -0,0 +1,47 @@
+# sh testcase for add $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global add
+init:
+ pta wrong, tr0
+add:
+ movi 10, r0
+ movi 0, r1
+ add r0, r1, r3
+ movi 10, r4
+ bne r3, r4, tr0
+
+add0:
+ movi 1, r63
+ add r63, r63, r1
+ bnei r1, 0, tr0
+
+add2:
+ movi 0, r0
+ movi 10, r1
+ add r0, r1, r3
+ movi 10, r4
+ bne r3, r4, tr0
+
+add3:
+ movi 10, r1
+ add r63, r1, r3
+ movi 10, r4
+ bne r3, r4, tr0
+
+add4:
+ movi 10, r1
+ add r1, r63, r3
+ movi 10, r4
+ bne r3, r4, tr0
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/addi.cgs b/sim/testsuite/sim/sh64/media/addi.cgs
new file mode 100644
index 00000000000..3d4b49f5995
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/addi.cgs
@@ -0,0 +1,37 @@
+# sh testcase for addi $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+addi1:
+ movi 1, r0
+ addi r0, 10, r0
+ bnei r0, 11, tr0
+
+addi2:
+ movi 10, r0
+ addi r0, 1, r0
+ bnei r0, 11, tr0
+
+addi3:
+ movi 10, r0
+ addi r0, -1, r0
+ bnei r0, 9, tr0
+
+addi4:
+ movi 20, r0
+ addi r0, -2, r0
+ bnei r0, 18, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/addil.cgs b/sim/testsuite/sim/sh64/media/addil.cgs
new file mode 100644
index 00000000000..5c92e2733a6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/addil.cgs
@@ -0,0 +1,49 @@
+# sh testcase for addi.l $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+addil0:
+ movi 1, r63
+ addi.l r63, 0, r1
+ bnei r1, 0, tr0
+
+addil1:
+ movi 10, r0
+ addi.l r0, 0, r3
+ bnei r3, 10, tr0
+
+addil2:
+ movi 0, r0
+ addi.l r0, 10, r2
+ bnei r2, 10, tr0
+
+addil3:
+ addi.l r63, 10, r1
+ bnei r1, 10, tr0
+
+addil4:
+ movi 10, r0
+ addi.l r0, 0, r1
+ bnei r1, 10, tr0
+
+addil5:
+ # Ensure top 32-bits are discarded when adding.
+ movi 10, r0
+ shlli r0, 32, r0
+ addi r0, 10, r0
+ addi.l r0, 10, r2
+ bnei r2, 20, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/addl.cgs b/sim/testsuite/sim/sh64/media/addl.cgs
new file mode 100644
index 00000000000..7f94b616206
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/addl.cgs
@@ -0,0 +1,61 @@
+# sh testcase for add.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global addl
+init:
+ pta wrong, tr0
+
+addl0:
+ movi 1, r63
+ add.l r63, r63, r1
+ bnei r1, 0, tr0
+
+addl1:
+ movi 10, r0
+ movi 0, r1
+ add.l r0, r1, r3
+ movi 10, r4
+ bne r3, r4, tr0
+
+addl2:
+ movi 0, r0
+ movi 10, r1
+ add.l r0, r1, r2
+ movi 10, r3
+ bne r2, r3, tr0
+
+addl3:
+ movi 10, r0
+ add.l r63, r0, r1
+ movi 10, r2
+ bne r1, r2, tr0
+
+addl4:
+ movi 10, r0
+ add.l r0, r63, r1
+ movi 10, r2
+ bne r1, r2, tr0
+
+addl5:
+ # Ensure top 32-bits are discarded when adding.
+ movi 10, r0
+ shlli r0, 32, r0
+ addi r0, 10, r0
+ movi 10, r1
+ shlli r1, 32, r1
+ addi r1, 10, r1
+ add.l r0, r1, r2
+ movi 20, r3
+ bne r2, r3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/addzl.cgs b/sim/testsuite/sim/sh64/media/addzl.cgs
new file mode 100644
index 00000000000..b7917d377a6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/addzl.cgs
@@ -0,0 +1,39 @@
+# sh testcase for addz.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+addzl1:
+ movi 1, r0
+ movi 2, r1
+ addz.l r0, r1, r2
+ bnei r2, 3, tr0
+
+addzl2:
+ movi 1, r0
+ shlli r0, 32, r0
+ addi r0, 2, r0
+ movi 1, r1
+ shlli r1, 32, r1
+ addi r1, 2, r1
+ addz.l r0, r1, r2
+ bnei r2, 4, tr0
+
+addzl3:
+ movi 1, r0
+ shlli r0, 31, r0
+ addi r0, 2, r0
+ movi 2, r1
+ addz.l r0, r1, r2
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/alloco.cgs b/sim/testsuite/sim/sh64/media/alloco.cgs
new file mode 100644
index 00000000000..5f27359c3b6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/alloco.cgs
@@ -0,0 +1,10 @@
+# sh testcase for alloco $rm, $disp6x32 -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ alloco r0, 32
+ pass
diff --git a/sim/testsuite/sim/sh64/media/and.cgs b/sim/testsuite/sim/sh64/media/and.cgs
new file mode 100644
index 00000000000..c2d42339bcf
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/and.cgs
@@ -0,0 +1,68 @@
+# sh testcase for and $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+and0:
+ # 0 and 0 is 0.
+ movi 0, r0
+ movi 0, r1
+ and r0, r1, r2
+ bnei r2, 0, tr0
+
+and1:
+ # 0 and 1 is 0.
+ movi 0, r0
+ movi 1, r1
+ and r0, r1, r2
+ bnei r2, 0, tr0
+
+and2:
+ # 1 and 0 is 0.
+ movi 1, r0
+ movi 0, r1
+ and r0, r1, r2
+ bnei r2, 0, tr0
+
+and3:
+ # 1 and 1 is 1.
+ movi 1, r0
+ movi 1, r1
+ and r0, r1, r2
+ bnei r2, 1, tr0
+
+and4:
+ movi 1, r0
+ shlli r0, 63, r0
+ movi 1, r1
+ shlli r1, 63, r1
+ and r0, r1, r2
+ # Check it.
+ movi 1, r3
+ shlli r3, 63, r3
+ bne r2, r3, tr0
+
+and5:
+ movi 1, r0
+ shlli r0, 63, r0
+ movi 1, r1
+ shlli r1, 63, r1
+ ori r1, 1, r1
+ and r0, r1, r2
+ # Check it.
+ movi 1, r3
+ shlli r1, 63, r1
+ bne r1, r2, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/andc.cgs b/sim/testsuite/sim/sh64/media/andc.cgs
new file mode 100644
index 00000000000..60b50ace465
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/andc.cgs
@@ -0,0 +1,50 @@
+# sh testcase for andc $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+andc1:
+ # X . !X = 0.
+ movi 3, r0
+ movi 3, r1
+ andc r0, r1, r2
+ bnei r2, 0, tr0
+
+andc2:
+ # X . 0 = X.
+ movi 3, r0
+ movi 0, r1
+ andc r0, r1, r2
+ bnei r2, 3, tr0
+
+andc3:
+ # wide X . 0 = wide X.
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+ movi 0, r1
+ andc r0, r1, r2
+ bne r0, r2, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/andi.cgs b/sim/testsuite/sim/sh64/media/andi.cgs
new file mode 100644
index 00000000000..decfc2fc2ec
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/andi.cgs
@@ -0,0 +1,46 @@
+# sh testcase for andi $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+andi0:
+ # 0 and 0 is 0.
+ movi 0, r0
+ andi r0, 0, r2
+ bnei r2, 0, tr0
+
+and1:
+ # 0 and 1 is 0.
+ movi 0, r0
+ andi r0, 1, r2
+ bnei r2, 0, tr0
+
+and2:
+ # 1 and 0 is 0.
+ movi 1, r0
+ andi r0, 0, r2
+ bnei r2, 0, tr0
+
+and3:
+ # 1 and 1 is 1.
+ movi 1, r0
+ andi r0, 1, r2
+ bnei r2, 1, tr0
+
+and4:
+ movi 15, r0
+ andi r0, 3, r2
+ bnei r2, 3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/beq.cgs b/sim/testsuite/sim/sh64/media/beq.cgs
new file mode 100644
index 00000000000..6f96ffdf00f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/beq.cgs
@@ -0,0 +1,52 @@
+# sh testcase for beq$likely $rm, $rn, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global beq
+init:
+ # Load up the branch target registers.
+ pta beq2, tr0
+ pta beq3, tr1
+ pta wrong, tr2
+
+beq1:
+ # Compare r0 with itself.
+ # Always true, so branch likely.
+ movi 1, r0
+ beq/l r0, r0, tr0
+ # We should branch over this.
+ fail
+
+beq2:
+ # Ensure high order bits are compared, too.
+ movi 1, r0
+ shlli r0, 35, r0
+ addi r0, 10, r0
+ movi 1, r1
+ shlli r1, 35, r1
+ addi r1, 10, r1
+ beq r0, r1, tr1
+ # We should branch over this, too.
+ fail
+
+beq3:
+ movi 1, r0
+ shlli r0, 35, r0
+ addi r0, 10, r0
+ movi 2, r1
+ shlli r1, 35, r1
+ addi r1, 9, r1
+ # Unlikely we'll branch!
+ beq/u r0, r1, tr2
+ # We should proceed to pass here.
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/beqi.cgs b/sim/testsuite/sim/sh64/media/beqi.cgs
new file mode 100644
index 00000000000..c2b4ea8acf5
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/beqi.cgs
@@ -0,0 +1,40 @@
+# sh testcase for beqi$likely $rm, $imm6, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global beqi
+init:
+ # Load up the branch target registers.
+ pta beqi2, tr0
+ pta beqi3, tr1
+ pta wrong, tr2
+
+beqi1:
+ # Always true, so branch likely.
+ movi 1, r0
+ beqi/l r0, 1, tr0
+ # We should branch over this.
+ fail
+
+beqi2:
+ movi 22, r3
+ beqi r3, 22, tr1
+ # We should branch over this.
+ fail
+
+beqi3:
+ movi 27, r7
+ # We shouldn't branch here.
+ beqi/u r7, 23, tr2
+ # We should proceed to pass here.
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/bge.cgs b/sim/testsuite/sim/sh64/media/bge.cgs
new file mode 100644
index 00000000000..832ff06ac21
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/bge.cgs
@@ -0,0 +1,40 @@
+# sh testcase for bge$likely $rm, $rn, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global bge
+init:
+ pta bge2, tr0
+ pta bge3, tr1
+ pta wrong, tr2
+ movi 0, r0
+
+bge1:
+ # Compare r0 with itself.
+ bge/l r0, r0, tr0
+ # We should branch here.
+ fail
+
+bge2:
+ movi 1, r1
+ movi 1, r2
+ bge r1, r2, tr1
+ # We should branch here.
+ fail
+
+bge3:
+ movi -1, r1
+ movi 1, r2
+ bge r1, r2, tr2
+ # We should not branch here.
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/bgeu.cgs b/sim/testsuite/sim/sh64/media/bgeu.cgs
new file mode 100644
index 00000000000..da469d0e4ae
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/bgeu.cgs
@@ -0,0 +1,47 @@
+# sh testcase for bgeu$likely $rm, $rn, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global bgeu
+init:
+ movi 0, r0
+
+bgeu1:
+ # Compare r0 with itself.
+ pta bgeu2, tr0
+ bgeu/l r0, r0, tr0
+ # We should branch here.
+ fail
+
+bgeu2:
+ movi 1, r1
+ movi 1, r2
+ pta bge3, tr0
+ bgeu r1, r2, tr0
+ # We should branch here.
+ fail
+
+bge3:
+ movi -1, r1
+ movi 1, r2
+ # We SHOULD branch here.
+ pta bge4, tr0
+ bgeu r1, r2, tr0
+ fail
+
+bge4:
+ movi 1, r1
+ movi -1, r2
+ # We should not branch here.
+ pta wrong, tr0
+ bgeu r1, r2, tr0
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/bgt.cgs b/sim/testsuite/sim/sh64/media/bgt.cgs
new file mode 100644
index 00000000000..8866635b818
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/bgt.cgs
@@ -0,0 +1,32 @@
+# sh testcase for bgt$likely $rm, $rn, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+
+init:
+ pta wrong, tr0
+
+bgt1:
+ movi 1, r0
+ movi -1, r1
+ bgt r1, r0, tr0
+
+bgt2:
+ bgt r0, r0, tr0
+
+bgt3:
+ pta okay, tr1
+ movi -1, r0
+ movi 1, r1
+ bgt r0, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/bgtu.cgs b/sim/testsuite/sim/sh64/media/bgtu.cgs
new file mode 100644
index 00000000000..3cc02696e75
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/bgtu.cgs
@@ -0,0 +1,36 @@
+# sh testcase for bgtu$likely $rm, $rn, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+
+init:
+ pta wrong, tr0
+
+bgtu1:
+ movi 1, r0
+ movi -1, r1
+ pta bgt2, tr1
+ bgtu r1, r0, tr1
+ fail
+
+bgt2:
+ bgtu r0, r0, tr0
+
+bgt3:
+ pta okay, tr1
+ movi -1, r0
+ movi 1, r1
+ pta okay, tr1
+ bgtu r0, r1, tr1
+ fail
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/blink.cgs b/sim/testsuite/sim/sh64/media/blink.cgs
new file mode 100644
index 00000000000..000d1f597f2
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/blink.cgs
@@ -0,0 +1,17 @@
+# sh testcase for blink $trb, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+blink:
+ pta target, tr0
+ gettr tr0, r1
+ ptabs r1, tr0
+ blink tr0, r0
+ fail
+
+target:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/bne.cgs b/sim/testsuite/sim/sh64/media/bne.cgs
new file mode 100644
index 00000000000..f574147e3de
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/bne.cgs
@@ -0,0 +1,23 @@
+# sh testcase for bne$likely $rm, $rn, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ movi 1, r0
+ pta wrong, tr0
+ pta okay, tr1
+
+bne1:
+ bne r63, r63, tr0
+bne2:
+ bne r0, r63, tr1
+bad:
+ fail
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/bnei.cgs b/sim/testsuite/sim/sh64/media/bnei.cgs
new file mode 100644
index 00000000000..5ce33991c0d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/bnei.cgs
@@ -0,0 +1,23 @@
+# sh testcase for bnei$likely $rm, $imm6, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ movi 1, r0
+ pta wrong, tr0
+ pta okay, tr1
+
+bnei1:
+ bnei r63, 0, tr0
+bnei2:
+ bnei r0, 3, tr1
+bad:
+ fail
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/brk.cgs b/sim/testsuite/sim/sh64/media/brk.cgs
new file mode 100644
index 00000000000..073641443ec
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/brk.cgs
@@ -0,0 +1,11 @@
+# sh testcase for brk -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ # brk will cause the sim to trap, so avoid it.
+ pass
+ brk
diff --git a/sim/testsuite/sim/sh64/media/byterev.cgs b/sim/testsuite/sim/sh64/media/byterev.cgs
new file mode 100644
index 00000000000..d97c3adb7b0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/byterev.cgs
@@ -0,0 +1,67 @@
+# sh testcase for byterev $rm, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ pta wrong, tr0
+init:
+ # Put a distinctive pattern in r0.
+ movi 10, r0
+ shlli r0, 8, r0
+ ori r0, 20, r0
+ shlli r0, 8, r0
+ ori r0, 30, r0
+ shlli r0, 8, r0
+ ori r0, 40, r0
+ shlli r0, 8, r0
+ ori r0, 50, r0
+ shlli r0, 8, r0
+ ori r0, 60, r0
+ shlli r0, 8, r0
+ ori r0, 70, r0
+ shlli r0, 8, r0
+ ori r0, 80, r0
+
+byterev:
+ byterev r0, r1
+
+check:
+ andi r1, 255, r2
+ movi 10, r3
+ bne r2, r3, tr0
+ shlri r1, 8, r1
+ andi r1, 255, r2
+ movi 20, r3
+ bne r2, r3, tr0
+ shlri r1, 8, r1
+ andi r1, 255, r2
+ movi 30, r3
+ bne r2, r3, tr0
+ shlri r1, 8, r1
+ andi r1, 255, r2
+ movi 40, r3
+ bne r2, r3, tr0
+ shlri r1, 8, r1
+ andi r1, 255, r2
+ movi 50, r3
+ bne r2, r3, tr0
+ shlri r1, 8, r1
+ andi r1, 255, r2
+ movi 60, r3
+ bne r2, r3, tr0
+ shlri r1, 8, r1
+ andi r1, 255, r2
+ movi 70, r3
+ bne r2, r3, tr0
+ shlri r1, 8, r1
+ andi r1, 255, r2
+ movi 80, r3
+ bne r2, r3, tr0
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/cmpeq.cgs b/sim/testsuite/sim/sh64/media/cmpeq.cgs
new file mode 100644
index 00000000000..78f51f4a65d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/cmpeq.cgs
@@ -0,0 +1,42 @@
+# sh testcase for cmpeq $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+ movi 0, r0
+ movi 1, r1
+ movi 2, r2
+ movi 2, r3
+ movi 3, r4
+
+cmpeq1:
+ cmpeq r2, r2, r7
+ bne r7, r1, tr0
+
+cmpeq2:
+ cmpeq r2, r3, r7
+ bne r7, r1, tr0
+
+cmpeq3:
+ cmpeq r2, r4, r7
+ bne r7, r0, tr0
+
+cmpeq4:
+ movi 1, r2
+ shlli r2, 63, r2
+ movi 1, r3
+ shlli r3, 63, r3
+ cmpeq r2, r3, r7
+ bne r7, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/cmpgt.cgs b/sim/testsuite/sim/sh64/media/cmpgt.cgs
new file mode 100644
index 00000000000..e4a971bd5ee
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/cmpgt.cgs
@@ -0,0 +1,43 @@
+# sh testcase for cmpgt $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+ movi 0, r0
+ movi 1, r1
+ movi 2, r2
+ movi 2, r3
+ movi 3, r4
+
+cmpgt1:
+ cmpgt r2, r2, r7
+ bne r7, r0, tr0
+
+cmpgt2:
+ cmpgt r2, r3, r7
+ bne r7, r0, tr0
+
+cmpgt3:
+ cmpgt r4, r2, r7
+ bne r7, r1, tr0
+
+cmpgt4:
+ movi 1, r2
+ shlli r2, 63, r2
+ movi 1, r3
+ shlli r3, 63, r3
+ addi r3, 1, r3
+ cmpgt r3, r2, r7
+ bne r7, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/cmpgtu.cgs b/sim/testsuite/sim/sh64/media/cmpgtu.cgs
new file mode 100644
index 00000000000..b896dfcb9fd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/cmpgtu.cgs
@@ -0,0 +1,43 @@
+# sh testcase for cmpgtu $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+ movi 0, r0
+ movi 1, r1
+ movi 2, r2
+ movi 2, r3
+ movi 3, r4
+
+cmpgt1:
+ cmpgtu r2, r2, r7
+ bne r7, r0, tr0
+
+cmpgt2:
+ cmpgtu r2, r3, r7
+ bne r7, r0, tr0
+
+cmpgt3:
+ cmpgtu r4, r2, r7
+ bne r7, r1, tr0
+
+cmpgt4:
+ movi 1, r2
+ shlli r2, 63, r2
+ movi 1, r3
+ shlli r3, 63, r3
+ addi r3, 1, r3
+ cmpgtu r3, r2, r7
+ bne r7, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/cmveq.cgs b/sim/testsuite/sim/sh64/media/cmveq.cgs
new file mode 100644
index 00000000000..0f49733de36
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/cmveq.cgs
@@ -0,0 +1,32 @@
+# sh testcase for cmveq $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+ movi 0, r0
+ movi 1, r1
+ movi 2, r2
+ movi 21, r3
+
+cmveq:
+ # Zap r7.
+ movi 0, r7
+
+ cmveq r0, r2, r7
+ bne r2, r7, tr0
+
+ cmveq r1, r3, r7
+ # Make sure r7 is still equal to r2.
+ bne r2, r7, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/cmvne.cgs b/sim/testsuite/sim/sh64/media/cmvne.cgs
new file mode 100644
index 00000000000..909179afc76
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/cmvne.cgs
@@ -0,0 +1,32 @@
+# sh testcase for cmvne $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+ movi 0, r0
+ movi 1, r1
+ movi 2, r2
+ movi 21, r3
+
+cmvne:
+ # Zap r7.
+ movi 0, r7
+
+ cmvne r1, r2, r7
+ bne r2, r7, tr0
+
+ cmvne r0, r3, r7
+ # Make sure r7 is still equal to r2.
+ bne r2, r7, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fabsd.cgs b/sim/testsuite/sim/sh64/media/fabsd.cgs
new file mode 100644
index 00000000000..47060fcc44b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fabsd.cgs
@@ -0,0 +1,39 @@
+# sh testcase for fabs.d $drgh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+ movi 0, r0
+ movi 1, r1
+
+fabs0:
+ # Ensure fabs(-1) = 1.
+ fmov.ls r0, fr7
+ float.ld fr7, dr0
+ fmov.ls r1, fr7
+ float.ld fr7, dr2
+ fsub.d dr0, dr2, dr4
+ fabs.d dr4, dr6
+ fcmpeq.d dr6, dr2, r7
+ bnei r7, 1, tr0
+
+fabs1:
+ # Ensure fabs(1) = 1.
+ fmov.ls r0, fr7
+ float.ld fr7, dr0
+ fmov.ls r1, fr7
+ float.ld fr7, dr2
+ fabs.d dr2, dr4
+ fcmpeq.d dr2, dr4, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fabss.cgs b/sim/testsuite/sim/sh64/media/fabss.cgs
new file mode 100644
index 00000000000..dd9aec7e640
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fabss.cgs
@@ -0,0 +1,39 @@
+# sh testcase for fabs.s $frgh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+ movi 0, r0
+ movi 1, r1
+
+fabs0:
+ # Ensure fabs(-1) = 1.
+ fmov.ls r0, fr7
+ float.ls fr7, fr0
+ fmov.ls r1, fr7
+ float.ls fr7, fr1
+ fsub.s fr0, fr1, fr2
+ fabs.s fr2, fr3
+ fcmpeq.s fr3, fr1, r7
+ bnei r7, 1, tr0
+
+fabs1:
+ # Ensure fabs(1) = 1.
+ fmov.ls r0, fr7
+ float.ls fr7, fr0
+ fmov.ls r1, fr7
+ float.ls fr7, fr1
+ fabs.s fr1, fr2
+ fcmpeq.s fr1, fr2, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/faddd.cgs b/sim/testsuite/sim/sh64/media/faddd.cgs
new file mode 100644
index 00000000000..096f8528946
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/faddd.cgs
@@ -0,0 +1,33 @@
+# sh testcase for fadd.d $drg, $drh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+ movi 2, r0
+ movi 3, r1
+
+fadd0:
+ # Add 2 and 3.
+ fmov.ls r0, fr7
+ float.ld fr7, dr0
+ fmov.ls r1, fr7
+ float.ld fr7, dr2
+ fadd.d dr0, dr2, dr4
+ # Check to make sure we got 5.
+ movi 5, r2
+ fmov.ls r2, fr7
+ float.ld fr7, dr6
+ fcmpeq.d dr4, dr6, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fadds.cgs b/sim/testsuite/sim/sh64/media/fadds.cgs
new file mode 100644
index 00000000000..fb93979c737
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fadds.cgs
@@ -0,0 +1,34 @@
+# sh testcase for fadd.s $frg, $frh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global fadds
+init:
+ pta wrong, tr0
+ movi 2, r0
+ movi 3, r1
+
+fadd0:
+ # Add 2 and 3.
+ fmov.ls r0, fr7
+ float.ls fr7, fr0
+ fmov.ls r1, fr7
+ float.ls fr7, fr1
+ fadd.s fr0, fr1, fr2
+ # Check to make sure we got 5.
+ movi 5, r2
+ fmov.ls r2, fr7
+ float.ls fr7, fr3
+ fcmpeq.s fr2, fr3, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpeqd.cgs b/sim/testsuite/sim/sh64/media/fcmpeqd.cgs
new file mode 100644
index 00000000000..c19356476f9
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fcmpeqd.cgs
@@ -0,0 +1,36 @@
+# sh testcase for fcmpeq.d $drg, $drh, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+fcmpeq1:
+ movi 1, r0
+ fmov.ls r0, fr0
+ fmov.ls r0, fr1
+ float.ld fr0, dr2
+ float.ld fr1, dr4
+ fcmpeq.d dr2, dr2, r7
+ bnei r7, 1, tr0
+
+fcmpeq2:
+ movi 1, r0
+ fmov.ls r0, fr0
+ movi 2, r1
+ fmov.ls r1, fr1
+ float.ld fr0, dr4
+ float.ld fr1, dr6
+ fcmpeq.d dr4, dr6, r7
+ bnei r7, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpeqs.cgs b/sim/testsuite/sim/sh64/media/fcmpeqs.cgs
new file mode 100644
index 00000000000..216894d7d20
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fcmpeqs.cgs
@@ -0,0 +1,36 @@
+# sh testcase for fcmpeq.s $frg, $frh, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+fcmpeq1:
+ movi 1, r0
+ fmov.ls r0, fr0
+ fmov.ls r0, fr1
+ float.ls fr0, fr2
+ float.ls fr1, fr3
+ fcmpeq.s fr2, fr3, r7
+ bnei r7, 1, tr0
+
+fcmpeq2:
+ movi 1, r0
+ fmov.ls r0, fr0
+ movi 2, r1
+ fmov.ls r1, fr1
+ float.ls fr0, fr2
+ float.ls fr1, fr3
+ fcmpeq.s fr2, fr3, r7
+ bnei r7, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpged.cgs b/sim/testsuite/sim/sh64/media/fcmpged.cgs
new file mode 100644
index 00000000000..52496cc6b14
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fcmpged.cgs
@@ -0,0 +1,46 @@
+# sh testcase for fcmpge.d $drg, $drh, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+fcmpge1: # 2 = 2.
+ movi 2, r0
+ fmov.ls r0, fr0
+ fmov.ls r0, fr1
+ float.ld fr0, dr2
+ float.ld fr1, dr4
+ fcmpge.d dr2, dr4, r7
+ bnei r7, 1, tr0
+
+fcmpge2: # 4 > 2.
+ movi 4, r0
+ fmov.ls r0, fr0
+ movi 2, r0
+ fmov.ls r0, fr1
+ float.ld fr0, dr2
+ float.ld fr1, dr4
+ fcmpge.d dr2, dr4, r7
+ bnei r7, 1, tr0
+
+fcmpge3: # 2 < 4.
+ movi 2, r0
+ fmov.ls r0, fr0
+ movi 4, r0
+ fmov.ls r0, fr1
+ float.ld fr0, dr2
+ float.ld fr1, dr4
+ fcmpge.d dr2, dr4, r7
+ bnei r7, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpges.cgs b/sim/testsuite/sim/sh64/media/fcmpges.cgs
new file mode 100644
index 00000000000..2dd0a35fd27
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fcmpges.cgs
@@ -0,0 +1,46 @@
+# sh testcase for fcmpge.s $frg, $frh, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+fcmpge1: # 2 = 2.
+ movi 2, r0
+ fmov.ls r0, fr0
+ fmov.ls r0, fr1
+ float.ls fr0, fr2
+ float.ls fr1, fr3
+ fcmpge.s fr2, fr3, r7
+ bnei r7, 1, tr0
+
+fcmpge2: # 3 > 2.
+ movi 3, r0
+ fmov.ls r0, fr0
+ movi 2, r0
+ fmov.ls r0, fr1
+ float.ls fr0, fr2
+ float.ls fr1, fr3
+ fcmpge.s fr2, fr3, r7
+ bnei r7, 1, tr0
+
+fcmpge3: # 2 < 3.
+ movi 2, r0
+ fmov.ls r0, fr0
+ movi 3, r0
+ fmov.ls r0, fr1
+ float.ls fr0, fr2
+ float.ls fr1, fr3
+ fcmpge.s fr2, fr3, r7
+ bnei r7, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpgtd.cgs b/sim/testsuite/sim/sh64/media/fcmpgtd.cgs
new file mode 100644
index 00000000000..aec952097de
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fcmpgtd.cgs
@@ -0,0 +1,36 @@
+# sh testcase for fcmpgt.d $drg, $drh, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+fcmpgt1:
+ movi 2, r0
+ fmov.qd r0, dr0
+ movi 1, r1
+ fmov.qd r1, dr2
+ float.qd dr0, dr4
+ float.qd dr2, dr6
+ fcmpgt.d dr4, dr6, r7
+ bnei r7, 1, tr0
+
+fcmpgt2:
+ movi 1, r0
+ fmov.qd r0, dr0
+ fmov.qd r0, dr2
+ float.qd dr0, dr4
+ float.qd dr2, dr6
+ fcmpgt.d dr4, dr6, r7
+ bnei r7, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpgts.cgs b/sim/testsuite/sim/sh64/media/fcmpgts.cgs
new file mode 100644
index 00000000000..893bbcbf60b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fcmpgts.cgs
@@ -0,0 +1,36 @@
+# sh testcase for fcmpgt.s $frg, $frh, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+fcmpgt1:
+ movi 2, r0
+ fmov.ls r0, fr0
+ movi 1, r1
+ fmov.ls r1, fr1
+ float.ls fr0, fr2
+ float.ls fr1, fr3
+ fcmpgt.s fr2, fr3, r7
+ bnei r7, 1, tr0
+
+fcmpgt2:
+ movi 1, r0
+ fmov.ls r0, fr0
+ fmov.ls r0, fr1
+ float.ls fr0, fr2
+ float.ls fr1, fr3
+ fcmpgt.s fr2, fr3, r7
+ bnei r7, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpund.cgs b/sim/testsuite/sim/sh64/media/fcmpund.cgs
new file mode 100644
index 00000000000..b87fb8d9fb6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fcmpund.cgs
@@ -0,0 +1,26 @@
+# sh testcase for fcmpun.d $drg, $drh, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+fcmpund:
+ movi 0, r0
+ movi 1, r1
+ fmov.qd r0, dr0
+ float.qd dr0, dr0
+ fmov.qd r1, dr2
+ float.qd dr2, dr2
+ fcmpun.d dr0, dr2, r7
+ bnei r7, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fcmpuns.cgs b/sim/testsuite/sim/sh64/media/fcmpuns.cgs
new file mode 100644
index 00000000000..6c2ed96b4a3
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fcmpuns.cgs
@@ -0,0 +1,26 @@
+# sh testcase for fcmpun.s $frg, $frh, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+fcmpuns:
+ movi 0, r0
+ movi 1, r1
+ fmov.ls r0, fr0
+ float.ls fr0, fr0
+ fmov.ls r1, fr1
+ float.ls fr1, fr1
+ fcmpun.s fr0, fr1, r7
+ bnei r7, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fcnvds.cgs b/sim/testsuite/sim/sh64/media/fcnvds.cgs
new file mode 100644
index 00000000000..aa6c993fb85
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fcnvds.cgs
@@ -0,0 +1,27 @@
+# sh testcase for fcnv.ds $drgh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+fcnvds:
+ movi 9, r0
+ fmov.qd r0, dr0
+ float.qd dr0, dr0
+ fcnv.ds dr0, fr3
+ movi 9, r0
+ fmov.ls r0, fr4
+ float.ls fr4, fr4
+ fcmpeq.s fr3, fr4, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fcnvsd.cgs b/sim/testsuite/sim/sh64/media/fcnvsd.cgs
new file mode 100644
index 00000000000..6c2396fe815
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fcnvsd.cgs
@@ -0,0 +1,27 @@
+# sh testcase for fcnv.sd $frgh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+fcnvsd:
+ movi 9, r0
+ fmov.ls r0, fr0
+ float.ls fr0, fr0
+ fcnv.sd fr0, dr2
+ movi 9, r0
+ fmov.qd r0, dr4
+ float.qd dr4, dr4
+ fcmpeq.d dr2, dr4, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fdivd.cgs b/sim/testsuite/sim/sh64/media/fdivd.cgs
new file mode 100644
index 00000000000..62401c6b47e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fdivd.cgs
@@ -0,0 +1,39 @@
+# sh testcase for fdiv.d $drg, $drh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+fdivd1:
+ movi 1, r0
+ fmov.qd r0, dr0
+ float.qd dr0, dr0
+ movi 2, r1
+ fmov.qd r1, dr2
+ float.qd dr2, dr2
+ fdiv.d dr0, dr2, dr4
+
+fdvid2:
+ movi 6, r0
+ fmov.qd r0, dr0
+ float.qd dr0, dr0
+ movi 2, r1
+ fmov.qd r1, dr2
+ float.qd dr2, dr2
+ fdiv.d dr0, dr2, dr4
+ movi 3, r3
+ fmov.qd r3, dr6
+ float.qd dr6, dr6
+ fcmpeq.d dr4, dr6, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fdivs.cgs b/sim/testsuite/sim/sh64/media/fdivs.cgs
new file mode 100644
index 00000000000..9b20f686b92
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fdivs.cgs
@@ -0,0 +1,39 @@
+# sh testcase for fdiv.s $frg, $frh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+fdivs1:
+ movi 1, r0
+ fmov.ls r0, fr0
+ float.ls fr0, fr0
+ movi 2, r1
+ fmov.ls r1, fr1
+ float.ls fr1, fr1
+ fdiv.s fr0, fr1, fr2
+
+fdvis2:
+ movi 6, r0
+ fmov.ls r0, fr0
+ float.ls fr0, fr0
+ movi 2, r1
+ fmov.ls r1, fr1
+ float.ls fr1, fr1
+ fdiv.s fr0, fr1, fr2
+ movi 3, r3
+ fmov.ls r3, fr3
+ float.ls fr3, fr3
+ fcmpeq.s fr2, fr3, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fgetscr.cgs b/sim/testsuite/sim/sh64/media/fgetscr.cgs
new file mode 100644
index 00000000000..6aa227480ce
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fgetscr.cgs
@@ -0,0 +1,14 @@
+# sh testcase for fgetscr $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global fgetscr
+fgetscr:
+ fgetscr fr0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fiprs.cgs b/sim/testsuite/sim/sh64/media/fiprs.cgs
new file mode 100644
index 00000000000..fef62d11c7c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fiprs.cgs
@@ -0,0 +1,42 @@
+# sh testcase for fipr.s $fvg, $fvh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ .macro _load val, fpreg
+ # This macro clobbers r0.
+ movi \val, r0
+ fmov.ls r0, \fpreg
+ float.ls \fpreg, \fpreg
+ .endm
+
+ start
+
+ .global fiprs
+init:
+ pta wrong, tr0
+
+ _load 1, fr0
+ _load 2, fr1
+ _load 3, fr2
+ _load 4, fr3
+ _load 1, fr4
+ _load 2, fr5
+ _load 3, fr6
+ _load 4, fr7
+
+fiprs:
+ fipr.s fv0, fv4, fr9
+
+check:
+ _load 30, fr10
+ fcmpeq.s fr9, fr10, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fldd.cgs b/sim/testsuite/sim/sh64/media/fldd.cgs
new file mode 100644
index 00000000000..ded2a9fe8f5
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fldd.cgs
@@ -0,0 +1,13 @@
+# sh testcase for fld.d $rm, $disp10x8, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ movi 0x2800, r0
+ fld.d r0, 0, dr0
+ fld.d r0, 8, dr0
+ fld.d r0, -8, dr0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fldp.cgs b/sim/testsuite/sim/sh64/media/fldp.cgs
new file mode 100644
index 00000000000..8727110378c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fldp.cgs
@@ -0,0 +1,16 @@
+# sh testcase for fld.p $rm, $disp10x8, $fpf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ movi 0x2800, r0
+
+fldp:
+ fld.p r0, 0, fp0
+ fld.p r0, 8, fp2
+ fld.p r0, -8, fp4
+ pass
diff --git a/sim/testsuite/sim/sh64/media/flds.cgs b/sim/testsuite/sim/sh64/media/flds.cgs
new file mode 100644
index 00000000000..75d5e961e26
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/flds.cgs
@@ -0,0 +1,13 @@
+# sh testcase for fld.s $rm, $disp10x4, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ movi 0x2800, r0
+ fld.s r0, 0, fr0
+ fld.s r0, 4, fr0
+ fld.s r0, -4, fr0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fldxd.cgs b/sim/testsuite/sim/sh64/media/fldxd.cgs
new file mode 100644
index 00000000000..63cb56bb06f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fldxd.cgs
@@ -0,0 +1,16 @@
+# sh testcase for fldx.d $rm, $rn, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ movi 0x2800, r0
+ movi 0, r1
+ fldx.d r0, r1, dr0
+ movi 8, r1
+ fldx.d r0, r1, dr0
+ movi -8, r1
+ fldx.d r0, r1, dr0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fldxp.cgs b/sim/testsuite/sim/sh64/media/fldxp.cgs
new file mode 100644
index 00000000000..3d929c6fef8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fldxp.cgs
@@ -0,0 +1,22 @@
+# sh testcase for fldx.p $rm, $rn, $fpf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ movi 0x2800, r0
+
+fldxp:
+ movi 0, r1
+ fldx.p r0, r1, fp0
+
+ movi 8, r1
+ fldx.p r0, r1, fp2
+
+ movi -8, r1
+ fldx.p r0, r1, fp4
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fldxs.cgs b/sim/testsuite/sim/sh64/media/fldxs.cgs
new file mode 100644
index 00000000000..10feb3e54a9
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fldxs.cgs
@@ -0,0 +1,16 @@
+# sh testcase for fldx.s $rm, $rn, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ movi 0x2800, r0
+ movi 0, r1
+ fldx.s r0, r1, fr0
+ movi 4, r1
+ fldx.s r0, r1, fr0
+ movi -4, r1
+ fldx.s r0, r1, fr0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/floatld.cgs b/sim/testsuite/sim/sh64/media/floatld.cgs
new file mode 100644
index 00000000000..31f6111061b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/floatld.cgs
@@ -0,0 +1,12 @@
+# sh testcase for float.ld $frgh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ movi 1, r0
+ fmov.ls r0, fr0
+ float.ld fr0, dr0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/floatls.cgs b/sim/testsuite/sim/sh64/media/floatls.cgs
new file mode 100644
index 00000000000..4c8fb992798
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/floatls.cgs
@@ -0,0 +1,12 @@
+# sh testcase for float.ls $frgh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ movi 1, r0
+ fmov.ls r0, fr0
+ float.ls fr0, fr0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/floatqd.cgs b/sim/testsuite/sim/sh64/media/floatqd.cgs
new file mode 100644
index 00000000000..ea5ddd9e49a
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/floatqd.cgs
@@ -0,0 +1,12 @@
+# sh testcase for float.qd $drgh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ movi 1, r0
+ fmov.qd r0, dr0
+ float.qd dr0, dr2
+ pass
diff --git a/sim/testsuite/sim/sh64/media/floatqs.cgs b/sim/testsuite/sim/sh64/media/floatqs.cgs
new file mode 100644
index 00000000000..fcf35e29548
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/floatqs.cgs
@@ -0,0 +1,12 @@
+# sh testcase for float.qs $drgh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ movi 1, r0
+ fmov.qd r0, dr0
+ float.qs dr0, fr1
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fmacs.cgs b/sim/testsuite/sim/sh64/media/fmacs.cgs
new file mode 100644
index 00000000000..62219c5fafd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fmacs.cgs
@@ -0,0 +1,39 @@
+# sh testcase for fmac.s $frg, $frh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+fmacs:
+ movi 2, r0
+ fmov.ls r0, fr0
+ float.ls fr0, fr0
+
+ movi 3, r1
+ fmov.ls r1, fr1
+ float.ls fr1, fr1
+
+ movi 4, r2
+ fmov.ls r2, fr2
+ float.ls fr2, fr2
+
+ fmac.s fr0, fr1, fr2
+
+ movi 10, r3
+ fmov.ls r3, fr3
+ float.ls fr3, fr3
+
+ fcmpeq.s fr2, fr3, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fmovd.cgs b/sim/testsuite/sim/sh64/media/fmovd.cgs
new file mode 100644
index 00000000000..03c05ad1776
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fmovd.cgs
@@ -0,0 +1,24 @@
+# sh testcase for fmov.d $drgh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+fmovd:
+ movi 4, r0
+ fmov.qd r0, dr0
+ float.qd dr0, dr2
+ fmov.d dr2, dr4
+ fcmpeq.d dr2, dr4, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fmovdq.cgs b/sim/testsuite/sim/sh64/media/fmovdq.cgs
new file mode 100644
index 00000000000..ff5c3fe9302
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fmovdq.cgs
@@ -0,0 +1,23 @@
+# sh testcase for fmov.dq $drgh, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+fmovdq:
+ movi 4, r0
+ fmov.qd r0, dr0
+ fmov.dq dr0, r1
+ bne r0, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fmovls.cgs b/sim/testsuite/sim/sh64/media/fmovls.cgs
new file mode 100644
index 00000000000..850ec33d160
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fmovls.cgs
@@ -0,0 +1,26 @@
+# sh testcase for fmov.ls $rm, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+fmovls0:
+ movi 0, r0
+ fmov.ls r0, fr0
+
+fmovls1:
+ movi 1, r1
+ fmov.ls r1, fr1
+
+upper:
+ movi 1, r2
+ shlli r2, 63, r2
+ ori r2, 3, r2
+ # Bit 63 should be ignored.
+ fmov.ls r2, fr2
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fmovqd.cgs b/sim/testsuite/sim/sh64/media/fmovqd.cgs
new file mode 100644
index 00000000000..64eac72b3df
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fmovqd.cgs
@@ -0,0 +1,22 @@
+# sh testcase for fmov.qd $rm, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+fmovdq:
+ movi 4, r0
+ fmov.qd r0, dr0
+ fmov.dq dr0, r1
+ bne r0, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fmovs.cgs b/sim/testsuite/sim/sh64/media/fmovs.cgs
new file mode 100644
index 00000000000..f126aa5a41c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fmovs.cgs
@@ -0,0 +1,24 @@
+# sh testcase for fmov.s $frgh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+fmovs:
+ movi 8, r0
+ fmov.ls r0, fr7
+ float.ls fr7, fr0
+ fmov.s fr0, fr1
+ fcmpeq.s fr0, fr1, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fmovsl.cgs b/sim/testsuite/sim/sh64/media/fmovsl.cgs
new file mode 100644
index 00000000000..7dfdab1d145
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fmovsl.cgs
@@ -0,0 +1,21 @@
+# sh testcase for fmov.sl $frgh, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+fmovsl:
+ pta wrong, tr0
+ movi 9, r0
+ fmov.ls r0, fr0
+ fmov.sl fr0, r1
+ bne r0, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fmuld.cgs b/sim/testsuite/sim/sh64/media/fmuld.cgs
new file mode 100644
index 00000000000..2ad67cdc532
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fmuld.cgs
@@ -0,0 +1,30 @@
+# sh testcase for fmul.d $drg, $drh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+fmuld1:
+ movi 2, r0
+ fmov.qd r0, dr0
+ float.qd dr0, dr0
+ movi 3, r1
+ fmov.qd r1, dr2
+ float.qd dr2, dr2
+ fmul.d dr0, dr2, dr4
+ movi 6, r2
+ fmov.qd r2, dr6
+ float.qd dr6, dr6
+ fcmpeq.d dr4, dr6, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fmuls.cgs b/sim/testsuite/sim/sh64/media/fmuls.cgs
new file mode 100644
index 00000000000..4b8875f0c59
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fmuls.cgs
@@ -0,0 +1,31 @@
+# sh testcase for fmul.s $frg, $frh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+fmuls1:
+ movi 2, r0
+ fmov.ls r0, fr0
+ float.ls fr0, fr0
+ movi 3, r1
+ fmov.ls r1, fr1
+ float.ls fr1, fr1
+ fmul.s fr0, fr1, fr2
+ movi 6, r2
+ fmov.ls r2, fr3
+ float.ls fr3, fr3
+ fcmpeq.s fr2, fr3, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fnegd.cgs b/sim/testsuite/sim/sh64/media/fnegd.cgs
new file mode 100644
index 00000000000..67b381345b6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fnegd.cgs
@@ -0,0 +1,35 @@
+# sh testcase for fneg.d $drgh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+ movi 0, r0
+ movi 1, r1
+
+fnegd0:
+ # Ensure fnegd(0) = 0.
+ fmov.ls r0, fr7
+ float.ld fr7, dr0
+ fneg.d dr0, dr2
+ fcmpeq.d dr0, dr2, r7
+ bnei r7, 1, tr0
+
+fnegd1:
+ # Ensure fnegd(fnegd(1)) = 1.
+ fmov.ls r1, fr7
+ float.ld fr7, dr0
+ fneg.d dr0, dr2
+ fneg.d dr2, dr4
+ fcmpeq.d dr0, dr4, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fnegs.cgs b/sim/testsuite/sim/sh64/media/fnegs.cgs
new file mode 100644
index 00000000000..9ad625a1f1f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fnegs.cgs
@@ -0,0 +1,35 @@
+# sh testcase for fneg.s $frgh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+ movi 0, r0
+ movi 1, r1
+
+fnegs0:
+ # Ensure fnegs(0) = 0.
+ fmov.ls r0, fr7
+ float.ls fr7, fr0
+ fneg.s fr0, fr1
+ fcmpeq.s fr0, fr1, r7
+ bnei r7, 1, tr0
+
+fnegs1:
+ # Ensure fnegs(fnegs(1)) = 1.
+ fmov.ls r1, fr7
+ float.ls fr7, fr0
+ fneg.s fr0, fr1
+ fneg.s fr1, fr2
+ fcmpeq.s fr0, fr2, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fputscr.cgs b/sim/testsuite/sim/sh64/media/fputscr.cgs
new file mode 100644
index 00000000000..28d2e7230ee
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fputscr.cgs
@@ -0,0 +1,14 @@
+# sh testcase for fputscr $frgh -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global fputscr
+fputscr:
+ fputscr fr0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fsqrtd.cgs b/sim/testsuite/sim/sh64/media/fsqrtd.cgs
new file mode 100644
index 00000000000..ae6120002e0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fsqrtd.cgs
@@ -0,0 +1,27 @@
+# sh testcase for fsqrt.d $frgh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+ movi 9, r0
+ fmov.ls r0, fr7
+ float.ld fr7, dr0
+ movi 3, r1
+ fmov.ls r1, fr7
+ float.ld fr7, dr2
+
+fsqrtd:
+ fsqrt.d dr0, dr4
+ fcmpeq.d dr2, dr4, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fsqrts.cgs b/sim/testsuite/sim/sh64/media/fsqrts.cgs
new file mode 100644
index 00000000000..f1183933159
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fsqrts.cgs
@@ -0,0 +1,27 @@
+# sh testcase for fsqrt.s $frgh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+ movi 9, r0
+ fmov.ls r0, fr7
+ float.ls fr7, fr0
+ movi 3, r1
+ fmov.ls r1, fr7
+ float.ls fr7, fr2
+
+fsqrts:
+ fsqrt.s fr0, fr1
+ fcmpeq.s fr1, fr2, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fstd.cgs b/sim/testsuite/sim/sh64/media/fstd.cgs
new file mode 100644
index 00000000000..16ab5b6672c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fstd.cgs
@@ -0,0 +1,34 @@
+# sh testcase for fst.d $rm, $disp10x8, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global fstd
+fstd:
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+ # Set target address.
+ movi 0x2800, r1
+ fmov.qd r0, dr0
+
+ fst.d r1, 0, dr0
+ fst.d r1, 8, dr0
+ fst.d r1, -8, dr0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fstp.cgs b/sim/testsuite/sim/sh64/media/fstp.cgs
new file mode 100644
index 00000000000..e0c396ac59a
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fstp.cgs
@@ -0,0 +1,14 @@
+# sh testcase for fst.p $rm, $disp10x8, $fpf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global fstp
+fstp:
+ fst.p r0, 0, fp0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fsts.cgs b/sim/testsuite/sim/sh64/media/fsts.cgs
new file mode 100644
index 00000000000..fb692cf274c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fsts.cgs
@@ -0,0 +1,34 @@
+# sh testcase for fst.s $rm, $disp10x4, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global fsts
+fsts:
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+ # Set target address.
+ movi 0x2800, r1
+ fmov.ls r0, fr0
+
+ fst.s r1, 0, fr0
+ fst.s r1, 4, fr0
+ fst.s r1, -4, fr0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fstxd.cgs b/sim/testsuite/sim/sh64/media/fstxd.cgs
new file mode 100644
index 00000000000..10f6c1436b5
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fstxd.cgs
@@ -0,0 +1,31 @@
+# sh testcase for fstx.d $rm, $rn, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global fstxd
+fstxd:
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+ fmov.qd r0, dr0
+ movi 0x2800, r1
+ movi -8, r2
+ fstx.d r1, r2, dr0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fstxp.cgs b/sim/testsuite/sim/sh64/media/fstxp.cgs
new file mode 100644
index 00000000000..1829f58eb25
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fstxp.cgs
@@ -0,0 +1,14 @@
+# sh testcase for fstx.p $rm, $rn, $fpf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global fstxp
+fstxp:
+ fstx.p r0, r0, fp0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fstxs.cgs b/sim/testsuite/sim/sh64/media/fstxs.cgs
new file mode 100644
index 00000000000..0b4ff96dba9
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fstxs.cgs
@@ -0,0 +1,30 @@
+# sh testcase for fstx.s $rm, $rn, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ .global fstxs
+fstxs:
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+ fmov.ls r0, fr0
+ movi 0x2800, r1
+ movi -8, r2
+ fstx.s r1, r2, fr0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/fsubd.cgs b/sim/testsuite/sim/sh64/media/fsubd.cgs
new file mode 100644
index 00000000000..93dc421b01f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fsubd.cgs
@@ -0,0 +1,36 @@
+# sh testcase for fsub.d $drg, $drh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global fsubd
+init:
+ pta wrong, tr0
+
+fsubd:
+ movi 9, r0
+ fmov.qd r0, dr0
+ float.qd dr0, dr0
+
+ movi 3, r0
+ fmov.qd r0, dr2
+ float.qd dr2, dr2
+
+ fsub.d dr0, dr2, dr4
+
+ movi 6, r0
+ fmov.qd r0, dr6
+ float.qd dr6, dr6
+
+ fcmpeq.d dr4, dr6, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/fsubs.cgs b/sim/testsuite/sim/sh64/media/fsubs.cgs
new file mode 100644
index 00000000000..b009f094054
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/fsubs.cgs
@@ -0,0 +1,36 @@
+# sh testcase for fsub.s $frg, $frh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global fsubs
+init:
+ pta wrong, tr0
+
+fsubs:
+ movi 9, r0
+ fmov.ls r0, fr0
+ float.ls fr0, fr0
+
+ movi 3, r0
+ fmov.ls r0, fr1
+ float.ls fr1, fr1
+
+ fsub.s fr0, fr1, fr2
+
+ movi 6, r0
+ fmov.ls r0, fr3
+ float.ls fr3, fr3
+
+ fcmpeq.s fr2, fr3, r7
+ bnei r7, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/ftrcdl.cgs b/sim/testsuite/sim/sh64/media/ftrcdl.cgs
new file mode 100644
index 00000000000..3aafb83dca3
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ftrcdl.cgs
@@ -0,0 +1,26 @@
+# sh testcase for ftrc.dl $drgh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global ftrcdl
+init:
+ pta wrong, tr0
+
+ftrcdl:
+ movi -9, r0
+ fmov.qd r0, dr0
+ float.qd dr0, dr0
+ ftrc.dl dr0, fr0
+ fmov.sl fr0, r1
+ bne r0, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/ftrcdq.cgs b/sim/testsuite/sim/sh64/media/ftrcdq.cgs
new file mode 100644
index 00000000000..6cd63fb029e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ftrcdq.cgs
@@ -0,0 +1,24 @@
+# sh testcase for ftrc.dq $drgh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+ftrcdq:
+ movi -9, r0
+ fmov.qd r0, dr0
+ float.qd dr0, dr0
+ ftrc.dq dr0, dr2
+ fmov.dq dr2, r1
+ bne r0, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/ftrcsl.cgs b/sim/testsuite/sim/sh64/media/ftrcsl.cgs
new file mode 100644
index 00000000000..9fd7faebd1a
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ftrcsl.cgs
@@ -0,0 +1,26 @@
+# sh testcase for ftrc.sl $frgh, $frf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global ftrcsl
+init:
+ pta wrong, tr0
+
+ftrcsl:
+ movi -9, r0
+ fmov.ls r0, fr0
+ float.ls fr0, fr0
+ ftrc.sl fr0, fr1
+ fmov.sl fr1, r1
+ bne r0, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/ftrcsq.cgs b/sim/testsuite/sim/sh64/media/ftrcsq.cgs
new file mode 100644
index 00000000000..8f19d595e10
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ftrcsq.cgs
@@ -0,0 +1,25 @@
+# sh testcase for ftrc.sq $frgh, $drf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+ftrcsq:
+ movi -9, r0
+ fmov.ls r0, fr0
+ float.ls fr0, fr0
+ ftrc.sq fr0, dr2
+ fmov.dq dr2, r1
+ bne r0, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/ftrvs.cgs b/sim/testsuite/sim/sh64/media/ftrvs.cgs
new file mode 100644
index 00000000000..be7a75ad885
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ftrvs.cgs
@@ -0,0 +1,67 @@
+# sh testcase for ftrv.s $mtrxg, $fvh, $fvf -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ .macro _load val, fpreg
+ # This macro clobbers r0.
+ movi \val, r0
+ fmov.ls r0, \fpreg
+ float.ls \fpreg, \fpreg
+ .endm
+
+ start
+
+init:
+ pta wrong, tr0
+
+ _load 1, fr0
+ _load 2, fr4
+ _load 3, fr8
+ _load 4, fr12
+ _load 5, fr1
+ _load 6, fr5
+ _load 7, fr9
+ _load 8, fr13
+ _load 9, fr2
+ _load 10, fr6
+ _load 11, fr10
+ _load 12, fr14
+ _load 13, fr3
+ _load 14, fr7
+ _load 15, fr11
+ _load 16, fr15
+
+ _load 1, fr16
+ _load 2, fr17
+ _load 3, fr18
+ _load 4, fr19
+
+ftrvs:
+ ftrv.s mtrx0, fv16, fv20
+
+check:
+ _load 30, fr0
+ _load 70, fr1
+ _load 110, fr2
+ _load 150, fr3
+
+ fcmpeq.s fr0, fr20, r0
+ bnei r0, 1, tr0
+
+ fcmpeq.s fr1, fr21, r0
+ bnei r0, 1, tr0
+
+ fcmpeq.s fr2, fr22, r0
+ bnei r0, 1, tr0
+
+ fcmpeq.s fr3, fr23, r0
+ bnei r0, 1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/getcfg.cgs b/sim/testsuite/sim/sh64/media/getcfg.cgs
new file mode 100644
index 00000000000..d151739846e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/getcfg.cgs
@@ -0,0 +1,10 @@
+# sh testcase for getcfg $rm, $disp6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ getcfg r0, 0, r0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/getcon.cgs b/sim/testsuite/sim/sh64/media/getcon.cgs
new file mode 100644
index 00000000000..8eeb43cd5b0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/getcon.cgs
@@ -0,0 +1,29 @@
+# sh testcase for getcon $crk, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+getcon1:
+ movi 22, r0
+ putcon r0, cr0
+ getcon cr0, r1
+ bne r0, r1, tr0
+
+getcon2:
+ movi 12, r0
+ shlli r0, 35, r0
+ putcon r0, cr20
+ getcon cr20, r20
+ bne r0, r20, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/gettr.cgs b/sim/testsuite/sim/sh64/media/gettr.cgs
new file mode 100644
index 00000000000..8840a361bb0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/gettr.cgs
@@ -0,0 +1,48 @@
+# sh testcase for gettr $trb, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ # tr0 is reserved.
+ # don't use it anywhere else in this test.
+ pta wrong, tr0
+
+gettr1:
+ # Put garbage in r1, r2.
+ movi 20, r1
+ movi 30, r2
+
+ pta foo, tr1
+ pta foo, tr2
+
+check1:
+ gettr tr1, r1
+ gettr tr2, r2
+ bne r1, r2, tr0
+
+gettr2:
+ # Put garbage in r3, r4.
+ movi 21, r3
+ movi 42, r4
+
+check2:
+ pta foo, tr1
+ gettr tr1, r2
+ ptabs r2, tr2
+ gettr tr2, r3
+ ptabs r3, tr3
+ gettr tr3, r4
+ bne r2, r4, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
+
+foo:
+ nop
diff --git a/sim/testsuite/sim/sh64/media/icbi.cgs b/sim/testsuite/sim/sh64/media/icbi.cgs
new file mode 100644
index 00000000000..9ba18452ef6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/icbi.cgs
@@ -0,0 +1,10 @@
+# sh testcase for icbi $rm, $disp6x32 -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ icbi r0, 0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldb.cgs b/sim/testsuite/sim/sh64/media/ldb.cgs
new file mode 100644
index 00000000000..fad1e6e15ee
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldb.cgs
@@ -0,0 +1,21 @@
+# sh testcase for ld.b $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ movi 20, r3
+ shlli r3, 8, r3
+
+ldb1:
+ ld.b r3, 0, r0
+ldb2:
+ ld.b r3, -1, r0
+ldb3:
+ ld.b r3, 1, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldhil.cgs b/sim/testsuite/sim/sh64/media/ldhil.cgs
new file mode 100644
index 00000000000..4323985ea49
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldhil.cgs
@@ -0,0 +1,14 @@
+# sh testcase for ldhi.l $rm, $disp6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global ldhil
+ldhil:
+ ldhi.l r0, 0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldhiq.cgs b/sim/testsuite/sim/sh64/media/ldhiq.cgs
new file mode 100644
index 00000000000..c34a952bba7
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldhiq.cgs
@@ -0,0 +1,14 @@
+# sh testcase for ldhi.q $rm, $disp6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global ldhiq
+ldhiq:
+ ldhi.q r0, 0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldl.cgs b/sim/testsuite/sim/sh64/media/ldl.cgs
new file mode 100644
index 00000000000..b8b8725dee1
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldl.cgs
@@ -0,0 +1,21 @@
+# sh testcase for ld.l $rm, $disp10x4, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ movi 20, r3
+ shlli r3, 8, r3
+
+ldl1:
+ ld.l r3, 0, r0
+ldl2:
+ ld.l r3, -4, r0
+ldl3:
+ ld.l r3, 4, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldlol.cgs b/sim/testsuite/sim/sh64/media/ldlol.cgs
new file mode 100644
index 00000000000..8204f40ebf4
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldlol.cgs
@@ -0,0 +1,14 @@
+# sh testcase for ldlo.l $rm, $disp6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global ldlol
+ldlol:
+ ldlo.l r0, 0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldloq.cgs b/sim/testsuite/sim/sh64/media/ldloq.cgs
new file mode 100644
index 00000000000..0cf128e2013
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldloq.cgs
@@ -0,0 +1,14 @@
+# sh testcase for ldlo.q $rm, $disp6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global ldloq
+ldloq:
+ ldlo.q r0, 0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldq.cgs b/sim/testsuite/sim/sh64/media/ldq.cgs
new file mode 100644
index 00000000000..cacc076bb90
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldq.cgs
@@ -0,0 +1,21 @@
+# sh testcase for ld.q $rm, $disp10x8, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ movi 20, r3
+ shlli r3, 8, r3
+
+ldl1:
+ ld.q r3, 0, r0
+ldl2:
+ ld.q r3, -8, r0
+ldl3:
+ ld.q r3, 8, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldub.cgs b/sim/testsuite/sim/sh64/media/ldub.cgs
new file mode 100644
index 00000000000..825ce642e31
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldub.cgs
@@ -0,0 +1,22 @@
+# sh testcase for ld.ub $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ movi 20, r3
+ shlli r3, 8, r3
+
+ldub1:
+ ld.ub r3, 0, r0
+ldub2:
+ ld.ub r3, -1, r0
+ldub3:
+ ld.ub r3, 1, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/lduw.cgs b/sim/testsuite/sim/sh64/media/lduw.cgs
new file mode 100644
index 00000000000..a329802e22b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/lduw.cgs
@@ -0,0 +1,22 @@
+# sh testcase for ld.uw $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ movi 20, r3
+ shlli r3, 8, r3
+
+lduw1:
+ ld.uw r3, 0, r0
+lduw2:
+ ld.uw r3, -2, r0
+lduw3:
+ ld.uw r3, 2, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldw.cgs b/sim/testsuite/sim/sh64/media/ldw.cgs
new file mode 100644
index 00000000000..d39405515a9
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldw.cgs
@@ -0,0 +1,21 @@
+# sh testcase for ld.w $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ movi 20, r3
+ shlli r3, 8, r3
+
+ldw1:
+ ld.w r3, 0, r0
+ldw2:
+ ld.w r3, -2, r0
+ldw3:
+ ld.w r3, 2, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldxb.cgs b/sim/testsuite/sim/sh64/media/ldxb.cgs
new file mode 100644
index 00000000000..36038df8da4
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldxb.cgs
@@ -0,0 +1,28 @@
+# sh testcase for ldx.b $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ldxb1:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 0, r4
+ ldx.b r3, r4, r0
+
+ldxb2:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 1, r4
+ ldx.b r3, r4, r0
+
+ldxb3:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi -1, r4
+ ldx.b r3, r4, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldxl.cgs b/sim/testsuite/sim/sh64/media/ldxl.cgs
new file mode 100644
index 00000000000..0596e9f325b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldxl.cgs
@@ -0,0 +1,28 @@
+# sh testcase for ldx.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ldxl1:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 0, r4
+ ldx.l r3, r4, r0
+
+ldxl2:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 4, r4
+ ldx.l r3, r4, r0
+
+ldxl3:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi -4, r4
+ ldx.l r3, r4, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldxq.cgs b/sim/testsuite/sim/sh64/media/ldxq.cgs
new file mode 100644
index 00000000000..1247f220562
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldxq.cgs
@@ -0,0 +1,28 @@
+# sh testcase for ldx.q $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ldxq1:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 0, r4
+ ldx.q r3, r4, r0
+
+ldxq2:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 8, r4
+ ldx.q r3, r4, r0
+
+ldxq3:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi -8, r4
+ ldx.q r3, r4, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldxub.cgs b/sim/testsuite/sim/sh64/media/ldxub.cgs
new file mode 100644
index 00000000000..e863a3bfccf
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldxub.cgs
@@ -0,0 +1,28 @@
+# sh testcase for ldx.ub $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ldxub1:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 0, r4
+ ldx.ub r3, r4, r0
+
+ldxub2:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 1, r4
+ ldx.ub r3, r4, r0
+
+ldxub3:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi -1, r4
+ ldx.ub r3, r4, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldxuw.cgs b/sim/testsuite/sim/sh64/media/ldxuw.cgs
new file mode 100644
index 00000000000..282812db895
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldxuw.cgs
@@ -0,0 +1,29 @@
+# sh testcase for ldx.uw $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ldxuw1:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 0, r4
+ ldx.uw r3, r4, r0
+
+ldxuw2:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 2, r4
+ ldx.uw r3, r4, r0
+
+ldxuw3:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi -2, r4
+ ldx.uw r3, r4, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ldxw.cgs b/sim/testsuite/sim/sh64/media/ldxw.cgs
new file mode 100644
index 00000000000..d377fef6177
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ldxw.cgs
@@ -0,0 +1,29 @@
+# sh testcase for ldx.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ldxw1:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 0, r4
+ ldx.w r3, r4, r0
+
+ldxw2:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi 2, r4
+ ldx.w r3, r4, r0
+
+ldxw3:
+ movi 20, r3
+ shlli r3, 8, r3
+ movi -2, r4
+ ldx.w r3, r4, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mabsl.cgs b/sim/testsuite/sim/sh64/media/mabsl.cgs
new file mode 100644
index 00000000000..a8af663ea12
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mabsl.cgs
@@ -0,0 +1,39 @@
+# sh testcase for mabs.l $rm, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mabsl
+init:
+ pta wrong, tr0
+
+mabsl1:
+ # Pack { 1 3 } into R0.
+ _packl 1, 3, r0
+
+ mabs.l r0, r1
+
+ # Test for { 1 3 } in R0.
+ _packl 1, 3, r2
+ bne r0, r2, tr0
+
+mabsl2:
+ # Pack { -1, -1 } into R0.
+ _packl 1, 1, r0
+
+ # Set the left sign bit.
+ movi 1, r1
+ shlli r1, 63, r1
+ or r0, r1, r0
+
+ mabs.l r0, r2
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/mabsw.cgs b/sim/testsuite/sim/sh64/media/mabsw.cgs
new file mode 100644
index 00000000000..f4e980a19c6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mabsw.cgs
@@ -0,0 +1,38 @@
+# sh testcase for mabs.w $rm, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+mabsw1:
+ # Pack { 1 3 5 7 } into R0.
+ _packw 1, 3, 5, 7, r0
+
+ mabs.l r0, r1
+
+ # Test for { 1 3 5 7 } in R0.
+ _packw 1, 3, 5, 7, r2
+ bne r0, r2, tr0
+
+mabsw2:
+ # Pack { -1, -1, -1, -1 } into R0.
+ _packw 1, 1, 1, 1, r0
+
+ # Set the left sign bit
+ movi 1, r1
+ shlli r1, 63, r1
+ or r0, r1, r0
+
+ mabs.w r0, r2
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/maddl.cgs b/sim/testsuite/sim/sh64/media/maddl.cgs
new file mode 100644
index 00000000000..4bdf5463866
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/maddl.cgs
@@ -0,0 +1,29 @@
+# sh testcase for madd.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+maddl:
+ # Load { 1 2 } into r0.
+ _packl 1, 2, r0
+ # Load { 3 4 } into r1.
+ _packl 3, 4, r1
+
+ # Add slices to produce { 4 6 }.
+ madd.l r0, r1, r2
+
+ _packl 4, 6, r3
+ bne r2, r3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/maddsl.cgs b/sim/testsuite/sim/sh64/media/maddsl.cgs
new file mode 100644
index 00000000000..3977275dc89
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/maddsl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for madds.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global maddsl
+maddsl:
+ madds.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/maddsub.cgs b/sim/testsuite/sim/sh64/media/maddsub.cgs
new file mode 100644
index 00000000000..a55f927a3e1
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/maddsub.cgs
@@ -0,0 +1,14 @@
+# sh testcase for madds.ub $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global maddsub
+maddsub:
+ madds.ub r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/maddsw.cgs b/sim/testsuite/sim/sh64/media/maddsw.cgs
new file mode 100644
index 00000000000..45a774ed2fc
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/maddsw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for madds.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global maddsw
+maddsw:
+ madds.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/maddw.cgs b/sim/testsuite/sim/sh64/media/maddw.cgs
new file mode 100644
index 00000000000..b220ef4aee6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/maddw.cgs
@@ -0,0 +1,29 @@
+# sh testcase for madd.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+maddw:
+ # Load { 1 2 3 4 } into R0.
+ _packw 1, 2, 3, 4, r0
+
+ # Load { 3 4 5 6 } into R1.
+ _packw 3, 4, 5, 6, r1
+
+ # Add slices to produce { 4 6 8 10 }.
+ madd.w r0, r1, r2
+
+ _packw 4, 6, 8, 10, r3
+ bne r2, r3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/mcmpeqb.cgs b/sim/testsuite/sim/sh64/media/mcmpeqb.cgs
new file mode 100644
index 00000000000..d7af6fa5f58
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mcmpeqb.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mcmpeq.b $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mcmpeqb
+mcmpeqb:
+ mcmpeq.b r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mcmpeql.cgs b/sim/testsuite/sim/sh64/media/mcmpeql.cgs
new file mode 100644
index 00000000000..2851e80fc5e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mcmpeql.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mcmpeq.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mcmpeql
+mcmpeql:
+ mcmpeq.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mcmpeqw.cgs b/sim/testsuite/sim/sh64/media/mcmpeqw.cgs
new file mode 100644
index 00000000000..085df84eeb9
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mcmpeqw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mcmpeq.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mcmpeqw
+mcmpeqw:
+ mcmpeq.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mcmpgtl.cgs b/sim/testsuite/sim/sh64/media/mcmpgtl.cgs
new file mode 100644
index 00000000000..2ace0480506
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mcmpgtl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mcmpgt.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mcmpgtl
+mcmpgtl:
+ mcmpgt.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mcmpgtub.cgs b/sim/testsuite/sim/sh64/media/mcmpgtub.cgs
new file mode 100644
index 00000000000..540ce966092
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mcmpgtub.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mcmpgt.ub $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mcmpgtub
+mcmpgtub:
+ mcmpgt.ub r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mcmpgtw.cgs b/sim/testsuite/sim/sh64/media/mcmpgtw.cgs
new file mode 100644
index 00000000000..83274512d5e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mcmpgtw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mcmpgt.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mcmpgtw
+mcmpgtw:
+ mcmpgt.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mcmv.cgs b/sim/testsuite/sim/sh64/media/mcmv.cgs
new file mode 100644
index 00000000000..c1f59aa4f88
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mcmv.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mcmv $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mcmv
+mcmv:
+ mcmv r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mcnvslw.cgs b/sim/testsuite/sim/sh64/media/mcnvslw.cgs
new file mode 100644
index 00000000000..005108b7669
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mcnvslw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mcnvs.lw $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mcnvslw
+mcnvslw:
+ mcnvs.lw r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mcnvswb.cgs b/sim/testsuite/sim/sh64/media/mcnvswb.cgs
new file mode 100644
index 00000000000..0d25920f310
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mcnvswb.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mcnvs.wb $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mcnvswb
+mcnvswb:
+ mcnvs.wb r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mcnvswub.cgs b/sim/testsuite/sim/sh64/media/mcnvswub.cgs
new file mode 100644
index 00000000000..2fc74466dd0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mcnvswub.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mcnvs.wub $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mcnvswub
+mcnvswub:
+ mcnvs.wub r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mextr1.cgs b/sim/testsuite/sim/sh64/media/mextr1.cgs
new file mode 100644
index 00000000000..b2cb3c3ff29
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mextr1.cgs
@@ -0,0 +1,67 @@
+# sh testcase for mextr1 $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ # Put a distinguised bit pattern in R0.
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+
+ # Put another distinguished bit pattern in R1.
+ movi 0x1525, r1
+ shlli r1, 8, r1
+ ori r1, 0x35, r1
+ shlli r1, 8, r1
+ ori r1, 0x45, r1
+ shlli r1, 8, r1
+ ori r1, 0x55, r1
+ shlli r1, 8, r1
+ ori r1, 0x65, r1
+ shlli r1, 8, r1
+ ori r1, 0x75, r1
+ shlli r1, 8, r1
+ ori r1, 0x85, r1
+
+mextr1:
+ mextr1 r0, r1, r2
+
+check:
+ # Put the result in R3.
+ movi 0x2535, r3
+ shlli r3, 8, r3
+ ori r3, 0x45, r3
+ shlli r3, 8, r3
+ ori r3, 0x55, r3
+ shlli r3, 8, r3
+ ori r3, 0x65, r3
+ shlli r3, 8, r3
+ ori r3, 0x75, r3
+ shlli r3, 8, r3
+ ori r3, 0x85, r3
+ shlli r3, 8, r3
+ ori r3, 0x10, r3
+
+ pta wrong, tr0
+ bne r2, r3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/mextr2.cgs b/sim/testsuite/sim/sh64/media/mextr2.cgs
new file mode 100644
index 00000000000..cf136be8176
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mextr2.cgs
@@ -0,0 +1,67 @@
+# sh testcase for mextr2 $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ # Put a distinguised bit pattern in R0.
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+
+ # Put another distinguished bit pattern in R1.
+ movi 0x1525, r1
+ shlli r1, 8, r1
+ ori r1, 0x35, r1
+ shlli r1, 8, r1
+ ori r1, 0x45, r1
+ shlli r1, 8, r1
+ ori r1, 0x55, r1
+ shlli r1, 8, r1
+ ori r1, 0x65, r1
+ shlli r1, 8, r1
+ ori r1, 0x75, r1
+ shlli r1, 8, r1
+ ori r1, 0x85, r1
+
+mextr2:
+ mextr2 r0, r1, r2
+
+check:
+ # Put the result in R3.
+ movi 0x3545, r3
+ shlli r3, 8, r3
+ ori r3, 0x55, r3
+ shlli r3, 8, r3
+ ori r3, 0x65, r3
+ shlli r3, 8, r3
+ ori r3, 0x75, r3
+ shlli r3, 8, r3
+ ori r3, 0x85, r3
+ shlli r3, 8, r3
+ ori r3, 0x10, r3
+ shlli r3, 8, r3
+ ori r3, 0x20, r3
+
+ pta wrong, tr0
+ bne r2, r3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/mextr3.cgs b/sim/testsuite/sim/sh64/media/mextr3.cgs
new file mode 100644
index 00000000000..b8d60a447bc
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mextr3.cgs
@@ -0,0 +1,67 @@
+# sh testcase for mextr3 $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ # Put a distinguised bit pattern in R0.
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+
+ # Put another distinguished bit pattern in R1.
+ movi 0x1525, r1
+ shlli r1, 8, r1
+ ori r1, 0x35, r1
+ shlli r1, 8, r1
+ ori r1, 0x45, r1
+ shlli r1, 8, r1
+ ori r1, 0x55, r1
+ shlli r1, 8, r1
+ ori r1, 0x65, r1
+ shlli r1, 8, r1
+ ori r1, 0x75, r1
+ shlli r1, 8, r1
+ ori r1, 0x85, r1
+
+mextr3:
+ mextr3 r0, r1, r2
+
+check:
+ # Put the result in R3.
+ movi 0x4555, r3
+ shlli r3, 8, r3
+ ori r3, 0x65, r3
+ shlli r3, 8, r3
+ ori r3, 0x75, r3
+ shlli r3, 8, r3
+ ori r3, 0x85, r3
+ shlli r3, 8, r3
+ ori r3, 0x10, r3
+ shlli r3, 8, r3
+ ori r3, 0x20, r3
+ shlli r3, 8, r3
+ ori r3, 0x30, r3
+
+ pta wrong, tr0
+ bne r2, r3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/mextr4.cgs b/sim/testsuite/sim/sh64/media/mextr4.cgs
new file mode 100644
index 00000000000..e9ebff9be7b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mextr4.cgs
@@ -0,0 +1,67 @@
+# sh testcase for mextr4 $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ # Put a distinguised bit pattern in R0.
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+
+ # Put another distinguished bit pattern in R1.
+ movi 0x1525, r1
+ shlli r1, 8, r1
+ ori r1, 0x35, r1
+ shlli r1, 8, r1
+ ori r1, 0x45, r1
+ shlli r1, 8, r1
+ ori r1, 0x55, r1
+ shlli r1, 8, r1
+ ori r1, 0x65, r1
+ shlli r1, 8, r1
+ ori r1, 0x75, r1
+ shlli r1, 8, r1
+ ori r1, 0x85, r1
+
+mextr4:
+ mextr4 r0, r1, r2
+
+check:
+ # Put the result in R3.
+ movi 0x5565, r3
+ shlli r3, 8, r3
+ ori r3, 0x75, r3
+ shlli r3, 8, r3
+ ori r3, 0x85, r3
+ shlli r3, 8, r3
+ ori r3, 0x10, r3
+ shlli r3, 8, r3
+ ori r3, 0x20, r3
+ shlli r3, 8, r3
+ ori r3, 0x30, r3
+ shlli r3, 8, r3
+ ori r3, 0x40, r3
+
+ pta wrong, tr0
+ bne r2, r3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/mextr5.cgs b/sim/testsuite/sim/sh64/media/mextr5.cgs
new file mode 100644
index 00000000000..c61a0c89f52
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mextr5.cgs
@@ -0,0 +1,67 @@
+# sh testcase for mextr5 $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ # Put a distinguised bit pattern in R0.
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+
+ # Put another distinguished bit pattern in R1.
+ movi 0x1525, r1
+ shlli r1, 8, r1
+ ori r1, 0x35, r1
+ shlli r1, 8, r1
+ ori r1, 0x45, r1
+ shlli r1, 8, r1
+ ori r1, 0x55, r1
+ shlli r1, 8, r1
+ ori r1, 0x65, r1
+ shlli r1, 8, r1
+ ori r1, 0x75, r1
+ shlli r1, 8, r1
+ ori r1, 0x85, r1
+
+mextr5:
+ mextr5 r0, r1, r2
+
+check:
+ # Put the result in R3.
+ movi 0x6575, r3
+ shlli r3, 8, r3
+ ori r3, 0x85, r3
+ shlli r3, 8, r3
+ ori r3, 0x10, r3
+ shlli r3, 8, r3
+ ori r3, 0x20, r3
+ shlli r3, 8, r3
+ ori r3, 0x30, r3
+ shlli r3, 8, r3
+ ori r3, 0x40, r3
+ shlli r3, 8, r3
+ ori r3, 0x50, r3
+
+ pta wrong, tr0
+ bne r2, r3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/mextr6.cgs b/sim/testsuite/sim/sh64/media/mextr6.cgs
new file mode 100644
index 00000000000..5c6c7f60c79
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mextr6.cgs
@@ -0,0 +1,67 @@
+# sh testcase for mextr6 $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ # Put a distinguised bit pattern in R0.
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+
+ # Put another distinguished bit pattern in R1.
+ movi 0x1525, r1
+ shlli r1, 8, r1
+ ori r1, 0x35, r1
+ shlli r1, 8, r1
+ ori r1, 0x45, r1
+ shlli r1, 8, r1
+ ori r1, 0x55, r1
+ shlli r1, 8, r1
+ ori r1, 0x65, r1
+ shlli r1, 8, r1
+ ori r1, 0x75, r1
+ shlli r1, 8, r1
+ ori r1, 0x85, r1
+
+mextr6:
+ mextr6 r0, r1, r2
+
+check:
+ # Put the result in R3.
+ movi 0x7585, r3
+ shlli r3, 8, r3
+ ori r3, 0x10, r3
+ shlli r3, 8, r3
+ ori r3, 0x20, r3
+ shlli r3, 8, r3
+ ori r3, 0x30, r3
+ shlli r3, 8, r3
+ ori r3, 0x40, r3
+ shlli r3, 8, r3
+ ori r3, 0x50, r3
+ shlli r3, 8, r3
+ ori r3, 0x60, r3
+
+ pta wrong, tr0
+ bne r2, r3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/mextr7.cgs b/sim/testsuite/sim/sh64/media/mextr7.cgs
new file mode 100644
index 00000000000..e05ec7f9ab3
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mextr7.cgs
@@ -0,0 +1,67 @@
+# sh testcase for mextr7 $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ # Put a distinguised bit pattern in R0.
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+
+ # Put another distinguished bit pattern in R1.
+ movi 0x1525, r1
+ shlli r1, 8, r1
+ ori r1, 0x35, r1
+ shlli r1, 8, r1
+ ori r1, 0x45, r1
+ shlli r1, 8, r1
+ ori r1, 0x55, r1
+ shlli r1, 8, r1
+ ori r1, 0x65, r1
+ shlli r1, 8, r1
+ ori r1, 0x75, r1
+ shlli r1, 8, r1
+ ori r1, 0x85, r1
+
+mextr7:
+ mextr7 r0, r1, r2
+
+check:
+ # Put the result in R3.
+ movi 0x8510, r3
+ shlli r3, 8, r3
+ ori r3, 0x20, r3
+ shlli r3, 8, r3
+ ori r3, 0x30, r3
+ shlli r3, 8, r3
+ ori r3, 0x40, r3
+ shlli r3, 8, r3
+ ori r3, 0x50, r3
+ shlli r3, 8, r3
+ ori r3, 0x60, r3
+ shlli r3, 8, r3
+ ori r3, 0x70, r3
+
+ pta wrong, tr0
+ bne r2, r3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/mmacfxwl.cgs b/sim/testsuite/sim/sh64/media/mmacfxwl.cgs
new file mode 100644
index 00000000000..dd2d9a41ae7
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mmacfxwl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mmacfx.wl $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mmacfxwl
+mmacfxwl:
+ mmacfx.wl r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs b/sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs
new file mode 100644
index 00000000000..ba634d207a3
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mmacnfx-wl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mmacnfx.wl $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mmacnfx_wl
+mmacnfx_wl:
+ mmacnfx.wl r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mmulfxl.cgs b/sim/testsuite/sim/sh64/media/mmulfxl.cgs
new file mode 100644
index 00000000000..7d2d1a63268
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mmulfxl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mmulfx.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mmulfxl
+mmulfxl:
+ mmulfx.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mmulfxrpw.cgs b/sim/testsuite/sim/sh64/media/mmulfxrpw.cgs
new file mode 100644
index 00000000000..13fdcc71d0e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mmulfxrpw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mmulfxrp.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mmulfxrpw
+mmulfxrpw:
+ mmulfxrp.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mmulfxw.cgs b/sim/testsuite/sim/sh64/media/mmulfxw.cgs
new file mode 100644
index 00000000000..e2a66a7c11d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mmulfxw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mmulfx.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mmulfxw
+mmulfxw:
+ mmulfx.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mmulhiwl.cgs b/sim/testsuite/sim/sh64/media/mmulhiwl.cgs
new file mode 100644
index 00000000000..1a41ac59286
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mmulhiwl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mmulhi.wl $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mmulhiwl
+mmulhiwl:
+ mmulhi.wl r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mmull.cgs b/sim/testsuite/sim/sh64/media/mmull.cgs
new file mode 100644
index 00000000000..b3ed9df3f35
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mmull.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mmul.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mmull
+mmull:
+ mmul.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mmullowl.cgs b/sim/testsuite/sim/sh64/media/mmullowl.cgs
new file mode 100644
index 00000000000..b50ccfcb5dd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mmullowl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mmullo.wl $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mmullowl
+mmullowl:
+ mmullo.wl r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mmulsumwq.cgs b/sim/testsuite/sim/sh64/media/mmulsumwq.cgs
new file mode 100644
index 00000000000..344710b0e98
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mmulsumwq.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mmulsum.wq $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mmulsumwq
+mmulsumwq:
+ mmulsum.wq r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mmulw.cgs b/sim/testsuite/sim/sh64/media/mmulw.cgs
new file mode 100644
index 00000000000..675c620fadc
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mmulw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mmul.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mmulw
+mmulw:
+ mmul.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/movi.cgs b/sim/testsuite/sim/sh64/media/movi.cgs
new file mode 100644
index 00000000000..a01bcae84df
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/movi.cgs
@@ -0,0 +1,29 @@
+# sh testcase for movi $imm16, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+movi0:
+ movi 0, r0
+ bnei r0, 0, tr0
+movi1:
+ movi 1, r0
+ bnei r0, 1, tr0
+movi2:
+ movi 23, r0
+ bnei r0, 23, tr0
+movn:
+ movi -1, r0
+ addi r0, 1, r0
+ bnei r0, 0, tr0
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/mpermw.cgs b/sim/testsuite/sim/sh64/media/mpermw.cgs
new file mode 100644
index 00000000000..3b6741e8107
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mpermw.cgs
@@ -0,0 +1,51 @@
+# sh testcase for mperm.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+ movi 27, r1
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+
+mpermw:
+ mperm.w r0, r1, r2
+
+check:
+ # Expect 0x7080506030401020.
+ movi 0x7080, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x10, r0
+ shlli r0, 8, r0
+ ori r0, 0x20, r0
+
+ bne r0, r2, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/msadubq.cgs b/sim/testsuite/sim/sh64/media/msadubq.cgs
new file mode 100644
index 00000000000..4361883b870
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/msadubq.cgs
@@ -0,0 +1,14 @@
+# sh testcase for msad.ubq $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global msadubq
+msadubq:
+ msad.ubq r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshaldsl.cgs b/sim/testsuite/sim/sh64/media/mshaldsl.cgs
new file mode 100644
index 00000000000..1dd86ec6bb6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshaldsl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshalds.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshaldsl
+mshaldsl:
+ mshalds.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshaldsw.cgs b/sim/testsuite/sim/sh64/media/mshaldsw.cgs
new file mode 100644
index 00000000000..7ab6797e9a6
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshaldsw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshalds.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshaldsw
+mshaldsw:
+ mshalds.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshardl.cgs b/sim/testsuite/sim/sh64/media/mshardl.cgs
new file mode 100644
index 00000000000..0dc102e337a
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshardl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshard.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshardl
+mshardl:
+ mshard.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshardsq.cgs b/sim/testsuite/sim/sh64/media/mshardsq.cgs
new file mode 100644
index 00000000000..5f29afb8b1b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshardsq.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshards.q $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshardsq
+mshardsq:
+ mshards.q r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshardw.cgs b/sim/testsuite/sim/sh64/media/mshardw.cgs
new file mode 100644
index 00000000000..ecc7004febd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshardw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshard.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshardw
+mshardw:
+ mshard.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshfhib.cgs b/sim/testsuite/sim/sh64/media/mshfhib.cgs
new file mode 100644
index 00000000000..b7b245e79ae
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshfhib.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshfhi.b $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshfhib
+mshfhib:
+ mshfhi.b r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshfhil.cgs b/sim/testsuite/sim/sh64/media/mshfhil.cgs
new file mode 100644
index 00000000000..2fab7ae1fd9
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshfhil.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshfhi.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshfhil
+mshfhil:
+ mshfhi.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshfhiw.cgs b/sim/testsuite/sim/sh64/media/mshfhiw.cgs
new file mode 100644
index 00000000000..03111413cf1
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshfhiw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshfhi.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshfhiw
+mshfhiw:
+ mshfhi.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshflob.cgs b/sim/testsuite/sim/sh64/media/mshflob.cgs
new file mode 100644
index 00000000000..400e81a0598
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshflob.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshflo.b $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshflob
+mshflob:
+ mshflo.b r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshflol.cgs b/sim/testsuite/sim/sh64/media/mshflol.cgs
new file mode 100644
index 00000000000..2fbdf894e60
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshflol.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshflo.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshflol
+mshflol:
+ mshflo.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshflow.cgs b/sim/testsuite/sim/sh64/media/mshflow.cgs
new file mode 100644
index 00000000000..542eb042c52
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshflow.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshflo.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshflow
+mshflow:
+ mshflo.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshlldl.cgs b/sim/testsuite/sim/sh64/media/mshlldl.cgs
new file mode 100644
index 00000000000..2a17c33002e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshlldl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshlld.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshlldl
+mshlldl:
+ mshlld.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshlldw.cgs b/sim/testsuite/sim/sh64/media/mshlldw.cgs
new file mode 100644
index 00000000000..e4afe3d732a
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshlldw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshlld.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshlldw
+mshlldw:
+ mshlld.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshlrdl.cgs b/sim/testsuite/sim/sh64/media/mshlrdl.cgs
new file mode 100644
index 00000000000..89e70772b7f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshlrdl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshlrd.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshlrdl
+mshlrdl:
+ mshlrd.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mshlrdw.cgs b/sim/testsuite/sim/sh64/media/mshlrdw.cgs
new file mode 100644
index 00000000000..4cbf2807f9c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mshlrdw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for mshlrd.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mshlrdw
+mshlrdw:
+ mshlrd.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/msubl.cgs b/sim/testsuite/sim/sh64/media/msubl.cgs
new file mode 100644
index 00000000000..87151fad728
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/msubl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for msub.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global msubl
+msubl:
+ msub.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/msubsl.cgs b/sim/testsuite/sim/sh64/media/msubsl.cgs
new file mode 100644
index 00000000000..014422ed8f3
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/msubsl.cgs
@@ -0,0 +1,14 @@
+# sh testcase for msubs.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global msubsl
+msubsl:
+ msubs.l r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/msubsub.cgs b/sim/testsuite/sim/sh64/media/msubsub.cgs
new file mode 100644
index 00000000000..c92c77ee72e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/msubsub.cgs
@@ -0,0 +1,14 @@
+# sh testcase for msubs.ub $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global msubsub
+msubsub:
+ msubs.ub r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/msubsw.cgs b/sim/testsuite/sim/sh64/media/msubsw.cgs
new file mode 100644
index 00000000000..83b76a1b4b3
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/msubsw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for msubs.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global msubsw
+msubsw:
+ msubs.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/msubw.cgs b/sim/testsuite/sim/sh64/media/msubw.cgs
new file mode 100644
index 00000000000..9d5e639f240
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/msubw.cgs
@@ -0,0 +1,14 @@
+# sh testcase for msub.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global msubw
+msubw:
+ msub.w r0, r0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/mulsl.cgs b/sim/testsuite/sim/sh64/media/mulsl.cgs
new file mode 100644
index 00000000000..d65c80cadf2
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mulsl.cgs
@@ -0,0 +1,54 @@
+# sh testcase for muls.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mulsl
+init:
+ pta wrong, tr0
+
+mulsl1:
+ movi 0, r0
+ muls.l r0, r0, r1
+ bnei r1, 0, tr0
+
+mulsl2:
+ movi 0, r0
+ movi 1, r1
+ muls.l r0, r1, r2
+ bnei r2, 0, tr0
+
+mulsl3:
+ movi 1, r0
+ movi 0, r1
+ muls.l r0, r1, r2
+ bnei r2, 0, tr0
+
+mulsl4:
+ movi 1, r0
+ movi 1, r1
+ muls.l r0, r1, r2
+ bnei r2, 1, tr0
+
+mulsl5:
+ movi 2, r0
+ movi 9, r1
+ muls.l r0, r1, r2
+ bnei r2, 18, tr0
+
+mulsl6:
+ movi 2, r0
+ movi -9, r1
+ muls.l r0, r1, r2
+ bnei r2, -18, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/media/mulul.cgs b/sim/testsuite/sim/sh64/media/mulul.cgs
new file mode 100644
index 00000000000..b795cf79ec0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/mulul.cgs
@@ -0,0 +1,54 @@
+# sh testcase for mulu.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global mulul
+init:
+ pta wrong, tr0
+
+mulul1:
+ movi 0, r0
+ mulu.l r0, r0, r1
+ bnei r1, 0, tr0
+
+mulul2:
+ movi 0, r0
+ movi 1, r1
+ mulu.l r0, r1, r2
+ bnei r2, 0, tr0
+
+mulul3:
+ movi 1, r0
+ movi 0, r1
+ mulu.l r0, r1, r2
+ bnei r2, 0, tr0
+
+mulul4:
+ movi 1, r0
+ movi 1, r1
+ mulu.l r0, r1, r2
+ bnei r2, 1, tr0
+
+mulul5:
+ movi 2, r0
+ movi 9, r1
+ mulu.l r0, r1, r2
+ bnei r2, 18, tr0
+
+mulul6:
+ movi 2, r0
+ movi -9, r1
+ mulu.l r0, r1, r2
+ beqi r2, -18, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/media/nop.cgs b/sim/testsuite/sim/sh64/media/nop.cgs
new file mode 100644
index 00000000000..a0e57530542
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/nop.cgs
@@ -0,0 +1,10 @@
+# sh testcase for nop -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ nop
+ pass
diff --git a/sim/testsuite/sim/sh64/media/nsb.cgs b/sim/testsuite/sim/sh64/media/nsb.cgs
new file mode 100644
index 00000000000..8b3cffef4a8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/nsb.cgs
@@ -0,0 +1,66 @@
+# sh testcase for nsb $rm, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+nsb0:
+ movi 0, r0
+ nsb r0, r1
+check0:
+ movi 63, r4
+ bne r1, r4, tr0
+
+nsb1:
+ # set up a loop target reg.
+ pta again1, tr1
+ # r4 holds the loop count.
+ movi 62, r4
+ movi 1, r0
+again1:
+ nsb r0, r1
+ bne r1, r4, tr0
+ # okay? go around again.
+ shlli r0, 1, r0
+ addi r4, -1, r4
+ bnei r4, 0, tr1
+
+nsb2:
+ # set up a loop target reg.
+ pta again2, tr1
+ # r4 holds the loop count.
+ movi 63, r4
+ movi -1, r0
+again2:
+ nsb r0, r1
+ bne r1, r4, tr0
+ # okay? go around again.
+ shlli r0, 1, r0
+ addi r4, -1, r4
+ bnei r4, 0, tr1
+
+nsb3:
+ movi 1, r0
+ shlli r0, 63, r0
+ nsb r0, r1
+check3:
+ movi 0, r4
+ bne r1, r4, tr0
+
+nsb4:
+ movi 7, r0
+ shlli r0, 61, r0
+ nsb r0, r1
+check4:
+ movi 2, r4
+ bne r1, r4, tr0
+
+okay:
+ pass
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/ocbi.cgs b/sim/testsuite/sim/sh64/media/ocbi.cgs
new file mode 100644
index 00000000000..b210216e3db
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ocbi.cgs
@@ -0,0 +1,10 @@
+# sh testcase for ocbi $rm, $disp6x32 -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ ocbi r0, 0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ocbp.cgs b/sim/testsuite/sim/sh64/media/ocbp.cgs
new file mode 100644
index 00000000000..9158c6f4518
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ocbp.cgs
@@ -0,0 +1,10 @@
+# sh testcase for ocbp $rm, $disp6x32 -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ ocbp r0, 0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ocbwb.cgs b/sim/testsuite/sim/sh64/media/ocbwb.cgs
new file mode 100644
index 00000000000..6addabcf461
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ocbwb.cgs
@@ -0,0 +1,10 @@
+# sh testcase for ocbwb $rm, $disp6x32 -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ ocbwb r0, 0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/or.cgs b/sim/testsuite/sim/sh64/media/or.cgs
new file mode 100644
index 00000000000..e06759225ba
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/or.cgs
@@ -0,0 +1,44 @@
+# sh testcase for or $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+or1:
+ movi 0, r0
+ or r0, r0, r1
+ bnei r1, 0, tr0
+
+or2:
+ movi 0, r0
+ movi 1, r1
+ or r0, r1, r2
+ bnei r2, 1, tr0
+
+or3:
+ movi 1, r0
+ movi 0, r1
+ or r0, r1, r2
+ bnei r2, 1, tr0
+
+or4:
+ movi 1, r0
+ or r0, r0, r1
+ bnei r1, 1, tr0
+
+or5:
+ movi 1, r0
+ shlli r0, 63, r0
+ movi 1, r1
+ or r0, r1, r2
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/ori.cgs b/sim/testsuite/sim/sh64/media/ori.cgs
new file mode 100644
index 00000000000..7b2554227da
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ori.cgs
@@ -0,0 +1,41 @@
+# sh testcase for ori $rm, $imm10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+or1:
+ movi 0, r0
+ ori r0, 0, r1
+ bnei r1, 0, tr0
+
+or2:
+ movi 0, r0
+ ori r0, 1, r2
+ bnei r2, 1, tr0
+
+or3:
+ movi 1, r0
+ ori r0, 0, r2
+ bnei r2, 1, tr0
+
+or4:
+ movi 1, r0
+ ori r0, 1, r1
+ bnei r1, 1, tr0
+
+or5:
+ movi 1, r0
+ shlli r0, 63, r0
+ ori r0, 1, r2
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/prefi.cgs b/sim/testsuite/sim/sh64/media/prefi.cgs
new file mode 100644
index 00000000000..68d7bfe29a4
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/prefi.cgs
@@ -0,0 +1,10 @@
+# sh testcase for prefi $rm, $disp6x32 -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ prefi r0, 0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/pta.cgs b/sim/testsuite/sim/sh64/media/pta.cgs
new file mode 100644
index 00000000000..9f6484a8d4c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/pta.cgs
@@ -0,0 +1,26 @@
+# sh testcase for pta$likely $disp16, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+pta0:
+ pta foo, tr0
+pta1:
+ pta/l bar, tr1
+pta2:
+ pta/u baz, tr2
+ movi 0, r0
+ bnei r0, 1, tr2
+ fail
+
+foo:
+bar:
+baz:
+ pass
+ fail
+ fail
+ fail
+ fail
diff --git a/sim/testsuite/sim/sh64/media/ptabs.cgs b/sim/testsuite/sim/sh64/media/ptabs.cgs
new file mode 100644
index 00000000000..0c01f838eb8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ptabs.cgs
@@ -0,0 +1,25 @@
+# sh testcase for ptabs$likely $rn, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global ptabs
+ptabs:
+ movi 16, r0
+ shlli r0, 8, r0
+ # Add one to stay in SHmedia mode.
+ addi r0, 29, r0
+ ptabs r0, tr0
+
+ # Now jump.
+ beqi r63, 0, tr0
+
+wrong:
+ fail
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/ptb.cgs b/sim/testsuite/sim/sh64/media/ptb.cgs
new file mode 100644
index 00000000000..129d6260439
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ptb.cgs
@@ -0,0 +1,29 @@
+# sh testcase for ptb$likely $disp16, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ptb0:
+ ptb foo, tr0
+ptb:
+ ptb/l bar, tr1
+ptb2:
+ ptb/u baz, tr2
+ movi 0, r0
+ bnei r0, 1, tr2
+ fail
+
+.mode SHcompact
+
+foo:
+bar:
+baz:
+ trapa #253
+ trapa #254
+ trapa #254
+ trapa #254
+ trapa #254
diff --git a/sim/testsuite/sim/sh64/media/ptrel.cgs b/sim/testsuite/sim/sh64/media/ptrel.cgs
new file mode 100644
index 00000000000..7e5f19b1b9c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/ptrel.cgs
@@ -0,0 +1,22 @@
+# sh testcase for ptrel$likely $rn, $tra -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ # Add one to stay in SHmedia mode.
+ movi 53, r0
+ ptrel r0, tr0
+ movi 0, r0
+ # Always branch.
+ bnei r0, 1, tr0
+ fail
+ fail
+ fail
+ fail
+ fail
+ pass
+ fail
+ fail
diff --git a/sim/testsuite/sim/sh64/media/putcfg.cgs b/sim/testsuite/sim/sh64/media/putcfg.cgs
new file mode 100644
index 00000000000..85385754a48
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/putcfg.cgs
@@ -0,0 +1,10 @@
+# sh testcase for putcfg $rm, $disp6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ putcfg r0, 0, r0
+ pass
diff --git a/sim/testsuite/sim/sh64/media/putcon.cgs b/sim/testsuite/sim/sh64/media/putcon.cgs
new file mode 100644
index 00000000000..39dfc036280
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/putcon.cgs
@@ -0,0 +1,30 @@
+# sh testcase for putcon $rm, $crj -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+putcon1:
+ movi 22, r0
+ putcon r0, cr0
+ getcon cr0, r1
+ bne r0, r1, tr0
+
+putcon2:
+ movi 12, r0
+ shlli r0, 35, r0
+ putcon r0, cr20
+ getcon cr20, r20
+ bne r0, r20, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/rte.cgs b/sim/testsuite/sim/sh64/media/rte.cgs
new file mode 100644
index 00000000000..e80f08541cc
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/rte.cgs
@@ -0,0 +1,11 @@
+# sh testcase for rte -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ # Unimplemented.
+ rte
+ pass
diff --git a/sim/testsuite/sim/sh64/media/shard.cgs b/sim/testsuite/sim/sh64/media/shard.cgs
new file mode 100644
index 00000000000..029e52902a2
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shard.cgs
@@ -0,0 +1,30 @@
+# sh testcase for shard $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+shard1:
+ movi 128, r0
+ movi 3, r1
+ shard r0, r1, r2
+ bnei r2, 16, tr0
+
+shard2:
+ movi -4, r0
+ movi 2, r1
+ shard r0, r1, r2
+ addi r2, 1, r2
+ bnei r2, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/shardl.cgs b/sim/testsuite/sim/sh64/media/shardl.cgs
new file mode 100644
index 00000000000..d9acaa54f69
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shardl.cgs
@@ -0,0 +1,45 @@
+# sh testcase for shard.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+shardl1:
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+
+ movi 1, r1
+ shard.l r0, r1, r0
+ shard.l r0, r1, r0
+ shard.l r0, r1, r0
+ shard.l r0, r1, r0
+ shard.l r0, r1, r0
+ shard.l r0, r1, r0
+ shard.l r0, r1, r0
+ shard.l r0, r1, r0
+ movi 20, r1
+ shard.l r0, r1, r0
+ bnei r0, 5, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/shari.cgs b/sim/testsuite/sim/sh64/media/shari.cgs
new file mode 100644
index 00000000000..3d3a650fb0c
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shari.cgs
@@ -0,0 +1,28 @@
+# sh testcase for shari $rm, $imm, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+shari1:
+ movi 128, r0
+ shari r0, 3, r2
+ bnei r2, 16, tr0
+
+shari2:
+ movi -4, r0
+ shari r0, 2, r2
+ addi r2, 1, r2
+ bnei r2, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/sharil.cgs b/sim/testsuite/sim/sh64/media/sharil.cgs
new file mode 100644
index 00000000000..be946e0c84d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/sharil.cgs
@@ -0,0 +1,45 @@
+# sh testcase for shari.l $rm, $imm6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+sharil1:
+ movi 0x1020, r0
+ shlli r0, 8, r0
+ ori r0, 0x30, r0
+ shlli r0, 8, r0
+ ori r0, 0x40, r0
+ shlli r0, 8, r0
+ ori r0, 0x50, r0
+ shlli r0, 8, r0
+ ori r0, 0x60, r0
+ shlli r0, 8, r0
+ ori r0, 0x70, r0
+ shlli r0, 8, r0
+ ori r0, 0x80, r0
+
+ movi 1, r1
+ shari.l r0, 1, r0
+ shari.l r0, 1, r0
+ shari.l r0, 1, r0
+ shari.l r0, 1, r0
+ shari.l r0, 1, r0
+ shari.l r0, 1, r0
+ shari.l r0, 1, r0
+ shari.l r0, 1, r0
+ shari.l r0, 20, r0
+ bnei r0, 5, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/media/shlld.cgs b/sim/testsuite/sim/sh64/media/shlld.cgs
new file mode 100644
index 00000000000..05d2da4cd68
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shlld.cgs
@@ -0,0 +1,36 @@
+# sh testcase for shlld $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+shlld1:
+ movi 1, r0
+ movi 5, r1
+ shlld r0, r1, r2
+ movi 32, r7
+ bne r2, r7, tr0
+
+shlld2:
+ movi 2, r1
+ shlld r2, r1, r3
+ movi 128, r7
+ bne r3, r7, tr0
+
+shlld3:
+ movi 32, r1
+ shlld r0, r1, r7
+ shlld r7, r1, r2
+ bnei r2, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/shlldl.cgs b/sim/testsuite/sim/sh64/media/shlldl.cgs
new file mode 100644
index 00000000000..3d37f53a76b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shlldl.cgs
@@ -0,0 +1,34 @@
+# sh testcase for shlld.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+shlldl1:
+ movi 1, r0
+ shlli r0, 32, r0
+ ori r0, 1, r0
+ movi 1, r1
+ shlli r1, 7, r1
+ ori r1, 3, r1
+
+ shlld.l r0, r1, r2
+
+check1:
+ bnei r2, 8, tr0
+
+shlldl2:
+ movi 1, r0
+ movi 31, r1
+ shlld.l r0, r1, r2
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/shlli.cgs b/sim/testsuite/sim/sh64/media/shlli.cgs
new file mode 100644
index 00000000000..9ab331c0930
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shlli.cgs
@@ -0,0 +1,30 @@
+# sh testcase for shlli $rm, $imm6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+shlli:
+ movi 1, r0
+ shlli r0, 3, r0
+ bnei r0, 8, tr0
+
+shlli2:
+ shlli r0, 3, r0
+
+shlli3:
+ # Shift all bits out of sight.
+ shlli r0, 63, r0
+ bnei r0, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/shllil.cgs b/sim/testsuite/sim/sh64/media/shllil.cgs
new file mode 100644
index 00000000000..347acd64084
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shllil.cgs
@@ -0,0 +1,14 @@
+# sh testcase for shlli.l $rm, $imm6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global shllil
+shllil:
+ shlli.l r0, 0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/shlrd.cgs b/sim/testsuite/sim/sh64/media/shlrd.cgs
new file mode 100644
index 00000000000..56f10bf1c0e
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shlrd.cgs
@@ -0,0 +1,30 @@
+# sh testcase for shlrd $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+shlrd1:
+ movi 128, r0
+ movi 3, r1
+ shlrd r0, r1, r2
+ bnei r2, 16, tr0
+
+shlrd2:
+ movi -4, r0
+ movi 2, r1
+ shlrd r0, r1, r2
+ addi r2, 1, r2
+ beqi r2, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/shlrdl.cgs b/sim/testsuite/sim/sh64/media/shlrdl.cgs
new file mode 100644
index 00000000000..32b20c0a3cd
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shlrdl.cgs
@@ -0,0 +1,37 @@
+# sh testcase for shlrd.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+shlrdl1:
+ movi 1, r0
+ shlli r0, 32, r0
+ ori r0, 8, r0
+ movi 1, r1
+ shlli r1, 7, r1
+ ori r1, 3, r1
+
+ shlrd.l r0, r1, r2
+
+check1:
+ bnei r2, 1, tr0
+
+shlrdl2:
+ movi 1, r0
+ shlli r0, 31, r0
+ movi 31, r1
+ shlld.l r0, r1, r2
+ bnei r2, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/shlri.cgs b/sim/testsuite/sim/sh64/media/shlri.cgs
new file mode 100644
index 00000000000..488cac9aec8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shlri.cgs
@@ -0,0 +1,28 @@
+# sh testcase for shlri $rm, $imm, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+shlri1:
+ movi 128, r0
+ shlri r0, 3, r2
+ bnei r2, 16, tr0
+
+shlri2:
+ movi -4, r0
+ shlri r0, 2, r2
+ addi r2, 1, r2
+ beqi r2, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/shlril.cgs b/sim/testsuite/sim/sh64/media/shlril.cgs
new file mode 100644
index 00000000000..bb1b2a6eaf0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shlril.cgs
@@ -0,0 +1,14 @@
+# sh testcase for shlri.l $rm, $imm6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global shlril
+shlril:
+ shlri.l r0, 0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/shori.cgs b/sim/testsuite/sim/sh64/media/shori.cgs
new file mode 100644
index 00000000000..5f02b7d2c5f
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/shori.cgs
@@ -0,0 +1,35 @@
+# sh testcase for shori $imm16, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+shori1:
+ movi 1, r0
+ shori 7, r0
+ # check it.
+ andi r0, 15, r7
+ bnei r7, 7, tr0
+ shlri r0, 16, r0
+ bnei r0, 1, tr0
+
+shori2:
+ # Test for zero extension bug reported by
+ # Alexandre Oliva <aoliva@redhat.com>.
+ movi 0, r0
+ shori 65535, r0
+ # check it.
+ movi 0xffff, r1
+ bne r0, r1, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/sleep.cgs b/sim/testsuite/sim/sh64/media/sleep.cgs
new file mode 100644
index 00000000000..b4c35ee8f96
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/sleep.cgs
@@ -0,0 +1,10 @@
+# sh testcase for sleep -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ sleep
+ pass
diff --git a/sim/testsuite/sim/sh64/media/stb.cgs b/sim/testsuite/sim/sh64/media/stb.cgs
new file mode 100644
index 00000000000..09de47b14a9
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/stb.cgs
@@ -0,0 +1,26 @@
+# sh testcase for st.b $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ movi -1, r7
+ xori r7, 13, r7
+ movi 40, r0
+ shlli r0, 8, r0
+
+stb1:
+ st.b r0, 0, r7
+
+stb2:
+ st.b r0, 1, r7
+
+stb3:
+ st.b r0, -1, r7
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/sthil.cgs b/sim/testsuite/sim/sh64/media/sthil.cgs
new file mode 100644
index 00000000000..cfee28444f8
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/sthil.cgs
@@ -0,0 +1,55 @@
+# sh testcase for sthi.l $rm, $disp6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+ movi 40, r0
+ shlli r0, 8, r0
+
+ movi 0x1020, r1
+ shlli r1, 8, r1
+ addi r1, 0x30, r1
+ shlli r1, 8, r1
+ addi r1, 0x40, r1
+ shlli r1, 8, r1
+ addi r1, 0x50, r1
+ shlli r1, 8, r1
+ addi r1, 0x60, r1
+ shlli r1, 8, r1
+ addi r1, 0x70, r1
+ shlli r1, 8, r1
+ addi r1, 0x80, r1
+
+sthil1:
+ sthi.l r0, 0, r1
+
+sthil2:
+ sthi.l r0, 1, r1
+
+sthil3:
+ sthi.l r0, 2, r1
+
+sthil4:
+ sthi.l r0, 3, r1
+
+sthil5:
+ sthi.l r0, -1, r1
+
+sthil6:
+ sthi.l r0, -2, r1
+
+sthil7:
+ sthi.l r0, -3, r1
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/sthiq.cgs b/sim/testsuite/sim/sh64/media/sthiq.cgs
new file mode 100644
index 00000000000..6310d43e5ad
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/sthiq.cgs
@@ -0,0 +1,79 @@
+# sh testcase for sthi.q $rm, $disp6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+ movi 40, r0
+ shlli r0, 8, r0
+
+ movi 0x1020, r1
+ shlli r1, 8, r1
+ addi r1, 0x30, r1
+ shlli r1, 8, r1
+ addi r1, 0x40, r1
+ shlli r1, 8, r1
+ addi r1, 0x50, r1
+ shlli r1, 8, r1
+ addi r1, 0x60, r1
+ shlli r1, 8, r1
+ addi r1, 0x70, r1
+ shlli r1, 8, r1
+ addi r1, 0x80, r1
+
+sthiq1:
+ sthi.q r0, 0, r1
+
+sthiq2:
+ sthi.q r0, 1, r1
+
+sthiq3:
+ sthi.q r0, 2, r1
+
+sthiq4:
+ sthi.q r0, 3, r1
+
+sthiq5:
+ sthi.q r0, 4, r1
+
+sthiq6:
+ sthi.q r0, 5, r1
+
+sthiq7:
+ sthi.q r0, 6, r1
+
+sthiq8:
+ sthi.q r0, 7, r1
+
+sthiq9:
+ sthi.q r0, -1, r1
+
+sthiq10:
+ sthi.q r0, -2, r1
+
+sthiq11:
+ sthi.q r0, -3, r1
+
+sthiq12:
+ sthi.q r0, -4, r1
+
+sthiq13:
+ sthi.q r0, -5, r1
+
+sthiq14:
+ sthi.q r0, -6, r1
+
+sthiq15:
+ sthi.q r0, -7, r1
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/stl.cgs b/sim/testsuite/sim/sh64/media/stl.cgs
new file mode 100644
index 00000000000..8737e354c5b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/stl.cgs
@@ -0,0 +1,26 @@
+# sh testcase for st.l $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ movi -1, r7
+ xori r7, 13, r7
+ movi 40, r0
+ shlli r0, 8, r0
+
+stl1:
+ st.l r0, 0, r7
+
+stl2:
+ st.l r0, 4, r7
+
+stl3:
+ st.l r0, -4, r7
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/stlol.cgs b/sim/testsuite/sim/sh64/media/stlol.cgs
new file mode 100644
index 00000000000..f2d90552509
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/stlol.cgs
@@ -0,0 +1,14 @@
+# sh testcase for stlo.l $rm, $disp6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global stlol
+stlol:
+ stlo.l r0, 0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/stloq.cgs b/sim/testsuite/sim/sh64/media/stloq.cgs
new file mode 100644
index 00000000000..35c84c255cc
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/stloq.cgs
@@ -0,0 +1,14 @@
+# sh testcase for stlo.q $rm, $disp6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+ .global stloq
+stloq:
+ stlo.q r0, 0, r0
+
+ pass
diff --git a/sim/testsuite/sim/sh64/media/stq.cgs b/sim/testsuite/sim/sh64/media/stq.cgs
new file mode 100644
index 00000000000..e1af7956b84
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/stq.cgs
@@ -0,0 +1,26 @@
+# sh testcase for st.q $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ movi -1, r7
+ xori r7, 13, r7
+ movi 40, r0
+ shlli r0, 8, r0
+
+stq1:
+ st.q r0, 0, r7
+
+stq2:
+ st.q r0, 8, r7
+
+stq3:
+ st.q r0, -8, r7
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/stw.cgs b/sim/testsuite/sim/sh64/media/stw.cgs
new file mode 100644
index 00000000000..2446aa62795
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/stw.cgs
@@ -0,0 +1,26 @@
+# sh testcase for st.q $rm, $disp10, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ movi -1, r7
+ xori r7, 13, r7
+ movi 40, r0
+ shlli r0, 8, r0
+
+stw1:
+ st.w r0, 0, r7
+
+stw2:
+ st.w r0, 2, r7
+
+stw3:
+ st.w r0, -2, r7
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/stxb.cgs b/sim/testsuite/sim/sh64/media/stxb.cgs
new file mode 100644
index 00000000000..8ab2ae31d23
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/stxb.cgs
@@ -0,0 +1,29 @@
+# sh testcase for stx.b $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ movi -1, r7
+ xori r7, 13, r7
+ movi 40, r0
+ shlli r0, 8, r0
+
+stxb1:
+ movi 0, r1
+ stx.b r0, r1, r7
+
+stxb2:
+ movi 1, r1
+ stx.b r0, r1, r7
+
+stxb3:
+ movi -1, r1
+ stx.b r0, r1, r7
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/stxl.cgs b/sim/testsuite/sim/sh64/media/stxl.cgs
new file mode 100644
index 00000000000..8ed2e366ab3
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/stxl.cgs
@@ -0,0 +1,29 @@
+# sh testcase for stx.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ movi -1, r7
+ xori r7, 13, r7
+ movi 40, r0
+ shlli r0, 8, r0
+
+stxl1:
+ movi 0, r1
+ stx.l r0, r1, r7
+
+stxl2:
+ movi 4, r1
+ stx.l r0, r1, r7
+
+stxl3:
+ movi -4, r1
+ stx.l r0, r1, r7
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/stxq.cgs b/sim/testsuite/sim/sh64/media/stxq.cgs
new file mode 100644
index 00000000000..10759fd4414
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/stxq.cgs
@@ -0,0 +1,29 @@
+# sh testcase for stx.q $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ movi -1, r7
+ xori r7, 13, r7
+ movi 40, r0
+ shlli r0, 8, r0
+
+stxq1:
+ movi 0, r1
+ stx.q r0, r1, r7
+
+stxq2:
+ movi 8, r1
+ stx.q r0, r1, r7
+
+stxq3:
+ movi -8, r1
+ stx.q r0, r1, r7
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/stxw.cgs b/sim/testsuite/sim/sh64/media/stxw.cgs
new file mode 100644
index 00000000000..d03981146a2
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/stxw.cgs
@@ -0,0 +1,29 @@
+# sh testcase for stx.w $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ movi -1, r7
+ xori r7, 13, r7
+ movi 40, r0
+ shlli r0, 8, r0
+
+stxw1:
+ movi 0, r1
+ stx.w r0, r1, r7
+
+stxw2:
+ movi 2, r1
+ stx.w r0, r1, r7
+
+stxw3:
+ movi -2, r1
+ stx.w r0, r1, r7
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/sub.cgs b/sim/testsuite/sim/sh64/media/sub.cgs
new file mode 100644
index 00000000000..e5e7530100b
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/sub.cgs
@@ -0,0 +1,42 @@
+# sh testcase for sub $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+ movi 0, r0
+ movi 1, r1
+
+sub1:
+ # 0 - 0 = 0.
+ sub r0, r0, r2
+ bnei r2, 0, tr0
+
+sub2:
+ # 1 - 0 = 1.
+ sub r1, r0, r2
+ bnei r2, 1, tr0
+
+sub3:
+ # 0 - 1 = -1.
+ sub r0, r1, r2
+ addi r2, 1, r2
+ bnei r2, 0, tr0
+
+sub4:
+ # 5 - 2 = 3.
+ movi 5, r0
+ movi 2, r1
+ sub r0, r1, r2
+ bnei r2, 3, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/subl.cgs b/sim/testsuite/sim/sh64/media/subl.cgs
new file mode 100644
index 00000000000..98abe59f666
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/subl.cgs
@@ -0,0 +1,38 @@
+# sh testcase for sub.l $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+
+init:
+ pta wrong, tr0
+
+subl1:
+ # Test that the top 32 bits are ignored.
+ movi 1, r0
+ shlli r0, 32, r0
+ ori r0, 7, r0
+
+ movi 1, r1
+ shlli r1, 32, r1
+ ori r1, 2, r1
+
+ sub.l r0, r1, r2
+ bnei r2, 5, tr0
+
+subl2:
+ # Test that 0 - 1 is sign extended.
+ movi 0, r0
+ movi 1, r1
+ sub.l r0, r1, r2
+ addi r2, 1, r2
+ bnei r2, 0, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/media/swapq.cgs b/sim/testsuite/sim/sh64/media/swapq.cgs
new file mode 100644
index 00000000000..6f168b1ff48
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/swapq.cgs
@@ -0,0 +1,36 @@
+# sh testcase for swap.q $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ movi 10, r0
+ shlli r0, 8, r0
+ ori r0, 20, r0
+ shlli r0, 8, r0
+ ori r0, 30, r0
+ shlli r0, 8, r0
+ ori r0, 40, r0
+ shlli r0, 8, r0
+ ori r0, 50, r0
+ shlli r0, 8, r0
+ ori r0, 60, r0
+ shlli r0, 8, r0
+ ori r0, 70, r0
+ shlli r0, 8, r0
+ ori r0, 80, r0
+
+ # Set up two address operands.
+
+ movi 40, r1
+ shlli r1, 8, r1
+ movi 8, r2
+
+swapq:
+ swap.q r1, r2, r0
+
+okay:
+ pass
diff --git a/sim/testsuite/sim/sh64/media/synci.cgs b/sim/testsuite/sim/sh64/media/synci.cgs
new file mode 100644
index 00000000000..65e06213a50
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/synci.cgs
@@ -0,0 +1,10 @@
+# sh testcase for synci -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ synci
+ pass
diff --git a/sim/testsuite/sim/sh64/media/synco.cgs b/sim/testsuite/sim/sh64/media/synco.cgs
new file mode 100644
index 00000000000..2db6df343d4
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/synco.cgs
@@ -0,0 +1,10 @@
+# sh testcase for synco -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ synco
+ pass
diff --git a/sim/testsuite/sim/sh64/media/testutils.inc b/sim/testsuite/sim/sh64/media/testutils.inc
new file mode 100644
index 00000000000..d3b383a1efb
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/testutils.inc
@@ -0,0 +1,51 @@
+# Support macros for the assembly test cases.
+
+ .macro start
+ .text
+ .global start
+start:
+ .endm
+
+ .macro pass
+ movi 253, r0
+ trapa r0
+ .endm
+
+ .macro fail
+ movi 254, r0
+ trapa r0
+ .endm
+
+ .macro _packb v1 v2 v3 v4 v5 v6 v7 v8 reg
+ movi \v1, \reg
+ shlli \reg, 8, \reg
+ addi \reg, \v2, \reg
+ shlli \reg, 8, \reg
+ addi \reg, \v3, \reg
+ shlli \reg, 8, \reg
+ addi \reg, \v4, \reg
+ shlli \reg, 8, \reg
+ addi \reg, \v5, \reg
+ shlli \reg, 8, \reg
+ addi \reg, \v6, \reg
+ shlli \reg, 8, \reg
+ addi \reg, \v7, \reg
+ shlli \reg, 8, \reg
+ addi \reg, \v8, \reg
+ .endm
+
+ .macro _packw v1 v2 v3 v4 reg
+ movi \v1, \reg
+ shlli \reg, 16, \reg
+ addi \reg, \v2, \reg
+ shlli \reg, 16, \reg
+ addi \reg, \v3, \reg
+ shlli \reg, 16, \reg
+ addi \reg, \v4, \reg
+ .endm
+
+ .macro _packl v1 v2 reg
+ movi \v1, \reg
+ shlli \reg, 32, \reg
+ addi \reg, \v2, \reg
+ .endm
diff --git a/sim/testsuite/sim/sh64/media/trapa.cgs b/sim/testsuite/sim/sh64/media/trapa.cgs
new file mode 100644
index 00000000000..c961bac73ba
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/trapa.cgs
@@ -0,0 +1,11 @@
+# sh testcase for trapa $rm -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+ # This performs a trap to emit "pass".
+ movi 253, r0
+ trapa r0
diff --git a/sim/testsuite/sim/sh64/media/xor.cgs b/sim/testsuite/sim/sh64/media/xor.cgs
new file mode 100644
index 00000000000..80278f0a3e0
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/xor.cgs
@@ -0,0 +1,54 @@
+# sh testcase for xor $rm, $rn, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+xor1:
+ # 0 xor 0 = 0.
+ movi 0, r0
+ movi 0, r1
+ xor r0, r1, r2
+ bnei r2, 0, tr0
+
+xor2:
+ # 0 xor 1 = 1.
+ movi 0, r0
+ movi 1, r1
+ xor r0, r1, r2
+ bnei r2, 1, tr0
+
+xor3:
+ # 1 xor 0 = 1.
+ movi 1, r0
+ movi 0, r1
+ xor r0, r1, r2
+ bnei r2, 1, tr0
+
+xor4:
+ # 1 xor 1 = 0.
+ movi 1, r0
+ movi 1, r1
+ xor r0, r1, r2
+ bnei r2, 0, tr0
+
+xor5:
+ movi 1, r0
+ shlli r0, 63, r0
+ ori r0, 1, r0
+ movi 3, r1
+ xor r0, r1, r2
+ andi r2, 255, r2
+ bnei r2, 2, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
+
diff --git a/sim/testsuite/sim/sh64/media/xori.cgs b/sim/testsuite/sim/sh64/media/xori.cgs
new file mode 100644
index 00000000000..0d4d96a779d
--- /dev/null
+++ b/sim/testsuite/sim/sh64/media/xori.cgs
@@ -0,0 +1,48 @@
+# sh testcase for xori $rm, $imm6, $rd -*- Asm -*-
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+ .include "media/testutils.inc"
+
+ start
+init:
+ pta wrong, tr0
+
+xori1:
+ # 0 xor 0 = 0.
+ movi 0, r0
+ xori r0, 0, r2
+ bnei r2, 0, tr0
+
+xori2:
+ # 0 xor 1 = 1.
+ movi 0, r0
+ xori r0, 1, r2
+ bnei r2, 1, tr0
+
+xori3:
+ # 1 xor 0 = 1.
+ movi 1, r0
+ xori r0, 0, r2
+ bnei r2, 1, tr0
+
+xori4:
+ # 1 xor 1 = 0.
+ movi 1, r0
+ xori r0, 1, r2
+ bnei r2, 0, tr0
+
+xori5:
+ movi 1, r0
+ shlli r0, 63, r0
+ ori r0, 1, r0
+ xori r0, 3, r2
+ andi r2, 255, r2
+ bnei r2, 2, tr0
+
+okay:
+ pass
+
+wrong:
+ fail
diff --git a/sim/testsuite/sim/sh64/misc/fr-dr.s b/sim/testsuite/sim/sh64/misc/fr-dr.s
new file mode 100644
index 00000000000..52f0e136638
--- /dev/null
+++ b/sim/testsuite/sim/sh64/misc/fr-dr.s
@@ -0,0 +1,22 @@
+# sh testcase for floating point register shared state (see below).
+# mach: all
+# as: -isa=shmedia
+# ld: -m shelf64
+
+# (fr, dr, fp, fv amd mtrx provide different views of the same architecrual state).
+# Hitachi SH-5 CPU volume 1, p. 15.
+
+ .include "media/testutils.inc"
+
+ start
+
+ movi 42, r0
+ fmov.ls r0, fr12
+ # save this reg.
+ fmov.s fr12, fr14
+
+ movi 42, r0
+ fmov.qd r0, dr12
+
+okay:
+ pass